30 static int set_string(
dbString *
x,
char *s,
int copy);
43 return set_string(
x, (
char *)s, 1);
57 return set_string(
x, s, 0);
71 return (
unsigned int)
x->nalloc;
85 static int set_string(
dbString *
x,
char *s,
int copy)
122 if (
x->nalloc < len) {
126 if (
x->string ==
NULL)
168 for (i = 0; i < n; i++)
190 for (i = 0; i <
count; i++)
242 char *ptra, *ptrb, buf[2];
249 while ((ptra = strchr(ptrb,
'\'')) !=
NULL) {
250 for (; ptrb <= ptra; ptrb++) {
void * db_calloc(int, int)
Allocate memory.
void db_free(void *)
Free allocated memory.
void db_zero(void *, int)
Zero allocated space.
void * db_realloc(void *, int)
Reallocate memory.
void G_zero(void *, int)
Zero out a buffer, buf, of length i.
void db_zero_string(dbString *x)
Zero string.
void db_init_string(dbString *x)
Initialize dbString.
void db_free_string_array(dbString *a, int n)
Free allocated dbString array.
int db_enlarge_string(dbString *x, int len)
Enlarge dbString.
char * db_get_string(const dbString *x)
Get string.
unsigned int db_sizeof_string(const dbString *x)
Get string size.
int db_copy_string(dbString *dst, const dbString *src)
Copy dbString.
int db_append_string(dbString *x, const char *s)
Append string to dbString.
dbString * db_alloc_string_array(int count)
Allocate dbString array.
void db_free_string(dbString *x)
Free allocated space for dbString.
void db_double_quote_string(dbString *src)
Replace each ' is replaced by ''.
int db_set_string_no_copy(dbString *x, char *s)
Inserts string to dbString (overwrite current value)
int db_set_string(dbString *x, const char *s)
Inserts string to dbString (enlarge string)