summaryrefslogtreecommitdiff
path: root/libc/misc/internals/parse_config.c
AgeCommit message (Collapse)Author
2017-06-21remove editor hints for viWaldemar Brodkorb
2012-06-15parser_config.[ch]: remove duplicated hidden functionsPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-04-17parse_config: tweak indentationBernhard Reutner-Fischer
and shuffle tokens memsetting around. No obj-code changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-10-14parse_config: discard rest of incomplete lineNatanael Copa
If line is longer then size of given buffer and buffer is not allocated by the config parser itself, then discard rest of line. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-10-14config parser: always initialize line pointerNatanael Copa
We must always initialize line pointer since data pointer might have changed due to a realloc (in getserv.c for example). Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-10-14config parser: do not assume that realloc return same pointerNatanael Copa
We need to update the parser->line pointer on realloc and do not initialize the token array til after the potensial realloc in bb_get_chunk_with_continuation(). While here, also replace a realloc() with malloc() where pointer always is NULL. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-09-06misc: Fix build error about missing PAGE_SIZEAbdoulaye Walsimou Gaye
This patch fixes the following build error: CC libc/misc/internals/__h_errno_location.os CC libc/misc/internals/parse_config.os libc/misc/internals/parse_config.c: In function 'bb_get_chunk_with_continuation': libc/misc/internals/parse_config.c:77: error: 'PAGE_SIZE' undeclared (first use in this function) libc/misc/internals/parse_config.c:77: error: (Each undeclared identifier is reported only once libc/misc/internals/parse_config.c:77: error: for each function it appears in.) make[2]: *** [libc/misc/internals/parse_config.os] Error 1 Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-08-19getserv: fix reading services lines w > 80 charsBernhard Reutner-Fischer
e.g. getservbyname() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-08-06config parser: fix memory corruptionTimo Teräs
fgets will happily write over allocated area limits. Adjusted the buffer size according to how much is already read. Also increase the maximum default line length, as 80 is slightly small. It might be better if bb_get_chunk_with_continuation would reallocate the line buffer if it was not user given. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-08-05add config parserBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>