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

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

Issue 1977213002: Roll libxml to 8effcb578e0590cc01bbcab0f9dccefc6bdbcdbd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update README.chromium. Created 4 years, 7 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
OLDNEW
1 /* 1 /*
2 * error.c: module displaying/handling XML parser errors 2 * error.c: module displaying/handling XML parser errors
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 <daniel@veillard.com> 6 * Daniel Veillard <daniel@veillard.com>
7 */ 7 */
8 8
9 #define IN_LIBXML 9 #define IN_LIBXML
10 #include "libxml.h" 10 #include "libxml.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 */ 170 */
171 171
172 static void 172 static void
173 xmlParserPrintFileContextInternal(xmlParserInputPtr input , 173 xmlParserPrintFileContextInternal(xmlParserInputPtr input ,
174 xmlGenericErrorFunc channel, void *data ) { 174 xmlGenericErrorFunc channel, void *data ) {
175 const xmlChar *cur, *base; 175 const xmlChar *cur, *base;
176 unsigned int n, col; /* GCC warns if signed, because compared with si zeof() */ 176 unsigned int n, col; /* GCC warns if signed, because compared with si zeof() */
177 xmlChar content[81]; /* space for 80 chars + line terminator */ 177 xmlChar content[81]; /* space for 80 chars + line terminator */
178 xmlChar *ctnt; 178 xmlChar *ctnt;
179 179
180 if ((input == NULL) || (input->cur == NULL) || 180 if ((input == NULL) || (input->cur == NULL))
181 (*input->cur == 0)) return; 181 return;
182 182
183 cur = input->cur; 183 cur = input->cur;
184 base = input->base; 184 base = input->base;
185 /* skip backwards over any end-of-lines */ 185 /* skip backwards over any end-of-lines */
186 while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) { 186 while ((cur > base) && ((*(cur) == '\n') || (*(cur) == '\r'))) {
187 cur--; 187 cur--;
188 } 188 }
189 n = 0; 189 n = 0;
190 /* search backwards for beginning-of-line (to max buff size) */ 190 /* search backwards for beginning-of-line (to max buff size) */
191 while ((n++ < (sizeof(content)-1)) && (cur > base) && 191 while ((n++ < (sizeof(content)-1)) && (cur > base) &&
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 to->file = file; 989 to->file = file;
990 to->str1 = str1; 990 to->str1 = str1;
991 to->str2 = str2; 991 to->str2 = str2;
992 to->str3 = str3; 992 to->str3 = str3;
993 993
994 return 0; 994 return 0;
995 } 995 }
996 996
997 #define bottom_error 997 #define bottom_error
998 #include "elfgcchack.h" 998 #include "elfgcchack.h"
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698