Commit | Line | Data |
---|---|---|
04c6839a WJ |
1 | #include "quipu/util.h" |
2 | #include "quipu/attrvalue.h" | |
3 | ||
4 | as_cmp_comp (a,b) | |
5 | Attr_Sequence a,b; | |
6 | { | |
7 | int i; | |
8 | if (( i= AttrT_cmp (a->attr_type,b->attr_type)) != 0) | |
9 | return (i); | |
10 | ||
11 | return (avs_cmp (a->attr_value,b->attr_value)); | |
12 | } | |
13 | ||
14 | as_cmp (a,b) | |
15 | Attr_Sequence a,b; | |
16 | { | |
17 | int i; | |
18 | for (; (a != NULLATTR) && (b != NULLATTR) ; a = a->attr_link, b = b->attr_link) | |
19 | if ( (i =as_cmp_comp (a,b)) != 0) | |
20 | return (i); | |
21 | ||
22 | if ( (a == NULLATTR) && (b == NULLATTR) ) | |
23 | return (0); | |
24 | else | |
25 | return (a ? 1 : -1); | |
26 | ||
27 | } | |
28 |