summaryrefslogtreecommitdiff
path: root/src/misc.c
Commit message (Collapse)AuthorAge
* add (size_t) casts to malloc invocations to prevent warningsrlar2016-03-01
|
* add (int) casts to some strlen() invocations to prevent warningsrlar2016-02-29
|
* Converted K&R style function definitions to ANSI C styleTobias Klauser2016-02-16
| | | | | Consistently make use of the ANSI C function definition style instead of the K&R style.
* Cleaned up __STDC__ #ifdefs.Michael Reed2015-12-27
| | | | | | 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.
* Replace zero_out() with stdlib's memset.Michael McConville2015-12-09
|
* 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
* 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.
* 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>
* Fix -Wdocumentation warningsAlexis La Goutte2014-11-21
|
* 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.