21 char *dst = (
char *)
nmem_malloc(mem, strlen(src)+1);
63 char ***darray,
int *num)
69 char ***darray,
int *num,
int collapse)
75 char ***darray,
int *num,
int collapse,
83 char ***darray,
int *num,
int collapse,
84 int escape_char,
int subst_escape)
91 const char *cp = dstr;
99 while (*cp && strchr(delim, *cp) && *cp != escape_char)
106 while (*cp && !strchr(delim, *cp))
108 if (*cp == escape_char)
117 char *dst = (*darray)[i];
118 const char *src = dst;
121 if (*src == escape_char && src[1])
141 *darray = (
char **)
nmem_malloc(nmem, *num *
sizeof(**darray));
void * nmem_malloc(NMEM n, size_t size)
allocates memory block on NMEM handle
Header for Nibble Memory functions.
int nmem_bool_t
BER/utility boolean.
struct nmem_control * NMEM
NMEM handle (an opaque pointer to memory).
int nmem_int_t
BER/utility integer (32-bit on most platforms).
void nmem_strsplitx(NMEM nmem, const char *delim, const char *dstr, char ***darray, int *num, int collapse)
allocates sub strings out of string using certain delimitors
void nmem_strsplit_blank(NMEM nmem, const char *dstr, char ***darray, int *num)
splits string into sub strings delimited by blanks
nmem_int_t * nmem_intdup(NMEM mem, nmem_int_t v)
allocates and sets integer for NMEM
void nmem_strsplit(NMEM nmem, const char *delim, const char *dstr, char ***darray, int *num)
allocates sub strings out of string using certain delimitors
nmem_bool_t * nmem_booldup(NMEM mem, nmem_bool_t v)
allocates and sets boolean for NMEM
void nmem_strsplit_escape2(NMEM nmem, const char *delim, const char *dstr, char ***darray, int *num, int collapse, int escape_char, int subst_escape)
allocates sub strings out of string using certain delimitors
char * nmem_printf(NMEM nmem, const char *fmt,...)
formats and prints a string into NMEM allocated memory
char * nmem_strdup(NMEM mem, const char *src)
allocates string on NMEM handle (similar strdup)
void nmem_strsplit_escape(NMEM nmem, const char *delim, const char *dstr, char ***darray, int *num, int collapse, int escape_char)
allocates sub strings out of string using certain delimitors
char * nmem_strdupn(NMEM mem, const char *src, size_t n)
allocates string of certain size on NMEM handle
char * nmem_strdup_null(NMEM mem, const char *src)
allocates string on NMEM handle - allows NULL ptr buffer
void yaz_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
Header for config file reading utilities.