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

1.1     ! root        1: /* ca.c - General Directory Name routines */
        !             2: 
        !             3: #ifndef lint
        !             4: static char *rcsid = "$Header: /f/osi/dsap/common/RCS/ca.c,v 7.1 89/12/19 16:19:13 mrose Exp $";
        !             5: #endif
        !             6: 
        !             7: /*
        !             8:  * $Header: /f/osi/dsap/common/RCS/ca.c,v 7.1 89/12/19 16:19:13 mrose Exp $
        !             9:  *
        !            10:  *
        !            11:  * $Log:       ca.c,v $
        !            12:  * Revision 7.1  89/12/19  16:19:13  mrose
        !            13:  * sync
        !            14:  * 
        !            15:  * Revision 7.0  89/11/23  21:41:55  mrose
        !            16:  * Release 6.0
        !            17:  * 
        !            18:  */
        !            19: 
        !            20: /*
        !            21:  *                                NOTICE
        !            22:  *
        !            23:  *    Acquisition, use, and distribution of this module and related
        !            24:  *    materials are subject to the restrictions of a license agreement.
        !            25:  *    Consult the Preface in the User's Manual for the full terms of
        !            26:  *    this agreement.
        !            27:  *
        !            28:  */
        !            29: 
        !            30: 
        !            31: /* LINTLIBRARY */
        !            32: 
        !            33: 
        !            34: #include "quipu/util.h"
        !            35: #include "quipu/common.h"
        !            36: #include "quipu/dsargument.h"
        !            37: 
        !            38: DN mydsadn = NULLDN;   
        !            39: 
        !            40: struct common_args      * get_ca_ref(dsarg)
        !            41: struct ds_op_arg        * dsarg;
        !            42: {
        !            43:     struct common_args  * ca;
        !            44: 
        !            45:     switch(dsarg->dca_dsarg.arg_type)
        !            46:     {
        !            47:     case OP_READ :
        !            48:        ca = &(dsarg->dca_dsarg.arg_rd.rda_common);
        !            49:     break;
        !            50:     case OP_COMPARE :
        !            51:        ca = &(dsarg->dca_dsarg.arg_cm.cma_common);
        !            52:     break;
        !            53:     case OP_ABANDON :
        !            54:        ca = NULL_COMMONARG;
        !            55:     break;
        !            56:     case OP_LIST :
        !            57:        ca = &(dsarg->dca_dsarg.arg_ls.lsa_common);
        !            58:     break;
        !            59:     case OP_SEARCH :
        !            60:        ca = &(dsarg->dca_dsarg.arg_sr.sra_common);
        !            61:     break;
        !            62:     case OP_ADDENTRY :
        !            63:        ca = &(dsarg->dca_dsarg.arg_ad.ada_common);
        !            64:     break;
        !            65:     case OP_REMOVEENTRY :
        !            66:        ca = &(dsarg->dca_dsarg.arg_rm.rma_common);
        !            67:     break;
        !            68:     case OP_MODIFYENTRY :
        !            69:        ca = &(dsarg->dca_dsarg.arg_me.mea_common);
        !            70:     break;
        !            71:     case OP_MODIFYRDN :
        !            72:        ca = &(dsarg->dca_dsarg.arg_mr.mra_common);
        !            73:     break;
        !            74:     case OP_GETEDB :
        !            75:        ca = NULL_COMMONARG;
        !            76:     break;
        !            77:     }
        !            78:     return(ca);
        !            79: }
        !            80: 
        !            81: cha_loopdetected(cha)
        !            82: struct chain_arg       * cha;
        !            83: {
        !            84:     struct trace_info    ti_elem_s;
        !            85:     struct trace_info  * ti_elem = &(ti_elem_s);
        !            86: 
        !            87:     ti_elem->ti_dsa = mydsadn;
        !            88:     ti_elem->ti_target = cha->cha_target;
        !            89:     ti_elem->ti_progress.op_resolution_phase = cha->cha_progress.op_resolution_phase;
        !            90:     ti_elem->ti_progress.op_nextrdntoberesolved = cha->cha_progress.op_nextrdntoberesolved;
        !            91: 
        !            92:     return(ti_is_elem(ti_elem, cha->cha_trace));
        !            93: }
        !            94: 
        !            95: ti_is_elem(ti, ti_list)
        !            96: struct trace_info      * ti;
        !            97: struct trace_info      * ti_list;
        !            98: {
        !            99:     struct trace_info  * tip;
        !           100: 
        !           101:     for(tip = ti_list; tip!=NULLTRACEINFO; tip=tip->ti_next)
        !           102:     {
        !           103:        if(dn_cmp(ti->ti_dsa, tip->ti_dsa) != 0)
        !           104:            continue;
        !           105: 
        !           106:        if(dn_cmp(ti->ti_target, tip->ti_target) != 0)
        !           107:            continue;
        !           108: 
        !           109:        if(ti->ti_progress.op_resolution_phase == tip->ti_progress.op_resolution_phase)
        !           110:            return(1);
        !           111: 
        !           112:        if(ti->ti_progress.op_nextrdntoberesolved == tip->ti_progress.op_nextrdntoberesolved)
        !           113:            return(1);
        !           114:     }
        !           115: 
        !           116:     return(0);
        !           117: }
        !           118: 
        !           119: struct trace_info      * ti_cpy(ti)
        !           120: struct trace_info      * ti;
        !           121: {
        !           122:     struct trace_info  * ret_ti;
        !           123: 
        !           124:     if(ti == NULLTRACEINFO)
        !           125:        return(NULLTRACEINFO);
        !           126: 
        !           127:     ret_ti = (struct trace_info *) malloc(sizeof(struct trace_info));
        !           128: 
        !           129:     ret_ti->ti_target = dn_cpy(ti->ti_target);
        !           130:     ret_ti->ti_dsa = dn_cpy(ti->ti_dsa);
        !           131:     ret_ti->ti_progress = ti->ti_progress;
        !           132:     ret_ti->ti_next = ti_cpy(ti->ti_next);
        !           133: 
        !           134:     return(ret_ti);
        !           135: }
        !           136: 

unix.superglobalmegacorp.com

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