File: ctype.inc

package info (click to toggle)
cc65 2.17-1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 19,032 kB
  • sloc: ansic: 111,990; asm: 59,701; pascal: 3,584; makefile: 953; perl: 607
file content (29 lines) | stat: -rw-r--r-- 996 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
;
; Definitions for the character type tables
;
; Ullrich von Bassewitz, 08.09.2001
;

; Make the __ctype table an exported/imported symbol

        .global    __ctype

; Define bitmapped constants for the table entries

CT_NONE         = $00           ; Nothing special
CT_LOWER        = $01           ; 0 - Lower case char
CT_UPPER        = $02           ; 1 - Upper case char
CT_DIGIT        = $04           ; 2 - Numeric digit
CT_XDIGIT       = $08           ; 3 - Hex digit (both, lower and upper)
CT_CTRL         = $10           ; 4 - Control character
CT_SPACE        = $20           ; 5 - The space character itself
CT_OTHER_WS     = $40           ; 6 - Other whitespace ('\f', '\n', '\r', '\t' and '\v')
CT_SPACE_TAB    = $80           ; 7 - Space or tab character

; Combined stuff
CT_ALNUM        = (CT_LOWER | CT_UPPER | CT_DIGIT)
CT_ALPHA        = (CT_LOWER | CT_UPPER)
CT_CTRL_SPACE   = (CT_CTRL | CT_SPACE)
CT_NOT_PUNCT    = (CT_SPACE | CT_CTRL | CT_DIGIT | CT_UPPER | CT_LOWER)