211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
char *arg;
FILE *in = fopen(argv[1], "r");
if( in==0 ){
fprintf(stderr,"can not open %s\n", argv[1]);
exit(1);
}
zInFile = argv[1];
printf("#line 1 \"");
for(arg=argv[1]; *arg; arg++){
if( *arg!='\\' ){
printf("%c", *arg);
}else{
printf("\\\\");
}
}
printf("\"\n");
trans(in, stdout);
fclose(in);
}else{
trans(stdin, stdout);
}
return 0;
}
|
>
>
>
>
>
>
>
>
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
char *arg;
FILE *in = fopen(argv[1], "r");
if( in==0 ){
fprintf(stderr,"can not open %s\n", argv[1]);
exit(1);
}
zInFile = argv[1];
#ifndef FOSSIL_DEBUG
/* Set source line reference to the original source file.
* This makes compiler show the original file name in the compile error
* messages, instead of referring to the translated file.
* NOTE: This somewhat complicates stepping in debugger, as the resuling
* code would not match the referenced sources.
*/
printf("#line 1 \"");
for(arg=argv[1]; *arg; arg++){
if( *arg!='\\' ){
printf("%c", *arg);
}else{
printf("\\\\");
}
}
printf("\"\n");
#endif
trans(in, stdout);
fclose(in);
}else{
trans(stdin, stdout);
}
return 0;
}
|