Name: Anonymous 2011-02-03 19:14
Do you like my list comparison function?
#define NEXT(x) (p = (p)->next)
int compare (struct int_list *p, struct int_list *q) {
for(; p && q; NEXT(p), NEXT(q));
return p ? q ? p->value < q->value ? -1 : q->value < p->value ? 1 : 0 : 1 : q ? -1 : 0;
}
#undef NEXT