home *** CD-ROM | disk | FTP | other *** search
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/Changelo,v
- retrieving revision 1.81
- diff -c -r1.81 Changelo
- *** 1.81 1992/10/09 20:32:44
- --- Changelo 1992/11/08 00:03:26
- ***************
- *** 3361,3363 ****
- --- 3361,3421 ----
- may be picked istead of the inline asm version.
-
- ---------------------------- Patchlevel 84 ---------------------------
- +
- + doprnt.c:: ++jrb
- + Revert out michaels 15 sig digit hack. causing too many problems
- + (michal jaegermann reports all kinds of failures from gawk, mawk).
- + Revert out DBL_EPSILON hack too..
- + Awaitings michals advise on how to fix mjr's problems...
- +
- + _addsub*:: Olaff (flebbe@tat.physik.uni-tuebingen.de)
- + To summarize the changes in both double and float arithmetic:
- +
- + * The "sticky" byte d2.b is now initalized properly. In the former
- + version it was a deterministic random generator.
- +
- + * The rounding is now computed correctly. The rounding bits reside in
- + d3.b.
- +
- + * Due to cancellation effects one get one extra bit. So a conditional
- + jump had to be modified.
- +
- + One extra bug was included in the single precision arithmetic.
- +
- + * When the routine discovered that shifting can be done by swapping, it
- + shifted the result one additional digit.
- +
- + _norm*:: Olaff (flebbe@tat.physik.uni-tuebingen.de)
- + round up towards even.
- +
- + bcopy.s, bzero.cpp: andreas
- + dont use a4 (for -mbaserel)
- +
- + linea.h:: ++jrb
- + linea2() really needs to declare its output (i know its implicit, but
- + unless you put it in the output list, g++ thinks linea2() does
- + not output anthing, and complains on its usage).
- +
- + doprnt.c:: ++jrb
- + change condition for unreasonable precision for floats. (it should not
- + have been MAXFRACT only as we do zero padding on the right).
- +
- + regexp.c :: ++jrb
- + - include <sys/types.h> instread of <types.h>
- + - fix cast in malloc from (unsigned) to (size_t) as it should be.
- +
- + regexp.c:: ++jrb
- + in regmatch(), there was over-enthusuatic conversion of
- + int to size_t that caused regular expressions to break.
- + please be careful!
- +
- + in the PLUS/STAR case, `no' needs to be a signed entity, other
- + wise the loop is useless.
- +
- + tregex in the library tests showed this up.
- +
- + doprnt.c:: ++jrb
- + constraint ("g") on the source operand was wrong for divu. source
- + has to be data addressable ("dmi" constrain should cover).
- +
- + ---------------------------- Patchlevel 85 ---------------------------
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/PatchLev.h,v
- retrieving revision 1.60
- diff -c -r1.60 PatchLev.h
- *** 1.60 1992/10/09 20:32:44
- --- PatchLev.h 1992/11/08 00:03:31
- ***************
- *** 1,5 ****
-
- ! #define PatchLevel "84"
-
- /*
- *
- --- 1,5 ----
-
- ! #define PatchLevel "85"
-
- /*
- *
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/lib/mincl,v
- retrieving revision 1.22
- diff -c -r1.22 mincl
- *** 1.22 1992/10/09 20:32:44
- --- mincl 1992/11/08 00:03:36
- ***************
- *** 10,16 ****
- _umoddi3.o _negdi2.o _anddi3.o _iordi3.o _xordi3.o _lshrdi3.o \
- _lshldi3.o _ashldi3.o _ashrdi3.o _one_cmpldi2.o _bdiv.o _cmpdi2.o \
- _ucmpdi2.o _fixunsdfdi.o _fixdfdi.o _floatdidf.o \
- ! _fxussfsi.o
-
- GCC= $(GLIB1) $(GLIB2) \
- ldexp.o frexp.o modf.o alloca.o setjmp.o osbind.o\
- --- 10,16 ----
- _umoddi3.o _negdi2.o _anddi3.o _iordi3.o _xordi3.o _lshrdi3.o \
- _lshldi3.o _ashldi3.o _ashrdi3.o _one_cmpldi2.o _bdiv.o _cmpdi2.o \
- _ucmpdi2.o _fixunsdfdi.o _fixdfdi.o _floatdidf.o \
- ! _fxussfsi.o _gccbcmp.o
-
- GCC= $(GLIB1) $(GLIB2) \
- ldexp.o frexp.o modf.o alloca.o setjmp.o osbind.o\
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_addsubd.cpp,v
- retrieving revision 1.2
- diff -c -r1.2 _addsubd.cpp
- *** 1.2 1992/10/09 20:35:29
- --- _addsubd.cpp 1992/11/06 23:02:09
- ***************
- *** 10,16 ****
- --- 10,30 ----
- |
- | written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
- | Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
- + | patched by Olaf Flebbe (flebbe@tat.physik.uni-tuebingen.de)
- + |
- + | Revision 1.3.2 olaf 10-92 :
- + | + increased comparson by one again. (Dont understand, but it works)
- + | + corrected negation of rounding bits and mantissa
- + | >enquire now detects correct IEEE precision
- + | >paranoia now qualifies add/sub as correctly rounded
- |
- + | Revision 1.3.1 olaf 10-92 :
- + | + increased comparison of exponents by one.
- + | + initialized sticky byte
- + | + corrected handling of rounding bits
- + | >paranoia now detects no SERIOUS DEFECTS any more
- + | ** Patches need _normdf Rev 1.6.1 (or higher) **
- + |
- | Revision 1.3, kub 01-90 :
- | added support for denormalized numbers
- |
- ***************
- *** 72,78 ****
- bpl 1f
- bchg #31,d2
- 1:
- ! cmpw #53,d1 | is u so much bigger that v is not
- bge 7f | significant ?
-
- movew #10-1,d3 | shift u left up to 10 bits to minimize loss
- --- 86,92 ----
- bpl 1f
- bchg #31,d2
- 1:
- ! cmpw #55,d1 | is u so much bigger that v is not
- bge 7f | significant ?
-
- movew #10-1,d3 | shift u left up to 10 bits to minimize loss
- ***************
- *** 83,88 ****
- --- 97,103 ----
- subw #1,d1 | done shifting altogether ?
- dbeq d3,2b | loop if still can shift u.mant more
- clrw d3
- + clrb d2 | clear "sticky byte"
- 3:
- cmpw #16,d1 | see if fast rotate possible
- blt 4f
- ***************
- *** 101,107 ****
- lsrl #1,d4 | shift v.mant right the rest of the way
- roxrl #1,d5 | to line it up with u.mant
- orb d3,d2 | set "sticky byte" if necessary
- ! roxrw #1,d3 | shift into rounding bits
- 4: dbra d1,0b | loop
- andb #1,d2 | see if "sticky bit" should be set
- orb d2,d3
- --- 116,122 ----
- lsrl #1,d4 | shift v.mant right the rest of the way
- roxrl #1,d5 | to line it up with u.mant
- orb d3,d2 | set "sticky byte" if necessary
- ! roxrb #1,d3 | shift into rounding bits
- 4: dbra d1,0b | loop
- andb #1,d2 | see if "sticky bit" should be set
- orb d2,d3
- ***************
- *** 110,116 ****
- bpl 6f | yes, no negate necessary
-
- negb d3 | negate rounding bits and v.mant
- ! negl d5
- negxl d4
- 6:
- addl d5,d7 | u.mant = u.mant + v.mant
- --- 125,131 ----
- bpl 6f | yes, no negate necessary
-
- negb d3 | negate rounding bits and v.mant
- ! negxl d5
- negxl d4
- 6:
- addl d5,d7 | u.mant = u.mant + v.mant
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_addsubs.cpp,v
- retrieving revision 1.2
- diff -c -r1.2 _addsubs.cpp
- *** 1.2 1992/10/09 20:35:29
- --- _addsubs.cpp 1992/11/06 23:02:09
- ***************
- *** 10,16 ****
- --- 10,31 ----
- |
- | written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
- | Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
- + | patched by Olaf Flebbe (flebbe@tat.physik.un-tuebingen.de)
- |
- + | Revision 1.3.2 olaf 10-92 :
- + | + increased comparson by one again. (Dont understand, but it works)
- + | + corrected negation of rounding bits and mantissa
- + | >enquire now detects correct IEEE precision
- + | >paranoia now qualifies add/sub as correctly rounded
- + |
- + | Revision 1.3.1 olaf 10-92 :
- + | + increased comparison of exponents by one.
- + | + initialized sticky byte
- + | + corrected handling of rounding bits
- + | + corrected swapping of register halves
- + | >paranoia now detects only one (obscure) SERIOUS DEFECT.
- + | ** Patches need _normsf Rev 1.4.1 (or higher) **
- + |
- | Revision 1.3, kub 01-90 :
- | added support for denormalized numbers
- |
- ***************
- *** 73,79 ****
- bpl 1f
- bchg #31,d2
- 1:
- ! cmpw #24,d1 | is u so much bigger that v is not
- bge 7f | significant ?
-
- movew #7-1,d3 | shift u left up to 7 bits to minimize loss
- --- 88,94 ----
- bpl 1f
- bchg #31,d2
- 1:
- ! cmpw #26,d1 | is u so much bigger that v is not
- bge 7f | significant ?
-
- movew #7-1,d3 | shift u left up to 7 bits to minimize loss
- ***************
- *** 83,88 ****
- --- 98,104 ----
- subw #1,d1 | done shifting altogether ?
- dbeq d3,2b | loop if still can shift u.mant more
- clrw d3
- + clrb d2
-
- cmpw #16,d1 | see if fast rotate possible
- blt 4f
- ***************
- *** 94,103 ****
- clrw d4 | rotate by swapping register halfs
- swap d4
- subw #16,d1
- 0:
- lsrl #1,d4 | shift v.mant right the rest of the way
- orb d3,d2 | set "sticky byte" if necessary
- ! roxrw #1,d3 | shift into rounding bits
- 4: dbra d1,0b | loop
- andb #1,d2 | see if "sticky bit" should be set
- orb d2,d3
- --- 110,120 ----
- clrw d4 | rotate by swapping register halfs
- swap d4
- subw #16,d1
- + bra 4f
- 0:
- lsrl #1,d4 | shift v.mant right the rest of the way
- orb d3,d2 | set "sticky byte" if necessary
- ! roxrb #1,d3 | shift into rounding bits
- 4: dbra d1,0b | loop
- andb #1,d2 | see if "sticky bit" should be set
- orb d2,d3
- ***************
- *** 106,112 ****
- bpl 6f | yes, no negate necessary
-
- negb d3 | negate rounding bits and v.mant
- ! negl d4
- 6:
- addl d4,d5 | u.mant = u.mant + v.mant
- bcs 7f | needn not negate
- --- 123,129 ----
- bpl 6f | yes, no negate necessary
-
- negb d3 | negate rounding bits and v.mant
- ! negxl d4
- 6:
- addl d4,d5 | u.mant = u.mant + v.mant
- bcs 7f | needn not negate
- ***************
- *** 114,120 ****
- bpl 7f | do not need to negate result
-
- negb d3 | negate rounding bits and u.mant
- ! negl d5
- notl d2 | switch sign
- 7:
- movel d5,d4 | move result for normalization
- --- 131,137 ----
- bpl 7f | do not need to negate result
-
- negb d3 | negate rounding bits and u.mant
- ! negxl d5
- notl d2 | switch sign
- 7:
- movel d5,d4 | move result for normalization
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_normdf.cpp,v
- retrieving revision 1.5
- diff -c -r1.5 _normdf.cpp
- *** 1.5 1992/10/09 20:35:29
- --- _normdf.cpp 1992/11/06 23:02:09
- ***************
- *** 7,13 ****
- --- 7,18 ----
- |
- | written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
- | Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
- + | patched by Olaf Flebbe (flebbe@tat.physik.uni-tuebingen.de)
- |
- + | Revision 1.6.1 olaf 10-92:
- + | + corrected rounding in tie case: round up, not down.
- + | (needed for enquire 4.3)
- + |
- | Revision 1.6, kub 04-90 :
- | more robust handling exponent and sign handling for 32 bit integers. There
- | are now overflow tests for 32 bit exponents, and bit 31 of the sign flag
- ***************
- *** 129,136 ****
- bge 8f | round down - no action neccessary
- negb d1
- bvc 7f | round up
- ! bclr #0,d5 | tie case - round to even
- ! bra 8f
- 7:
- clrl d1 | zero rounding bits
- addl #1,d5
- --- 134,144 ----
- bge 8f | round down - no action neccessary
- negb d1
- bvc 7f | round up
- ! movew d5,d1 | tie case - round to even
- ! | dont need rounding bits any more
- ! andw #1,d1 | check if even
- ! beq 8f | mantissa is even - no action necessary
- ! | fall through
- 7:
- clrl d1 | zero rounding bits
- addl #1,d5
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/_normsf.cpp,v
- retrieving revision 1.2
- diff -c -r1.2 _normsf.cpp
- *** 1.2 1992/10/09 20:35:29
- --- _normsf.cpp 1992/11/06 23:02:09
- ***************
- *** 7,13 ****
- --- 7,17 ----
- |
- | written by Kai-Uwe Bloem (I5110401@dbstu1.bitnet).
- | Based on a 80x86 floating point packet from comp.os.minix, written by P.Housel
- + | patched by Olaf Flebbe (flebbe@tat.physik.uni-tuebingen.de)
- |
- + | Revision 1.4.1 olaf 10-92:
- + | + corrected rounding in tie case: round up, not down.
- + | (needed for enquire 4.3)
- |
- | Revision 1.4, kub 03-90 :
- | export ___normsf entry to C language. Rename the internal entry to a name
- ***************
- *** 86,93 ****
- bge 6f | round down - no action neccessary
- negb d1
- bvc 5f | round up
- ! bclr #0,d4 | tie case - round to even
- ! bra 6f
- 5:
- clrw d1 | zero rounding bits
- addl #1,d4
- --- 90,101 ----
- bge 6f | round down - no action neccessary
- negb d1
- bvc 5f | round up
- ! movew d4,d1 | tie case - round to even
- ! | dont need rounding bits any more
- ! andw #1,d1 | check if even
- ! beq 6f | mantissa is even - no action necessary
- ! | fall through
- !
- 5:
- clrw d1 | zero rounding bits
- addl #1,d4
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/bcopy.s,v
- retrieving revision 1.6
- diff -c -r1.6 bcopy.s
- *** 1.6 1992/06/01 01:54:10
- --- bcopy.s 1992/11/06 23:02:09
- ***************
- *** 56,79 ****
- movb d0,d1
- lsrl #8,d0 | number of 256 bytes blocks
- jeq less256
- ! movml d3-d7/a2-a6,sp@- | d2 is already saved
- copy256:
- ! movml a0@+,d2-d7/a2-a6 | copy 5*44+36=256 bytes
- ! movml d2-d7/a2-a6,a1@
- ! movml a0@+,d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@(44)
- ! movml a0@+,d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@(88)
- ! movml a0@+,d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@(132)
- ! movml a0@+,d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@(176)
- ! movml a0@+,d2-d7/a2-a4
- ! movml d2-d7/a2-a4,a1@(220)
- lea a1@(256),a1 | increment dest, src is already
- subql #1,d0
- jne copy256 | next, please
- ! movml sp@+,d3-d7/a2-a6
- less256: | copy 16 bytes blocks
- movw d1,d0
- lsrw #2,d0 | number of 4 bytes blocks
- --- 56,80 ----
- movb d0,d1
- lsrl #8,d0 | number of 256 bytes blocks
- jeq less256
- ! movml d1/d3-d7/a2/a3/a5/a6,sp@- | d2 is already saved
- ! | exclude a4 because of -mbaserel
- copy256:
- ! movml a0@+,d1-d7/a2/a3/a5/a6 | copy 5*44+36=256 bytes
- ! movml d1-d7/a2/a3/a5/a6,a1@
- ! movml a0@+,d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@(44)
- ! movml a0@+,d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@(88)
- ! movml a0@+,d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@(132)
- ! movml a0@+,d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@(176)
- ! movml a0@+,d1-d7/a2-a3
- ! movml d1-d7/a2-a3,a1@(220)
- lea a1@(256),a1 | increment dest, src is already
- subql #1,d0
- jne copy256 | next, please
- ! movml sp@+,d1/d3-d7/a2/a3/a5/a6
- less256: | copy 16 bytes blocks
- movw d1,d0
- lsrw #2,d0 | number of 4 bytes blocks
- ***************
- *** 146,169 ****
- movb d0,d1
- lsrl #8,d0
- jeq less256_d
- ! movml d3-d7/a2-a6,sp@-
- copy256_d:
- ! movml a0@(-44),d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@-
- ! movml a0@(-88),d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@-
- ! movml a0@(-132),d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@-
- ! movml a0@(-176),d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@-
- ! movml a0@(-220),d2-d7/a2-a6
- ! movml d2-d7/a2-a6,a1@-
- ! movml a0@(-256),d2-d7/a2-a4
- ! movml d2-d7/a2-a4,a1@-
- lea a0@(-256),a0
- subql #1,d0
- jne copy256_d
- ! movml sp@+,d3-d7/a2-a6
- less256_d:
- movw d1,d0
- lsrw #2,d0
- --- 147,170 ----
- movb d0,d1
- lsrl #8,d0
- jeq less256_d
- ! movml d1/d3-d7/a2/a3/a5/a6,sp@-
- copy256_d:
- ! movml a0@(-44),d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@-
- ! movml a0@(-88),d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@-
- ! movml a0@(-132),d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@-
- ! movml a0@(-176),d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@-
- ! movml a0@(-220),d1-d7/a2/a3/a5/a6
- ! movml d1-d7/a2/a3/a5/a6,a1@-
- ! movml a0@(-256),d1-d7/a2-a3
- ! movml d1-d7/a2-a3,a1@-
- lea a0@(-256),a0
- subql #1,d0
- jne copy256_d
- ! movml sp@+,d1/d3-d7/a2/a3/a5/a6
- less256_d:
- movw d1,d0
- lsrw #2,d0
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/bzero.cpp,v
- retrieving revision 1.2
- diff -c -r1.2 bzero.cpp
- *** 1.2 1992/06/01 01:54:10
- --- bzero.cpp 1992/11/06 23:02:09
- ***************
- *** 59,65 ****
- movb d1,d0
- lsrl #8,d1 | number of 256 bytes blocks
- jeq less256
- ! movml d3-d7/a2-a6,sp@- | d2 is already saved
- movl d2,d3
- movl d2,d4
- movl d2,d5
- --- 59,67 ----
- movb d1,d0
- lsrl #8,d1 | number of 256 bytes blocks
- jeq less256
- ! movml d0/d3-d7/a2/a3/a5/a6,sp@- | d2 is already saved
- ! | exclude a4 because of -mbaserel
- ! movl d2,d0
- movl d2,d3
- movl d2,d4
- movl d2,d5
- ***************
- *** 67,85 ****
- movl d2,d7
- movl d2,a2
- movl d2,a3
- - movl d2,a4
- movl d2,a5
- movl d2,a6
- set256:
- ! movml d2-d7/a2-a6,a0@- | set 5*44+36=256 bytes
- ! movml d2-d7/a2-a6,a0@-
- ! movml d2-d7/a2-a6,a0@-
- ! movml d2-d7/a2-a6,a0@-
- ! movml d2-d7/a2-a6,a0@-
- ! movml d2-d7/a2-a4,a0@-
- subql #1,d1
- jne set256 | next, please
- ! movml sp@+,d3-d7/a2-a6
- less256: | set 16 bytes blocks
- movw d0,sp@- | save length below 256 for last 3 bytes
- lsrw #2,d0 | number of 4 bytes blocks
- --- 69,86 ----
- movl d2,d7
- movl d2,a2
- movl d2,a3
- movl d2,a5
- movl d2,a6
- set256:
- ! movml d0/d2-d7/a2/a3/a5/a6,a0@- | set 5*44+36=256 bytes
- ! movml d0/d2-d7/a2/a3/a5/a6,a0@-
- ! movml d0/d2-d7/a2/a3/a5/a6,a0@-
- ! movml d0/d2-d7/a2/a3/a5/a6,a0@-
- ! movml d0/d2-d7/a2/a3/a5/a6,a0@-
- ! movml d0/d2-d7/a2-a3,a0@-
- subql #1,d1
- jne set256 | next, please
- ! movml sp@+,d0/d3-d7/a2/a3/a5/a6
- less256: | set 16 bytes blocks
- movw d0,sp@- | save length below 256 for last 3 bytes
- lsrw #2,d0 | number of 4 bytes blocks
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/doprnt.c,v
- retrieving revision 1.17
- diff -c -r1.17 doprnt.c
- *** 1.17 1992/10/09 20:35:29
- --- doprnt.c 1992/11/08 00:02:47
- ***************
- *** 45,50 ****
- --- 45,51 ----
- static char sccsid[] = "@(#)doprnt.c 5.37 (Berkeley) 3/26/89";
- #endif /* LIBC_SCCS */
-
- + #include <compiler.h>
- #ifdef __TURBOC__
- #include <sys\types.h>
- #else
- ***************
- *** 163,169 ****
- clrw %0;
- swap %0" \
- : "=d"((long)NUMBER), "=g"(i) \
- ! : "0"((long)NUMBER), "g"((short)BASE)); \
- *--BUF = digs[i]; \
- } while(NUMBER); \
- }
- --- 164,170 ----
- clrw %0;
- swap %0" \
- : "=d"((long)NUMBER), "=g"(i) \
- ! : "0"((long)NUMBER), "dm"((short)BASE)); \
- *--BUF = digs[i]; \
- } while(NUMBER); \
- }
- ***************
- *** 330,336 ****
- * don't do unrealistic precision; just pad it with
- * zeroes later, so buffer size stays rational.
- */
- ! if (prec > MAXFRACT) {
- if ((*fmt != 'g' && *fmt != 'G') || (flags&ALT))
- fpprec = prec - MAXFRACT;
- prec = MAXFRACT;
- --- 331,337 ----
- * don't do unrealistic precision; just pad it with
- * zeroes later, so buffer size stays rational.
- */
- ! if (prec > (MAXEXP - MAXFRACT)) {
- if ((*fmt != 'g' && *fmt != 'G') || (flags&ALT))
- fpprec = prec - MAXFRACT;
- prec = MAXFRACT;
- ***************
- *** 545,551 ****
- {
- register char *p, *t;
- register double fract;
- ! int dotrim, expcnt, gformat, /* mjr++ : */ old_prec;
- double integer, tmp, modf __PROTO((double, double *));
- char *exponent __PROTO((char *, int, int)),
- *_round __PROTO((double, int *, char *, char *, int, char *));
- --- 546,552 ----
- {
- register char *p, *t;
- register double fract;
- ! int dotrim, expcnt, gformat;
- double integer, tmp, modf __PROTO((double, double *));
- char *exponent __PROTO((char *, int, int)),
- *_round __PROTO((double, int *, char *, char *, int, char *));
- ***************
- *** 555,561 ****
-
- /* get an extra slot for rounding. */
- t = ++startp;
- ! #define DBL_EPSILON 1.1107651257113995e-16 /* mjr ++ /
- /*
- * get integer portion of number; put into the end of the buffer; the
- * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
- --- 556,562 ----
-
- /* get an extra slot for rounding. */
- t = ++startp;
- ! /* jrb -- #define DBL_EPSILON 1.1107651257113995e-16 /* mjr ++ /
- /*
- * get integer portion of number; put into the end of the buffer; the
- * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
- ***************
- *** 562,568 ****
- */
- for (p = endp - 1; integer; ++expcnt) {
- tmp = modf(integer / 10, &integer);
- ! *p-- = tochar((int)((tmp + DBL_EPSILON) * 10));
- }
- switch(fmtch) {
- case 'f':
- --- 563,572 ----
- */
- for (p = endp - 1; integer; ++expcnt) {
- tmp = modf(integer / 10, &integer);
- ! *p-- = tochar((int)((tmp + .01) * 10));
- ! /* await michals advise on this -- in the mean while use above line
- ! *p-- = tochar((int)((tmp + DBL_EPSILON) * 10));
- ! */
- }
- switch(fmtch) {
- case 'f':
- ***************
- *** 654,661 ****
- break;
- case 'g':
- case 'G':
- - old_prec = min(prec,15); /* mjr++, avoid "precision" that */
- - /* cannot be numerically resolved */
- /* a precision of 0 is treated as a precision of 1. */
- if (!prec)
- ++prec;
- --- 658,663 ----
- ***************
- *** 693,699 ****
- if (prec || flags&ALT) {
- dotrim = 1;
- *t++ = '.';
- - old_prec ++; /* mjr++ */
- }
- else
- dotrim = 0;
- --- 695,700 ----
- ***************
- *** 722,729 ****
- if (flags&ALT)
- for (; prec--; *t++ = '0');
- else if (dotrim) {
- - if( (int)(t-startp) > old_prec ) /* mjr++ */
- - t = startp + old_prec;
- while (t > startp && *--t == '0');
- if (*t != '.')
- ++t;
- --- 723,728 ----
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/gnulib2.c,v
- retrieving revision 1.13
- diff -c -r1.13 gnulib2.c
- *** 1.13 1992/09/14 14:56:40
- --- gnulib2.c 1992/11/08 00:02:51
- ***************
- *** 52,57 ****
- --- 52,58 ----
- #define L_lesf2
- #endif
- #define L_fxussfsi
- + #define L_gccbcmp
-
- #endif /* __DEF_ALL__ */
-
- ***************
- *** 1641,1644 ****
- --- 1642,1668 ----
- return (SItype) (a + LONG_MIN) - LONG_MIN;
- return (SItype) a;
- }
- + #endif
- +
- + #ifdef L_gccbcmp
- +
- + /* Like bcmp except the sign is meaningful.
- + Reult is negative if S1 is less than S2,
- + positive if S1 is greater, 0 if S1 and S2 are equal. */
- +
- + int
- + __gcc_bcmp (s1, s2, size)
- + unsigned char *s1, *s2;
- + size_t size;
- + {
- + while (size > 0)
- + {
- + unsigned char c1 = *s1++, c2 = *s2++;
- + if (c1 != c2)
- + return c1 - c2;
- + size--;
- + }
- + return 0;
- + }
- +
- #endif
- ===================================================================
- RCS file: /net/acae127/home/bammi/etc/src/master/atari/co/regexp.c,v
- retrieving revision 1.5
- diff -c -r1.5 regexp.c
- *** 1.5 1992/10/09 20:35:29
- --- regexp.c 1992/11/06 23:02:09
- ***************
- *** 32,38 ****
- #include <string.h>
- #include <regexp.h>
- #include <stdio.h>
- ! #include <types.h>
- #ifndef _COMPILER_H
- #include <compiler.h>
- #endif
- --- 32,38 ----
- #include <string.h>
- #include <regexp.h>
- #include <stdio.h>
- ! #include <sys/types.h>
- #ifndef _COMPILER_H
- #include <compiler.h>
- #endif
- ***************
- *** 218,224 ****
- RFAIL("regexp too big");
-
- /* Allocate space. */
- ! r = (regexp *) malloc(sizeof(regexp) + (unsigned) regsize);
- if (r == (regexp *)NULL) RFAIL("out of space");
-
- /* Second pass: emit code. */
- --- 218,224 ----
- RFAIL("regexp too big");
-
- /* Allocate space. */
- ! r = (regexp *) malloc(sizeof(regexp) + (size_t) regsize);
- if (r == (regexp *)NULL) RFAIL("out of space");
-
- /* Second pass: emit code. */
- ***************
- *** 871,879 ****
- case STAR:
- case PLUS:{
- register char nextch;
- ! register size_t no;
- register char *save;
- ! register size_t min;
-
- /* Lookahead to avoid useless match attempts
- * when we know what character comes next. */
- --- 871,879 ----
- case STAR:
- case PLUS:{
- register char nextch;
- ! register long no;
- register char *save;
- ! register long min;
-
- /* Lookahead to avoid useless match attempts
- * when we know what character comes next. */
- ***************
- *** 977,983 ****
-
- #ifdef DEBUG
-
- ! STATIC char *regprop();
-
- /*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
- --- 977,983 ----
-
- #ifdef DEBUG
-
- ! static char *regprop();
-
- /*
- - regdump - dump a regexp onto stdout in vaguely comprehensible form
-