xref: /csrg-svn/lib/libc/stdlib/abs.c (revision 42099)
1*42099Sbostic /*-
2*42099Sbostic  * Copyright (c) 1990 The Regents of the University of California.
3*42099Sbostic  * All rights reserved.
4*42099Sbostic  *
5*42099Sbostic  * %sccs.include.redist.c%
6*42099Sbostic  */
7*42099Sbostic 
8*42099Sbostic #if defined(LIBC_SCCS) && !defined(lint)
9*42099Sbostic static char sccsid[] = "@(#)abs.c	5.1 (Berkeley) 05/15/90";
10*42099Sbostic #endif /* LIBC_SCCS and not lint */
11*42099Sbostic 
12*42099Sbostic int
13*42099Sbostic abs(j)
14*42099Sbostic 	int j;
15*42099Sbostic {
16*42099Sbostic 	return(j < 0 ? -j : j);
17*42099Sbostic }
18