#include #include #include FILE *fr, *fw; int lineno; void print_error(char *fmt,...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr,"\n"); exit(-1); } char *skip_space(char *s) { while ((*s==' ' || *s=='\t') && *s) s++; return s; } char *to_space(char *s) { while (*s!=' ' && *s!='\t' && *s) s++; return s; } void del_nl_space(char *s) { char *t; int len=strlen(s); if (!*s) return; t=s+len-1; while ( (*t=='\n' || *t==' ' || *t=='\t' )&& s \n"); exit (0); } fp = fopen (argv[1], "rt"); fr = fp; fpOut = fopen (argv[2], "wt"); while (get_line (buf) == 1) { del_enter (buf); cmd_arg(buf, &cmd, &arg); SpliteLineCode (cmd, arg, fpOut); } fclose (fp); fclose (fpOut); }