diff options
Diffstat (limited to '')
-rw-r--r-- | src/functionwrite.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/functionwrite.cpp b/src/functionwrite.cpp index 14a396a..4aee4e0 100644 --- a/src/functionwrite.cpp +++ b/src/functionwrite.cpp | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | #include <bu/plugger.h> | 4 | #include <bu/plugger.h> |
5 | PluginInterface3( pluginFunctionWrite, write, FunctionWrite, Function, | 5 | PluginInterface3( pluginFunctionWrite, write, FunctionWrite, Function, |
6 | "Mike Buland", 0, 1 ); | 6 | "Mike Buland", 0, 1 ); |
7 | 7 | ||
8 | FunctionWrite::FunctionWrite() | 8 | FunctionWrite::FunctionWrite() |
9 | { | 9 | { |
@@ -15,20 +15,20 @@ FunctionWrite::~FunctionWrite() | |||
15 | 15 | ||
16 | Bu::String FunctionWrite::getName() const | 16 | Bu::String FunctionWrite::getName() const |
17 | { | 17 | { |
18 | return "write"; | 18 | return "write"; |
19 | } | 19 | } |
20 | 20 | ||
21 | Variable FunctionWrite::call( Variable &input, VarList lParams ) | 21 | Variable FunctionWrite::call( Variable &input, VarList lParams ) |
22 | { | 22 | { |
23 | if( lParams.getSize() != 1 ) | 23 | if( lParams.getSize() != 1 ) |
24 | { | 24 | { |
25 | throw Bu::ExceptionBase( | 25 | throw Bu::ExceptionBase( |
26 | "write takes one parameter, the string to write." | 26 | "write takes one parameter, the string to write." |
27 | ); | 27 | ); |
28 | } | 28 | } |
29 | FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).write( | 29 | FileMgr::getInstance().get( (ptrdiff_t)input.getOpaque() ).write( |
30 | lParams.first().toString() | 30 | lParams.first().toString() |
31 | ); | 31 | ); |
32 | return Variable(); | 32 | return Variable(); |
33 | } | 33 | } |
34 | 34 | ||