cpplib.c: Kill define of STDC_VALUE.

1999-02-18 18:32 -0500  Zack Weinberg  <zack@rabi.columbia.edu>
	* cpplib.c: Kill define of STDC_VALUE.  Don't include output.h
          or prefix.h. Change CPP_IS_MACRO_BUFFER to not refer to
          macro_cleanup.
	  (GET_ENV_PATH_LIST, PATH_SEPARATOR, STANDARD_INCLUDE_DIR,
          predefs, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
          CPP_WCHAR_TYPE, USER_LABEL_PREFIX, REGISTER_PREFIX, struct
          cpp_pending, version_string, struct default_include,
          include_defaults_array, path_include, cpp_options_init,
          dump_special_to_buffer, initialize_builtins, cpp_start_read,
          cpp_reader_init, nreverse_pending, push_pending, print_help,
          cpp_handle_option, cpp_handle_options, cpp_finish,
          cpp_cleanup): Move to cppinit.c.
	  (macro_cleanup, struct arglist, collect_expansion,
	  create_definition, compare_defs, comp_def_part, ARG_BASE,
	  struct argdata, macarg, change_newlines, timestamp,
	  monthnames, special_symbol, unsafe_chars, macroexpand,
	  push_macro_expansion): Move to cpphash.c.
	  (quote_string, check_macro_name, cpp_expand_to_buffer,
	  output_line_command, cpp_undef): Export.
	  (null_underflow, null_cleanup, handle_directive): Make static.
	* cpplib.h: Prototype now-exported functions.  Adjust decls of
          syntax tables so we can include cpplib.h in cppinit.c.
	* cpphash.h: Prototype all functions exported by cpphash.c.
	* cppinit.c: Make syntax tables initialized data if possible
          (uses GCC designated-initializer extension).
	* cppexp.c:  Make cpp_lex static.
	* Makefile.in: Move -D switches for the various include dirs
          from cpplib.o rule to cppinit.o rule.  Adjust dependencies.

From-SVN: r25287
This commit is contained in:
Zack Weinberg 1999-02-18 15:35:49 +00:00 committed by Zack Weinberg
parent 43c5ec700f
commit 6de1e2a978
8 changed files with 3160 additions and 2974 deletions

View File

@ -1,3 +1,35 @@
1999-02-18 18:32 -0500 Zack Weinberg <zack@rabi.columbia.edu>
* cpplib.c: Kill define of STDC_VALUE. Don't include output.h
or prefix.h. Change CPP_IS_MACRO_BUFFER to not refer to
macro_cleanup.
(GET_ENV_PATH_LIST, PATH_SEPARATOR, STANDARD_INCLUDE_DIR,
predefs, SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE,
CPP_WCHAR_TYPE, USER_LABEL_PREFIX, REGISTER_PREFIX, struct
cpp_pending, version_string, struct default_include,
include_defaults_array, path_include, cpp_options_init,
dump_special_to_buffer, initialize_builtins, cpp_start_read,
cpp_reader_init, nreverse_pending, push_pending, print_help,
cpp_handle_option, cpp_handle_options, cpp_finish,
cpp_cleanup): Move to cppinit.c.
(macro_cleanup, struct arglist, collect_expansion,
create_definition, compare_defs, comp_def_part, ARG_BASE,
struct argdata, macarg, change_newlines, timestamp,
monthnames, special_symbol, unsafe_chars, macroexpand,
push_macro_expansion): Move to cpphash.c.
(quote_string, check_macro_name, cpp_expand_to_buffer,
output_line_command, cpp_undef): Export.
(null_underflow, null_cleanup, handle_directive): Make static.
* cpplib.h: Prototype now-exported functions. Adjust decls of
syntax tables so we can include cpplib.h in cppinit.c.
* cpphash.h: Prototype all functions exported by cpphash.c.
* cppinit.c: Make syntax tables initialized data if possible
(uses GCC designated-initializer extension).
* cppexp.c: Make cpp_lex static.
* Makefile.in: Move -D switches for the various include dirs
from cpplib.o rule to cppinit.o rule. Adjust dependencies.
Thu Feb 18 13:15:56 1999 Marc Espie <espie@cvs.openbsd.org>
* alpha/openbsd.h: New file.

View File

@ -1970,23 +1970,23 @@ cppmain$(exeext): cppmain.o libcpp.a $(LIBDEPS)
cppmain.o: cppmain.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h \
prefix.h output.h Makefile
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
cpplib.o: cpplib.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h
cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h
cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h \
cpphash.h prefix.h output.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-c `echo $(srcdir)/cpplib.c | sed 's,^\./,,'`
cppulp.o: cppulp.c $(CONFIG_H) system.h output.h
cpphash.o: cpphash.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h cpphash.h
cppalloc.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cpperror.o: cpperror.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppexp.o: cppexp.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppfiles.o: cppfiles.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h machmode.h system.h
-c `echo $(srcdir)/cppinit.c | sed 's,^\./,,'`
# Note for the stamp targets, we run the program `true' instead of
# having an empty command (nothing following the semicolon).

View File

@ -376,7 +376,7 @@ static struct token tokentab2[] = {
/* Read one token. */
struct operation
static struct operation
cpp_lex (pfile, skip_evaluation)
cpp_reader *pfile;
int skip_evaluation;

File diff suppressed because it is too large Load Diff

View File

@ -53,3 +53,10 @@ extern HASHNODE *install PARAMS ((U_CHAR *, int, enum node_type,
const char *, int));
extern int hashf PARAMS ((const U_CHAR *, int, int));
extern void delete_macro PARAMS ((HASHNODE *));
extern MACRODEF create_definition PARAMS ((U_CHAR *, U_CHAR *,
cpp_reader *, int));
extern int compare_defs PARAMS ((cpp_reader *, DEFINITION *,
DEFINITION *));
extern void macroexpand PARAMS ((cpp_reader *, HASHNODE *));
extern void cpp_hash_cleanup PARAMS ((cpp_reader *));

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -637,11 +637,19 @@ struct definition {
} args;
};
extern const unsigned char is_idstart[256];
extern const unsigned char is_idchar[256];
extern const unsigned char is_hor_space[256];
extern const unsigned char is_space[256];
extern const unsigned char trigraph_table[256];
/* These tables are not really `const', but they are only modified at
initialization time, in a separate translation unit from the rest
of the library. We let the rest of the library think they are `const'
to get better code and some additional sanity checks. */
#ifndef FAKE_CONST
#define FAKE_CONST const
#endif
extern FAKE_CONST unsigned char is_idstart[256];
extern FAKE_CONST unsigned char is_idchar[256];
extern FAKE_CONST unsigned char is_hor_space[256];
extern FAKE_CONST unsigned char is_space[256];
extern FAKE_CONST unsigned char trigraph_table[256];
#undef FAKE_CONST
/* Stack of conditionals currently in progress
(including both successful and failing conditionals). */
@ -667,8 +675,9 @@ typedef struct if_stack IF_STACK_FRAME;
extern void cpp_buf_line_and_col PARAMS((cpp_buffer *, long *, long *));
extern cpp_buffer* cpp_file_buffer PARAMS((cpp_reader *));
extern void cpp_define PARAMS ((cpp_reader*, unsigned char *));
extern void cpp_define PARAMS ((cpp_reader *, unsigned char *));
extern void cpp_assert PARAMS ((cpp_reader *, unsigned char *));
extern void cpp_undef PARAMS ((cpp_reader *, unsigned char *));
extern void cpp_error PVPROTO ((cpp_reader *, const char *, ...))
ATTRIBUTE_PRINTF_2;
@ -705,6 +714,16 @@ extern int scan_decls PARAMS ((cpp_reader *, int, char **));
extern void skip_rest_of_line PARAMS ((cpp_reader *));
extern void cpp_finish PARAMS ((cpp_reader *));
extern void quote_string PARAMS ((cpp_reader *, const char *));
extern void cpp_expand_to_buffer PARAMS ((cpp_reader *, U_CHAR *, int));
extern void cpp_scan_buffer PARAMS ((cpp_reader *));
extern int check_macro_name PARAMS ((cpp_reader *, U_CHAR *, int));
/* Last arg to output_line_command. */
enum file_change_code {same_file, enter_file, leave_file};
extern void output_line_command PARAMS ((cpp_reader *, int,
enum file_change_code));
/* From cpperror.c */
extern void cpp_fatal PVPROTO ((cpp_reader *, const char *, ...))
ATTRIBUTE_PRINTF_2;
@ -729,9 +748,6 @@ extern int finclude PROTO ((cpp_reader *, int,
extern void deps_output PROTO ((cpp_reader *, char *, int));
extern struct include_hash *include_hash PROTO ((cpp_reader *, char *, int));
/* cppinit.c */
extern void initialize_char_syntax PROTO ((int));
#ifndef INCLUDE_LEN_FUDGE
#define INCLUDE_LEN_FUDGE 0
#endif