[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] Lisp format in sf.spad.pamphlet
From: |
Waldek Hebisch |
Subject: |
Re: [Axiom-developer] Lisp format in sf.spad.pamphlet |
Date: |
Fri, 16 Feb 2007 00:56:20 +0100 (CET) |
Gregory Vanuxem wrote:
> Hello,
>
> I have introduced two bugs in DFLOAT when I sent a patch against
> sf.spad.pamphlet (outputting routine). Try, for example,
> complex(1.7,address@hidden) or address@hidden Furthermore, the directive
> used ("~G") is not "the" good one (it's not portable, the directive
> works this way only on GCL). Patch in attachment (I have used the Float
> method (via 'message')).
>
I wonder how portable "~A" is. The standard promises nice output,
but nothing more. OTOH all Lisp implementations that I tried get
"~G" wrong (GCL does not add trailing spaces, the other lose
some significant digits).
> A suggestion, what about using )spool to produce *.output file?
> (to simplify the comparison via diff of two versions of Axiom (different
> banners)).
>
FYI: I use the script below. The crucial thing is at the end:
I use sed to delete banner and timing messages. I also normalize
paths that appear for various reasons (most from 'Loading' messages).
---------------------------<cut here>-------------------------
#!/bin/sh
DIR1=$1
DIR2=$2
echo DIR1=$DIR1
echo DIR2=$DIR2
ADIR1=$(cd $DIR1; pwd)
ADIR2=$(cd $DIR2; pwd)
verify_dir () {
if ! [ -d $1 ] ; then
echo $1: does not exist
exit
fi
}
verify_dir $ADIR1
verify_dir $ADIR2
IDIR1=$ADIR1/int/input
IDIR2=$ADIR2/int/input
verify_dir $IDIR1
verify_dir $IDIR2
TDIR1=$ADIR1/mnt
TDIR2=$ADIR2/mnt
if ! [ -d $TDIR1 ] ; then
TDIR1=$ADIR1/target
fi
if ! [ -d $TDIR2 ] ; then
TDIR2=$ADIR2/target
fi
verify_dir $TDIR1
verify_dir $TDIR2
PLF=""
for A in $(ls $TDIR1); do
if [ -d $TDIR1/$A ] ; then
if [ "$PLF"x != x ] ; then
echo $TDIR1: contains more then one subdirectory
else
PLF=$A
fi
fi
done
AX1=$TDIR1/$PLF
PLF=""
for A in $(ls $TDIR2); do
if [ -d $TDIR2/$A ] ; then
if [ "$PLF"x != x ] ; then
echo $TDIR2: contains more then one subdirectory
else
PLF=$A
fi
fi
done
AX2=$TDIR2/$PLF
echo AX1=$AX1
echo AX2=$AX2
trap "rm -f /tmp/tcmp1.$$ /tmp/tcmp2.$$" 0 2 3 15
cd $IDIR1
for A in *.output; do
echo Diffing $A
if ! [ -f $IDIR2/$A ] ; then
echo $A: only in $IDIR1
else
sed "1,/^(/d;/^ *Time: /d;s,$AX1,AXIOM,g" $A > /tmp/tcmp1.$$
sed "1,/^(/d;/^ *Time: /d;s,$AX2,AXIOM,g" $IDIR2/$A > /tmp/tcmp2.$$
diff -u /tmp/tcmp1.$$ /tmp/tcmp2.$$
fi
done
-----------------------<cut here>------------------------
--
Waldek Hebisch
address@hidden