ULTRIX Worksystem Software Display PostScript® pswrap Reference Manual

Order Number: AA-PAJTA-TE

This document is the pswrap Reference Manual, a programmer's guide for the pswrap translator, specifically designed for use within the ULTRIX Worksystem Software and Display PostScript® system. Published by Adobe Systems Incorporated in 1989, it instructs developers on how to create C-callable "wrapped procedures" (or "wraps") that embed POSTSCRIPT language code.

The core function of pswrap is to facilitate efficient communication between C applications and the POSTSCRIPT interpreter. It translates definitions written in a special pswrap syntax into C source code, which can then be compiled and linked with an application. When a wrapped procedure is called from C, it sends encoded POSTSCRIPT language code to the interpreter and retrieves returned values.

Key topics covered in the manual include:

  • Overview of pswrap: Explains its purpose in allowing C applications to send POSTSCRIPT commands and receive data, emphasizing its efficiency for this task.
  • Using the pswrap Translator: Details command-line options for generating ANSI C prototypes, header files, reentrant code, and controlling string lengths in the output.
  • Writing Wrap Definitions: Describes the structure of a wrap, which consists of a defineps keyword, a C-callable procedure declaration (including optional input and output arguments), the POSTSCRIPT language code body, and an endps keyword. It also covers comments and the handling of PostScript language syntax within the wrap body.
  • Declaring Input Arguments: Explains how various C data types (booleans, numbers, user objects, character strings, and arrays) are declared and converted into POSTSCRIPT objects when passed into a wrap. It also covers specifying array sizes and the optional DPSContext argument.
  • Declaring Output Arguments: Details how to declare and receive values returned from the POSTSCRIPT interpreter, including numbers, booleans, character strings, and arrays. pswrap handles popping values from the PostScript operand stack, converting them to C types, and storing them in the specified memory locations.
  • Communication and Synchronization: Discusses the interaction between the client application and the POSTSCRIPT interpreter, noting how the presence of output arguments affects the flushing of communication channels and error reporting.
  • Appendices: Provides a comprehensive list of error messages from the pswrap translator and a formal syntax definition for wrap declarations, including semantic restrictions and clarifications.

In essence, this manual is a technical guide for C programmers developing applications that leverage the Display PostScript system by integrating PostScript language operations through pswrap-generated routines.

AA-PAJTA-TE
May 1989
33 pages
Quality

Original
1.1MB

Site structure and layout ©2025 Majenko Technologies