From: stephan b. <sg...@us...> - 2004-12-26 12:18:21
|
Update of /cvsroot/pclasses/pclasses2/src/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12523/src/Util Modified Files: StringTool.cpp Log Message: Renamed expandVars*() to expandDollarRefs*(). Fixed a minor escaped-$var bug. Index: StringTool.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Util/StringTool.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- StringTool.cpp 26 Dec 2004 11:58:33 -0000 1.3 +++ StringTool.cpp 26 Dec 2004 12:18:09 -0000 1.4 @@ -233,15 +233,15 @@ } std::string - expandVars( const EntityMap & src, const std::string & text ) + expandDollarRefs( const EntityMap & src, const std::string & text ) { std::string foo = text; - expandVarsInline( src, foo ); + expandDollarRefsInline( src, foo ); return foo; } size_t - expandVarsInline( const EntityMap & src, std::string & buffer ) + expandDollarRefsInline( const EntityMap & src, std::string & buffer ) { using std::string; //CERR << "environment::expand_vars(["<<buffer<<"])"<<std::endl; @@ -275,6 +275,11 @@ if( posA>0 && !slashmode && buffer[posA-1] == '\\' ) slashmode = true; if( slashmode ) { + // arguable: + --posA; // strip 1 slash + buffer.erase( posA, 1 ); + // todo: only remove slashe preeding $. + // end arguable slashmode = false; continue; } |