Update of /cvsroot/boost/boost/tools/wave
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2101/tools/wave
Modified Files:
Tag: RC_1_34_0
cpp.cpp
Log Message:
Stripped leading and trailing whitespace for all lines in a config file (Wave
driver tool).
Index: cpp.cpp
===================================================================
RCS file: /cvsroot/boost/boost/tools/wave/cpp.cpp,v
retrieving revision 1.24.2.4
retrieving revision 1.24.2.5
diff -u -d -r1.24.2.4 -r1.24.2.5
--- cpp.cpp 14 May 2006 16:44:15 -0000 1.24.2.4
+++ cpp.cpp 24 Jun 2006 21:47:45 -0000 1.24.2.5
@@ -240,10 +240,14 @@
string::size_type pos = line.find_first_not_of(" \t");
if (pos == string::npos)
continue;
-
+
// skip comment lines
- if ('#' != line[pos])
- options.push_back(line);
+ if ('#' != line[pos]) {
+ // strip leading and trailing whitespace
+ string::size_type endpos = line.find_last_not_of(" \t");
+ BOOST_ASSERT(endpos != string::npos);
+ options.push_back(line.substr(pos, endpos-pos+1));
+ }
}
if (options.size() > 0) {
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs