YAZ
5.34.0
|
Implements NMEM dup utilities. More...
Go to the source code of this file.
Functions | |
char * | nmem_strdup (NMEM mem, const char *src) |
allocates string on NMEM handle (similar strdup) More... | |
char * | nmem_strdup_null (NMEM mem, const char *src) |
allocates string on NMEM handle - allows NULL ptr buffer More... | |
char * | nmem_strdupn (NMEM mem, const char *src, size_t n) |
allocates string of certain size on NMEM handle More... | |
nmem_int_t * | nmem_intdup (NMEM mem, nmem_int_t v) |
allocates and sets integer for NMEM More... | |
nmem_bool_t * | nmem_booldup (NMEM mem, nmem_bool_t v) |
allocates and sets boolean for NMEM More... | |
void | nmem_strsplit_blank (NMEM nmem, const char *dstr, char ***darray, int *num) |
splits string into sub strings delimited by blanks More... | |
void | nmem_strsplit (NMEM nmem, const char *delim, const char *dstr, char ***darray, int *num) |
allocates sub strings out of string using certain delimitors More... | |
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 More... | |
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 More... | |
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 More... | |
char * | nmem_text_node_cdata (const xmlNode *ptr_cdata, NMEM nmem) |
copies TEXT Libxml2 node data to NMEM More... | |
Implements NMEM dup utilities.
Definition in file nmemsdup.c.
nmem_bool_t* nmem_booldup | ( | NMEM | nmem, |
nmem_bool_t | v | ||
) |
allocates and sets boolean for NMEM
nmem | NMEM handle |
v | value (0=false, != 0 true) |
Definition at line 48 of file nmemsdup.c.
References nmem_malloc().
Referenced by match_v_next(), and odr_booldup().
nmem_int_t* nmem_intdup | ( | NMEM | nmem, |
nmem_int_t | v | ||
) |
allocates and sets integer for NMEM
nmem | NMEM handle |
v | integer value |
Definition at line 41 of file nmemsdup.c.
References nmem_malloc().
Referenced by cql_transform_parse_tok_line(), and odr_intdup().
char* nmem_strdup | ( | NMEM | mem, |
const char * | src | ||
) |
allocates string on NMEM handle (similar strdup)
mem | HNEM handle |
src | string |
Definition at line 18 of file nmemsdup.c.
References nmem_malloc().
Referenced by add_entry(), append_removed_item(), conf_retrieval(), construct_marc(), construct_one_rdf_lookup(), construct_rdf_lookup(), construct_select(), cql_apply_prefix(), cql_node_dup(), cql_node_mk_boolean(), cql_node_mk_sc(), cql_node_mk_sort(), cql_transform_parse_tok_line(), element_attribute_value_extract(), extract_user_pass(), gfs_listen_new(), nmem_strdup_null(), odr_strdup(), yaz_get_proposal_charneg(), yaz_get_response_charneg(), yaz_marc_add_comment(), yaz_marc_add_controlfield(), yaz_marc_add_datafield(), yaz_marc_add_datafield_xml(), yaz_match_xsd_string_n_nmem(), yaz_set_esn(), and yyparse().
char* nmem_strdup_null | ( | NMEM | mem, |
const char * | src | ||
) |
allocates string on NMEM handle - allows NULL ptr buffer
mem | HNEM handle |
src | string |
Definition at line 25 of file nmemsdup.c.
References nmem_strdup().
Referenced by gfs_server_new(), and odr_strdup_null().
char* nmem_strdupn | ( | NMEM | mem, |
const char * | src, | ||
size_t | n | ||
) |
allocates string of certain size on NMEM handle
mem | NMEM handle |
src | string |
n | size of string |
Definition at line 33 of file nmemsdup.c.
References nmem_malloc().
Referenced by extract_user_pass(), nmem_strsplit_escape2(), odr_strdupn(), yaz_marc_add_controlfield(), yaz_marc_add_datafield(), yaz_marc_add_leader(), yaz_marc_add_subfield(), and yaz_record_render().
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 | NMEM handle |
delim | delimitor chars (splits on each char in there) |
dstr | string to be split |
darray | result string array for each sub string |
num | number of result strings |
Definition at line 61 of file nmemsdup.c.
References nmem_strsplitx().
Referenced by nmem_strsplit_blank(), xml_config_read(), yaz_pqf_parse_facet_list(), yaz_set_proposal_charneg_list(), yaz_solr_sortkeys_to_sort_spec(), and ZOOM_connection_get_databases().
void nmem_strsplit_blank | ( | NMEM | nmem, |
const char * | dstr, | ||
char *** | darray, | ||
int * | num | ||
) |
splits string into sub strings delimited by blanks
nmem | NMEM handle |
dstr | string to be split |
darray | result string array for each sub string |
num | number of result strings |
Definition at line 55 of file nmemsdup.c.
References nmem_strsplit().
Referenced by yaz_srw_sortkeys_to_sort_spec().
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
nmem | NMEM handle |
delim | delimitor chars (splits on each char in there) |
dstr | string to be split |
darray | result string array for each sub string |
num | number of result strings |
collapse | 1=collapse multiple delims to one; 0=no collapse |
escape_char | != 0, an escape char (could be ) |
Definition at line 73 of file nmemsdup.c.
References nmem_strsplit_escape2().
Referenced by nmem_strsplitx().
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
nmem | NMEM handle |
delim | delimitor chars (splits on each char in there) |
dstr | string to be split |
darray | result string array for each sub string |
num | number of result strings |
collapse | 1=collapse multiple delims to one; 0=no collapse |
escape_char | != 0, an escape char (could be ) |
subst_escape | 1=substitute escapes, 0 leave as is |
Definition at line 81 of file nmemsdup.c.
References nmem_malloc(), and nmem_strdupn().
Referenced by nmem_strsplit_escape().
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
nmem | NMEM handle |
delim | delimitor chars (splits on each char in there) |
dstr | string to be split |
darray | result string array for each sub string |
num | number of result strings |
collapse | 1=collapse multiple delims to one; 0=no collapse |
Definition at line 67 of file nmemsdup.c.
References nmem_strsplit_escape().
Referenced by nmem_strsplit(), yaz_solr_sortkeys_to_sort_spec(), and yaz_srw_sortkeys_to_sort_spec().
char* nmem_text_node_cdata | ( | const xmlNode * | ptr_cdata, |
NMEM | nmem | ||
) |
copies TEXT Libxml2 node data to NMEM
Definition at line 145 of file nmemsdup.c.
References nmem_malloc().
Referenced by base64_render(), element_attribute_value_extract(), get_facet_term_count(), strVal(), yaz_marc_add_controlfield_xml(), yaz_marc_add_controlfield_xml2(), yaz_marc_add_datafield_xml(), yaz_solr_decode_error(), and yaz_sru_proxy_get_facet_term_count().