Commit 656ac110 by Alexandre Oliva Committed by Alexandre Oliva

cpplib.h (enum file_change_code): Added rename_file.

* cpplib.h (enum file_change_code): Added rename_file.
* cpplib.c (do_line): If a filename is given, set file_change to
rename_file.
(output_line_command): If file_change is rename_file, always
output a # directive with the file name.

From-SVN: r32215
parent 6aede567
2000-02-27 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* cpplib.h (enum file_change_code): Added rename_file.
* cpplib.c (do_line): If a filename is given, set file_change to
rename_file.
(output_line_command): If file_change is rename_file, always
output a # directive with the file name.
* cpplib.c (do_pragma): Accept #pragma without consecutive token.
2000-02-26 Mark Mitchell <mark@codesourcery.com>
......
......@@ -965,7 +965,7 @@ output_line_command (pfile, file_change)
CPP_ADJUST_WRITTEN (pfile, strlen (CPP_PWRITTEN (pfile)));
quote_string (pfile, ip->nominal_fname);
if (file_change != same_file)
if (file_change != same_file && file_change != rename_file)
{
CPP_PUTC_Q (pfile, ' ');
CPP_PUTC_Q (pfile, file_change == enter_file ? '1' : '2');
......@@ -1358,6 +1358,8 @@ do_line (pfile, keyword)
U_CHAR *end_name = CPP_PWRITTEN (pfile) - 1;
int action_number = 0;
file_change = rename_file;
if (read_line_number (pfile, &action_number))
{
if (CPP_PEDANTIC (pfile))
......
......@@ -699,7 +699,7 @@ extern void cpp_scan_buffer PARAMS ((cpp_reader *));
extern int check_macro_name PARAMS ((cpp_reader *, const U_CHAR *));
/* Last arg to output_line_command. */
enum file_change_code {same_file, enter_file, leave_file};
enum file_change_code {same_file, rename_file, enter_file, leave_file};
extern void output_line_command PARAMS ((cpp_reader *,
enum file_change_code));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment