summaryrefslogtreecommitdiff
path: root/src/GsWidget.cxx
diff options
context:
space:
mode:
authorJohannes Hofmann <johannes.hofmann@gmx.de>2004-11-14 19:04:09 +0000
committerJohannes Hofmann <johannes.hofmann@gmx.de>2004-11-14 19:04:09 +0000
commit37a96e693506ff169d6702d384405597f3ff54e1 (patch)
treea94af90660a2939c636e7356b353bd35db3cdb16 /src/GsWidget.cxx
parentdbcf5fcc56e85f372d3be40f725a8e526ef00ca1 (diff)
final touches for 0.3.1
final touches for 0.3.1
Diffstat (limited to 'src/GsWidget.cxx')
-rw-r--r--src/GsWidget.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GsWidget.cxx b/src/GsWidget.cxx
index 7ecbedd..590f6f5 100644
--- a/src/GsWidget.cxx
+++ b/src/GsWidget.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: GsWidget.cxx,v 1.12 2004/11/10 18:49:08 hofmann Exp $"
+// "$Id: GsWidget.cxx,v 1.13 2004/11/14 20:04:09 hofmann Exp $"
//
// GsWidget routines.
//
@@ -118,7 +118,7 @@ GsWidget::~GsWidget() {
int GsWidget::load(char *f) {
int fd = open(f, O_RDONLY);
if (fd == -1) {
- fprintf(stderr, "Could not open file %s (errno %d).\n", f, errno);
+ perror("open");
return 1;
}
return load(fd);
@@ -161,7 +161,7 @@ int GsWidget::load(int fd) {
argv[5] = "-";
argv[6] = NULL;
execvp(argv[0], argv);
- fprintf(stderr, "Could not exec gs (errno %d)\n", errno);
+ perror("exec");
fprintf(stderr, "Please install ghostscript and make sure 'gs' "
"is in the PATH.\n");
exit(1);
@@ -179,7 +179,7 @@ int GsWidget::reload() {
if (in_fd >= 0) {
ret = lseek(in_fd, 0L, SEEK_SET);
if (ret == -1) {
- fprintf(stderr, "lseek failed (errno %d)\n", errno);
+ perror("lseek");
return 1;
}
load(in_fd);