home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / longlong / ucmpdi2.c < prev    next >
C/C++ Source or Header  |  1992-02-22  |  396b  |  21 lines

  1. #include "longlong.h"
  2.  
  3. SItype
  4. __ucmpdi2 (a, b)
  5.      long long a, b;
  6. {
  7.   long_long au, bu;
  8.  
  9.   au.ll = a, bu.ll = b;
  10.  
  11.   if ((unsigned) au.s.high < (unsigned) bu.s.high)
  12.     return 0;
  13.   else if ((unsigned) au.s.high > (unsigned) bu.s.high)
  14.     return 2;
  15.   if ((unsigned) au.s.low < (unsigned) bu.s.low)
  16.     return 0;
  17.   else if ((unsigned) au.s.low > (unsigned) bu.s.low)
  18.     return 2;
  19.   return 1;
  20. }
  21.