Annotation of 43BSDReno/contrib/isode-beta/dsap/common/attrt_new.c, revision 1.1.1.1

1.1       root        1: #include "quipu/util.h"
                      2: #include "quipu/name.h"
                      3: 
                      4: AttributeType AttrT_new (name)
                      5: register char * name;
                      6: {
                      7: oid_table * Current;
                      8: extern oid_table_attr attrOIDTable [];
                      9: oid_table_attr  *res;
                     10: extern attrNumEntries;
                     11: char * get_oid ();
                     12: 
                     13:        if ((res = name2attr (name)) == NULLTABLE_ATTR) {
                     14:                /* attribute not in tables, add as "ASN" if possible */
                     15:                char * ptr;
                     16:                OID oid;
                     17: 
                     18:                if ((ptr = get_oid (name)) == NULLCP) 
                     19:                        return (NULLTABLE_ATTR);
                     20: 
                     21:                Current = &attrOIDTable[attrNumEntries].oa_ot;
                     22:                (void) strcpy (Current->ot_name, name);
                     23:                add_entry_aux (Current->ot_name,(caddr_t)&attrOIDTable[attrNumEntries],2,NULLCP);
                     24:                (void) strcpy (Current->ot_stroid,ptr);
                     25: 
                     26:                oid = str2oid (Current->ot_stroid);
                     27:                if (oid == NULLOID)
                     28:                        Current->ot_oid = NULLOID;
                     29:                else
                     30:                        Current->ot_oid = oid_cpy (oid);
                     31:                attrOIDTable[attrNumEntries].oa_syntax = 0;
                     32:                return (&attrOIDTable[attrNumEntries++]);
                     33:        }
                     34:        return (res);
                     35: }
                     36: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.