Go to the documentation of this file.
46 #define CTL "\001\002\003\004\005\006\007" \
47 "\010\011\012\013\014\015\016\017" \
48 "\020\021\022\023\024\025\026\027" \
49 "\030\031\032\033\034\035\036\037" "\177" "\0"
63 #define LWS SP HT CR LF
65 #define LOALPHA "abcdefghijklmnopqrstuvwxyz"
67 #define UPALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
69 #define ALPHA LOALPHA UPALPHA
71 #define DIGIT "0123456789"
74 #define ALPHANUM DIGIT ALPHA
75 #define HEX DIGIT "ABCDEF" "abcdef"
80 #define SIP_TOKEN ALPHANUM "-.!%*_+`'~"
82 #define SIP_SEPARATOR "()<>@,;:\\\"/[]?={}" SP HT
85 #define SIP_WORD "()<>:\\\"/[]?{}"
88 #define skip_ws(ss) (*(ss) += span_ws(*(ss)))
91 #define skip_lws(ss) (*(ss) += span_lws(*(ss)))
94 #define skip_alpha(ss) (*(ss) += span_alpha(*(ss)))
97 #define skip_digit(ss) (*(ss) += span_digit(*(ss)))
100 #define skip_alpha_digit_safe(ss) (*(ss) += span_alpha_digit_safe(*(ss)))
103 #define skip_token(ss) (*(ss) += span_token(*(ss)))
106 #define skip_param(ss) (*(ss) += span_param(*(ss)))
109 #define skip_word(ss) (*(ss) += span_word(*(ss)))
112 #define IS_CRLF(c) ((c) == '\r' || (c) == '\n')
114 #define IS_LWS(c) ((c) == ' ' || (c) == '\t' || (c) == '\r' || (c) == '\n')
117 #define IS_WS(c) ((c) == ' ' || (c) == '\t')
119 #define IS_NON_WS(c) (c && !IS_WS(c))
122 #define IS_NON_LWS(c) (c && !IS_LWS(c))
125 #define IS_DIGIT(c) ((c) >= '0' && (c) <= '9')
127 #define IS_ALPHA(c) (c && ((_bnf_table[(unsigned char)c] & bnf_alpha)))
129 #define IS_ALPHANUM(c) (c && (IS_DIGIT(c) || IS_ALPHA(c)))
131 #define IS_UNRESERVED(c) ((_bnf_table[(unsigned char)c] & bnf_unreserved))
133 #define IS_RESERVED(c) (c && !(_bnf_table[(unsigned char)c] & bnf_unreserved))
135 #define IS_TOKEN(c) ((_bnf_table[(unsigned char)c] & bnf_token))
137 #define IS_PARAM(c) ((_bnf_table[(unsigned char)c] & (bnf_token|bnf_param)))
139 #define IS_HEX(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'))
141 #define IS_TOKENLWS(c) ((_bnf_table[(unsigned char)c] & (bnf_token|bn_lws)))
163 #define span_non_crlf(s) strcspn(s, CR LF)
166 #define span_non_ws(s) strcspn(s, WS)
169 #define span_ws(s) strspn(s, WS)
172 #define span_non_lws(s) strcspn(s, LWS)
182 if (e[i] ==
'\r') i++;
183 if (e[i] ==
'\n') i++;
185 e += i + strspn(e + i,
WS);
220 while (*e >=
'0' && *e <=
'9')
279 s += strcspn(s,
"\\\"");
291 #define URL_RESERVED ";/?:=+$,"
294 #define URL_MARK "-_.!~*'()"
297 #define URL_UNRESERVED ALPHANUM URL_MARK
300 #define URL_ESCAPED "%"
301 #define URL_DELIMS "<>#%\""
302 #define URL_UNWISE "{}|\\^[]`"
303 #define URL_SCHEME ALPHANUM "+-."
306 #define span_url_scheme(s) strspn(s, URL_SCHEME)
Sofia-SIP 1.12.11devel -
Copyright (C) 2006 Nokia Corporation. All rights reserved.
Licensed under the terms of the GNU Lesser General Public License.