From 52be1ef0d126f09ba943c7afcf367e7d9347f2fd Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 8 Nov 2012 22:58:28 +0000 Subject: tabconv: it's all spaces now. --- src/functiongetmakedeps.cpp | 78 ++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'src/functiongetmakedeps.cpp') diff --git a/src/functiongetmakedeps.cpp b/src/functiongetmakedeps.cpp index fda6aa2..22cf4aa 100644 --- a/src/functiongetmakedeps.cpp +++ b/src/functiongetmakedeps.cpp @@ -8,7 +8,7 @@ using namespace Bu; #include PluginInterface3( pluginFunctionGetMakeDeps, getMakeDeps, FunctionGetMakeDeps, - Function, "Mike Buland", 0, 1 ); + Function, "Mike Buland", 0, 1 ); FunctionGetMakeDeps::FunctionGetMakeDeps() { @@ -20,50 +20,50 @@ FunctionGetMakeDeps::~FunctionGetMakeDeps() Bu::String FunctionGetMakeDeps::getName() const { - return "getMakeDeps"; + return "getMakeDeps"; } Variable FunctionGetMakeDeps::call( Variable &/*input*/, VarList lParams ) { - pContext->getView()->cmdStarted( lParams.first().getString().getStr() ); - Process p( Process::StdOut, "/bin/bash", "/bin/bash", "-c", - lParams.first().getString().getStr(), NULL ); + pContext->getView()->cmdStarted( lParams.first().getString().getStr() ); + Process p( Process::StdOut, "/bin/bash", "/bin/bash", "-c", + lParams.first().getString().getStr(), NULL ); - // Gather all data from the command. - Bu::String sBuf; - do - { - char buf[4096]; - int iRead = p.read( buf, 4096 ); - sBuf.append( buf, iRead ); - } - while( !p.isEos() ); - - pContext->getView()->cmdFinished( "", "", p.childExitStatus() ); - - Variable vRet( Variable::typeList ); + // Gather all data from the command. + Bu::String sBuf; + do + { + char buf[4096]; + int iRead = p.read( buf, 4096 ); + sBuf.append( buf, iRead ); + } + while( !p.isEos() ); + + pContext->getView()->cmdFinished( "", "", p.childExitStatus() ); + + Variable vRet( Variable::typeList ); - Bu::String::iterator i, j; - i = sBuf.find(':')+2; - while( i ) - { - // Find whitespace at the end of the word, this one is easy, there's - // always a space after a word - for( j = i; j && *j != ' ' && *j != '\n' && *j != '\r'; j++ ) { } - - Bu::String sTmp( i, j ); - vRet.append( sTmp ); - - // Find the begining of the next word, trickier, we don't want to go - // off the end, and we need to skip \ chars at the ends of lines, right - // now this is too stupid to do that, so it may not work on windows. - // TODO: perhaps make this only skip \ chars at the ends of lines, - // we'll see if it matters. - for( i = j+1; - i && (*i == ' ' || *i == '\\' || *i == '\n' || *i == '\r'); i++ ) - { } - } + Bu::String::iterator i, j; + i = sBuf.find(':')+2; + while( i ) + { + // Find whitespace at the end of the word, this one is easy, there's + // always a space after a word + for( j = i; j && *j != ' ' && *j != '\n' && *j != '\r'; j++ ) { } + + Bu::String sTmp( i, j ); + vRet.append( sTmp ); + + // Find the begining of the next word, trickier, we don't want to go + // off the end, and we need to skip \ chars at the ends of lines, right + // now this is too stupid to do that, so it may not work on windows. + // TODO: perhaps make this only skip \ chars at the ends of lines, + // we'll see if it matters. + for( i = j+1; + i && (*i == ' ' || *i == '\\' || *i == '\n' || *i == '\r'); i++ ) + { } + } - return vRet; + return vRet; } -- cgit v1.2.3