diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-02 19:06:04 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1998-07-02 19:06:04 +0000 |
commit | 186df561f20e8ff3f8c74f3f4ef6ac29f67485e2 (patch) | |
tree | 8e23f01a9975fe3c59d7ee922be9e679137c65e3 /sys/arch/hppa/spmath/fcnvff.c | |
parent | 387f724d77fa7589fc76165f07621db9817fb9b1 (diff) |
ansi and fancy gcc
Diffstat (limited to 'sys/arch/hppa/spmath/fcnvff.c')
-rw-r--r-- | sys/arch/hppa/spmath/fcnvff.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/sys/arch/hppa/spmath/fcnvff.c b/sys/arch/hppa/spmath/fcnvff.c index 5d6830b0d3c..9db752b0886 100644 --- a/sys/arch/hppa/spmath/fcnvff.c +++ b/sys/arch/hppa/spmath/fcnvff.c @@ -1,3 +1,5 @@ +/* $OpenBSD: fcnvff.c,v 1.3 1998/07/02 19:05:18 mickey Exp $ */ + /* * Copyright 1996 1995 by Open Software Foundation, Inc. * All Rights Reserved @@ -46,11 +48,13 @@ * Single Floating-point to Double Floating-point */ /*ARGSUSED*/ +int sgl_to_dbl_fcnvff(srcptr,nullptr,dstptr,status) sgl_floating_point *srcptr; dbl_floating_point *dstptr; -unsigned int *nullptr, *status; +void *nullptr; +unsigned int *status; { register unsigned int src, resultp1, resultp2; register int src_exponent; @@ -132,11 +136,13 @@ unsigned int *nullptr, *status; * Double Floating-point to Single Floating-point */ /*ARGSUSED*/ +int dbl_to_sgl_fcnvff(srcptr,nullptr,dstptr,status) dbl_floating_point *srcptr; sgl_floating_point *dstptr; -unsigned int *nullptr, *status; +void *nullptr; +unsigned int *status; { register unsigned int srcp1, srcp2, result; register int src_exponent, dest_exponent, dest_mantissa; @@ -252,10 +258,12 @@ unsigned int *nullptr, *status; */ Sgl_setwrapped_exponent(result,dest_exponent,ovfl); *dstptr = result; - if (inexact) + if (inexact) { if (Is_inexacttrap_enabled()) return(OVERFLOWEXCEPTION|INEXACTEXCEPTION); - else Set_inexactflag(); + else + Set_inexactflag(); + } return(OVERFLOWEXCEPTION); } Set_overflowflag(); @@ -279,10 +287,12 @@ unsigned int *nullptr, *status; */ Sgl_setwrapped_exponent(result,dest_exponent,unfl); *dstptr = result; - if (inexact) + if (inexact) { if (Is_inexacttrap_enabled()) return(UNDERFLOWEXCEPTION|INEXACTEXCEPTION); - else Set_inexactflag(); + else + Set_inexactflag(); + } return(UNDERFLOWEXCEPTION); } /* @@ -296,8 +306,9 @@ unsigned int *nullptr, *status; /* * Trap if inexact trap is enabled */ - if (inexact) + if (inexact) { if (Is_inexacttrap_enabled()) return(INEXACTEXCEPTION); else Set_inexactflag(); + } return(NOEXCEPTION); } |