summaryrefslogtreecommitdiff
path: root/src/flexdef.h
Commit message (Collapse)AuthorAge
* build: fix ENABLE_NLS preprocessor check.Explorer092017-11-28
| | | | | | | | | Because ENABLE_NLS may be defined to 0 (manually, not through autoconf) and it's semantically incorrect to only check whether it's defined. This is a correction to commit 661d603b65385f62f372acd2017e5af2e0f0cd50.
* scanner: Remove unused BASENAME() macro.Explorer092017-11-03
| | | | (Simply forgot to do so in commit fb731ac0221e1866534dfe072b84b8af7a5d88f3)
* build: Remove custom reallocarray() declaration.Lukasz Baj2017-10-05
| | | | Use one from <stdlib.h> instead because that is more portable.
* scanner: #define BASENAME, remove #include libgen.hJannick2017-07-17
|
* filter: faster is_blank_line implementationExplorer092017-07-15
| | | | Using regex_t regex_blank_line is *slow*.
* Obsolete htoui() and otoui(); use strtoul().Explorer092017-05-02
| | | | | No sense to keep these two function when libc's strtoul() can do the same job, but better.
* build: Include <strings.h>; add strcasecmp() check to configure.Explorer092017-02-17
| | | | | | strings.h (not string.h) is the standard-defined include header for strcasecmp(). Include <strings.h> for portability (even though glibc exposes strcasecmp() declaration also in <string.h> by default).
* build: Let configure error if missing required functions, headers..Explorer092017-02-17
| | | | | | | | | | | | `configure` will now error if a required header or function is not found on the system. Also add comments on optional functions checks. Add sys/stats.h and sys/wait.h to list of required headers in configure. This fixes issue #180.
* scanner: compute powers of two faster.Explorer092017-02-16
| | | | | | Replace the naive "for" loop in determining power of two with a clever bitwise solution. This code is around the Internet already and is in Public Domain.
* scanner: Add yyparse prototypeChristos Zoulas2017-01-23
|
* scanner: Include stdarg.h for va_listChristos Zoulas2017-01-23
|
* scanner: Rename warn to lwarn.Christos Zoulas2017-01-23
| | | | This avoids a naming conflict in NetBSD's libc.
* Fix M4 quoting of section 3.Demi Obenour2016-10-05
| | | | | | | | | | This fixes M4 quoting of section 3 of the input file, including escape sequences and character constants. Tests were added to verify the behavior in section 3 with respect to quoting. Both escaping of quotes and quoting of potential macro-start characters are tested. Existing tests were also fixed to account for the new -- and now correct -- behavior. Many tests relied on the old behavior of expanding M4 macros in section 3. They needed to be updated for the new behavior.
* no longer generate K&R C scannersDemi Obenour2016-09-25
|
* change return type and rename int htoi()/otoi() --> unsigned int htoui()/otoui()rlar2016-03-08
|
* ndlookup(), char *, to get rid of casts and warningsrlar2016-02-29
|
* ndinstal(), char *, to get rid of casts and warningsrlar2016-02-29
|
* cclinstal() and ccllookup(), char *, to get rid of casts and warningsrlar2016-02-29
|
* warning: redundant redeclaration of ‘yywrap’ [-Wredundant-decls]rlar2016-02-28
|
* warning: redundant redeclaration of ‘yylval’ [-Wredundant-decls]rlar2016-02-28
|
* warning: redundant redeclaration of ‘yyin’ [-Wredundant-decls]rlar2016-02-28
|
* warning: redundant redeclaration of ‘yyparse’ [-Wredundant-decls]rlar2016-02-28
|
* warning: negative integer implicitly converted to unsigned type ↵rlar2016-02-28
| | | | [-Wsign-conversion]
* Removed no longer needed header checksWill Estes2015-12-27
|
* include libgen.h from flexdef.h, not main.cWill Estes2015-12-27
|
* Remove remaining use of PROTOMichael Reed2015-12-25
|
* Started removal of PROTO macro.Michael McConville2015-12-12
| | | | | The PROTO macro is no longer needed. Additionally, its usage is inconsistent, so we began removing it.
* Added new function reallocarray.Michael McConville2015-12-12
| | | | | | | | | | | | | | This is taken from OpenSSH Portable, which in turn takes it from OpenBSD. reallocarray wraps the stdlib's realloc function. It takes two size arguments and checks for overflow, like calloc, but doesn't zero the memory. Therefore, it allows us to do overflow-safe array reallocations and overflow-safe unzeroed array allocations, which the stdlib allocation functions don't. We have a bunch of specific array allocation macros, none of which check for overflow. reallocarray should be able to replace them.
* Removed MS-DOS, VMS macros.Michael McConville2015-12-12
| | | | Given the age of the MS-DOS and VMS platforms, it's likely that no one is building flex on them any more. Additionally, the preferred approach is to test for particular platform features rather than to test for particular platforms.
* Made search for m4 more explicit.Will Estes2015-12-12
|
* Replace zero_out() with stdlib's memset.Michael McConville2015-12-09
|
* Removed alloca() configuration.Michael McConville2015-12-09
| | | | Since alloca() is dangerous, depricated, we remove it.
* Removed implementation of isascii().Michael McConville2015-12-09
| | | | POSIX defines isascii(), so it's likely present on anything weactually build flex on these days.
* Removed flex_free()i, corrected buf_destroy logic.Michael McConville2015-12-09
| | | | | | | As with flex_alloc(), replace with direct calls to free(). The function buf_destroy is now null safe and the logic was corrected to free() correctly.
* Removed flex_realloc().Michael McConville2015-12-09
| | | | | As with flex_alloc(), replace calls to flex_realloc(), which was just a wrapper around realloc().
* Removed flex_alloc; cleaned up style.Michael McConville2015-12-09
| | | | | | | | | | | The function flex_alloc() was just a wrapper around malloc(). Since this only added unclarity, and the flex_alloc() function is likely a legacy of olden times, remove it in favor of calls to malloc() directly. Style elements cleaned up: * superfluous spacing around parentheses * non-constant initialization in variable declarations * needless casts * almost all uses of assignments as subexpressions
* Remove allocation castsMichael McConville2015-12-07
|
* Replace copy_unsigned_string() with xstrdup().Michael McConville2015-12-05
| | | | | | Like copy_string(), copy_unsigned_string() is just a clone of the stlib's strdup(). We only use it twice. I'm pretty confident that char signedness is irrelevant in this case.
* Made string copying more standard.Michael McConville2015-12-02
| | | | | copy_string() was a clone of the stdlib's strdup(). For safety, simplicity, and speed, we should use that instead. We introduce xstrdup() which wraps strdup() in a failure upon memory allocation errors.
* Replaced CHAR macro with unsigned char type.Mightyjo2015-11-29
| | | | | | | | Thanks to Michael McConville for pointing out that the old Char macro causes problems with static analysis. The macro has been removed and replaced with 'unsigned char' throughout the flex sources. The macro is not needed at best and was confusing at worst. It was not used in any of the example files nor was it mentioned in the manual at all.
* NetBSD downstream patches.Christos Zoulas2014-11-11
| | | | | | | | | | | | | | | | const fixes. -Wconversion fixes for the skeleton files. param namespace protection (add _ to inline function parameters). unused variable/code removal. rename warn to lwarn to avoid conflict with <err.h>. ctype.h function argument correction. merged the error functions lerrif and lerrsf -> lerr.
* Allow error reporting routines to accept varying number of arguments in ↵Mariusz Pluciński2014-07-25
| | | | modern style
* Removed deprecated 'register' storage class specifier.Yuri2014-07-25
| | | | clang-3.5.0 now complains about them: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
* Change output formats from octal to hexadecimalMariusz Pluciński2014-06-26
|
* move flex program sources into src/ directoryWill Estes2014-02-16
The *.[chly] sources are now in the src directory. This implies a bunch of changes in Makefile.am and friends to account for the new location. The .gitignore files are now more local to places where various object files and generated source files occur.