File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / dsap / common / dn_cmp.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

#include "quipu/util.h"
#include "quipu/name.h"

dn_cmp (a,b)
register DN  a,b;
{
int res;

	for (; (a != NULLDN) && (b != NULLDN) ; a = a->dn_parent, b = b->dn_parent)
		if ( (res = rdn_cmp (a->dn_rdn,b->dn_rdn)) != OK) {
			return res;
		}

	if (( a == NULLDN) && (b == NULLDN)) {
		return OK;
	} else {
		return ( a == NULLDN ? 1 : -1 );
	}

}

dn_cmp_prefix (a,b)
register DN  a,b;
{
	for (; a != NULLDN && b != NULLDN ; a = a->dn_parent, b = b->dn_parent)
		if ( dn_comp_cmp (a,b) == NOTOK) {
			return NOTOK;
		}

	if ( a == NULLDN) {
		return OK;
	} else {
		return NOTOK;
	}

}


unix.superglobalmegacorp.com

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