14 static inline int fancy_cmp(const struct item *a, const struct item *b,
17 unsigned vala = a->value ^ ctx->xcode;
18 unsigned valb = b->value ^ ctx->xcode;
19 const char *stra, *strb;
26 stra = a->str + ctx->offset;
27 strb = b->str + ctx->offset;
29 return strcmp(stra, strb);
32 static inline int fancy_cmp_noctx(const void *av, const void *bv)
34 const struct item *a = (const struct item *)av;
35 const struct item *b = (const struct item *)bv;
36 struct cmp_info ctx_default = {
40 total_order(default_order, struct item, struct cmp_info *) = {
41 fancy_cmp, &ctx_default,
44 return default_order.cb(a, b, default_order.ctx);
47 #endif /* _FANCY_CMP_H */