Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

tc_break.c File Reference


Detailed Description

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:

Include dependency graph

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.


Define Documentation

#define STRINGBUF_CHUNK
 

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().

#define STRINGBUF_INIT
 

For internal use only.

This macro simply initializes a string buffer structure for use.

Definition at line 51 of file tc_break.c.


Function Documentation

unsigned int _add_string struct stringbuf buf,
const char *  str,
int  len
[static]
 

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().


Generated on Wed Jun 8 09:18:32 2005 for treeconf by  doxygen 1.3.9.1