- void (*line_change) PARAMS ((cpp_reader *, const cpp_token *, int));
- void (*file_change) PARAMS ((cpp_reader *, const struct line_map *));
- void (*include) PARAMS ((cpp_reader *, unsigned int,
- const unsigned char *, const cpp_token *));
- void (*define) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
- void (*undef) PARAMS ((cpp_reader *, unsigned int, cpp_hashnode *));
- void (*ident) PARAMS ((cpp_reader *, unsigned int, const cpp_string *));
- void (*def_pragma) PARAMS ((cpp_reader *, unsigned int));
- /* Called when the client has a chance to properly register
- built-ins with cpp_define() and cpp_assert(). */
- void (*register_builtins) PARAMS ((cpp_reader *));
+ void (*line_change) (cpp_reader *, const cpp_token *, int);
+
+ /* Called when switching to/from a new file.
+ The line_map is for the new file. It is NULL if there is no new file.
+ (In C this happens when done with <built-in>+<command line> and also
+ when done with a main file.) This can be used for resource cleanup. */
+ void (*file_change) (cpp_reader *, const struct line_map *);
+
+ void (*dir_change) (cpp_reader *, const char *);
+ void (*include) (cpp_reader *, unsigned int, const unsigned char *,
+ const char *, int);
+ void (*define) (cpp_reader *, unsigned int, cpp_hashnode *);
+ void (*undef) (cpp_reader *, unsigned int, cpp_hashnode *);
+ void (*ident) (cpp_reader *, unsigned int, const cpp_string *);
+ void (*def_pragma) (cpp_reader *, unsigned int);
+ int (*valid_pch) (cpp_reader *, const char *, int);
+ void (*read_pch) (cpp_reader *, const char *, int, const char *);
+ missing_header_cb missing_header;
+};
+
+/* Chain of directories to look for include files in. */
+struct cpp_dir
+{
+ /* NULL-terminated singly-linked list. */
+ struct cpp_dir *next;
+
+ /* NAME of the directory, NUL-terminated. */
+ char *name;
+ unsigned int len;
+
+ /* One if a system header, two if a system header that has extern
+ "C" guards for C++. */
+ unsigned char sysp;
+
+ /* Mapping of file names for this directory for MS-DOS and related
+ platforms. A NULL-terminated array of (from, to) pairs. */
+ const char **name_map;
+
+ /* Routine to construct pathname, given the search path name and the
+ HEADER we are trying to find, return a constructed pathname to
+ try and open. If this is NULL, the constructed pathname is as
+ constructed by append_file_to_dir. */
+ char *(*construct) (const char *header, cpp_dir *dir);
+
+ /* The C front end uses these to recognize duplicated
+ directories in the search path. */
+ ino_t ino;
+ dev_t dev;