File:  [CSRG BSD Unix] / 43BSDReno / contrib / isode-beta / dsap / common / as_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/attrvalue.h"

as_cmp_comp (a,b)
Attr_Sequence  a,b;
{
int i;
	if (( i= AttrT_cmp (a->attr_type,b->attr_type)) != 0)
		return (i);

	return (avs_cmp (a->attr_value,b->attr_value));
}

as_cmp (a,b)
Attr_Sequence  a,b;
{
int i;
	for (; (a != NULLATTR) && (b != NULLATTR) ; a = a->attr_link, b = b->attr_link)
		if ( (i =as_cmp_comp (a,b)) != 0)
			return (i);

	if ( (a == NULLATTR) && (b == NULLATTR) )
		return (0);
	else
		return (a ? 1  : -1);

}


unix.superglobalmegacorp.com

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