[xml] Tiny refactoring patch for xmlParseCharData
- From: Bjorn Reese <breese mail1 stofanet dk>
- To: xml gnome org
- Subject: [xml] Tiny refactoring patch for xmlParseCharData
- Date: Wed, 04 Jan 2006 17:27:40 +0100
Avoiding duplicated code.
Index: parser.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/parser.c,v
retrieving revision 1.444
diff -u -p -u -r1.444 parser.c
--- parser.c 17 Nov 2005 07:25:52 -0000 1.444
+++ parser.c 4 Jan 2006 16:13:31 -0000
@@ -3455,12 +3455,10 @@ xmlParseCharData(xmlParserCtxtPtr ctxt,
get_more_space:
while (*in == 0x20) in++;
if (*in == 0xA) {
- ctxt->input->line++; ctxt->input->col = 1;
- in++;
- while (*in == 0xA) {
+ do {
ctxt->input->line++; ctxt->input->col = 1;
in++;
- }
+ } while (*in == 0xA);
goto get_more_space;
}
if (*in == '<') {
@@ -3496,12 +3494,10 @@ get_more:
}
ctxt->input->col = ccol;
if (*in == 0xA) {
- ctxt->input->line++; ctxt->input->col = 1;
- in++;
- while (*in == 0xA) {
+ do {
ctxt->input->line++; ctxt->input->col = 1;
in++;
- }
+ } while (*in == 0xA);
goto get_more;
}
if (*in == ']') {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]