Typedefs | Functions | Variables
chattr.h File Reference

Character attribute definitions and arrays. More...

#include <stdint.h>
#include <limits.h>
Include dependency graph for chattr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint16_t attr_t
 

Functions

char to_lower (char c)
 Convert a character to its lower-case equivalent.
 
char to_upper (char c)
 Convert a character to its upper-case equivalent.
 
attr_t is_blank (char c)
 Test whether a character is a blank.
 
attr_t is_eol (char c)
 Test whether a character is an end-of-line character.
 
attr_t is_white_space (char c)
 Test whether a character is white space.
 
attr_t is_file (char c)
 Test whether a character is a file symbol.
 
attr_t is_rank (char c)
 Test whether a character is a rank symbol.
 
attr_t is_piece (char c)
 Test whether a character is a chess piece symbol.
 
attr_t is_check (char c)
 Test whether a character is a check or mate symbol.
 
attr_t is_punctuation_junk (char c)
 Test whether a character is punctuation junk.
 
attr_t is_digit (char c)
 Test whether a character is a digit.
 
attr_t is_alpha (char c)
 Test whether a character is alphabetic.
 
attr_t is_alnum (char c)
 Test whether a character is alphanumeric.
 
attr_t is_tagname_begin (char c)
 Test whether a character could be the first character of a tagname.
 
attr_t is_tagname_continuation (char c)
 Test whether a character could be part of a tagname.
 
attr_t is_tag_separator_junk (char c)
 Test whether a character could tag separator junk.
 
attr_t is_printable_string (char c)
 Test whether a character is allowed in a string.
 
attr_t is_quote_or_eol (char c)
 Test whether a character is a quote or EOL.
 
attr_t is_comment_start (char c)
 Test whether a character is a comment start.
 
attr_t is_printable_comment (char c)
 Test whether a character is allowed in a brace comment.
 
attr_t is_printable (char c)
 Test whether a character is allowed in a semi-colon comment.
 

Variables

attr_t const pgn_blank = 0x0001
 ' ' | '\t' | '\v' | '\f'. Note that '\f' is normally not legal in a PGN.
 
attr_t const pgn_eol = 0x0002
 '\r' | '\n'
 
attr_t const pgn_white_space = pgn_blank | pgn_eol
 (pgn_blank | pgn_eol)
 
attr_t const pgn_file = 0x0004
 abcdefgh
 
attr_t const pgn_rank = 0x0008
 12345678
 
attr_t const pgn_piece = 0x0010
 RNBQK.
 
attr_t const pgn_check = 0x0020
 +#
 
attr_t const pgn_punctuation_junk = 0x0040
 ,;
 
attr_t const pgn_digit = 0x0080
 0123456789
 
attr_t const pgn_alpha = 0x0100
 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
 
attr_t const pgn_alnum = pgn_alpha | pgn_digit
 (pgn_alpha | pgn_digit)
 
attr_t const pgn_tagname_begin = pgn_alnum
 pgn_alnum
 
attr_t const pgn_tagname_continuation = 0x0200
 (pgn_alnum | '_')
 
attr_t const pgn_tag_separator_junk = 0x0400
 :=
 
attr_t const pgn_printable_string = 0x0800
 ascii range(-96, -1) | ascii range(35, 91) | ' ' | ascii range(93, 126) | '!'
 
attr_t const pgn_quote_or_eol = 0x1000
 (ntl_eol | '"')
 
attr_t const pgn_comment_start = 0x2000
 {;
 
attr_t const pgn_printable_comment = 0x4000
 ascii range(-96, -1) | ascii range(32, 124) | '~' | pgn_blank | pgn_eol
 
attr_t const pgn_printable = 0x8000
 ascii range(-96, -1) | ascii range(32, 126)
 
char const ToLowerTab_8859_1 []
 
char const ToUpperTab_8859_1 []
 
attr_t const PGN_CharAttrTab []
 

Detailed Description

Character attribute definitions and arrays.

Definition in file chattr.h.


Copyright © 2006 - 2010 Carlo Wood.  All rights reserved.