Commit | Line | Data |
---|---|---|
aeeab106 KB |
1 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | */ | |
7 | ||
8 | #if defined(LIBC_SCCS) && !defined(lint) | |
dd967b02 | 9 | static char sccsid[] = "@(#)abs.c 5.2 (Berkeley) %G%"; |
aeeab106 KB |
10 | #endif /* LIBC_SCCS and not lint */ |
11 | ||
dd967b02 KB |
12 | #include <stdlib.h> |
13 | ||
aeeab106 KB |
14 | int |
15 | abs(j) | |
16 | int j; | |
17 | { | |
18 | return(j < 0 ? -j : j); | |
19 | } |