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

1.1       root        1: #include "quipu/util.h"
                      2: #include "quipu/attrvalue.h"
                      3: 
                      4: short oc_sntx = -1;
                      5: IFP oc_hier = NULLIFP;
                      6: short acl_sntx = -1;
                      7: IFP merge_acl = NULLIFP;
                      8: 
                      9: AV_Sequence str2avs (str,at)
                     10: char * str;
                     11: AttributeType at;
                     12: {
                     13: char * ptr;
                     14: char * save,val;
                     15: AV_Sequence avs = NULLAV;
                     16: AV_Sequence newavs;
                     17: 
                     18:        if (str == NULLCP)
                     19:                return (NULLAV);
                     20: 
                     21:        if ((at) && (at->oa_syntax == oc_sntx))
                     22:                return ((AV_Sequence)(*oc_hier)(str));
                     23: 
                     24:        while ((ptr = index (str,'&')) != 0) {
                     25:                save = ptr++;
                     26:                save--;
                     27:                if (! isspace (*save))
                     28:                        save++;
                     29:                val = *save;
                     30:                *save = 0;
                     31: 
                     32:                if ((avs) && (at->oa_syntax == acl_sntx)) {
                     33:                        (*merge_acl)(avs,SkipSpace(str));
                     34:                        *save = val;
                     35:                        str = ptr;
                     36:                        continue;
                     37:                }
                     38: 
                     39:                newavs = avs_comp_alloc();
                     40:                newavs->avseq_next = NULLAV;
                     41: 
                     42:                if (str_at2AttrV_aux (str,at,&newavs->avseq_av) == NOTOK)
                     43:                        return (NULLAV);
                     44: 
                     45:                *save = val;
                     46:                str = ptr;
                     47:                avs = avs_merge (avs,newavs);
                     48:        }
                     49: 
                     50:        if ((avs) && (at->oa_syntax == acl_sntx)) {
                     51:                (*merge_acl)(avs,SkipSpace(str));
                     52:                return (avs);
                     53:        }
                     54: 
                     55:        newavs = avs_comp_alloc();
                     56:        newavs->avseq_next = NULLAV;
                     57: 
                     58:        if (str_at2AttrV_aux (str,at,&newavs->avseq_av) == NOTOK)
                     59:                return (NULLAV);
                     60: 
                     61:        return (avs_merge (avs,newavs));
                     62: 
                     63: }

unix.superglobalmegacorp.com

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