21 else printf(
"overflow: %d\n",
l);
27 memset(
line_buf[fn],0,1000*
sizeof(
int));
52 s=fgets(line,500,fi);ln++;
55 fprintf(fo,
"%4d + %s",ln,line);
57 fprintf(fo,
"%4d %s",ln,line);
73int main(
int argc,
char** argv)
76 f=fopen(
"smon.out",
"r");
77 if(
f==
NULL) { printf(
"cannot read smon.out\n");
return 2; }
81 if ((strncmp(
buf,
"STDIN",5)!=0)
82 && (strncmp(
buf,
"(none)",6)!=0)
83 && (strncmp(
buf,
"::",2)!=0))
89 while((
buf[
i]!=
':')&&(
i<200))
i++;
92 while ((
buf[
i]!=
' ')&&(
i<200))
i++;
93 sscanf(
buf+
i,
"%d",&line_no);
100 printf(
"new file:%s\n",
buf);
108 printf(
"----- all read\n");
113 printf(
"File %s =============================\n",
file_names[
i]);
const CanonicalForm int s
void add_line(int fn, int l)
VAR int * line_buf[NUM_FILES]
void add_fn(int fn, char *b)
VAR char * file_names[NUM_FILES]