octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #41957] print -P fails, and print when no figu


From: Michael Godfrey
Subject: [Octave-bug-tracker] [bug #41957] print -P fails, and print when no figure exists crashes
Date: Fri, 28 Mar 2014 11:03:48 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0

Follow-up Comment #3, bug #41957 (project octave):

Rik,

The patch:
    ||  any (strcmp (arg_st.devopt, {"pswrite", "ps2write"}))
is obviously wrong. But, the original code is also
wrong. It does not allow spooling to a PDF printer or anything
except PS. Many modern printers accept other formats. In addition,
the "printer" may be a "virtual" printer which outputs PDF
rather than actually spooling to any device.

So, the only part of this test that is valid is the line

if (! any (strcmp (arg_st.devopt, gs_device_list))

This will allow formats that the specific printer does not
support but there is no obvious way of avoiding this.

So, the patch should read:
diff -r d0d9f6daa4b6 -r 90c199446cea
scripts/plot/util/private/__print_parse_opts__.m
--- a/scripts/plot/util/private/__print_parse_opts__.m  Mon Mar 24 21:24:16
2014 -0700
+++ b/scripts/plot/util/private/__print_parse_opts__.m  Tue Mar 25 17:00:41
2014 +0000
@@ -335,7 +335,8 @@
       error ("print: a file name may not specified when spooling to a
printer")
     endif
     if (! any (strcmp (arg_st.devopt, gs_device_list))
-      || ! any (strcmp (arg_st.devopt, {"pswrite", "ps2write"})))
+       )
-      ## Only postscript and supported ghostscript devices
-      error ("print: invalid format for spooling to a printer")
+      error ("print: invalid format for ghostscript")
     endif

OK?

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?41957>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]