diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 17:07:39 +0000 |
| commit | 37da2899f40661e3e9631e497da8dc59b971cbd0 (patch) | |
| tree | cbc6d4680e347d906f5fa7fca73214418741df72 /appl/charon/ctype.m | |
| parent | 54bc8ff236ac10b3eaa928fd6bcfc0cdb2ba46ae (diff) | |
20060303a
Diffstat (limited to 'appl/charon/ctype.m')
| -rw-r--r-- | appl/charon/ctype.m | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/appl/charon/ctype.m b/appl/charon/ctype.m new file mode 100644 index 00000000..d4c86126 --- /dev/null +++ b/appl/charon/ctype.m @@ -0,0 +1,24 @@ +Ctype: module +{ + PATH: con "/dis/charon/ctype.dis"; + + # Classify first NCTYPE chars of Unicode into one of + # + # W: whitespace + # D: decimal digit + # L: lowercase letter + # U: uppercase letter + # N: '.' or '-' (parts of certain kinds of names) + # S: '_' (parts of other kinds of names) + # P: printable other than all of above + # C: control other than whitespace + # + # These are separate bits, so can test for, e.g., ctype[c]&(U|L), + # but only one is set for any particular character, + # so can use faster ctype[c]==W too. + + W, D, L, U, N, S, P, C: con byte (1<<iota); + NCTYPE: con 256; + + ctype: array of byte; +}; |
