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