xref: /csrg-svn/lib/libc/stdlib/abs.c (revision 61180)
142099Sbostic /*-
2*61180Sbostic  * Copyright (c) 1990, 1993
3*61180Sbostic  *	The Regents of the University of California.  All rights reserved.
442099Sbostic  *
542099Sbostic  * %sccs.include.redist.c%
642099Sbostic  */
742099Sbostic 
842099Sbostic #if defined(LIBC_SCCS) && !defined(lint)
9*61180Sbostic static char sccsid[] = "@(#)abs.c	8.1 (Berkeley) 06/04/93";
1042099Sbostic #endif /* LIBC_SCCS and not lint */
1142099Sbostic 
1242179Sbostic #include <stdlib.h>
1342179Sbostic 
1442099Sbostic int
abs(j)1542099Sbostic abs(j)
1642099Sbostic 	int j;
1742099Sbostic {
1842099Sbostic 	return(j < 0 ? -j : j);
1942099Sbostic }
20