| Main index | Section 3 | 日本語 | Options |
#include <stringlist.h>
The StringList structure has the following definition:
typedef struct _stringlist {
char **sl_str;
size_t sl_max;
size_t sl_cur;
} StringList;
| sl_str | |
| a pointer to the base of the array containing the list. | |
| sl_max | |
| the size of sl_str. | |
| sl_cur | |
| the offset in sl_str of the current element. | |
The following stringlist manipulation functions are available:
| sl_init() | |
| Create a stringlist. Returns a pointer to a StringList, or NULL in case of failure. | |
| sl_free() | |
| Releases memory occupied by sl and the sl->sl_str array. If freeall is non-zero, then each of the items within sl->sl_str is released as well. | |
| sl_add() | |
| Add item to sl->sl_str at sl->sl_cur, extending the size of sl->sl_str. Returns zero upon success, -1 upon failure. | |
| sl_find() | |
| Find item in sl, returning NULL if it is not found. | |
| STRINGLIST (3) | November 28, 1999 |
| Main index | Section 3 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | Never write it in C if you can do it in `awk'; Never do it in `awk' if `sed' can handle it; Never use `sed' when `tr' can do the job; Never invoke `tr' when `cat' is sufficient; Avoid using `cat' whenever possible. |
” |
| — Taylor's Laws of Programming | ||