octave-maintainers
[Top][All Lists]
Advanced

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

Print to PDF under Windows


From: Michael Goffioul
Subject: Print to PDF under Windows
Date: Thu, 19 Nov 2009 20:39:29 +0000

Hi,

In print.m, I see the following pieces of code:

... (line 194)
  elseif (ispc ())
    if (~isempty (getenv ("GSC")))
      persistent ghostscript_binary = getenv ("GSC");
    else
      persistent ghostscript_binary = "gswin32c";
    endif
...
... (line 265)
    elseif (ispc ())
      [status, output] = system (sprintf ("if exist \"%s\" ( exit /B 1
) else ( exit /B 0 )", ghostscript_binary));
      have_ghostscript = (status ~= 0);
    endif
...

Now, let's say GSC is not defined. How is this supposed to work?
The "system" call will check for the existence of a file named
"gswin32c" in the current directory. This will never work... or am
I missing something?

Wouldn't it be better to default to

      persistent ghostscript_binary = file_in_path(EXEC_PATH, "gswin32c.exe");

Michael.


reply via email to

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