DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦ee7ca1d9a⟧ TextFile

    Length: 1195 (0x4ab)
    Types: TextFile
    Names: »attrt_new.c«

Derivation

└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0
    └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« 
        └─⟦de7628f85⟧ 
            └─⟦this⟧ »isode-6.0/dsap/common/attrt_new.c« 

TextFile

#include "quipu/util.h"
#include "quipu/name.h"

oid_table_attr * AttrT_new_aux (name)
register char * name;
{
oid_table * Current;
extern oid_table_attr attrOIDTable [];
oid_table_attr  *res;
extern attrNumEntries;
char * get_oid ();

	if ((res = name2attr (name)) == NULLTABLE_ATTR) {
		/* attribute not in tables, add as "ASN" if possible */
		char * ptr;
		OID oid;

		if ((ptr = get_oid (name)) == NULLCP) 
			return (NULLTABLE_ATTR);

		Current = &attrOIDTable[attrNumEntries].oa_ot;
		(void) strcpy (Current->ot_name, name);
		add_entry_aux (Current->ot_name,(caddr_t)&attrOIDTable[attrNumEntries],2,NULLCP);
		(void) strcpy (Current->ot_stroid,ptr);

		oid = str2oid (Current->ot_stroid);
		if (oid == NULLOID)
			Current->ot_oid = NULLOID;
		else
			Current->ot_oid = oid_cpy (oid);
		attrOIDTable[attrNumEntries].oa_syntax = 0;
		return (&attrOIDTable[attrNumEntries++]);
	}
	return (res);
}

AttributeType AttrT_new (name)
register char * name;
{
register AttributeType y;
oid_table_attr  *res;

	if ((res = AttrT_new_aux(name)) == NULLTABLE_ATTR)
		return (NULLAttrT);

	y = (AttributeType) smalloc (sizeof (attrType));
	y -> at_oid = NULLOID;
	y -> at_table = res;
	return (y);
}