Age | Commit message (Collapse) | Author |
|
Using strlen in strndup will walk past the first
n bytes up to the terminator, which may not be
present. This is not what we want.
While we're here, do some cleanups.
|
|
strndup is part of POSIX.1, so APE should provide it.
This patch adds it, so need to patch it out of fewer
programs going forward.
|
|
Our ctype.h mistakenly ommitted isblank. Add it in.
While we're here, the make the 'isfoo()' functions
are broken: they're offsetting into the array, and
don't work with negative character values.
Sync the function bodies with the macros, and make
them produce correct results.
|
|
We're missing type flags for:
hh: char
ll: vlong
z: size_t
t: ptrdiff_t
j: intmax_t
The lack of '%lld' was causing us to fail when parsing
timezone files. This brings us in line with the specifiers
in the C99 standard, section 7.19.6.2p11
|
|
|
|
q
|
|
For ape, we never enabled warnings in cflags.
Turning it on brings up a lot of warnings. Most are noise,
but a few caught unused variables and trunctaions of pointers.
to smaller integers (int, long).
A few warnings remain.
|
|
|
|
|
|
|
|
including <string.h> should be enougth to make strdup()
available.
|
|
|
|
|
|
writing /env in putenv() doesnt work. exec will create
new enviroment anyway. we have to modify environ array!
|
|
|
|
|
|
|
|
|