home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best Objectech Shareware Selections
/
UNTITLED.iso
/
boss
/
word
/
misc
/
010
/
language.doc
< prev
next >
Wrap
Text File
|
1992-09-10
|
15KB
|
381 lines
Copyright (C) 1989-1992 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.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This file, language.doc, describes the Ghostscript language.
For an overview of Ghostscript and a list of the documentation files, see
README.
The Ghostscript interpreter, except as noted below, is intended to execute
properly any source program written in a language defined by reference to
the December 1990 printing of the PostScript Language Reference Manual
(Second Edition) published by Addison-Wesley (ISBN 0-201-18127-4). The
Ghostscript language includes the following elements of the PostScript
(TM) language:
- The full PostScript Level 1 language, as also defined in the
first edition of the PostScript Language Reference Manual, ISBN
0-201-10174-2, Addison-Wesley, 1985.
- The CMYK color, file system, version 25.0 language, and
miscellaneous additions listed in sections A.1.4, A.1.6, A.1.7, and A.1.8
of the Second Edition respectively.
- The Display PostScript extensions listed in section A.1.3 of the
Second Edition, but excluding the operators listed in section A.1.2, and
also excluding setbbox, xshow, xyshow, and yshow. These extensions are
only available if the dps feature was selected at the time that
Ghostscript was compiled and linked.
- A few other PostScript Level 2 operators, listed below.
Ghostscript also includes a number of operators defined below that are not
in the PostScript language.
Stub facilities
---------------
The following operators, while provided in the current release, have only
a partial or dummy implementation.
Character and font operators:
cshow, rootfont, setcachedevice2
Graphics state operators:
currentblackgeneration, currentcmykcolor, currentcolorscreen,
currentcolortransfer, currenthalftonephase, currentundercolorremoval,
setblackgeneration, setcmykcolor, setcolorscreen,
setcolortransfer, sethalftonephase, setundercolorremoval,
currenthalftone, sethalftone,
setbbox
Interpreter parameter operators:
setucacheparams, ucachestatus
Path construction operators:
ucache
Virtual memory operators:
currentshared, scheck, setshared, setvmthreshold, shareddict,
SharedFontDirectory, vmreclaim
Level 2 operators
-----------------
The following PostScript Level 2 operators are available in
Ghostscript. Unless otherwise noted, these are only available if the
level2 feature was selected at the time that Ghostscript was compiled
and linked.
File operators:
filter (not all filters are implemented, and most of the
implemented ones are only available if the filter feature was
selected when Ghostscript was built)
Graphics state operators:
currentcolor, currentcolorspace, setcolor, setcolorspace
(for DeviceGray, DeviceRGB, and DeviceCMYK only)
currentstrokeadjust, setstrokeadjust (even if level2 is
not selected)
In addition, Ghostscript supports the following Level 2 facilities:
- Use of a string with the status operator (even if level2 is
not selected);
- Use of a dictionary with the image and imagemask operators;
- Use of a string or a file as data source with the image,
imagemask, and colorimage operators (even if level2 is not selected).
Ghostscript-specific additions
==============================
Miscellaneous
-------------
^Z is counted as whitespace.
run can take either a string or a file as its argument. In the former
case, it uses findlibfile to open the file (searching directories as
needed). In the latter case, it just runs the file, closing it at the
end, and trapping errors just as for the string case.
Mathematical operators
----------------------
<number> arccos <number>
Computes the arc cosine of a number between -1 and 1.
<number> arcsin <number>
Computes the arc sine of a number between -1 and 1.
Dictionary operators
--------------------
<dict> <integer> setmaxlength -
Changes the capacity of a dictionary, preserving its
contents. Causes a dictfull error if the requested
capacity is less than the current number of occupied
entries.
String operators
----------------
<string|name|other> <patternString> stringmatch <boolean>
Determines whether the string or name matches the given
pattern. In the pattern, `*' matches any substring of
the string, `?' matches any single character, and `\'
quotes the next character. If the first argument is not
a string or name, stringmatch returns true if
patternString is a single *, and false otherwise.
<state> <fromString> <toString> type1encrypt <newState> <toSubstring>
Encrypts fromString according to the algorithm for Adobe
Type 1 fonts, writing the result into toString.
toString must be at least as long as fromString or a
rangecheck error occurs. state is the initial state of
the encryption algorithm (a 16-bit non-negative
integer); newState is the new state of the algorithm.
<state> <fromString> <toString> type1decrypt <newState> <toSubstring>
Decrypts fromString according to the algorithm for Adobe
Type 1 fonts, writing the result into toString. Other
specifications are as for type1encrypt.
Relational operators
--------------------
<number|string> <number|string> max <number|string>
Returns the larger of two numbers or strings.
<number|string> <number|string> min <number|string>
Returns the smaller of two numbers or strings.
File operators
--------------
<string> findlibfile <foundstring> <file> true or <string> false
Opens the file of the given name for reading. If the file
cannot be opened using the supplied name, searches
through directories as described in use.doc. If the
search fails, findlibfile simply pushes false on the
stack and returns, rather than causing an error.
<file> <integer> unread -
Pushes back the last-read character onto the front of the
file. If the file is only open for writing, or if the
integer argument is not the same as the last character
read from the file, causes an ioerror error. May also
cause an ioerror if the last operation on the file was not
a reading operation.
<file> <device> writeppmfile -
Writes the contents of the device, which must be an image
device, onto the file, in Portable PixMap (ppm) format.
Does not close the file.
Path operators
--------------
<x> <y> <width> <height> rectappend -
<numarray> rectappend -
<numstring> rectappend -
Appends a rectangle or rectangles to the current path, in
the same manner as rectfill, rectclip, etc. Only
defined if the dps option is selected.
Filters
-------
Ghostscript supports all standard filters except DCTEncode and
DCTDecode. Ghostscript does not support the use of a procedure as a
data source or sink, only a file or a string. In addition,
Ghostscript supports two non-standard filters:
<file|string> <seed_integer> /eexecDecode filter <file>
Creates a filter for decrypting data that has been
encrypted using eexec encryption as described in the
Adobe Type 1 Font Format documentation. The
seed_integer must be 55665 for proper operation.