Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

OPEN PHIGS(3P)  —  Kubota Pacfic Computer Inc. (29 February 1991)

NAME

OPEN PHIGS − open and initialize the PHIGS environment

SYNOPSIS

C Syntax

void
popen_phigs ( error_file, memory )
char∗error_file;name of error file
size_tmemory;NOT USED

Required PHIGS Operating States

(PHCL, WSCL, STCL, ARCL)

DESCRIPTION

Purpose

OPEN PHIGS initializes PHIGS and enables access to the PHIGS functions.  OPEN PHIGS must be called prior to calling any other PHIGS functions. 

C Input Parameters

error_file
A pointer to the error file to log PHIGS error messages to.  The error file can be either a pointer to a valid UNIX file name or a null pointer, for example (char∗)0.  A null pointer implies that standard error is to be used as the error file.  If a file name is specified, PHIGS will attempt to access the file for writing.  If this attempt fails, OPEN PHIGS will fail and the appropriate error will be reported to standard error. 

The error file argument passed to OPEN PHIGS will be passed to ERROR HANDLING.  ERROR HANDLING will also pass this argument to ERROR LOGGING.  If for some reason ERROR LOGGING cannot access the specified error file, the error message will be written to standard error.  ERROR LOGGING appends messages to the error file; it does not truncate the file when OPEN PHIGS is called.  If the specified file does not exist, it will only be created if ERROR LOGGING is called. 

ERROR LOGGING writes the abstract PHIGS function name, the error number, and an error description to the error file.  If for some reason the text for the function name and/or error description can’t be determined, ERROR LOGGING will just write the function number and the error number. 

memory
This parameter is not used by the PEX-SI API. 

Execution

OPEN PHIGS:

•    Connects to a default or specified server. The default server is the one returned by XDisplayName (NULL).  (OPEN XPHIGS must be used to specify a server.) 

•    Sets the PHIGS system state variable to ‘PHOP’. 

•    Initializes the default workstation description tables and makes them available for use by the other PHIGS functions.  These tables reflect the capabilities of the default or specified server. 

•    Creates the PHIGS state list and initializes it with default values taken from the PHIGS description table. 

•    Stores error file in the PHIGS error state list. 

The default values for the PHIGS state list, PHIGS description table, and workstation description tables are in the Appendix. 

When an error in PHIGS is detected, ERROR HANDLING is called and passes three items of informations: the error file, the function number of the PHIGS function that detected the error, and the error number.  ERROR HANDLING calls ERROR LOGGING, which writes an error message to the error file.  PHIGS users can replace ERROR HANDLING with a function of their own.  This function may in turn call ERROR LOGGING.  See ERROR HANDLING and ERROR LOGGING for more information. 

PHIGS only writes to the error file if ERROR LOGGING is called, either by ERROR HANDLING or the application.  If the error file does not exist when OPEN PHIGS is called, it will only be created if and when ERROR LOGGING is called. 

ERRORS

001Ignoring function, function requires state (PHCL, WSCL, STCL, ARCL)

450Ignoring function, the specified error file is invalid

SEE ALSO

INQUIRE SYSTEM STATE VALUE (3P)
CLOSE PHIGS (3P)
OPEN ARCHIVE FILE (3P)
OPEN STRUCTURE (3P)
OPEN WORKSTATION (3P)
OPEN XPHIGS (3P)

September 02, 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026