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/functionfiles.cpp | 64 +++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'src/functionfiles.cpp') diff --git a/src/functionfiles.cpp b/src/functionfiles.cpp index cd5b122..051ee3a 100644 --- a/src/functionfiles.cpp +++ b/src/functionfiles.cpp @@ -7,7 +7,7 @@ #include PluginInterface3( pluginFunctionFiles, files, FunctionFiles, Function, - "Mike Buland", 0, 1 ); + "Mike Buland", 0, 1 ); FunctionFiles::FunctionFiles() { @@ -19,47 +19,47 @@ FunctionFiles::~FunctionFiles() Bu::String FunctionFiles::getName() const { - return "files"; + return "files"; } Variable FunctionFiles::call( Variable &/*input*/, VarList lParams ) { - glob_t globbuf; + glob_t globbuf; - int flags = 0; + int flags = 0; - for( VarList::const_iterator i = lParams.begin(); i; i++ ) - { - switch( (*i).getType() ) - { - case Variable::typeString: - glob( (*i).getString().getStr(), flags, NULL, &globbuf ); - flags |= GLOB_APPEND; - break; + for( VarList::const_iterator i = lParams.begin(); i; i++ ) + { + switch( (*i).getType() ) + { + case Variable::typeString: + glob( (*i).getString().getStr(), flags, NULL, &globbuf ); + flags |= GLOB_APPEND; + break; - case Variable::typeList: - throw Bu::ExceptionBase("Lists not supported in glob yet."); - break; + case Variable::typeList: + throw Bu::ExceptionBase("Lists not supported in glob yet."); + break; - default: - throw Bu::ExceptionBase( - "Cannot use a non-string or non-list as a parameter to glob" - ); - break; - } - } + default: + throw Bu::ExceptionBase( + "Cannot use a non-string or non-list as a parameter to glob" + ); + break; + } + } - Variable vRet( Variable::typeList ); - struct stat s; - for( size_t j = 0; j < globbuf.gl_pathc; j++ ) - { - stat( globbuf.gl_pathv[j], &s ); - if( S_ISREG( s.st_mode ) ) - vRet.append( globbuf.gl_pathv[j] ); - } + Variable vRet( Variable::typeList ); + struct stat s; + for( size_t j = 0; j < globbuf.gl_pathc; j++ ) + { + stat( globbuf.gl_pathv[j], &s ); + if( S_ISREG( s.st_mode ) ) + vRet.append( globbuf.gl_pathv[j] ); + } - globfree( &globbuf ); + globfree( &globbuf ); - return vRet; + return vRet; } -- cgit v1.2.3