summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Reed <m.reed@mykolab.com>2015-12-25 14:15:15 -0500
committerWill Estes <westes575@gmail.com>2015-12-27 08:32:33 -0500
commit6fa7ed0446e02aaeb81b712325bbf1a3636feb18 (patch)
treefa8438f88bd3d4232a3d602f1381aa9360b2af84 /src
parent64874cd4640c1cd95f5cb51481f85c63803afe6c (diff)
Cleaned up __STDC__ #ifdefs.
Assuming a compiler conforming to the ISO C standard is used, i.e., __STDC__ is defined to 1, YY_USE_CONST is always defined and can be eliminated.
Diffstat (limited to 'src')
-rw-r--r--src/flex.skl20
-rw-r--r--src/misc.c13
2 files changed, 1 insertions, 32 deletions
diff --git a/src/flex.skl b/src/flex.skl
index 5c58d01..2daaefb 100644
--- a/src/flex.skl
+++ b/src/flex.skl
@@ -223,26 +223,8 @@ m4preproc_include(`flexint.h')
/* end standard C++ headers. */
%endif
-#ifdef __cplusplus
-
-/* The "const" storage-class-modifier is valid. */
-#define YY_USE_CONST
-
-#else /* ! __cplusplus */
-
-/* C99 requires __STDC__ to be defined as 1. */
-#if defined (__STDC__)
-
-#define YY_USE_CONST
-
-#endif /* defined (__STDC__) */
-#endif /* ! __cplusplus */
-
-#ifdef YY_USE_CONST
+/* TODO: this is always defined, so inline it */
#define yyconst const
-#else
-#define yyconst
-#endif
%# For compilers that can not handle prototypes.
%# e.g.,
diff --git a/src/misc.c b/src/misc.c
index cfdf2f8..a74fdd3 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -521,19 +521,10 @@ unsigned char myesc (unsigned char array[])
return '\r';
case 't':
return '\t';
-
-#if defined (__STDC__)
case 'a':
return '\a';
case 'v':
return '\v';
-#else
- case 'a':
- return '\007';
- case 'v':
- return '\013';
-#endif
-
case '0':
case '1':
case '2':
@@ -684,14 +675,10 @@ char *readable_form (int c)
return "\\r";
case '\t':
return "\\t";
-
-#if defined (__STDC__)
case '\a':
return "\\a";
case '\v':
return "\\v";
-#endif
-
default:
if(trace_hex)
snprintf (rform, sizeof(rform), "\\x%.2x", (unsigned int) c);