Fossil

Check-in [ae965ddf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Ensure correct file name on compile errors in translated sources. This helps avoid editing the generated file with vim "quickfix".
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | steveb-fixes
Files: files | file ages | folders
SHA1:ae965ddf5dd8142f296f250f8dfe4a8a1624ddb2
User & Date: steveb 2011-11-04 18:49:41
Context
2011-11-04
18:57
Fix html escaping of TH1 variables. Escaping should be determined by $ or $a form, but instead it was based on the relationship between the length of the variable name and the length of the value. Closed-Leaf check-in: d81e2176 user: steveb tags: steveb-fixes
18:49
Ensure correct file name on compile errors in translated sources. This helps avoid editing the generated file with vim "quickfix". check-in: ae965ddf user: steveb tags: steveb-fixes
17:59
Remove the "commands" command and replace it with --all, --aux, and --test options to the "help" command. check-in: d6a93abf user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/translate.c.

163
164
165
166
167
168
169

170
171
172
173
174
175
176
int main(int argc, char **argv){
  if( argc==2 ){
    FILE *in = fopen(argv[1], "r");
    if( in==0 ){
      fprintf(stderr,"can not open %s\n", argv[1]);
      exit(1);
    }

    trans(in, stdout);
    fclose(in);
  }else{
    trans(stdin, stdout);
  }
  return 0;
}







>







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
int main(int argc, char **argv){
  if( argc==2 ){
    FILE *in = fopen(argv[1], "r");
    if( in==0 ){
      fprintf(stderr,"can not open %s\n", argv[1]);
      exit(1);
    }
    printf("#line 1 \"%s\"\n", argv[1]);
    trans(in, stdout);
    fclose(in);
  }else{
    trans(stdin, stdout);
  }
  return 0;
}