ESCAPE -7(3P) — SUNPHIGS LIBRARY
NAME
ESCAPE -7 − inquire character set facilities
SYNOPSIS
C Syntax
void
pescape ( func_id, in, out )
Pintfunc_id;escape function identifier
Pescapein∗in;input data for the function
Pescapeout∗out;OUT output data of the function
FORTRAN Syntax
SUBROUTINE pesc ( FCTID, LIDR, IDR, MLODR, LODR, ODR )
INTEGERFCTIDfunction identification
INTEGERLIDRdimension of input data record array
CHARACTER∗80IDR(LIDR) input data record
INTEGERMLODRmaximum length of output data record
INTEGERLODROUT number of array elements used in ODR
CHARACTER∗80ODR(MLODR) OUT output data record
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
ESCAPE -7, or Inquire Character Set Facilities, returns a list of character sets and their cswidths supported by a workstation. Cswidth is number of bytes needed to specify a character in a character set.
C Input Parameters
func_id
The function identifier for this escape is PUESC_INQ_CHARSET_FACILITIES, which is defined in phigs.h to be -7.
in
A pointer to a Pescapein union containing the input data record, uesc7_idatarec. It is defined as:
typedef struct {
Pwstypetype;/∗ workstation type ∗/
Pintlength;/∗ length of application list ∗/
Pintstart;/∗ starting position ∗/
} Puesc0007_idatarec;
typeWorkstation type.
lengthThe length of the list of csws items (character sets and widths) to return in the application allocated array, facilities.csws in the output data record. A length of zero may be specified, in order to have the total_length field (in the output record) return the total number of elements in the workstation list of available character sets.
startThe first element of the list of character sets in the workstation description table to return.
C Output Parameters
outA pointer to a Pescapeout union containing the output data record uesc7_odatarec. It is defined as:
typedef struct {
Pinterror_ind;/∗ error indicator ∗/
Pinttotal_length;/∗ length of list in PHIGS ∗/
Pcsfacfacilities;/∗ list of available character sets ∗/
} Puesc0007_odatarec;
The fields in this record correspond in their usage to the usual output parameters of a facilities inquiry (see INQUIRE TEXT FACILITIES).
error_ind
An integer in which the system returns the error number of any error detected by this function.
total_length
An integer in which the system returns the total number of items in the list of available character sets in the workstation description table. This is the value required for length if all the items in the workstation list are to be returned.
facilities
A Pcsfac data structure in which the system returns a listing of the character set facilities available on this type of workstation. Pcsfac is defined in phigs.h as:
typedef struct {
Pintn_cs;/∗ number of character sets ∗/
Pcsw∗csws;/∗ list of character sets ∗/
} Pcsfac;
Pcsw is defined in phigs.h as:
typedef struct {
Pintcharset;/∗ index of character set ∗/
Pintwidth;/∗ width of character set ∗/
} Pcsw;
The application must allocate memory for the facilities.csws list.
FORTRAN Input Parameters
FCTID
The function identifier of this escape is PUESCINQCSFAC, which is defined in phigs77.h to be -7.
LIDR
The dimension of IDR (returned by PACK DATA RECORD).
IDR(LIDR)
An ESCAPE data record packed by PACK DATA RECORD when called with the following parameters:
ILThe number of integers = 2.
IAContains two integer values:
Element 1 is the workstation type identifier.
Element 2 is the index of the character set list element desired.
RLThe number of real values = 0.
SLThe number of strings = 0.
MLODR
The maximum length of the output data record, ODR.
FORTRAN Output Parameters
LODRThe length used in the output data record array, ODR.
ODR(MLODR)
The output data record is stored in this array. When the output record is passed to UNPACK DATA RECORD, the following fields should be returned:
ILThe number of integers = 4.
IAContains four integer values.
Element 1 is the error indicator.
Element 2 is the length of the list of character sets.
Element 3 is the Nth element of the character set index list, as specified by element 2 in the input data record.
Element 4 is the Nth element of the character set width list, as specified by element 2 in the input data record.
RLThe number of real values = 0.
SLThe number of strings = 0.
Execution
The Inquire Character Set Facilities escape returns a list of character sets and their cswidths supported by a workstation. Cswidth is number of bytes needed to specify a character in a character set. For more information on character sets, see INTRO_INTERNATIONALIZATION (7P).
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
052Ignoring function, workstation type not recognized by the implementation
062Ignoring function, this information is not available for this MO workstation type
351Ignoring function, one of the fields within the escape data record is in error
SEE ALSO
INTRO INTERNATIONALIZATION (7P)
Sun Release 4.0 — Last change: 31 July 1989