flexdef.h (flex-2.6.3) | : | flexdef.h (flex-2.6.4) | ||
---|---|---|---|---|
skipping to change at line 60 | skipping to change at line 60 | |||
#ifdef HAVE_ASSERT_H | #ifdef HAVE_ASSERT_H | |||
#include <assert.h> | #include <assert.h> | |||
#else | #else | |||
#define assert(Pred) | #define assert(Pred) | |||
#endif | #endif | |||
#ifdef HAVE_LIMITS_H | #ifdef HAVE_LIMITS_H | |||
#include <limits.h> | #include <limits.h> | |||
#endif | #endif | |||
#ifdef HAVE_UNISTD_H | /* Required: dup() and dup2() in <unistd.h> */ | |||
#include <unistd.h> | #include <unistd.h> | |||
#endif | ||||
#ifdef HAVE_NETINET_IN_H | #ifdef HAVE_NETINET_IN_H | |||
#include <netinet/in.h> | #include <netinet/in.h> | |||
#endif | #endif | |||
#ifdef HAVE_SYS_PARAMS_H | #ifdef HAVE_SYS_PARAMS_H | |||
#include <sys/params.h> | #include <sys/params.h> | |||
#endif | #endif | |||
#ifdef HAVE_SYS_STAT_H | /* Required: stat() in <sys/stat.h> */ | |||
#include <sys/stat.h> | #include <sys/stat.h> | |||
#endif | /* Required: wait() in <sys/wait.h> */ | |||
#include <sys/wait.h> | #include <sys/wait.h> | |||
#include <stdbool.h> | #include <stdbool.h> | |||
#ifdef HAVE_REGEX_H | #include <stdarg.h> | |||
/* Required: regcomp(), regexec() and regerror() in <regex.h> */ | ||||
#include <regex.h> | #include <regex.h> | |||
#endif | /* Required: strcasecmp() in <strings.h> */ | |||
#include <strings.h> | ||||
#include "flexint.h" | #include "flexint.h" | |||
/* We use gettext. So, when we write strings which should be translated, we mark them with _() */ | /* We use gettext. So, when we write strings which should be translated, we mark them with _() */ | |||
#ifdef ENABLE_NLS | #ifdef ENABLE_NLS | |||
#ifdef HAVE_LOCALE_H | #ifdef HAVE_LOCALE_H | |||
#include <locale.h> | #include <locale.h> | |||
#endif /* HAVE_LOCALE_H */ | #endif /* HAVE_LOCALE_H */ | |||
#include "gettext.h" | #include "gettext.h" | |||
#define _(String) gettext (String) | #define _(String) gettext (String) | |||
#else | #else | |||
skipping to change at line 111 | skipping to change at line 112 | |||
#ifndef MIN | #ifndef MIN | |||
#define MIN(x,y) ((x) < (y) ? (x) : (y)) | #define MIN(x,y) ((x) < (y) ? (x) : (y)) | |||
#endif | #endif | |||
#ifndef MAX | #ifndef MAX | |||
#define MAX(x,y) ((x) > (y) ? (x) : (y)) | #define MAX(x,y) ((x) > (y) ? (x) : (y)) | |||
#endif | #endif | |||
#ifndef ABS | #ifndef ABS | |||
#define ABS(x) ((x) < 0 ? -(x) : (x)) | #define ABS(x) ((x) < 0 ? -(x) : (x)) | |||
#endif | #endif | |||
/* Whether an integer is a power of two */ | ||||
#define is_power_of_2(n) ((n) > 0 && ((n) & ((n) - 1)) == 0) | ||||
#define unspecified -1 | #define unspecified -1 | |||
/* Special chk[] values marking the slots taking by end-of-buffer and action | /* Special chk[] values marking the slots taking by end-of-buffer and action | |||
* numbers. | * numbers. | |||
*/ | */ | |||
#define EOB_POSITION -1 | #define EOB_POSITION -1 | |||
#define ACTION_POSITION -2 | #define ACTION_POSITION -2 | |||
/* Number of data items per line for -f output. */ | /* Number of data items per line for -f output. */ | |||
#define NUMDATAITEMS 10 | #define NUMDATAITEMS 10 | |||
skipping to change at line 826 | skipping to change at line 830 | |||
#define flex_die(msg) \ | #define flex_die(msg) \ | |||
do{ \ | do{ \ | |||
fprintf (stderr,\ | fprintf (stderr,\ | |||
_("%s: fatal internal error at %s:%d %s\n"),\ | _("%s: fatal internal error at %s:%d %s\n"),\ | |||
program_name, __FILE__, (int)__LINE__,\ | program_name, __FILE__, (int)__LINE__,\ | |||
msg);\ | msg);\ | |||
FLEX_EXIT(1);\ | FLEX_EXIT(1);\ | |||
}while(0) | }while(0) | |||
#endif /* ! HAVE_DECL___func__ */ | #endif /* ! HAVE_DECL___func__ */ | |||
/* Convert a hexadecimal digit string to an integer value. */ | ||||
extern unsigned int htoui(unsigned char[]); | ||||
/* Report an error message formatted */ | /* Report an error message formatted */ | |||
extern void lerr(const char *, ...) | extern void lerr(const char *, ...) | |||
#if defined(__GNUC__) && __GNUC__ >= 3 | #if defined(__GNUC__) && __GNUC__ >= 3 | |||
__attribute__((__format__(__printf__, 1, 2))) | __attribute__((__format__(__printf__, 1, 2))) | |||
#endif | #endif | |||
; | ; | |||
/* Like lerr, but also exit after displaying message. */ | /* Like lerr, but also exit after displaying message. */ | |||
extern void lerr_fatal(const char *, ...) | extern void lerr_fatal(const char *, ...) | |||
#if defined(__GNUC__) && __GNUC__ >= 3 | #if defined(__GNUC__) && __GNUC__ >= 3 | |||
skipping to change at line 865 | skipping to change at line 866 | |||
extern void mk2data(int); | extern void mk2data(int); | |||
extern void mkdata(int); /* generate a data statement */ | extern void mkdata(int); /* generate a data statement */ | |||
/* Return the integer represented by a string of digits. */ | /* Return the integer represented by a string of digits. */ | |||
extern int myctoi(const char *); | extern int myctoi(const char *); | |||
/* Return character corresponding to escape sequence. */ | /* Return character corresponding to escape sequence. */ | |||
extern unsigned char myesc(unsigned char[]); | extern unsigned char myesc(unsigned char[]); | |||
/* Convert an octal digit string to an integer value. */ | ||||
extern unsigned int otoui(unsigned char[]); | ||||
/* Output a (possibly-formatted) string to the generated scanner. */ | /* Output a (possibly-formatted) string to the generated scanner. */ | |||
extern void out(const char *); | extern void out(const char *); | |||
extern void out_dec(const char *, int); | extern void out_dec(const char *, int); | |||
extern void out_dec2(const char *, int, int); | extern void out_dec2(const char *, int, int); | |||
extern void out_hex(const char *, unsigned int); | extern void out_hex(const char *, unsigned int); | |||
extern void out_str(const char *, const char *); | extern void out_str(const char *, const char *); | |||
extern void out_str3(const char *, const char *, const char *, const char *); | extern void out_str3(const char *, const char *, const char *, const char *); | |||
extern void out_str_dec(const char *, const char *, int); | extern void out_str_dec(const char *, const char *, int); | |||
extern void outc(int); | extern void outc(int); | |||
extern void outn(const char *); | extern void outn(const char *); | |||
skipping to change at line 956 | skipping to change at line 954 | |||
/* Write out a warning, pinpointing it at the given line. */ | /* Write out a warning, pinpointing it at the given line. */ | |||
extern void line_warning(const char *, int); | extern void line_warning(const char *, int); | |||
/* Write out a message, pinpointing it at the given line. */ | /* Write out a message, pinpointing it at the given line. */ | |||
extern void line_pinpoint(const char *, int); | extern void line_pinpoint(const char *, int); | |||
/* Report a formatted syntax error. */ | /* Report a formatted syntax error. */ | |||
extern void format_synerr(const char *, const char *); | extern void format_synerr(const char *, const char *); | |||
extern void synerr(const char *); /* report a syntax error */ | extern void synerr(const char *); /* report a syntax error */ | |||
extern void format_warn(const char *, const char *); | extern void format_warn(const char *, const char *); | |||
extern void warn(const char *); /* report a warning */ | extern void lwarn(const char *); /* report a warning */ | |||
extern void yyerror(const char *); /* report a parse error */ | extern void yyerror(const char *); /* report a parse error */ | |||
extern int yyparse(void); /* the YACC parser */ | ||||
/* from file scan.l */ | /* from file scan.l */ | |||
/* The Flex-generated scanner for flex. */ | /* The Flex-generated scanner for flex. */ | |||
extern int flexscan(void); | extern int flexscan(void); | |||
/* Open the given file (if NULL, stdin) for scanning. */ | /* Open the given file (if NULL, stdin) for scanning. */ | |||
extern void set_input_file(char *); | extern void set_input_file(char *); | |||
/* from file sym.c */ | /* from file sym.c */ | |||
End of changes. 11 change blocks. | ||||
13 lines changed or deleted | 12 lines changed or added |