pswrap - creates C procedures from segments of PostScript language code
reads input from
and creates C-callable procedures, known as wraps, that send PostScript
language code to the PostScript interpreter.
contains segments of PostScript language code wrapped with a C-like
Wraps are the most efficient way for an application to communicate with the
PostScript interpreter. For complete documentation of
and the language it accepts, see "pswrap Reference Manual"
in Programming the Display PostScript System with X.
- A file that contains one or more wrap definitions.
transforms the definitions in
into C procedures. If no input file is specified, the standard
input (which can be redirected from a file or pipe) is used. The input file
can include text other than wrap definitions.
converts wrap definitions to C procedures and passes the other text
through unchanged. Therefore, it is possible to intersperse C-language
source code with wrap definitions in the input file.
Although C code is allowed in a pswrap input file, it is not allowed
within a wrap body. In particular, no CPP macros (for example, #define) are
allowed inside a wrap.
- Generates ANSI C procedure prototypes for procedure definitions in
option allows compilers that recognize the
ANSI C standard to do more complete type checking of parameters. The
option also causes
to generate const declarations.
ANSI C procedure prototype syntax is not recognized by most non-ANSI C
compilers, including many compilers based on the Portable C Compiler. Use the
option only in conjunction with a compiler that conforms to the ANSI C Standard.
- -h outputHFile
- Generates a header file that contains extern declarations for non-static
wraps. This file can be used in #include statements in modules that use
wraps. If the
option is specified, the declarations in the header file
are ANSI C procedure prototypes. If the
option is omitted, a header file is not produced.
- -o outputCFile
- Specifies the file to which the generated wraps and passed-through text are
written. If omitted, the standard output is used. If the
option is also specified, the procedure definitions generated by
are in ANSI C procedure prototype syntax.
- Specifies that strings passed by wraps are padded so that each data object
begins on a long-word (4-byte) boundary. This option allows wraps to run on
architectures that restrict data alignment to 4-byte boundaries and
improves performance on some other architectures.
- Generates reentrant code for wraps shared by more than one process (as in
shared libraries). Reentrant code can be called recursively or by more than
one thread. The
to generate extra code, so use it only when necessary.
- -s maxstring
- Sets the maximum allowable length of a PostScript string object or
hexadecimal string object in the wrap body input. A syntax error is reported if a
string is not terminated with ) or > within
cannot be set lower than 80; the default is 200.
Programming the Display PostScript System with X
(Addison-Wesley Publishing Company, Inc., 1993).
Adobe Systems Incorporated