57 char *cp, *saved_name = 0;
59 char *nameval, *vname, *value;
67 #define DICT_INLINE_RETURN(x) do { \
69 if (saved_name != 0) \
79 if (open_flags != O_RDONLY)
81 open_flags, dict_flags,
82 "%s:%s map requires O_RDONLY access mode",
92 open_flags, dict_flags,
93 "bad UTF-8 syntax: \"%s:%s\"; "
94 "need \"%s:{name=value...}\"",
102 || *(cp = saved_name =
mystrndup(name + 1, len - 2)) == 0)
104 open_flags, dict_flags,
105 "bad syntax: \"%s:%s\"; "
106 "need \"%s:{name=value...}\"",
122 dict->
update(dict, vname, value);
125 if (err != 0 || count == 0) {
128 open_flags, dict_flags,
130 "need \"%s:{name=value...}\"",
131 err != 0 ? err :
"empty table",
#define DICT_NEED_UTF8_ACTIVATION(enable, flags)
char * extpar(char **bp, const char *parens, int flags)
void(* close)(struct DICT *)
int valid_utf8_string(const char *, ssize_t)
#define EXTPAR_FLAG_STRIP
char * mystrtokq(char **src, const char *sep, const char *parens)
DICT * dict_inline_open(const char *name, int open_flags, int dict_flags)
DICT * dict_open3(const char *, const char *, int, int)
int(* update)(struct DICT *, const char *, const char *)
const char * split_qnameval(char *buf, char **pkey, char **pvalue)
#define DICT_OWNER_TRUSTED
void dict_type_override(DICT *, const char *)
char * mystrndup(const char *str, ssize_t len)
size_t balpar(const char *string, const char *parens)
#define DICT_INLINE_RETURN(x)
DICT * dict_surrogate(const char *dict_type, const char *dict_name, int open_flags, int dict_flags, const char *fmt,...)