diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-25 04:31:36 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-25 04:31:36 +0000 |
commit | 4e7e6f15e849990633e877cce94540c1a531d686 (patch) | |
tree | 8b982e223f4721c2187f7ec9758aa6219831a306 | |
parent | 9b140c6734529939790cf1f5f1fce749eedad30c (diff) | |
download | ATCD-4e7e6f15e849990633e877cce94540c1a531d686.tar.gz |
ChangeLogTag:Fri Jul 24 21:44:09 1998 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLog-98c | 4 | ||||
-rw-r--r-- | TAO/TAO_IDL/driver/drv_preproc.cpp | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 502da970378..2572ea32f17 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -45,6 +45,10 @@ Fri Jul 24 21:44:09 1998 Carlos O'Ryan <coryan@cs.wustl.edu> Some IDL files include others, we need to add an explicit dependency in those cases. + * TAO_IDL/driver/drv_preproc.cpp: + Added a #lineno "filename" directive to the temporary files, so + the IDL compiler can generate better error messages. + Fri Jul 24 17:00:09 1998 David L. Levine <levine@cs.wustl.edu> * orbsvcs/orbsvcs/Event/Dispatching_Modules.cpp (open_queue): diff --git a/TAO/TAO_IDL/driver/drv_preproc.cpp b/TAO/TAO_IDL/driver/drv_preproc.cpp index ed4eed915a5..ebb22fbef47 100644 --- a/TAO/TAO_IDL/driver/drv_preproc.cpp +++ b/TAO/TAO_IDL/driver/drv_preproc.cpp @@ -162,7 +162,7 @@ DRV_get_line(FILE *f) * Copy from stdin to a file */ static void -DRV_copy_input(FILE *fin, char *fn) +DRV_copy_input(FILE *fin, char *fn, const char *orig_filename) { FILE *f = fopen(fn, "w"); @@ -178,6 +178,7 @@ DRV_copy_input(FILE *fin, char *fn) << GTDEVEL(": cannot open input file\n"); exit(99); } + fprintf (f, "#1 \"%s\"\n", orig_filename); while (DRV_get_line(fin)) fprintf(f, "%s\n", drv_line); fclose(f); @@ -249,11 +250,11 @@ DRV_pre_proc(char *myfile) (*DRV_FE_new_UTL_String)(DRV_stripped_name(tmp_ifile)) ); idl_global->set_real_filename((*DRV_FE_new_UTL_String)(tmp_ifile)); - DRV_copy_input(stdin, tmp_ifile); + DRV_copy_input(stdin, tmp_ifile, "standard input"); idl_global->set_read_from_stdin(I_TRUE); } else { FILE *fd = fopen(myfile, "r"); - DRV_copy_input(fd, tmp_ifile); + DRV_copy_input(fd, tmp_ifile, myfile); fclose(fd); idl_global->set_read_from_stdin(I_FALSE); idl_global->set_filename((*DRV_FE_new_UTL_String)(myfile)); |