diff options
author | Mike Buland <eichlan@xagasoft.com> | 2012-11-08 22:58:28 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2012-11-08 22:58:28 +0000 |
commit | 52be1ef0d126f09ba943c7afcf367e7d9347f2fd (patch) | |
tree | fd4b0dd148751c3c6c1b95296c3b82cb86051b83 /src/functionopen.cpp | |
parent | 795d0737fed40d88a7801b451b7750ba90802345 (diff) | |
download | build-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/functionopen.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/functionopen.cpp b/src/functionopen.cpp index 4026a8c..075f43c 100644 --- a/src/functionopen.cpp +++ b/src/functionopen.cpp | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <bu/plugger.h> | 4 | #include <bu/plugger.h> |
5 | PluginInterface3( pluginFunctionOpen, open, FunctionOpen, Function, | 5 | PluginInterface3( pluginFunctionOpen, open, FunctionOpen, Function, |
6 | "Mike Buland", 0, 1 ); | 6 | "Mike Buland", 0, 1 ); |
7 | 7 | ||
8 | FunctionOpen::FunctionOpen() | 8 | FunctionOpen::FunctionOpen() |
9 | { | 9 | { |
@@ -15,28 +15,28 @@ FunctionOpen::~FunctionOpen() | |||
15 | 15 | ||
16 | Bu::String FunctionOpen::getName() const | 16 | Bu::String FunctionOpen::getName() const |
17 | { | 17 | { |
18 | return "open"; | 18 | return "open"; |
19 | } | 19 | } |
20 | 20 | ||
21 | Variable FunctionOpen::call( Variable &input, VarList lParams ) | 21 | Variable FunctionOpen::call( Variable &input, VarList lParams ) |
22 | { | 22 | { |
23 | if( lParams.getSize() != 2 ) | 23 | if( lParams.getSize() != 2 ) |
24 | { | 24 | { |
25 | throw Bu::ExceptionBase( | 25 | throw Bu::ExceptionBase( |
26 | "open takes two parameters, filename and mode." | 26 | "open takes two parameters, filename and mode." |
27 | ); | 27 | ); |
28 | } | 28 | } |
29 | Bu::String sMode = lParams.last().toString().toLower(); | 29 | Bu::String sMode = lParams.last().toString().toLower(); |
30 | int iMode = Bu::File::Create; | 30 | int iMode = Bu::File::Create; |
31 | if( sMode.find('w') ) | 31 | if( sMode.find('w') ) |
32 | iMode |= Bu::File::Write; | 32 | iMode |= Bu::File::Write; |
33 | if( sMode.find('r') ) | 33 | if( sMode.find('r') ) |
34 | iMode |= Bu::File::Read; | 34 | iMode |= Bu::File::Read; |
35 | Variable vRet( | 35 | Variable vRet( |
36 | (void *)FileMgr::getInstance().open( | 36 | (void *)FileMgr::getInstance().open( |
37 | lParams.first().toString(), iMode | 37 | lParams.first().toString(), iMode |
38 | ) | 38 | ) |
39 | ); | 39 | ); |
40 | return vRet; | 40 | return vRet; |
41 | } | 41 | } |
42 | 42 | ||