[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src/serialization tokenizer.cpp
From: |
Philippe Plantier |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src/serialization tokenizer.cpp |
Date: |
Mon, 04 Apr 2005 16:14:21 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Philippe Plantier <address@hidden> 05/04/04 20:14:21
Modified files:
src/serialization: tokenizer.cpp
Log message:
Made the tokenizer ignore '\r' characters at low-level, preventing them
to be
included in quoted strings etc.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/serialization/tokenizer.cpp.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: wesnoth/src/serialization/tokenizer.cpp
diff -u wesnoth/src/serialization/tokenizer.cpp:1.5
wesnoth/src/serialization/tokenizer.cpp:1.6
--- wesnoth/src/serialization/tokenizer.cpp:1.5 Tue Mar 29 20:19:33 2005
+++ wesnoth/src/serialization/tokenizer.cpp Mon Apr 4 20:14:21 2005
@@ -1,4 +1,4 @@
-/* $Id: tokenizer.cpp,v 1.5 2005/03/29 20:19:33 gruikya Exp $ */
+/* $Id: tokenizer.cpp,v 1.6 2005/04/04 20:14:21 gruikya Exp $ */
/*
Copyright (C) 2004 by Philippe Plantier <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org
@@ -126,11 +126,13 @@
colno_++;
}
- if(in_.good()) {
- current_ = in_.get();
- } else {
- current_ = EOF;
- }
+ do {
+ if(in_.good()) {
+ current_ = in_.get();
+ } else {
+ current_ = EOF;
+ }
+ } while(current_ == '\r');
}
int tokenizer::peek_char()
@@ -140,7 +142,7 @@
bool tokenizer::is_space(int c)
{
- return c == ' ' || c == '\t' || c == '\r';
+ return c == ' ' || c == '\t';
}
bool tokenizer::is_alnum(int c)
- [Wesnoth-cvs-commits] wesnoth/src/serialization tokenizer.cpp,
Philippe Plantier <=