]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/isgraph.s
The spans do now contain the size of a span, no longer the end offset.
[cc65] / libsrc / common / isgraph.s
index 91f482c5664d4fe91cc4c594d513cd729fab4e4a..e52ae34858a5b43b0c48ade9fa57bf1ced1ed09f 100644 (file)
@@ -5,12 +5,18 @@
 ;
 
        .export         _isgraph
-       .import         __ctype
+       .include        "ctype.inc"
 
 _isgraph:
+       cpx     #$00            ; Char range ok?
+       bne     @L1             ; Jump if no
        tay
        lda     __ctype,y       ; Get character classification
-       eor     #$30            ; NOT control and NOT space
-       and     #$30            ; Mask character bits
+               eor     #CT_CTRL_SPACE  ; NOT control and NOT space
+       and     #CT_CTRL_SPACE  ; Mask character bits
+       rts
+
+@L1:   lda     #$00            ; Return false
+       tax
        rts