summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/gen
AgeCommit message (Collapse)Author
2020-12-18strndup: don't assume buffer is terminatedOri Bernstein
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.
2020-12-17libap: add strndupOri Bernstein
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.
2020-08-29ape/ctype.h: add isblank, fix functions (thanks staalmannen)Ori Bernstein
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.
2020-05-12[ape] add missing conversion flags for scanfOri Bernstein
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
2019-09-09ape: Add mkstemp to /sys/src/ape/lib/ap/gen/mkfileRoberto E. Vargas Caballero
2019-09-09Add mkstemp to stdlib.hRoberto E. Vargas Caballero
q
2019-06-21Turn on warnings when building libap.Ori Bernstein
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.
2018-06-21ape: add strnlenspew
2015-08-04ape: fix mktime() againcinap_lenrek
2014-01-20ape: remove local copy of memccpy()cinap_lenrek
2013-12-28ape: move strdup() from libbsd to libap (from sources)cinap_lenrek
including <string.h> should be enougth to make strdup() available.
2012-12-31fix utf and rune handling in preparation for 32bit runescinap_lenrek
2012-12-03ape: putenv, add file :)cinap_lenrek
2012-12-03ape: fix putenv()cinap_lenrek
writing /env in putenv() doesnt work. exec will create new enviroment anyway. we have to modify environ array!
2012-08-19calloc: check multiplication overflowcinap_lenrek
2011-06-03fixed mktime bugaiju
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen