For internal use only.
This file contains the implementation of the tc_break() function.
Definition in file tc_break.c.
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include "treeconf_int.h"
Include dependency graph for tc_break.c:
Go to the source code of this file.
Data Structures | |
struct | stringbuf |
String buffer structure. More... | |
Defines | |
#define | STRINGBUF_INIT |
Initializer for string buffer structure. | |
#define | STRINGBUF_CHUNK |
Number of treeconf_str_t to allocate. | |
Functions | |
unsigned int | _add_string (struct stringbuf *buf, const char *str, int len) |
Add a string to the string buffer. | |
unsigned int | tc_break (treeconf_str_t **str_p, int *cnt_p, const char *name, const char *delims) |
Break a string into an array of components. |
|
For internal use only. This macro sets the number of treeconf_str_t structures that are allocated at a time, for performance. Definition at line 59 of file tc_break.c. Referenced by _add_string(). |
|
For internal use only. This macro simply initializes a string buffer structure for use. Definition at line 51 of file tc_break.c. |
|
For internal use only. This function is used by tc_break() to add another string to the string buffer structure. Definition at line 68 of file tc_break.c. References stringbuf::sb_comps, stringbuf::sb_count, stringbuf::sb_size, STRINGBUF_CHUNK, treeconf_str_t, _treeconf_str_s::ts_length, and _treeconf_str_s::ts_string. Referenced by tc_break(). |