Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

REQUEST STRING(3P)  —  SUNPHIGS LIBRARY

NAME

REQUEST STRING − request an operator interaction with a string device

SYNOPSIS

C Syntax

void
preqstring ( ws, dev, string )
Pintws;workstation identifier
Pintdev;string device number
Pqstring∗string;OUT requested string data

FORTRAN Syntax

SUBROUTINE prqst ( WKID, STDNR, STAT, LOSTR, STR )
INTEGERWKIDworkstation identifier
INTEGERSTDNRstring device number
INTEGERSTATOUT status (PNONE, POK)
INTEGERLOSTROUT number of characters returned
CHARACTER∗(∗)STR OUT character string

FORTRAN Subset Syntax

SUBROUTINE prqst ( WKID, STDNR, STAT, LOSTR, STR )
INTEGERWKIDworkstation identifier
INTEGERSTDNRstring device number
INTEGERSTATOUT status (PNONE, POK)
INTEGERLOSTROUT number of characters returned
CHARACTER∗80STR OUT character string

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

Use REQUEST STRING to request an operator interaction with a specified string device. The device must be in request mode. See SET STRING MODE and INITIALIZE STRING for more information.  See the Available Devices section of INITIALIZE STRING for a description of the available string devices. 

The request suspends PHIGS until the specified device is triggered, or the operator performs a BREAK.  A BREAK is performed by typing the CONTROL and D keys simultaneously (^D). 

C Input Parameters

wsWorkstation identifier. An integer specifying the workstation with which the requested string device is associated. 

devThe device number of the requested string device.  See the Available Devices section of INITIALIZE STRING for a description of the available string devices. 

stringA pointer to a Pqstring structure in which to store the request status and the device’s string measure.  Pqstring is defined in phigs.h as follows:

typedef struct {
Pistatusstatus;/∗ status of request ∗/
Pchar∗string; /∗ string ∗/
} Pqstring;
Pistatus is defined in phigs.h as follows:

typedef enum {
PSTAT_OK,
PSTAT_NONE
} Pistatus;

string is a pointer to an array in which to store the string.  The array must be allocated by the caller and should be at least as large as the buffer size of the device. 

FORTRAN Input Parameters

WKIDThe workstation identifier of the workstation associated with the device. 

STDNR
The device number of the STRING device.  See the Available Devices section of INITIALIZE STRING 3 for a description of the available devices. 

STATThe request status.  Valid values as defined in phigs77.h are:

• PNONE(BREAK)
•  POK(OK)

LOSTR
The length of the string.

STRThe character array into which to copy the string.  The array must be allocated by the caller and should be at least as large as the buffer size of the device. 

Execution

REQUEST STRING requests a logical input value from the specified string device. The specified device must be in request mode. See SET STRING MODE for more information. 

REQUEST STRING creates a measure process for the specified device and suspends PHIGS until the device is triggered or the operator issues a BREAK.  A BREAK is generated by the operator by depressing the Control and D keys simultaneously (^D). 

If a BREAK occurs, a status of NONE is returned and the string data is undefined.  If a status of OK is returned the string data is available.  In either case the measure process is then terminated, and PHIGS processing resumes

See INITIALIZE STRING for a description of the available string devices. 

ERRORS

003Ignoring function, function requires state (PHOP, WSOP, ∗, ∗)

054Ignoring function, the specified workstation is not open

061Ignoring function, specified workstation is neither of category INPUT nor of category OUTIN

250Ignoring function, the specified device is not available on the specified workstation

251Ignoring function, the function requires the input device to be in REQUEST mode

SEE ALSO

INITIALIZE STRING (3P)
SET STRING MODE (3P)

Sun Release 4.0  —  Last change: 12 July 1989

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