示例#1
0
文件: attr.c 项目: OrangeTide/libcgi
/* 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;
}
示例#2
0
文件: attr.c 项目: 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);
}
示例#3
0
文件: attr.c 项目: OrangeTide/libcgi
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;
}