aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.h
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-04-14 23:29:45 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-04-14 23:29:45 +0000
commitf2d5f0cca244fc70acb45fbe557bd22411175f1b (patch)
treec91bee0467728e26a3ab2b06fce2d27db8e99983 /gcc/cpphash.h
parent362c63a5e8b5aacfff3e5af0911e42ba7c775042 (diff)
downloadgcc-f2d5f0cca244fc70acb45fbe557bd22411175f1b.zip
gcc-f2d5f0cca244fc70acb45fbe557bd22411175f1b.tar.gz
gcc-f2d5f0cca244fc70acb45fbe557bd22411175f1b.tar.bz2
cpplex.c (cpp_output_tokens, [...]): New public interfaces.
* cpplex.c (cpp_output_tokens, cpp_scan_buffer_nooutput): New public interfaces. (safe_fwrite, output_line_command): New static functions. (cpp_expand_to_buffer): Now private to cpplib. (cpp_scan_buffer): Take a printer. * cpphash.h: Update prototypes. * cpplib.h: Update prototypes. (cpp_printer): New. (cpp_buffer): Remove last_nominal_fname. (cpp_reader): Remove lineno. * cppmain.c: Use a cpp_printer. * fix-header.c: No need to inhibit line commands. Call cpp_start_read with no printer. * cpperror.c (cpp_notice_from_errno): Provide default name. * cppfiles.c (make_IHASH, _cpp_fake_ihash): New functions. (find_include_file, cpp_read_file): Use make_IHASH. (file_cleanup): Set control_macro and clear input_stack_listing_current here. (_cpp_execute_include): Don't output entering-file marker. * cpphash.c (special_symbol): Look for the line number in the buffer, not the reader. (_cpp_macroexpand): No need to disable line commands. (_cpp_dump_definition): No need to generate line commands. (dump_hash_helper): Remove excess newline from output. * cppinit.c (dump_special_to_buffer): No need to generate line commands. (cpp_printer_init): New. (cpp_start_read): Take a printer, and start it up if it's not NULL. No need to generate line commands. (cpp_finish): Expect no buffers stacked at all. Take a printer argument, and flush the output buffer if it's not NULL. * cpplex.c (_cpp_lex_token): Return EOF if there's no buffer. Don't put two hashes at the beginning of an assertion. (cpp_get_token): Don't increment pfile->lineno or emit line commands here. Return EOF if there's no buffer when we get EOF. * cpplib.c (do_define, skip_if_group): No need to disable line commands. (_cpp_output_line_command): Delete function. (do_line): Don't emit line commands here, but set things up so they will be emitted if necessary. Use _cpp_fake_ihash to make unique nominal_fnames if necessary. (do_elif, do_else, _cpp_handle_eof): Call cpp_error_with_line with 0 for column, not -1. (_cpp_handle_eof): Don't set the control macro here. Don't clear input_stack_listing_current here. Don't emit line commands. From-SVN: r33159
Diffstat (limited to 'gcc/cpphash.h')
-rw-r--r--gcc/cpphash.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/cpphash.h b/gcc/cpphash.h
index a23aa87..99e45fb 100644
--- a/gcc/cpphash.h
+++ b/gcc/cpphash.h
@@ -263,9 +263,6 @@ extern unsigned char _cpp_IStable[256];
#define ADJACENT_TO_MARK(PFILE) \
(CPP_BUFFER(PFILE)->cur - CPP_BUFFER(PFILE)->mark == 1)
-/* Last arg to output_line_command. */
-enum file_change_code {same_file, rename_file, enter_file, leave_file};
-
/* In cpphash.c */
extern HASHNODE *_cpp_make_hashnode PARAMS ((const U_CHAR *, size_t,
enum node_type,
@@ -293,6 +290,7 @@ extern void _cpp_execute_include PARAMS ((cpp_reader *, char *,
unsigned int, int,
struct file_name_list *));
extern void _cpp_init_include_hash PARAMS ((cpp_reader *));
+extern const char *_cpp_fake_ihash PARAMS ((cpp_reader *, const char *));
/* In cppexp.c */
extern int _cpp_parse_expr PARAMS ((cpp_reader *));
@@ -301,6 +299,8 @@ extern int _cpp_parse_expr PARAMS ((cpp_reader *));
extern void _cpp_parse_name PARAMS ((cpp_reader *, int));
extern void _cpp_skip_rest_of_line PARAMS ((cpp_reader *));
extern void _cpp_skip_hspace PARAMS ((cpp_reader *));
+extern void _cpp_expand_to_buffer PARAMS ((cpp_reader *,
+ const unsigned char *, int));
extern int _cpp_parse_assertion PARAMS ((cpp_reader *));
extern enum cpp_ttype _cpp_lex_token PARAMS ((cpp_reader *));
extern long _cpp_read_and_prescan PARAMS ((cpp_reader *, cpp_buffer *,
@@ -315,8 +315,5 @@ extern enum cpp_ttype _cpp_get_define_token
/* In cpplib.c */
extern int _cpp_handle_directive PARAMS ((cpp_reader *));
extern void _cpp_handle_eof PARAMS ((cpp_reader *));
-extern void _cpp_output_line_command PARAMS ((cpp_reader *,
- enum file_change_code));
-
#endif