Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pqewk(3P) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE LIST OF AVAILABLE WORKSTATION TYPES(3P)  —  SUNPHIGS LIBRARY

NAME

INQUIRE LIST OF AVAILABLE WORKSTATION TYPES− inquire the current list of workstation types defined in the PHIGS description table. 

SYNOPSIS

C Syntax

void
pinqwstypes ( size, error_ind, buffer, types, total_size )
Pintsize;size of application buffer
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Pwstypelst∗types;OUT list of ws types
Pint∗total_size;OUT actual size of buffer

FORTRAN Syntax

SUBROUTINE pqewk ( N, ERRIND, NUMBER, WKTYP )
INTEGERNlist element requested
INTEGERERRINDOUT error indicator
INTEGERNUMBEROUT number of workstation types
INTEGERWKTYPOUT Nth element of list of available
workstation types

Required PHIGS Operating States

(PHOP, ∗, ∗, ∗)

DESCRIPTION

Purpose

Use INQUIRE LIST OF AVAILABLE WORKSTATION TYPES to obtain a list of the currently available workstation types stored in the PHIGS description table.  This list contains the predefined workstation types, described in OPEN WORKSTATION, and user-created workstation types created with WORKSTATION TYPE CREATE.  User-created types are removed from this list by WORKSTATION TYPE DESTROY. 

C Input Parameters

Applications using the C binding must allocate a buffer to be used by this function as memory space for storing portions of the data.  This buffer is passed as the buffer argument.  The size of the buffer, in bytes, must be passed in the size argument.  The required size is returned in the argument total_size.  The caller can determine the required size by calling this function with size set to zero, in which case PHIGS will return the size needed in total_size.  After allocating a buffer of the required size a subsequent call can be made to retrieve all the data. 

Error PEBUFSPAC (2200) is returned if size is too small, but not if it’s zero. 

sizeThe size, in bytes, of buffer. 

error_ind
A pointer to the location to the error number of any error detected by this function.  See the Errors section below for the possible values it may return. 

bufferA pointer to the buffer, allocated by the application, to be used by PHIGS to store portions of the returned data. 

typesA pointer to a Pwstypelst structure in which to return the number and list of available workstation types.  The memory space used by the list will be a portion of buffer.  Pwstypelst is defined in phigs.h as follows:

typedef struct {
Pintnumber;/∗ number of WS types in list ∗/
Pwstype∗ws_types; /∗ list of types ∗/
} Pwstypelst;

total_size
A pointer to an integer in which PHIGS returns the size of the buffer needed, in bytes, to return all the information.

FORTRAN Input Parameters

The FORTRAN function does not return the complete list of workstation types.  Instead, it returns only one element of this list.  The element to return is indicated by the calling program via the argument N. 

NThe index of the workstation type list entry to return. 

ERRIND
The error indicator.  See the Execution section below for a description of its use.  See the Errors section below for the possible values it may return. 

NUMBER
The number of available workstation types.

WKTYP
The workstation type corresponding to the Nth position in the list of workstation types. 

Execution

INQUIRE LIST OF AVAILABLE WORKSTATION TYPES returns the list of available workstation types stored in the PHIGS description table.  See OPEN WORKSTATION and WORKSTATION TYPE CREATE for a description of the available workstation types and how to create new ones. 

Except in the cases mentioned in the C Parameters section above, if an error is detected by this function the error indicator will indicate the error number of the error detected and no other output data will be returned.  If no error is detected, the error indicator will be set to zero and the inquired information will be available in the output parameters.  Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function. 

ERRORS

002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)

2200C: Buffer overflow in input or inquiry function

SEE ALSO

OPEN WORKSTATION (3P)
PHIGS WORKSTATION DESCRIPTION TABLE (7P)
WORKSTATION TYPE CREATE (3P)
WORKSTATION TYPE DESTROY (3P)
WORKSTATION TYPE SET (3P)

Sun Release 4.0  —  Last change: 24 July 1989

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