home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
InfoMagic Source Code 1993 July
/
THE_SOURCE_CODE_CD_ROM.iso
/
bsd_srcs
/
usr.bin
/
gcc
/
gnulib
/
longlong
/
cmpdi2.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-01-21
|
351 b
|
21 lines
#include "longlong.h"
SItype
__cmpdi2 (a, b)
long long a, b;
{
long_long au, bu;
au.ll = a, bu.ll = b;
if (au.s.high < bu.s.high)
return 0;
else if (au.s.high > bu.s.high)
return 2;
if ((unsigned) au.s.low < (unsigned) bu.s.low)
return 0;
else if ((unsigned) au.s.low > (unsigned) bu.s.low)
return 2;
return 1;
}