home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / LIBSRC.ZOO / libsrc / longlong / cmpdi2.c < prev    next >
Text File  |  1992-03-14  |  384b  |  21 lines

  1. #include "longlong.h"
  2.  
  3. SItype
  4. __cmpdi2 (a, b)
  5.      long long a, b;
  6. {
  7.   long_long au, bu;
  8.  
  9.   au.ll = a, bu.ll = b;
  10.  
  11.   if (au.s.high < bu.s.high)
  12.     return 0;
  13.   else if (au.s.high > 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.