Annotation of 43BSDReno/contrib/isode-beta/dsap/common/as_cpy.c, revision 1.1

1.1     ! root        1: #include "quipu/util.h"
        !             2: #include "quipu/attrvalue.h"
        !             3: #include "quipu/malloc.h"
        !             4: 
        !             5: extern LLog * log_dsap;
        !             6: 
        !             7: static Attr_Sequence eptr;
        !             8: #define foreach(a)       for(eptr = a; eptr != NULLATTR; eptr=eptr->attr_link)
        !             9: 
        !            10: Attr_Sequence  as_comp_cpy (as)
        !            11: Attr_Sequence  as;
        !            12: {
        !            13: Attr_Sequence ptr;
        !            14: 
        !            15:        if (as==NULLATTR) {
        !            16:                DLOG (log_dsap,LLOG_DEBUG,("copy of null as"));
        !            17:                return (NULLATTR);
        !            18:        }
        !            19: 
        !            20:        ptr = (Attr_Sequence) smalloc (sizeof(attrcomp));
        !            21:        ptr->attr_type = AttrT_cpy (as->attr_type);
        !            22: 
        !            23:        ATTRIBUTE_HEAP;
        !            24: 
        !            25:        ptr->attr_value = avs_cpy  (as->attr_value);
        !            26:        ptr->attr_link = NULLATTR;
        !            27:        ptr->attr_acl = NULLACL_INFO;
        !            28: 
        !            29:        RESTORE_HEAP;
        !            30: 
        !            31:        return (ptr);
        !            32: }
        !            33: 
        !            34: Attr_Sequence  as_cpy (as)
        !            35: Attr_Sequence  as;
        !            36: {
        !            37: Attr_Sequence start;
        !            38: Attr_Sequence ptr,ptr2;
        !            39: 
        !            40:        if (as == NULLATTR) {
        !            41:                DLOG (log_dsap,LLOG_DEBUG,("as_cpy of null as"));
        !            42:                return (NULLATTR);
        !            43:        }
        !            44:        start = as_comp_cpy (as);
        !            45:        ptr2 = start;
        !            46:        foreach (as->attr_link) {
        !            47:                ptr = as_comp_cpy (eptr);
        !            48:                ptr2->attr_link = ptr;
        !            49:                ptr2 = ptr;
        !            50:        }
        !            51:        return (start);
        !            52: }
        !            53: 

unix.superglobalmegacorp.com

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