Slackware's Ghostscript

Slackware's Ghostscript

Post by Cindy Bartoril » Sun, 03 Sep 1995 04:00:00



I installed ghostscript/ghostview along with Linux 1.2.8 from
Slackware's distribution packages. Trying to view a postscript
file, however, with ghostview, gives the following error msg:

gs: Interpreter revision (261) does not match gs_init.ps
    revision (262).

This sounds like I wound up with a ghostscript that's pieces
from different releases. Does anyone know of a quick fix for
this, rather than downloading, compiling, and installing a
whole new ghostscript?

 
 
 

Slackware's Ghostscript

Post by jo.. » Tue, 05 Sep 1995 04:00:00


On 2 Sep 1995 23:26:10 GMT, Cindy Bartorillo <ci...@cindy.fred.net> wrote:
 : I installed ghostscript/ghostview along with Linux 1.2.8 from
 : Slackware's distribution packages. Trying to view a postscript
 : file, however, with ghostview, gives the following error msg:
 :
 : gs: Interpreter revision (261) does not match gs_init.ps
 :     revision (262).
 :
 : This sounds like I wound up with a ghostscript that's pieces
 : from different releases. Does anyone know of a quick fix for
 : this, rather than downloading, compiling, and installing a
 : whole new ghostscript?
 :
In the dir /usr/lib/ghostscript, the file gs_init.ps is "too new".

The quick fix is: replace yours for this one (first line of comment is mine):

% /usr/lib/ghostscript/gs_init.ps, version 261
%    Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
%
% This file is part of Ghostscript.
%
% Ghostscript is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
% to anyone for the consequences of using it or for whether it serves any
% particular purpose or works at all, unless he says so in writing.  Refer
% to the Ghostscript General Public License for full details.
%
% Everyone is granted permission to copy, modify and redistribute
% Ghostscript, but only under the conditions described in the Ghostscript
% General Public License.  A copy of this license is supposed to have been
% given to you along with Ghostscript so you can know your rights and
% responsibilities.  It should be in a file named COPYING.  Among other
% things, the copyright notice and this notice must be preserved on all
% copies.

% Initialization file for the interpreter.
% When this is run, systemdict is still writable.

% Comment lines of the form
%       %% Replace <n> <file(s)>
% indicate places where the next <n> lines should be replaced by
% the contents of <file(s)>, when creating a single merged init file.

% Check the interpreter revision.  NOTE: the interpreter code requires
% that the first non-comment token in this file be an integer.
261
dup revision ne
 { (gs: Interpreter revision \() print revision 10 string cvs print
   (\) does not match gs_init.ps revision \() print 10 string cvs print
   (\).\n) print flush 1 .quit
 }
if pop

% Define true and false.
systemdict begin
/true 0 0 eq def
/false 0 1 eq def
end

% Acquire userdict.
currentdict dup 200 .setmaxlength               % userdict
systemdict begin
/userdict exch def

% Acquire the debugging flags.
currentdict /DEBUG known   /DEBUG exch def
  /VMDEBUG
    DEBUG {{print ( ) print vmstatus pop (      ) cvs print pop ( ) print
            systemdict length (      ) cvs print (\n) print flush}}
          {{pop}} ifelse
  def
currentdict /DISKFONTS known   /DISKFONTS exch def
currentdict /ESTACKPRINT known   /ESTACKPRINT exch def
currentdict /NOBIND known   /NOBIND exch def
/.bind /bind load def
NOBIND { /bind { } def } if
currentdict /NOCACHE known   /NOCACHE exch def
currentdict /NODISPLAY known   not /DISPLAYING exch def
currentdict /NOPAUSE known   /NOPAUSE exch def
currentdict /NOPLATFONTS known   /NOPLATFONTS exch def
currentdict /OUTPUTFILE known   % obsolete
 { /OutputFile /OUTPUTFILE load def
   currentdict /OUTPUTFILE undef
 } if
currentdict /QUIET known   /QUIET exch def
currentdict /SAFER known   /SAFER exch def
currentdict /WRITESYSTEMDICT known   /WRITESYSTEMDICT exch def

% Acquire environment variables.
currentdict /DEVICE known not
 { (GS_DEVICE) getenv { /DEVICE exch def } if } if

QUIET not { (Initializing... ) print flush } if

(START) VMDEBUG

% Acquire the standard files.
/.stdin (%stdin) (r) file def
/.stdout (%stdout) (w) file def
/.stderr (%stderr) (w) file def

% Turn on array packing for the rest of initialization.
true setpacking

% Define a procedure for skipping over an unneeded section of code.
% This avoids allocating space for the skipped procedures.
/.skipeof       % string ->
 { { dup currentfile =string readline pop eq { exit } if } loop pop
 } bind def

% Define a special version of def for making operator procedures.
/odef
        {1 index exch .makeoperator def} bind def

% Define predefined procedures substituting for operators,
% in alphabetical order.

userdict /#copies 1 put
/[      /mark load def
/]      {counttomark array astore exch pop} odef
/abs    {dup 0 lt {neg} if} odef
/copypage
        { 1 false .outputpage
          (>>copypage, press <return> to continue<<\n) .confirm
        } odef
/defaultmatrix
        {currentdevice exch deviceinitialmatrix} odef
/.echo /echo load def
userdict /.echo.mode true put
/echo   {dup /.echo.mode exch store .echo} odef
/eexec
        { 55665 .filter_eexecDecode
          cvx systemdict begin stopped
          % Only pop systemdict if it is still the top element,
          % because this is apparently what Adobe interpreters do.
          currentdict systemdict eq { end } if
          { stop } if
        } bind def
/executive
        { { prompt
            { (%statementedit) (r) file } stopped { exit } if
            cvx execute
          } loop
        } odef
/framedevice
        {.stderr (Warning: framedevice is an obsolete operator.\n) writestring
         .stderr flushfile
         pop pop pop setmatrix initclip} odef
/handleerror
        {errordict /handleerror get exec} bind def
/identmatrix
        {{1.0 0.0 0.0 1.0 0.0 0.0} cvlit exch copy} odef
/initgraphics
        {initmatrix newpath initclip 1 setlinewidth 0 setlinecap 0 setlinejoin
         [] 0 setdash 0 setgray 10 setmiterlimit} odef
/initmatrix
        {.tempmatrix defaultmatrix setmatrix} odef
/languagelevel 1 def            % we don't have full Level 2
/matrix {6 array identmatrix} odef
/prompt {flush flushpage
         (GS) print count 0 ne
          {(<) print count =only}
         if (>) print flush} bind def
/pstack {0 1 count 3 sub {index ==} for} def
/quit   {0 .quit} odef
/run    {dup type /filetype eq
          { true }
          { findlibfile { exch pop true } { false } ifelse }
         ifelse
          {cvx execute}
          {(r) file}            % let the error happen
         ifelse} odef
/showpage
        { #copies true .outputpage
          (>>showpage, press <return> to continue<<\n) .confirm
          erasepage initgraphics
        } odef
% Code output by Adobe Illustrator relies on the fact that
% `stack' is a procedure, not an operator!!!
/stack  {0 1 count 3 sub {index =} for} bind def
/start  { executive } def
% This interpreter is compatible with PostScript "version" 54.0 (I think).
/version (54.0) def

% Provide semi-fake but usable definitions for some of
% the color PostScript extensions.
/setcolorscreen {
        setscreen 9 {pop} repeat

} odef

/currentcolorscreen {
        currentscreen 3 copy 6 copy

} odef

% Define some additional built-in procedures (beyond the ones defined by
% the PostScript Language Reference Manual).
% Warning: these are not guaranteed to stay the same from one Ghostscript
% release to the next!

/concatstrings
        { exch dup length 2 index length add string     % str2 str1 new
          dup dup 4 2 roll copy         % str2 new new new1
          length 4 -1 roll putinterval
        } bind def
/copyarray
        { dup length array copy } bind def
/copystring
        { dup length string copy } bind def
/.dicttomark            % (the Level 2 >> operator)
        { counttomark 2 idiv dup dict begin
           { def } repeat pop currentdict end
        } bind def
/finddevice
        { systemdict /devicedict get exch get } bind def
/.growdict              % grow a dictionary
        { dup length 3 mul 2 idiv 1 add .setmaxlength
        } bind def
/.growput               % put, grow the dictionary if needed
        { 2 index length 3 index maxlength eq
           { 3 copy pop known not { 2 index .growdict } if
           } if
          put
        } bind def
/selectdevice
        { finddevice setdevice } bind def
/signalerror            % object errorname
        { errordict exch get exec } bind def

% Define =string, which is used by some PostScript programs even though
% it isn't documented anywhere.
/=string 128 string def

% Define the =[only] procedures.  Also define =print,
% which is used by some PostScript programs even though
% it isn't documented anywhere.
/=      { =only (\n) print } bind def
/=only  { { =string cvs } stopped { pop pop (--nostringval--) } if print } bind def
/=print /=only load def
% Temporarily define == as = for the sake of run0.
/== /= load def

% Define the filter operator.

/.filterstring (.filter_01234567890123456789) def
/.filterstring1 .filterstring 8 .filterstring length 8 sub getinterval def
/filter
        { //.filterstring exch 0 exch
          //.filterstring1 cvs length 8 add getinterval cvn load exec
        } odef
systemdict /.filter_LZWEncode undef     % per FSF

% Define procedures for getting and setting the current device resolution.

/gsgetdeviceprop
 { 1 index getdeviceprops
    { 1 index counttomark 1 add index eq { exit } if pop pop } loop
   dup mark eq          % if true, not found
    { pop dup /undefined signalerror }
    { counttomark 1 add 1 roll cleartomark exch pop exch pop }
   ifelse
 } bind def
/gscurrentresolution
 { currentdevice /HWResolution gsgetdeviceprop
 } bind def
/gssetresolution
 { 2 array astore mark exch /HWResolution exch
   currentdevice copydevice putdeviceprops setdevice
 } bind def

% Define auxiliary procedures needed for the above.
/shellarguments         % -> shell_arguments true (or) false
        { /ARGUMENTS where
           { /ARGUMENTS get dup type /arraytype eq
              { aload pop /ARGUMENTS null store true }
              { pop false }
             ifelse }
           { false } ifelse
        } bind def
/.confirm
        {DISPLAYING NOPAUSE not and
          {% Print a message and wait for the user to type something.
           % If the user just types a newline, flush it.
           print flush
           .echo.mode false echo
             .stdin dup read
             {dup (\n) 0 get eq {pop pop} {unread} ifelse} {pop} ifelse
           echo}
          {pop} ifelse} bind def
/.identmatrix           % a read-only identity matrix
        matrix readonly def
/.tempmatrix            % a temporary matrix
        matrix def

% Define the procedure used by the C executive for executing user input,
% and also by the run operator.
% This is called with a procedure or file on the operand stack.
/execute
        {stopped $error /newerror get and {handleerror} if} odef
% Define an execute analogue of run0.
/execute0
        {stopped $error /newerror get and {handleerror flush 1 .quit} if} bind def

% Define a special version of `run' that aborts on errors.
/run0
...

read more »

 
 
 

1. Installing 'X' from SlackWare 2.2.0 in a SlackWare 3.0 system?

I've downloaded and installed all of SlackWare v.3.0 except for the X
Window system and utils and NTex.  I'm getting ready to download the rest
of SlackWare 3.0, however I do have SlackWare 2.2 on CD-ROM.  

Would it be alright if I just use the X Window system that's in SlackWare
2.2 in my SlackWare 3.0 system?  Are they both the same version (except
one is compiled for ELF and the other is compiled for a.out)?  In fact,
wouldn't it be better for me to use the a.out version of X Window because
(from what I heard) a.out is faster than ELF and I have no plans of doing
any mods to the X Window source (is it included BTW?).  Or is there
enough significant differences between the SlackWare 3.0 X Window and
SlackWare 2.2 X Window that it'll be worth my time to download all 20+
disks of the 3.0 SlackWare X Window package?

Thanks!

Arcadio

2. Accepting domain addressing for UUCP hosts

3. 'lp' and 'ghostscript'

4. Better FTP clients: NCFTP

5. ghostscript and 'Error: /invalidfont in findfont'

6. missing OI in Slackware 2.0.1

7. ghostscript 'linux' device

8. Problem with server-side Includes

9. Slackware 'setup' and 'pkgtool' broke!

10. Slackware + HP660C + Ghostscript/xv

11. Configuring ghostscript -- cannot display postscript files (Slackware 1.1.1)

12. Char spacing woes in Slackware/groff/ghostscript?

13. Slackware GhostScript shuts off the monitor ??