Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ps
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2005-06-02 11:38:06 (GMT)
committer Marco Pesenti Gritti <marco@src.gnome.org>2005-06-02 11:38:06 (GMT)
commit4e8c27b1594fbfc20df693cb25537da8fad9cde4 (patch)
treece645c88b6901cee7c6ef42b9da4ef425214d199 /ps
parentb30d106163b2b06b7f7193a0da766835984341f2 (diff)
Try to render even if psscan fails.
2005-06-02 Marco Pesenti Gritti <mpg@redhat.com> * ps/ps-document.c: (output): * ps/ps.c: (psscan): Try to render even if psscan fails.
Diffstat (limited to 'ps')
-rw-r--r--ps/ps-document.c12
-rw-r--r--ps/ps.c12
2 files changed, 2 insertions, 22 deletions
diff --git a/ps/ps-document.c b/ps/ps-document.c
index b57c96a..8684f4d 100644
--- a/ps/ps-document.c
+++ b/ps/ps-document.c
@@ -233,13 +233,6 @@ interpreter_failed (PSDocument *gs, char *msg)
stop_interpreter (gs);
}
-static void
-interpreter_message (PSDocument *gs, char *msg)
-{
- /* FIXME maybe we should display a dialog */
- g_print (msg);
-}
-
static gboolean
ps_document_widget_event (GtkWidget *widget, GdkEvent *event, gpointer data)
{
@@ -524,7 +517,7 @@ is_interpreter_ready (PSDocument *gs)
static void
output(gpointer data, gint source, GdkInputCondition condition)
{
- char buf[MAX_BUFSIZE + 1], *msg;
+ char buf[MAX_BUFSIZE + 1];
guint bytes = 0;
PSDocument *gs = PS_DOCUMENT(data);
@@ -564,8 +557,7 @@ output(gpointer data, gint source, GdkInputCondition condition)
}
if(bytes > 0) {
buf[bytes] = '\0';
- msg = g_strdup(buf);
- interpreter_message (gs, msg);
+ printf(buf);
}
}
diff --git a/ps/ps.c b/ps/ps.c
index 693cc37..c95c815 100644
--- a/ps/ps.c
+++ b/ps/ps.c
@@ -322,18 +322,6 @@ psscan(FILE * file, int respect_eof, const gchar * fname)
In a way, this makes sense, a program PostScript does not need
the !PS at the beginning.
*/
- /* use a test command to determine if ghostscript can
- understand this document! */
- gchar *test_cmd;
-
- test_cmd = g_strdup_printf
- ("%s -dNOPAUSE -dBATCH -sDEVICE=nullpage %s "
- "1>/dev/null 2>/dev/null", gtk_gs_defaults_get_interpreter_cmd(), fname);
- if(system(test_cmd) != 0) {
- g_free(test_cmd);
- return NULL;
- }
- g_free(test_cmd);
doc = g_new0(struct document, 1);
doc->default_page_orientation = GTK_GS_ORIENTATION_NONE;
doc->orientation = GTK_GS_ORIENTATION_NONE;