From 51e21a316be6e052251b3dfc7d671061ebd67cee Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 21 Dec 2009 18:03:28 +0000 Subject: Removed the old trunk contents. About to load up m3 --- src/stringprocbuild.cpp | 54 ------------------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 src/stringprocbuild.cpp (limited to 'src/stringprocbuild.cpp') diff --git a/src/stringprocbuild.cpp b/src/stringprocbuild.cpp deleted file mode 100644 index 419d819..0000000 --- a/src/stringprocbuild.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "stringprocbuild.h" -#include "build.h" - -StringProcBuild::StringProcBuild( Build *pBld ) : - StringProc( pBld ) -{ -} - -StringProcBuild::~StringProcBuild() -{ -} - -std::string StringProcBuild::replVars( const std::string &sSrc, const StringList *pCont, VarMap *mExtra ) -{ - std::string sDes, sBuf; - int nMode = 0; - - int nLen = sSrc.size(); - for( int j = 0; j < nLen; j++ ) - { - if( sSrc[j] == '{' ) - { - sBuf = ""; - nMode = 1; - } - else if( nMode == 0 ) - { - sDes += sSrc[j]; - } - else if( nMode == 1 ) - { - if( sSrc[j] == '}' ) - { - sDes += getBuild()->getVar( pCont, sBuf, mExtra ); - nMode = 0; - } - else - { - sBuf += sSrc[j]; - } - } - } - - if( nMode == 1 ) - { - throw BuildException( - "Unterminated variable replacement found: \"%s\"", - sSrc.c_str() - ); - } - - return sDes; -} - -- cgit v1.2.3