-int compar_state(const void * a, const void * b) {
- // didn't work: (the result is truncated to 32 bits)
- //return (*(int64_t*)b - *(int64_t*)a);
-
- // better:
- if (*(int64_t*)b == *(int64_t*)a) return 0;
- else if (*(int64_t*)b > *(int64_t*)a) return 1;
- else return -1;
-}
-