]> git.sur5r.net Git - cc65/commitdiff
Fixed minor issues with the modifiers: Some modifiers where accepted (and
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 11 Dec 2004 18:33:49 +0000 (18:33 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 11 Dec 2004 18:33:49 +0000 (18:33 +0000)
ignored) that do not exist.
Added C99 modifiers z, j and t.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3326 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/common/_printf.s

index dffeb64d10ddd870bd04475b6d27b2381afd9dcc..65528d1577278017f409f915f0470e6ec8d1b68a 100644 (file)
@@ -460,19 +460,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