xref: /csrg-svn/usr.bin/f77/libF77/i_sign.c (revision 47940)
1*47940Sbostic /*-
2*47940Sbostic  * Copyright (c) 1980 The Regents of the University of California.
3*47940Sbostic  * All rights reserved.
422917Skre  *
5*47940Sbostic  * %sccs.include.proprietary.c%
610504Sdlw  */
710504Sdlw 
8*47940Sbostic #ifndef lint
9*47940Sbostic static char sccsid[] = "@(#)i_sign.c	5.2 (Berkeley) 04/12/91";
10*47940Sbostic #endif /* not lint */
11*47940Sbostic 
i_sign(a,b)1210504Sdlw long int i_sign(a,b)
1310504Sdlw long int *a, *b;
1410504Sdlw {
1510504Sdlw long int x;
1610504Sdlw x = (*a >= 0 ? *a : - *a);
1710504Sdlw return( *b >= 0 ? x : -x);
1810504Sdlw }
19