STRINGLIST(3) | Library Functions Manual | STRINGLIST(3) |
stringlist
, sl_init
,
sl_add
, sl_free
,
sl_find
, sl_delete
—
#include <stringlist.h>
StringList *
sl_init
();
int
sl_add
(StringList
*sl, char
*item);
void
sl_free
(StringList
*sl, int
freeall);
char *
sl_find
(StringList
*sl, const char
*item);
int
sl_delete
(StringList
*sl, const char
*item, int
freeit);
stringlist
functions manipulate stringlists, which
are lists of strings that extend automatically if necessary.
The StringList structure has the following definition:
typedef struct _stringlist { char **sl_str; size_t sl_max; size_t sl_cur; } StringList;
where:
The following stringlist manipulation functions are available:
sl_init
()NULL
in case
of failure.sl_free
()sl_add
()sl_find
()NULL
if it's not found.sl_delete
()0
if the name is found and
-1
if the name is not found.stringlist
functions appeared in
NetBSD 1.3.
May 6, 2010 | NetBSD 9.2 |