On Thu, 2009-01-29 at 13:18 +0100, Henning Rogge wrote:
[...]
> The first one contains strlcpy as source (with the name strscpy ?)...

Yes, using strlcpy() would have been a much better idea than to invent
the n+1. wheel^Winterface again.
And use strdup() (+ strndup()[0]) instead of malloc()+strcpy() in the
first place.
strdup()/strndup() are quite old and IMHO well-known and strlcpy() is
also not really new.

> The second one implements a automatically growing string buffer.
> 
> Maybe we could use autobuf in the config parser too ?

Makes IMHO not that much sense (except for the config-file generator
funtion). The autobuf was designed for growing large buffers which
automagically expand as needed.

	Bernd

[0]: strndup() is not the nice version of malloc()+strncpy().
-- 
Firmix Software GmbH                   http://www.firmix.at/
mobil: +43 664 4416156                 fax: +43 1 7890849-55
          Embedded Linux Development and Services




