Lines Matching full:attributes
24 * attributes = [^,:\s]*
25 * entry = name[:attributes]
29 int (*callback)(const char *name, const char *attributes, void *priv), in env_attr_walk() argument
33 char *name, *attributes; in env_attr_walk() local
82 attributes = strchr(entry_cpy, ENV_ATTR_SEP); in env_attr_walk()
84 if (attributes != NULL) { in env_attr_walk()
86 *attributes++ = '\0'; in env_attr_walk()
87 /* remove white-space from attributes */ in env_attr_walk()
88 attributes = strim(attributes); in env_attr_walk()
97 retval = callback(name, attributes, priv); in env_attr_walk()
116 char *attributes; member
119 static int regex_callback(const char *name, const char *attributes, void *priv) in regex_callback() argument
134 if (!attributes) { in regex_callback()
146 free(cbp->attributes); in regex_callback()
147 cbp->attributes = malloc(strlen(attributes) + 1); in regex_callback()
148 if (cbp->attributes) { in regex_callback()
149 strcpy(cbp->attributes, attributes); in regex_callback()
166 * Retrieve the attributes string associated with a single name in the list
167 * There is no protection on attributes being too small for the value
169 int env_attr_lookup(const char *attr_list, const char *name, char *attributes) in env_attr_lookup() argument
171 if (!attributes) in env_attr_lookup()
183 priv.attributes = NULL; in env_attr_lookup()
189 strcpy(attributes, priv.attributes); in env_attr_lookup()
190 free(priv.attributes); in env_attr_lookup()
256 * Retrieve the attributes string associated with a single name in the list
257 * There is no protection on attributes being too small for the value
259 int env_attr_lookup(const char *attr_list, const char *name, char *attributes) in env_attr_lookup() argument
264 if (!attributes) in env_attr_lookup()
298 memcpy(attributes, entry, len); in env_attr_lookup()
300 attributes[len] = '\0'; in env_attr_lookup()