This version of mystructcmp uses explicit comparisons,
rather than the more obvious subtractions,
to decide whether to return a negative, zero, or positive value.
In general, it's safer to write comparison functions this way:
subtraction can easily overflow
(and cause either an abort or a quiet wrong answer)
when a very large positive number is compared with
a very large negative number.
in this example,
overflow would be unlikely in any case.)
about this FAQ list