home *** CD-ROM | disk | FTP | other *** search
- #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);
- }
-