Update of /cvsroot/boost/boost/tools/wave
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2018/tools/wave

Modified Files:
        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.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- cpp.cpp     14 May 2006 16:41:00 -0000      1.28
+++ cpp.cpp     24 Jun 2006 21:47:16 -0000      1.29
@@ -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

Reply via email to