Go Fish/C: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 69:
int shuffle_cmp(const void * a, const void *b)
{
int x = ((const shuffle_t*)a)->n, y = ((const shuffle_t*)b)->n;
return x < y ? -1 : x > y;
}
Line 75:
int card_cmp(const void *aa, const void *bb)
{
card a = *(const card*)aa, b = *(const card*)bb;
if (aa == bb) return 0;
if (!aaa == b) return 10;
if (!bba) return -1;
if (aa == bb!b) return 0-1;
 
card a = *(card*)aa, b = *(card*)bb;
if (a->num < b->num) return -1;
if (a->num > b->num) return 1;
Anonymous user