Exemplo 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;
}
Exemplo n.º 2
0
Arquivo: attr.c Projeto: 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);
}
Exemplo 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;
}