|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T g
Length: 10656 (0x29a0)
Types: TextFile
Names: »ghost.ps«
└─⟦a05ed705a⟧ Bits:30007078 DKUUG GNU 2/12/89
└─⟦ff23ba0e6⟧ »./ghostscript-1.3.tar.Z«
└─⟦a24a58cd3⟧
└─⟦this⟧ »ghost.ps«
% Copyright (C) 1989 Aladdin Enterprises. All rights reserved.
% Distributed by Free Software Foundation, Inc.
%
% 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 Ghostscript, version 1.3.
% When this is run, systemdict is still writable.
% Acquire the debugging flags.
currentdict /DEBUG known /DEBUG exch def
currentdict /NODISPLAY known not /DISPLAYING exch def
%%%%%%
DEBUG {vmstatus pop exch pop ( ) cvs print (\n) print flush} if
%%%%%%
% Acquire systemdict and userdict.
% Note that the dictionary stack only has 1 element at this point!
/systemdict currentdict def
/userdict 200 dict def
userdict begin % 2 elements now
systemdict begin
% Define true and false.
/true 0 0 eq def
/false 0 1 eq def
% Acquire the default device.
/defaultdevice currentdevice def
% Define the predefined procedures, in alphabetical order.
/[ /mark load def
/] {counttomark array astore exch pop} bind def
/= {=only (\n) print} bind def
/abs {dup 0 lt {neg} if} bind def
/concatstrings
{1 index length 1 index length add string
2 index 1 index copy pop
dup 3 index length 3 index length getinterval
2 index exch copy pop
exch pop exch pop} bind def
/defaultmatrix
{currentdevice exch deviceparams pop pop} bind def
/.echo /echo load def
/.echo.mode true def
/echo {dup /.echo.mode exch def .echo} bind def
/.findfile % find file for run,
% name -> file true or name false
{{(r) file} stopped
{pop systemdict /LIB known
{systemdict /LIB get exch concatstrings
{(r) file} stopped
{pop false}
{true}
ifelse
}
{false}
ifelse}
{true}
ifelse} bind def
/framedevice
{pop exch 8 mul exch
defaultdevice 4 1 roll makedevice setdevice} bind def
/handleerror
{errordict /handleerror get exec} bind def
/identmatrix
{{1.0 0.0 0.0 1.0 0.0 0.0} cvlit exch copy} bind def
/initgraphics
{initmatrix newpath initclip 1 setlinewidth 0 setlinecap 0 setlinejoin
{} 0 setdash 0 setgray 10 setmiterlimit} bind def
/initmatrix
{.tempmatrix defaultmatrix setmatrix} bind def
%.nulldevice does all of nulldevice except initclip and initmatrix.
/nulldevice
{.nulldevice initclip initmatrix} bind def
/matrix {6 array identmatrix} bind def
/prompt {(GS>) print flush} def
/pstack {0 1 count 3 sub {index ==} for} bind def
/run {.findfile
{cvx execute}
{(r) file} % let the error happen
ifelse} bind def
%.setdevice does all of setdevice except initclip and initmatrix.
/setdevice
{.setdevice initclip initmatrix} bind def
%.setgray is the same as setgray without the transfer function.
/setgray
{currenttransfer exec .setgray} bind def
/showpage
{copypage
% Beep the bell and wait for the user to hit a character
(\007) print flush
.echo.mode false echo
(%stdin) (r) file read {pop} if
echo
erasepage initgraphics} bind def
/stack {0 1 count 3 sub {index =} for} bind def
/start { (Ghostscript ) print version print (\n) print flush } def
%.typenumber is a non-standard operator.
/type {.typenumber
{arraytype booleantype dicttype filetype fonttype
integertype marktype nametype nulltype operatortype
packedarraytype realtype savetype stringtype
colortype devicetype}
exch get} def
/version
(1.3) def
% Define auxiliary procedures needed for the above.
/=only {dup type /stringtype ne
{( ) cvs} if print} 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} bind def
%%%%%%
DEBUG {vmstatus pop = pop flush} if
%%%%%%
% Create the error handling machinery.
% The interpreter knows the name ErrorNames.
{/unknown /dictfull /dictstackoverflow /dictstackunderflow
/execstackoverflow /interrupt /invalidaccess /invalidexit
/invalidfileaccess /invalidfont /invalidrestore /ioerror
/limitcheck /nocurrentpoint /rangecheck /stackoverflow
/stackunderflow /syntaxerror /timeout /typecheck
/undefined /undefinedfilename /undefinedresult /unmatchedmark
/VMerror
} cvlit readonly
dup length 2 add dict % ErrorNames, handleerror
/errordict exch def
errordict begin
/ErrorNames exch def
{ $error /.inerror get { = flush quit } if % detect error recursion
$error /.inerror true put
countdictstack array dictstack
$error begin
/newerror true def
/dstack exch def
/errorname exch def
/command exch def
countexecstack array execstack /estack exch def
count array astore /ostack exch def
ostack aload pop
end
$error /.inerror false put
stop
} bind
ErrorNames
{ [ 1 index 3 index /exec load ] cvx def
} forall
pop
/handleerror
{ (Error: ) print
$error begin
errorname ==only
( in ) print
/command load ==
( ostack:) print
ostack {( ) print =only} forall
(\n estack: ) print
estack {( ) print =only} forall
(\n dstack:) print
dstack {dup ( ) print length =only (/) print maxlength =only} forall
(\n) print
/newerror false def
flush
end
} bind def
end
/$error 7 dict def % newerror, .inerror, errorname, command,
% 3 stacks
$error begin
/newerror false def
/.inerror false def
end
% Define the == procedure.
/== {==only (\n) print} bind def
/.dict 13 dict dup
begin def
/.buf 128 string def
/.cvp {.buf cvs print} bind def
/.print
{dup type .dict exch known
{dup type exec} {(-) print type .cvp (-) print} ifelse}
bind def
/integertype /.cvp load def
/realtype /.cvp load def
/booleantype /.cvp load def
/nametype {dup xcheck not {(/) print} if .cvp} bind def
/arraytype
{dup xcheck {(})({)} {(])([)} ifelse print exch () exch
{exch print .print ( )} forall pop print} bind def
/operatortype
{systemdict
{2 index eq {exch pop exit} {pop} ifelse}
forall =only} bind def
/packedarraytype /arraytype load def
/stringtype
{(\() print
{/.ch exch def
.ch 32 lt .ch 127 ge or .ch 40 eq or .ch 41 eq or
{(\\) print .ch 8#1000 add 8 .buf cvrs 1 3 getinterval print}
{( ) dup 0 .ch put print}
ifelse}
forall (\)) print} bind def
{0 begin .print end} bind dup 0 .dict put
end
/==only exch def
%%%%%%
DEBUG {vmstatus pop = pop flush} if
%%%%%%
% Define the font directory.
/FontDirectory 20 dict def
% Define the standard encoding vector.
/StandardEncoding {
% \00x
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
% \04x
/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus /comma /hyphen /period /slash
/zero /one /two /three /four /five /six /seven
/eight /nine /colon /semicolon /less /equal /greater /question
% \10x
/at /A /B /C /D /E /F /G
/H /I /J /K /L /M /N /O
/P /Q /R /S /T /U /V /W
/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore
% \14x
/quoteleft /a /b /c /d /e /f /g
/h /i /j /k /l /m /n /o
/p /q /r /s /t /u /v /w
/x /y /z /braceleft /bar /braceright /asciitilde /.notdef
% \20x
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
% \24x
/.notdef /exclamdown /cent /sterling /fraction /yen /florin /section
/currency /quotesingle /quotedblleft /guillemotleft /guilsingleft /guilsingright /fi /fl
/.notdef /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet
/quotesinglbase /quotedblbase /quotedblright /guillemotright /ellipsis /perthousand /.notdef /questiondown
% \30x
/.notdef /grave /acute /circumflex /tilde /macron /breve /dotaccent
/dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron
/emdash /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
% \34x
/.notdef /AE /.notdef /ordfeminine /.notdef /.notdef /.notdef /.notdef
/Lslash /Oslash /OE /ordmasculine /.notdef /.notdef /.notdef /.notdef
/.notdef /ae /.notdef /.notdef /.notdef /dotlessi /.notdef /.notdef
/lslash /oslash /oe /germandbls /.notdef /.notdef /.notdef /.notdef
} cvlit readonly def
% Acquire the device parameters.
(gdevs.ps) run
% Define a dummy statusdict for the benefit of programs
% that think they are running on a LaserWriter or similar printer.
/statusdict 50 dict def
% Close up systemdict.
end
systemdict readonly pop
% Establish a default upper limit in the character cache,
% namely, 10 times the average expected character size.
cachestatus 5 index 10 mul 2 index 1 max idiv % bmax, cmax
mark exch dup 10 idiv exch setcacheparams
7 {pop} repeat
mark 0 0 setcacheparams
%%%%%%
DEBUG {vmstatus pop = pop flush} if
%%%%%%
% Load the standard font.
(gfonts.ps) run
% Establish a default environment.
% Map the screen height to an 11" page.
% This is not necessarily the best compromise.
DISPLAYING
{ .device.height 72 11 mul div
[1 index .aspect.ratio mul 0 0 4 index neg 0 .device.height]
.device.width 8 idiv .device.height { } framedevice pop
}
{ nulldevice
} ifelse
1 setflat
10 45 {dup mul exch dup mul add 1 exch sub} bind setscreen
{ } settransfer
initgraphics
DISPLAYING
{ erasepage
} if
%%%%%%
DEBUG {vmstatus pop = pop systemdict length = flush} if
%%%%%%
% The interpreter will run the initial procedure (start).