xref: /csrg-svn/lib/libc/stdlib/labs.c (revision 42179)
142100Sbostic /*-
242100Sbostic  * Copyright (c) 1990 The Regents of the University of California.
342100Sbostic  * All rights reserved.
442100Sbostic  *
542100Sbostic  * %sccs.include.redist.c%
642100Sbostic  */
742100Sbostic 
842100Sbostic #if defined(LIBC_SCCS) && !defined(lint)
9*42179Sbostic static char sccsid[] = "@(#)labs.c	5.2 (Berkeley) 05/17/90";
1042100Sbostic #endif /* LIBC_SCCS and not lint */
1142100Sbostic 
12*42179Sbostic #include <stdlib.h>
13*42179Sbostic 
1442100Sbostic long
1542100Sbostic labs(j)
1642100Sbostic 	long j;
1742100Sbostic {
1842100Sbostic 	return(j < 0 ? -j : j);
1942100Sbostic }
20