From 0846f581e81ccd73ea43f2a1dc73fd79ffc86b75 Mon Sep 17 00:00:00 2001 From: Pascal Bart Date: Fri, 19 Oct 2001 11:03:50 +0000 Subject: [PATCH] * src/conflicts.c: Move global variables rrc_total and src_total ... (print_conflicts): here. * src/output.c (output): Free global variable user_toknums. * src/lex.c (token_obstack): Become static. --- ChangeLog | 7 ++ config.hin | 292 ++++++++++++++++++++++++++++++++++++++++++++++++ src/conflicts.c | 4 +- src/lex.c | 2 +- src/output.c | 1 + 5 files changed, 303 insertions(+), 3 deletions(-) create mode 100644 config.hin diff --git a/ChangeLog b/ChangeLog index a033a1d1..53f64090 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-10-19 Pascal Bart + + * src/conflicts.c: Move global variables rrc_total and src_total ... + (print_conflicts): here. + * src/output.c (output): Free global variable user_toknums. + * src/lex.c (token_obstack): Become static. + 2001-10-18 Akim Demaille * tests/atlocal.in (GCC): Add. diff --git a/config.hin b/config.hin new file mode 100644 index 00000000..5181d21f --- /dev/null +++ b/config.hin @@ -0,0 +1,292 @@ +/* config.hin. Generated from configure.in by autoheader. */ + +/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ +#undef CRAY_STACKSEG_END + +/* Define if using `alloca.c'. */ +#undef C_ALLOCA + +/* Define to 1 if translation of program messages to the user's native + language is requested. */ +#undef ENABLE_NLS + +/* Define if you have `alloca', as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_CTYPE_H + +/* Define if backslash-a works in C strings. */ +#undef HAVE_C_BACKSLASH_A + +/* Define if you have the `dcgettext' function. */ +#undef HAVE_DCGETTEXT + +/* Define to 1 if you have the declaration of `memchr', and to 0 if you don't. + */ +#undef HAVE_DECL_MEMCHR + +/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. + */ +#undef HAVE_DECL_STPCPY + +/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ +#undef HAVE_DECL_STRERROR_R + +/* Define to 1 if you have the declaration of `strndup', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNDUP + +/* Define to 1 if you have the declaration of `strnlen', and to 0 if you + don't. */ +#undef HAVE_DECL_STRNLEN + +/* Define if the malloc check has been performed. */ +#undef HAVE_DONE_WORKING_MALLOC_CHECK + +/* Define if the realloc check has been performed. */ +#undef HAVE_DONE_WORKING_REALLOC_CHECK + +/* Define if you have the `doprnt' function. */ +#undef HAVE_DOPRNT + +/* Define if you have the `feof_unlocked' function. */ +#undef HAVE_FEOF_UNLOCKED + +/* Define if you have the `fgets_unlocked' function. */ +#undef HAVE_FGETS_UNLOCKED + +/* Define if you have the `getcwd' function. */ +#undef HAVE_GETCWD + +/* Define if you have the `getegid' function. */ +#undef HAVE_GETEGID + +/* Define if you have the `geteuid' function. */ +#undef HAVE_GETEUID + +/* Define if you have the `getgid' function. */ +#undef HAVE_GETGID + +/* Define if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define if the GNU gettext() function is already present or preinstalled. */ +#undef HAVE_GETTEXT + +/* Define if you have the `getuid' function. */ +#undef HAVE_GETUID + +/* Define if you have the iconv() function. */ +#undef HAVE_ICONV + +/* Define if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define if you have the `isascii' function. */ +#undef HAVE_ISASCII + +/* Define if you have the `iswprint' function. */ +#undef HAVE_ISWPRINT + +/* Define if you have and nl_langinfo(CODESET). */ +#undef HAVE_LANGINFO_CODESET + +/* Define if your file defines LC_MESSAGES. */ +#undef HAVE_LC_MESSAGES + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define to 1 if mbrtowc and mbstate_t are properly declared. */ +#undef HAVE_MBRTOWC + +/* Define if you have the `mbsinit' function. */ +#undef HAVE_MBSINIT + +/* Define if you have the `memchr' function. */ +#undef HAVE_MEMCHR + +/* Define if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define if you have the `mempcpy' function. */ +#undef HAVE_MEMPCPY + +/* Define if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define if you have the `munmap' function. */ +#undef HAVE_MUNMAP + +/* Define if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define if you have the `setenv' function. */ +#undef HAVE_SETENV + +/* Define if you have the `setlocale' function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the header file. */ +#undef HAVE_STDDEF_H + +/* Define if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define if you have the `stpcpy' function. */ +#undef HAVE_STPCPY + +/* Define if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define if you have the `strdup' function. */ +#undef HAVE_STRDUP + +/* Define if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define if you have the `strerror_r' function. */ +#undef HAVE_STRERROR_R + +/* Define if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the `strndup' function. */ +#undef HAVE_STRNDUP + +/* Define if you have the `strnlen' function. */ +#undef HAVE_STRNLEN + +/* Define if you have the `strspn' function. */ +#undef HAVE_STRSPN + +/* Define if you have the `strtoul' function. */ +#undef HAVE_STRTOUL + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the `tsearch' function. */ +#undef HAVE_TSEARCH + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the `vprintf' function. */ +#undef HAVE_VPRINTF + +/* Define if you have the header file. */ +#undef HAVE_WCHAR_H + +/* Define if you have the header file. */ +#undef HAVE_WCTYPE_H + +/* Define to 1 if `strerror_r' returns a string. */ +#undef HAVE_WORKING_STRERROR_R + +/* Define if you have the `__argz_count' function. */ +#undef HAVE___ARGZ_COUNT + +/* Define if you have the `__argz_next' function. */ +#undef HAVE___ARGZ_NEXT + +/* Define if you have the `__argz_stringify' function. */ +#undef HAVE___ARGZ_STRINGIFY + +/* Define as const if the declaration of iconv() needs const. */ +#undef ICONV_CONST + +/* Name of package */ +#undef PACKAGE + +/* Define if compiler has function prototypes */ +#undef PROTOTYPES + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Version number of package */ +#undef VERSION + +/* Define if using the dmalloc debugging malloc package */ +#undef WITH_DMALLOC + +/* Define to 1 for GNU C library extensions. */ +#undef _GNU_SOURCE + +/* Define if on MINIX. */ +#undef _MINIX + +/* Define if the system does not provide POSIX.1 features except with this + defined. */ +#undef _POSIX_1_SOURCE + +/* Define if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ +#undef inline + +/* Define to rpl_malloc if the replacement function should be used. */ +#undef malloc + +/* Define to a type if does not define. */ +#undef mbstate_t + +/* Define to `long' if does not define. */ +#undef off_t + +/* Define to rpl_realloc if the replacement function should be used. */ +#undef realloc + +/* Define to `unsigned' if does not define. */ +#undef size_t diff --git a/src/conflicts.c b/src/conflicts.c index 626db934..0f63f401 100644 --- a/src/conflicts.c +++ b/src/conflicts.c @@ -35,8 +35,6 @@ static char *conflicts = NULL; static unsigned *shiftset = NULL; static unsigned *lookaheadset = NULL; -static int src_total; -static int rrc_total; static int src_count; static int rrc_count; @@ -460,6 +458,8 @@ void print_conflicts (FILE *out) { int i; + int src_total; + int rrc_total; src_total = 0; rrc_total = 0; diff --git a/src/lex.c b/src/lex.c index 4eb8f313..65082a81 100644 --- a/src/lex.c +++ b/src/lex.c @@ -30,7 +30,7 @@ #include "quote.h" /* Buffer for storing the current token. */ -struct obstack token_obstack; +static struct obstack token_obstack; const char *token_buffer = NULL; bucket *symval; diff --git a/src/output.c b/src/output.c index 953f7017..a971af70 100644 --- a/src/output.c +++ b/src/output.c @@ -1108,6 +1108,7 @@ output (void) if (semantic_parser) output_stos (); output_rule_data (); + XFREE (user_toknums); output_actions (); #if 0 -- 2.45.2