Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: third_party/expat/files/lib/xmltok.h

Issue 2761253002: Update expat to 2.2.0 to fix CVE vulnerability. (Closed)
Patch Set: update README.chromium Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/expat/files/lib/xmlrole.c ('k') | third_party/expat/files/lib/xmltok.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd 1 /* Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd
2 See the file COPYING for copying permission. 2 See the file COPYING for copying permission.
3 */ 3 */
4 4
5 #ifndef XmlTok_INCLUDED 5 #ifndef XmlTok_INCLUDED
6 #define XmlTok_INCLUDED 1 6 #define XmlTok_INCLUDED 1
7 7
8 #ifdef __cplusplus 8 #ifdef __cplusplus
9 extern "C" { 9 extern "C" {
10 #endif 10 #endif
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } ATTRIBUTE; 123 } ATTRIBUTE;
124 124
125 struct encoding; 125 struct encoding;
126 typedef struct encoding ENCODING; 126 typedef struct encoding ENCODING;
127 127
128 typedef int (PTRCALL *SCANNER)(const ENCODING *, 128 typedef int (PTRCALL *SCANNER)(const ENCODING *,
129 const char *, 129 const char *,
130 const char *, 130 const char *,
131 const char **); 131 const char **);
132 132
133 enum XML_Convert_Result {
134 XML_CONVERT_COMPLETED = 0,
135 XML_CONVERT_INPUT_INCOMPLETE = 1,
136 XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
137 };
138
133 struct encoding { 139 struct encoding {
134 SCANNER scanners[XML_N_STATES]; 140 SCANNER scanners[XML_N_STATES];
135 SCANNER literalScanners[XML_N_LITERAL_TYPES]; 141 SCANNER literalScanners[XML_N_LITERAL_TYPES];
136 int (PTRCALL *sameName)(const ENCODING *, 142 int (PTRCALL *sameName)(const ENCODING *,
137 const char *, 143 const char *,
138 const char *); 144 const char *);
139 int (PTRCALL *nameMatchesAscii)(const ENCODING *, 145 int (PTRCALL *nameMatchesAscii)(const ENCODING *,
140 const char *, 146 const char *,
141 const char *, 147 const char *,
142 const char *); 148 const char *);
143 int (PTRFASTCALL *nameLength)(const ENCODING *, const char *); 149 int (PTRFASTCALL *nameLength)(const ENCODING *, const char *);
144 const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *); 150 const char *(PTRFASTCALL *skipS)(const ENCODING *, const char *);
145 int (PTRCALL *getAtts)(const ENCODING *enc, 151 int (PTRCALL *getAtts)(const ENCODING *enc,
146 const char *ptr, 152 const char *ptr,
147 int attsMax, 153 int attsMax,
148 ATTRIBUTE *atts); 154 ATTRIBUTE *atts);
149 int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr); 155 int (PTRFASTCALL *charRefNumber)(const ENCODING *enc, const char *ptr);
150 int (PTRCALL *predefinedEntityName)(const ENCODING *, 156 int (PTRCALL *predefinedEntityName)(const ENCODING *,
151 const char *, 157 const char *,
152 const char *); 158 const char *);
153 void (PTRCALL *updatePosition)(const ENCODING *, 159 void (PTRCALL *updatePosition)(const ENCODING *,
154 const char *ptr, 160 const char *ptr,
155 const char *end, 161 const char *end,
156 POSITION *); 162 POSITION *);
157 int (PTRCALL *isPublicId)(const ENCODING *enc, 163 int (PTRCALL *isPublicId)(const ENCODING *enc,
158 const char *ptr, 164 const char *ptr,
159 const char *end, 165 const char *end,
160 const char **badPtr); 166 const char **badPtr);
161 void (PTRCALL *utf8Convert)(const ENCODING *enc, 167 enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
162 const char **fromP, 168 const char **fromP,
163 const char *fromLim, 169 const char *fromLim,
164 char **toP, 170 char **toP,
165 const char *toLim); 171 const char *toLim);
166 void (PTRCALL *utf16Convert)(const ENCODING *enc, 172 enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
167 const char **fromP, 173 const char **fromP,
168 const char *fromLim, 174 const char *fromLim,
169 unsigned short **toP, 175 unsigned short **toP,
170 const unsigned short *toLim); 176 const unsigned short *toLim);
171 int minBytesPerChar; 177 int minBytesPerChar;
172 char isUtf8; 178 char isUtf8;
173 char isUtf16; 179 char isUtf16;
174 }; 180 };
175 181
176 /* Scan the string starting at ptr until the end of the next complete 182 /* Scan the string starting at ptr until the end of the next complete
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 ENCODING * 313 ENCODING *
308 XmlInitUnknownEncodingNS(void *mem, 314 XmlInitUnknownEncodingNS(void *mem,
309 int *table, 315 int *table,
310 CONVERTER convert, 316 CONVERTER convert,
311 void *userData); 317 void *userData);
312 #ifdef __cplusplus 318 #ifdef __cplusplus
313 } 319 }
314 #endif 320 #endif
315 321
316 #endif /* not XmlTok_INCLUDED */ 322 #endif /* not XmlTok_INCLUDED */
OLDNEW
« no previous file with comments | « third_party/expat/files/lib/xmlrole.c ('k') | third_party/expat/files/lib/xmltok.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698