| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(Simply forgot to do so in commit fb731ac0221e1866534dfe072b84b8af7a5d88f3)
|
|
|
|
| |
Use one from <stdlib.h> instead because that is more portable.
|
| |
|
|
|
|
| |
Using regex_t regex_blank_line is *slow*.
|
|
|
|
|
| |
No sense to keep these two function when libc's strtoul() can do the
same job, but better.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
This avoids a naming conflict in NetBSD's libc.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
[-Wsign-conversion]
|
| |
|
| |
|
| |
|
|
|
|
|
| |
The PROTO macro is no longer needed. Additionally, its usage is inconsistent,
so we began removing it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Since alloca() is dangerous, depricated, we remove it.
|
|
|
|
| |
POSIX defines isascii(), so it's likely present on anything weactually build flex on these days.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
As with flex_alloc(), replace calls to flex_realloc(), which was just a
wrapper around realloc().
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
modern style
|
|
|
|
| |
clang-3.5.0 now complains about them: warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]
|
| |
|
|
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.
|