| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, every call to sf_push() realloc()'s _sf_stack, even if the
maximum size _sf_max wasn't changed. As the indentation beneath the
"if" clause already indicates, the realloc() should only be executed
if _sf_max was increased.
Found by compiling flex with the -Wmisleading-indentation flags of gcc,
which leads to the following warning:
scanflags.c: In function ‘sf_push’:
scanflags.c:42:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (_sf_top_ix + 1 >= _sf_max)
^~
scanflags.c:44:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
_sf_stk = realloc(_sf_stk, sizeof(scanflags_t) * _sf_max);
^~~~~~~
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
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.
|