summaryrefslogtreecommitdiffstats
path: root/src/extension/script/InkscapeInterpreter.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-05-06 21:45:01 +0000
committerishmal <ishmal@users.sourceforge.net>2006-05-06 21:45:01 +0000
commitb151fcd87bfd5892dc3cd166a0944d12666aefab (patch)
tree0d2e099f46dcc747a4685727c3408c23efcdc544 /src/extension/script/InkscapeInterpreter.cpp
parentr11769@tres: ted | 2006-05-06 09:09:59 -0700 (diff)
downloadinkscape-b151fcd87bfd5892dc3cd166a0944d12666aefab.tar.gz
inkscape-b151fcd87bfd5892dc3cd166a0944d12666aefab.zip
const types
(bzr r754)
Diffstat (limited to 'src/extension/script/InkscapeInterpreter.cpp')
-rw-r--r--src/extension/script/InkscapeInterpreter.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/extension/script/InkscapeInterpreter.cpp b/src/extension/script/InkscapeInterpreter.cpp
index 4342922b1..c28163489 100644
--- a/src/extension/script/InkscapeInterpreter.cpp
+++ b/src/extension/script/InkscapeInterpreter.cpp
@@ -24,7 +24,7 @@ InkscapeInterpreter::InkscapeInterpreter()
{
}
-
+
/*
*
@@ -34,40 +34,40 @@ InkscapeInterpreter::~InkscapeInterpreter()
}
-
-
+
+
/*
* Interpret an in-memory string
*/
-bool InkscapeInterpreter::interpretScript(Glib::ustring &script,
- Glib::ustring &output,
- Glib::ustring &error)
+bool InkscapeInterpreter::interpretScript(const Glib::ustring &script,
+ Glib::ustring &output,
+ Glib::ustring &error)
{
//do nothing. let the subclasses implement this
return true;
}
-
-
+
+
/*
* Interpret a named file
*/
-bool InkscapeInterpreter::interpretUri(Glib::ustring &uri,
- Glib::ustring &output,
- Glib::ustring &error)
+bool InkscapeInterpreter::interpretUri(const Glib::ustring &uri,
+ Glib::ustring &output,
+ Glib::ustring &error)
{
char *curi = (char *)uri.raw().c_str();
std::ifstream ins(curi);
if (!ins.good())
{
- printf("interpretUri: Could not open %s for reading\n", curi);
+ g_error("interpretUri: Could not open %s for reading\n", curi);
return false;
}
-
+
Glib::ustring buf;
-
+
while (!ins.eof())
{
gunichar ch = (gunichar) ins.get();
@@ -75,7 +75,7 @@ bool InkscapeInterpreter::interpretUri(Glib::ustring &uri,
}
ins.close();
-
+
bool ret = interpretScript(buf, output, error);
return ret;