/*
* This file is generated, please don't edit it.
* script: ../../../util/gen-map.pl
* args:
* -oerror_map.new
* NAME=gsserrmap
* KEY=OM_uint32
* VALUE=char *
* COMPARE=compare_OM_uint32
* FREEVALUE=free_string
* The rest of this file is copied from a template, with
* substitutions. See the template for copyright info.
*/
/*
* map, generated from template
* map name: gsserrmap
* key: OM_uint32
* value: char *
* compare: compare_OM_uint32
* copy_key: 0
* free_key: 0
* free_value: free_string
*/
struct gsserrmap__element {
char * value;
};
struct gsserrmap__head {
};
{
return 0;
}
{
void (*free_value)(char *) = free_string;
if (free_key)
if (free_value)
(*free_value)(e->value);
free(e);
}
}
/* Returns pointer to linked-list entry, or null if key not found. */
static inline struct gsserrmap__element *
{
struct gsserrmap__element *e;
return e;
return 0;
}
/* Returns pointer to value, or null if key not found. */
static inline char * *
{
if (e)
return &e->value;
return 0;
}
/* Returns 0 or error code. */
static inline int
{
if (copykey == 0) {
return 0;
} else
}
/* Returns 0 or error code. */
static inline int
{
int ret;
if (e) {
/* replace */
void (*free_value)(char *) = free_string;
if (free_value)
(*free_value)(e->value);
} else {
/* insert */
e = malloc(sizeof(*e));
if (e == NULL)
return ENOMEM;
if (ret) {
free(e);
return ret;
}
}
return 0;
}