summaryrefslogtreecommitdiff
path: root/src/buf.c
Commit message (Collapse)AuthorAge
* Cast argument to avoid arithmetic on void *.Christos Zoulas2017-01-23
|
* scanner: Disallow, overquote '[' and ']' in prefixDemi Obenour2016-12-29
|
* casts in buf_append() to get rid of warningsrlar2016-03-08
|
* cast and fix usage of log10(), ceil to prevent buffer overflowrlar2016-03-08
|
* add (int) casts to some strlen() invocations to prevent warningsrlar2016-02-29
|
* Fixed size of bufferallocation, resolved gh#54.Will Estes2016-02-24
| | | | The value of n_alloc was a count, not a size. Multiplying the value by the element size was incorrect. That multiplication was already being done and having it done twice was incorrect.
* Emit no #line directives if gen_line_dirs is false, resolves igh#55.Tobias Klauser2016-02-24
| | | | | | | | There are two instances in the code which will print a #line directive to the resulting lexer, regardless of the value of gen_line_dirs. Fix them, so they also respect gen_line_dirs. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
* buf.c: use snprintfSerguey Parkhomovsky2015-12-21
|
* 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_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
* Use NULL rather than (type *) 0.Michael McConville2015-12-05
|
* Switch function definitions from mixed K&R to consistent ANSI C.Stefan Reinauer2015-11-19
| | | | | | | | flex was using K&R function definitions for some functions and ANSI C style in others, sometimes even in the same file. Change the code to consistently use ANSI C. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* 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.
* Fix warning on assigning from `const char*` to `char*`Mariusz PluciƄski2014-07-25
|
* 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.