Ejemplo n.º 1
0
/* 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;
}
Ejemplo n.º 2
0
Archivo: attr.c Proyecto: bgraves/dowse
/* 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);
}
Ejemplo n.º 3
0
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;
}