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

1.1       root        1: #include "quipu/util.h"
                      2: #include "quipu/attrvalue.h"
                      3: 
                      4: extern LLog * log_dsap;
                      5: 
                      6: static AV_Sequence eptr;
                      7: #define foreach(a)      for(eptr = a; eptr != NULLAV; eptr = eptr->avseq_next)
                      8: 
                      9: AV_Sequence  avs_comp_cpy (avs)
                     10: AV_Sequence  avs;
                     11: {
                     12: AV_Sequence ptr;
                     13: 
                     14:        if (avs==NULLAV) {
                     15:                DLOG (log_dsap,LLOG_DEBUG,("copy of null avs"));
                     16:                return (NULLAV);
                     17:        }
                     18:        ptr = (AV_Sequence) smalloc (sizeof(avseqcomp));
                     19:        AttrV_cpy_aux (&avs->avseq_av,&ptr->avseq_av);
                     20:        ptr->avseq_next = NULLAV;
                     21:        return (ptr);
                     22: }
                     23: 
                     24: AV_Sequence  avs_cpy (avs)
                     25: AV_Sequence  avs;
                     26: {
                     27: AV_Sequence start;
                     28: AV_Sequence ptr,ptr2;
                     29: 
                     30:        if (avs == NULLAV ) {
                     31:                DLOG (log_dsap,LLOG_DEBUG,("avs_cpy of null avs"));
                     32:                return (NULLAV);
                     33:        }
                     34:        start = avs_comp_cpy (avs);
                     35:        ptr2 = start;
                     36:        foreach (avs->avseq_next) {
                     37:                ptr = avs_comp_cpy (eptr);
                     38:                ptr2->avseq_next = ptr;
                     39:                ptr2 = ptr;
                     40:        }
                     41:        return (start);
                     42: }
                     43: 

unix.superglobalmegacorp.com

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