summaryrefslogtreecommitdiff
path: root/src/PSEditor.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2005-02-02 17:18:47 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2005-02-02 17:18:47 +0000
commit25250767c431c40abab8496c637d8b024bb28b4a (patch)
tree53e9342d381a4364411bfe31a5da1da61a0ec094 /src/PSEditor.cxx
parent20d670d43dce0852dfdbab5ba1f744d712652add (diff)
implement PDF import/export.
implement PDF import/export.
Diffstat (limited to 'src/PSEditor.cxx')
-rw-r--r--src/PSEditor.cxx28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/PSEditor.cxx b/src/PSEditor.cxx
index 276f4ff..015d935 100644
--- a/src/PSEditor.cxx
+++ b/src/PSEditor.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: PSEditor.cxx,v 1.22 2004/11/10 18:32:59 hofmann Exp $"
+// "$Id: PSEditor.cxx,v 1.23 2005/02/02 18:18:47 hofmann Exp $"
//
// PSEditor routines.
//
@@ -127,7 +127,7 @@ int PSEditor::load(FILE *fp) {
}
}
-int PSEditor::load(char *f) {
+int PSEditor::load(const char *f) {
FILE *fp;
int ret;
@@ -143,6 +143,22 @@ int PSEditor::load(char *f) {
return ret;
}
+int PSEditor::save(FILE *fp) {
+ int ret;
+
+ if (!file_loaded()) {
+ return 1;
+ }
+
+ ret = model->save(fp, tmp_fd);
+
+ if (ret == 0) {
+ mod = 0;
+ }
+
+ return ret;
+}
+
int PSEditor::save(const char* savefile) {
FILE *fp;
int ret;
@@ -157,13 +173,7 @@ int PSEditor::save(const char* savefile) {
return 1;
}
-
- ret = model->save(fp, tmp_fd);
-
- if (ret == 0) {
- mod = 0;
- }
-
+ ret = save(fp);
fclose(fp);
return ret;