Lines Matching +full:p +full:- +full:state
9 Copyright (c) 1997-2000 Thai Open Source Software Center Ltd
11 Copyright (c) 2016-2018 Sebastian Pipping <sebastian@pipping.org>
12 Copyright (c) 2018 Marco Maggi <marco.maggi-ipsu@poste.it>
42 int state = init; in getTok() local
47 if (state == inAtom) in getTok()
54 if (state == inAtom) in getTok()
58 if (state == inAtom) in getTok()
60 if (state != inString) in getTok()
61 state++; in getTok()
64 if (state > init) in getTok()
65 --state; in getTok()
66 else if (state != inString) in getTok()
72 if (state == inAtom) in getTok()
74 if (state == init) in getTok()
83 switch (state) { in getTok()
91 state = inString; in getTok()
96 if (state == init) { in getTok()
98 state = inAtom; in getTok()
114 if (*start != *key && *start != 'A' + (*key - 'a')) in matchkey()
121 const char *next, *p; in getXMLCharset() local
125 p = getTok(&next); in getXMLCharset()
126 if (matchkey(p, next, "text")) in getXMLCharset()
127 strcpy(charset, "us-ascii"); in getXMLCharset()
128 else if (! matchkey(p, next, "application")) in getXMLCharset()
130 p = getTok(&next); in getXMLCharset()
131 if (! p || *p != '/') in getXMLCharset()
133 p = getTok(&next); in getXMLCharset()
136 if (! matchkey(p, next, "xml") && charset[0] == '\0') in getXMLCharset()
140 p = getTok(&next); in getXMLCharset()
141 while (p) { in getXMLCharset()
142 if (*p == ';') { in getXMLCharset()
143 p = getTok(&next); in getXMLCharset()
144 if (matchkey(p, next, "charset")) { in getXMLCharset()
145 p = getTok(&next); in getXMLCharset()
146 if (p && *p == '=') { in getXMLCharset()
147 p = getTok(&next); in getXMLCharset()
148 if (p) { in getXMLCharset()
150 if (*p == '"') { in getXMLCharset()
151 while (++p != next - 1) { in getXMLCharset()
152 if (*p == '\\') in getXMLCharset()
153 ++p; in getXMLCharset()
154 if (s == charset + CHARSET_MAX - 1) { in getXMLCharset()
158 *s++ = *p; in getXMLCharset()
162 if (next - p > CHARSET_MAX - 1) in getXMLCharset()
164 while (p != next) in getXMLCharset()
165 *s++ = *p++; in getXMLCharset()
174 p = getTok(&next); in getXMLCharset()