/* get an attribute, return NULL if not found */ const _char *attrget(attrlist_t al, const char *name) { attr_t *at; int type; type=attrtype(name); at=attrlookup(al, type); return at?at->value:NULL; }
/* get an attribute, return NULL if not found */ attr_t *attrget(attrlist_t al, const char *name) { attr_t *at; int type; type = attrtype(name); at = attrlookup(al, type); return(at); }
static attr_t *setup_access(attrlist_t al, const char *name) { attr_t *at; int type; type=attrtype(name); if(type==-1) { /* type not found add it to the global list */ type=nameadd(name); } at=attrlookup(al, type); if(!at) { /* create a new attribute if it doesn't exist */ at=attradd(al, type); } return at; }