From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- libmath/bin/unif_dtoa | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 libmath/bin/unif_dtoa (limited to 'libmath/bin/unif_dtoa') diff --git a/libmath/bin/unif_dtoa b/libmath/bin/unif_dtoa new file mode 100644 index 00000000..bb365822 --- /dev/null +++ b/libmath/bin/unif_dtoa @@ -0,0 +1,37 @@ +#!/bin/rc +test -d /netlib/fp || 9fs netlib +test -d /n/hati/usr/ehg || 9fs hati + +echo '/* derived from /netlib/fp/dtoa.c assuming IEEE, Standard C */' > dtoa.c +echo '/* kudos to dmg@research.att.com, gripes to ehg@research.att.com */' >> dtoa.c +echo '#include "lib9.h"' >> dtoa.c + +sed 's/^#if defined.IEEE_8087. . defined.IEEE_MC68k.*!= 1/#ifndef IEEE_Arith/ + s/^#if defined.IEEE_8087. . defined.IEEE_MC68k.*/#ifdef IEEE_Arith/' \ + /netlib/fp/dtoa.c > /n/hati/usr/ehg/xxx.c +# undefine __STDC__ because we can't depend on HUGE_VAL +rx hati 'unifdef -UIBM -UVAX -UKR_headers -U__cplusplus -U__STDC__ -UDEBUG \ + -UBad_float_h -UJust_16 -UInaccurate_Divide -UROUND_BIASED \ + -URND_PRODQUOT -DNo_leftright -UCheck_FLT_ROUNDS -D__MATH_H__ \ + -DUnsigned_Shifts -DMALLOC=Malloc -DCONST=const \ + -DPack_32 -DIEEE_Arith xxx.c | cb -s' > xxx.c +sam -d >> dtoa.c >[2] err <> dtoa.c +rm xxx.c -- cgit v1.2.3