[Z88dk-commits] CVS: z88dk/libsrc/_DEVELOPMENT/stdlib/z80 __strtou.a

Bridge to the z88dk-commits mailing list
Post Reply
alvin

[Z88dk-commits] CVS: z88dk/libsrc/_DEVELOPMENT/stdlib/z80 __strtou.a

Post by alvin »

Update of /cvsroot/z88dk/z88dk/libsrc/_DEVELOPMENT/stdlib/z80
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv5700

Modified Files:
__strtou.asm __strtoul.asm
Log Message:
changed error indicators to simplify stdio's task of distinguishing overflow from improper input

Index: __strtou.asm
===================================================================
RCS file: /cvsroot/z88dk/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__strtou.asm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** __strtou.asm 22 Mar 2014 06:15:27 -0000 1.3
--- __strtou.asm 29 Mar 2014 05:04:05 -0000 1.4
***************
*** 25,32 ****
; de = original char *
;
! ; a = 3/2 indicates unsigned overflow
; de = char * (& next unconsumed char following number)
;
! ; a = 1 indicates signed overflow
; de = char * (& next unconsumed char following number)
;
--- 25,32 ----
; de = original char *
;
! ; a = 2 indicates unsigned overflow
; de = char * (& next unconsumed char following number)
;
! ; a = 1 indicates negative underflow
; de = char * (& next unconsumed char following number)
;
***************
*** 209,217 ****

ex de,hl
! ld a,3
scf

; de = char * (next unconsumed char)
! ; a = 3
; carry set for error

--- 209,217 ----

ex de,hl
! ld a,2
scf

; de = char * (next unconsumed char)
! ; a = 2
; carry set for error


Index: __strtoul.asm
===================================================================
RCS file: /cvsroot/z88dk/z88dk/libsrc/_DEVELOPMENT/stdlib/z80/__strtoul.asm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** __strtoul.asm 22 Mar 2014 07:43:06 -0000 1.3
--- __strtoul.asm 29 Mar 2014 05:04:05 -0000 1.4
***************
*** 28,36 ****
; bc = original char *
;
! ; a = 3/2 indicates unsigned overflow
; ixl = base
; bc = char * (& next unconsumed char following number)
;
! ; a = 1 indicates signed overflow
; ixl = base
; bc = char * (& next unconsumed char following number)
--- 28,36 ----
; bc = original char *
;
! ; a = 2 indicates unsigned overflow
; ixl = base
; bc = char * (& next unconsumed char following number)
;
! ; a = 1 indicates negative underflow
; ixl = base
; bc = char * (& next unconsumed char following number)
***************
*** 234,242 ****
ld b,h

! ld a,3
scf

; bc = char * (next unconsumed char)
! ; a = 3 (error overflow)
; carry set for error

--- 234,242 ----
ld b,h

! ld a,2
scf

; bc = char * (next unconsumed char)
! ; a = 2 (error overflow)
; carry set for error



------------------------------------------------------------------------------
Post Reply