diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GsWidget.cxx | 8 | ||||
-rw-r--r-- | src/PSEditWidget.cxx | 8 | ||||
-rw-r--r-- | src/flpsed.cxx | 6 |
3 files changed, 13 insertions, 9 deletions
diff --git a/src/GsWidget.cxx b/src/GsWidget.cxx index c781ea2..ec0a73d 100644 --- a/src/GsWidget.cxx +++ b/src/GsWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: GsWidget.cxx,v 1.4 2004/06/25 18:14:05 hofmann Exp $" +// "$Id: GsWidget.cxx,v 1.5 2004/06/28 19:43:16 hofmann Exp $" // // GsWidget routines. // @@ -152,7 +152,11 @@ int GsWidget::load(int fd) { argv[5] = "-dNOPLATFONTS"; argv[6] = "-"; argv[7] = NULL; - execvp(argv[0], argv); + execvp(argv[0], argv); + fprintf(stderr, "Could not exec gs (errno %d)\n", errno); + fprintf(stderr, "Please install ghostscript and make sure 'gs' " + "is in the PATH.\n"); + exit(1); } else { gs_pid = pid; page = 0; diff --git a/src/PSEditWidget.cxx b/src/PSEditWidget.cxx index 55373f5..d3c54ad 100644 --- a/src/PSEditWidget.cxx +++ b/src/PSEditWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditWidget.cxx,v 1.8 2004/06/25 18:14:05 hofmann Exp $" +// "$Id: PSEditWidget.cxx,v 1.9 2004/06/28 19:43:16 hofmann Exp $" // // PSEditWidget routines. // @@ -204,8 +204,8 @@ int PSEditWidget::load(char *f) { char *s, *e, glyph[1024]; int size, ret; - strncpy(tmpname, "/tmp/PSEditWidgetXXXXXX.ps", 256); - tmp_fd = mkstemps(tmpname, 3); + strncpy(tmpname, "/tmp/PSEditWidgetXXXXXX", 256); + tmp_fd = mkstemp(tmpname); if (tmp_fd < 0) { fprintf(stderr, "Could not create temporary file (errno %d).\n", errno); return 1; @@ -379,7 +379,7 @@ void PSText::draw(int off_x,int off_y) { fl_font(FL_HELVETICA, size); fl_draw(s, x + off_x, y + off_y); if (gsew->cur_text == this) { - fl_draw_box(FL_BORDER_FRAME, x+off_x-1, y+off_y-fl_height()+fl_descent(), fl_width(s)+2, fl_height(), FL_BLACK); + fl_draw_box(FL_BORDER_FRAME, x+off_x-1, y+off_y-fl_height()+fl_descent(), (int) fl_width(s)+2, fl_height(), FL_BLACK); } if (p->next) { p->next->draw(off_x, off_y); diff --git a/src/flpsed.cxx b/src/flpsed.cxx index a045b90..1344bce 100644 --- a/src/flpsed.cxx +++ b/src/flpsed.cxx @@ -1,5 +1,5 @@ // -// "$Id: flpsed.cxx,v 1.9 2004/06/25 18:14:05 hofmann Exp $" +// "$Id: flpsed.cxx,v 1.10 2004/06/28 19:43:16 hofmann Exp $" // // flpsed program. // @@ -170,8 +170,8 @@ void print_cb() { return; } - strncpy(tmpname, "/tmp/PSEditWidgetXXXXXX.ps", 256); - tmp_fd = mkstemps(tmpname, 3); + strncpy(tmpname, "/tmp/PSEditWidgetXXXXXX", 256); + tmp_fd = mkstemp(tmpname); if (tmp_fd >= 0) { close(tmp_fd); |