aboutsummaryrefslogtreecommitdiff
path: root/src/functiondirname.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-08 22:58:28 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-08 22:58:28 +0000
commit52be1ef0d126f09ba943c7afcf367e7d9347f2fd (patch)
treefd4b0dd148751c3c6c1b95296c3b82cb86051b83 /src/functiondirname.cpp
parent795d0737fed40d88a7801b451b7750ba90802345 (diff)
downloadbuild-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.gz
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.bz2
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.tar.xz
build-52be1ef0d126f09ba943c7afcf367e7d9347f2fd.zip
tabconv: it's all spaces now.
Diffstat (limited to '')
-rw-r--r--src/functiondirname.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/functiondirname.cpp b/src/functiondirname.cpp
index 7fc3bf2..c33771e 100644
--- a/src/functiondirname.cpp
+++ b/src/functiondirname.cpp
@@ -2,7 +2,7 @@
2 2
3#include <bu/plugger.h> 3#include <bu/plugger.h>
4PluginInterface3( pluginFunctionDirName, dirName, FunctionDirName, Function, 4PluginInterface3( pluginFunctionDirName, dirName, FunctionDirName, Function,
5 "Mike Buland", 0, 1 ); 5 "Mike Buland", 0, 1 );
6 6
7FunctionDirName::FunctionDirName() 7FunctionDirName::FunctionDirName()
8{ 8{
@@ -14,29 +14,29 @@ FunctionDirName::~FunctionDirName()
14 14
15Bu::String FunctionDirName::getName() const 15Bu::String FunctionDirName::getName() const
16{ 16{
17 return "dirName"; 17 return "dirName";
18} 18}
19 19
20Variable FunctionDirName::call( Variable &input, VarList /*lParams*/ ) 20Variable FunctionDirName::call( Variable &input, VarList /*lParams*/ )
21{ 21{
22 Bu::String sFile; 22 Bu::String sFile;
23 sFile = input.getString(); 23 sFile = input.getString();
24 24
25 Bu::String::const_iterator i = sFile.begin(); 25 Bu::String::const_iterator i = sFile.begin();
26 Bu::String::const_iterator io; 26 Bu::String::const_iterator io;
27 for(;;) 27 for(;;)
28 { 28 {
29 Bu::String::const_iterator b = i.find('/'); 29 Bu::String::const_iterator b = i.find('/');
30 if( !b ) 30 if( !b )
31 { 31 {
32 return Variable( Bu::String( sFile.begin(), io ) ); 32 return Variable( Bu::String( sFile.begin(), io ) );
33 } 33 }
34 io = b; 34 io = b;
35 i = b+1; 35 i = b+1;
36 if( !i ) 36 if( !i )
37 { 37 {
38 return Variable( Bu::String( sFile.begin(), io ) ); 38 return Variable( Bu::String( sFile.begin(), io ) );
39 } 39 }
40 } 40 }
41} 41}
42 42