]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/_printf.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / _printf.s
index dffeb64d10ddd870bd04475b6d27b2381afd9dcc..a8470df3e55ddc802ee455b41c0cd34e7d79c84e 100644 (file)
@@ -7,7 +7,6 @@
        .export         __printf
 
        .import         popax, pushax, pusheax, decsp6, push1, axlong, axulong
-       .import         __ctype
        .import         _ltoa, _ultoa
        .import         _strlower, _strlen
        .importzp       sp, ptr1, ptr2, tmp1, regbank, sreg
@@ -460,19 +459,21 @@ ReadPrec:
 
 ReadMod:
        lda     (Format),y
-       cmp     #'F'
-       beq     @L1                     ; Read and ignore this one
-       cmp     #'N'
-       beq     @L1                     ; Read and ignore this one
-       cmp     #'h'
-       beq     @L1                     ; Read and ignore this one
-       cmp     #'L'
-       beq     @L1                     ; Read and ignore this one
-       cmp     #'l'
+       cmp     #'z'                    ; size_t - same as unsigned
+       beq     @L2
+       cmp     #'h'                    ; short - same as int
+       beq     @L2
+        cmp     #'t'                    ; ptrdiff_t - same as int
+        beq     @L2
+        cmp     #'j'                    ; intmax_t/uintmax_t - same as long
+        beq     @L1
+       cmp     #'L'                    ; long double
+       beq     @L1
+       cmp     #'l'                    ; long int
        bne     DoFormat
-       lda     #$FF
+@L1:    lda    #$FF
        sta     IsLong
-@L1:   jsr     IncFormatPtr
+@L2:   jsr     IncFormatPtr
        jmp     ReadMod
 
 ; Initialize the argument buffer pointers. We use a static buffer (ArgBuf) to