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

1.1       root        1: #include "quipu/util.h"
                      2: #include "quipu/name.h"
                      3: 
                      4: dn_cmp (a,b)
                      5: register DN  a,b;
                      6: {
                      7: int res;
                      8: 
                      9:        for (; (a != NULLDN) && (b != NULLDN) ; a = a->dn_parent, b = b->dn_parent)
                     10:                if ( (res = rdn_cmp (a->dn_rdn,b->dn_rdn)) != OK) {
                     11:                        return res;
                     12:                }
                     13: 
                     14:        if (( a == NULLDN) && (b == NULLDN)) {
                     15:                return OK;
                     16:        } else {
                     17:                return ( a == NULLDN ? 1 : -1 );
                     18:        }
                     19: 
                     20: }
                     21: 
                     22: dn_cmp_prefix (a,b)
                     23: register DN  a,b;
                     24: {
                     25:        for (; a != NULLDN && b != NULLDN ; a = a->dn_parent, b = b->dn_parent)
                     26:                if ( dn_comp_cmp (a,b) == NOTOK) {
                     27:                        return NOTOK;
                     28:                }
                     29: 
                     30:        if ( a == NULLDN) {
                     31:                return OK;
                     32:        } else {
                     33:                return NOTOK;
                     34:        }
                     35: 
                     36: }
                     37: 

unix.superglobalmegacorp.com

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