9 #ifndef __AFW_ASCII_H__
10 #define __AFW_ASCII_H__
33 #define AFW_ASCII_NUL 0x00
36 #define AFW_ASCII_SOH 0x01
39 #define AFW_ASCII_STX 0x02
42 #define AFW_ASCII_ETX 0x03
45 #define AFW_ASCII_EOT 0x04
48 #define AFW_ASCII_ENQ 0x05
51 #define AFW_ASCII_ACK 0x06
54 #define AFW_ASCII_BEL 0x07
57 #define AFW_ASCII_BS 0x08
60 #define AFW_ASCII_HT 0x09
63 #define AFW_ASCII_LF 0x0A
66 #define AFW_ASCII_VT 0x0B
69 #define AFW_ASCII_FF 0x0C
72 #define AFW_ASCII_CR 0x0D
75 #define AFW_ASCII_SO 0x0E
78 #define AFW_ASCII_SI 0x0F
81 #define AFW_ASCII_DLE 0x10
84 #define AFW_ASCII_DC1 0x11
87 #define AFW_ASCII_DC2 0x12
90 #define AFW_ASCII_DC3 0x13
93 #define AFW_ASCII_DC4 0x14
96 #define AFW_ASCII_NAK 0x15
99 #define AFW_ASCII_SYN 0x16
102 #define AFW_ASCII_ETB 0x17
105 #define AFW_ASCII_CAN 0x18
108 #define AFW_ASCII_EM 0x19
111 #define AFW_ASCII_SUB 0x1A
114 #define AFW_ASCII_ESC 0x1B
117 #define AFW_ASCII_FS 0x1C
120 #define AFW_ASCII_GS 0x1D
123 #define AFW_ASCII_RS 0x1E
126 #define AFW_ASCII_US 0x1F
129 #define AFW_ASCII_DELETE 0x7F
133 #define AFW_ASCII_Z_PATH_SEPARATOR "\\"
134 #define AFW_ASCII_PATH_SEPARATOR '\\'
136 #define AFW_ASCII_Z_PATH_SEPARATOR "/"
137 #define AFW_ASCII_PATH_SEPARATOR '/'
145 #define afw_ascii_is_printable(v) \
146 ( ((v)>=AFW_ASCII_SPACE) && ((v)<=AFW_ASCII_TILDE) )
154 #define afw_ascii_is_lowercase(v) \
155 ( ((v) >= 'a') && ((v) <= 'z') )
163 #define afw_ascii_is_uppercase(v) \
164 ( ((v) >= 'A') && ((v) <= 'Z') )
172 #define afw_ascii_is_alpha(v) \
173 ( afw_ascii_is_ascii_lowercase(v) || afw_ascii_is_ascii_uppercase(v) )
181 #define afw_ascii_is_alphanumeric(v) \
182 ( afw_ascii_is_ascii_alpha(v) || ( ((v)>='0') && ((v)<='9') ) )
190 #define afw_ascii_is_control_character(v) \
191 ( ((v) <= 31) || ((v) == AFW_ASCII_DELETE) )
199 #define afw_ascii_is_digit(v) \
200 ( ((v)>='0') && ((v)<='9') )
219 #define afw_ascii_is_hex_digit(v) \
220 ( afw_ascii_decode_hex_digit(v) != -1 )
238 #define afw_ascii_is_whitespace(v) \
239 ((v) == 32 || ((v) >= 9 && (v) <= 13))
AFW_DEFINE(const afw_object_t *)
#define AFW_BEGIN_DECLARES
Adaptive Framework Minimal Header.
afw_ascii_encode_hex_digit(afw_octet_t octet)
Encode ascii hex digit.
afw_ascii_decode_hex_digit(afw_octet_t octet)
Decode ascii hex digit.
unsigned char afw_octet_t
8 bits (unsigned).