home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
src
/
c
/
abs
< prev
next >
Wrap
Text File
|
1994-03-08
|
452b
|
34 lines
#ifdef __STDC__
static char sccs_id[] = "@(#) abs.c 1.1 " __DATE__ " HJR";
#else
static char sccs_id[] = "@(#) abs.c 1.1 26/9/90 HJR";
#endif
/* abs.c (c) Copyright 1990 H.Rogers */
#include <stdlib.h>
#ifdef __STDC__
int
abs (register int x)
#else
int
abs (x)
register int x;
#endif
{
return ((x < 0) ? -x : x);
}
#ifdef __STDC__
long
labs (register long x)
#else
long
labs (x)
register long x;
#endif
{
return ((x < 0) ? -x : x);
}