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

Side by Side Diff: third_party/libxml/src/relaxng.c

Issue 2414643002: Roll libxml to 3169602058bd2d04913909e869c61d1540bc7fb4 (Closed)
Patch Set: Created 4 years, 2 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/libxml/src/macos/src/macos_main.c ('k') | third_party/libxml/src/runtest.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 /* 1 /*
2 * relaxng.c : implementation of the Relax-NG handling and validity checking 2 * relaxng.c : implementation of the Relax-NG handling and validity checking
3 * 3 *
4 * See Copyright for the status of this software. 4 * See Copyright for the status of this software.
5 * 5 *
6 * Daniel Veillard <veillard@redhat.com> 6 * Daniel Veillard <veillard@redhat.com>
7 */ 7 */
8 8
9 /** 9 /**
10 * TODO: 10 * TODO:
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
2081 * 2081 *
2082 * computes a formatted error string for the given error code and args 2082 * computes a formatted error string for the given error code and args
2083 * 2083 *
2084 * Returns the error string, it must be deallocated by the caller 2084 * Returns the error string, it must be deallocated by the caller
2085 */ 2085 */
2086 static xmlChar * 2086 static xmlChar *
2087 xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1, 2087 xmlRelaxNGGetErrorString(xmlRelaxNGValidErr err, const xmlChar * arg1,
2088 const xmlChar * arg2) 2088 const xmlChar * arg2)
2089 { 2089 {
2090 char msg[1000]; 2090 char msg[1000];
2091 xmlChar *result;
2091 2092
2092 if (arg1 == NULL) 2093 if (arg1 == NULL)
2093 arg1 = BAD_CAST ""; 2094 arg1 = BAD_CAST "";
2094 if (arg2 == NULL) 2095 if (arg2 == NULL)
2095 arg2 = BAD_CAST ""; 2096 arg2 = BAD_CAST "";
2096 2097
2097 msg[0] = 0; 2098 msg[0] = 0;
2098 switch (err) { 2099 switch (err) {
2099 case XML_RELAXNG_OK: 2100 case XML_RELAXNG_OK:
2100 return (NULL); 2101 return (NULL);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 return (xmlCharStrdup("No top grammar defined\n")); 2209 return (xmlCharStrdup("No top grammar defined\n"));
2209 case XML_RELAXNG_ERR_EXTRADATA: 2210 case XML_RELAXNG_ERR_EXTRADATA:
2210 return (xmlCharStrdup("Extra data in the document\n")); 2211 return (xmlCharStrdup("Extra data in the document\n"));
2211 default: 2212 default:
2212 return (xmlCharStrdup("Unknown error !\n")); 2213 return (xmlCharStrdup("Unknown error !\n"));
2213 } 2214 }
2214 if (msg[0] == 0) { 2215 if (msg[0] == 0) {
2215 snprintf(msg, 1000, "Unknown error code %d\n", err); 2216 snprintf(msg, 1000, "Unknown error code %d\n", err);
2216 } 2217 }
2217 msg[1000 - 1] = 0; 2218 msg[1000 - 1] = 0;
2218 xmlChar *result = xmlCharStrdup(msg); 2219 result = xmlCharStrdup(msg);
2219 return (xmlEscapeFormatString(&result)); 2220 return (xmlEscapeFormatString(&result));
2220 } 2221 }
2221 2222
2222 /** 2223 /**
2223 * xmlRelaxNGShowValidError: 2224 * xmlRelaxNGShowValidError:
2224 * @ctxt: the validation context 2225 * @ctxt: the validation context
2225 * @err: the error number 2226 * @err: the error number
2226 * @node: the node 2227 * @node: the node
2227 * @child: the node child generating the problem. 2228 * @child: the node child generating the problem.
2228 * @arg1: the first argument 2229 * @arg1: the first argument
(...skipping 8820 matching lines...) Expand 10 before | Expand all | Expand 10 after
11049 * TODO: build error codes 11050 * TODO: build error codes
11050 */ 11051 */
11051 if (ret == -1) 11052 if (ret == -1)
11052 return (1); 11053 return (1);
11053 return (ret); 11054 return (ret);
11054 } 11055 }
11055 11056
11056 #define bottom_relaxng 11057 #define bottom_relaxng
11057 #include "elfgcchack.h" 11058 #include "elfgcchack.h"
11058 #endif /* LIBXML_SCHEMAS_ENABLED */ 11059 #endif /* LIBXML_SCHEMAS_ENABLED */
OLDNEW
« no previous file with comments | « third_party/libxml/src/macos/src/macos_main.c ('k') | third_party/libxml/src/runtest.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698