Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pinqgenintrep(3P+) — PHIGS 1.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

INQUIRE GENERAL INTERIOR REPRESENTATION(3P+)  —  MISC. REFERENCE MANUAL PAGES

NAME

INQUIRE GENERAL INTERIOR REPRESENTATION − inquire the contents of a general interior representation on a workstation

SYNOPSIS

C Syntax

void
pinqgenintrep ( wsid, index, type, size, error_ind, buffer, gitype, rec, total_size )
Pintwsid;workstation identifier
Pintindex;general interior index
Pinqtypetype;type of returned value (PSET, PREALIZED)
Pintsize;size of application buffer
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Pint∗gitype;OUT general interior type
Pgisrec∗rec;OUT general interior data record
Pint∗total_size;OUT actual size of buffer needed

FORTRAN Syntax

SUBROUTINE pqgir ( WKID, INDEX, TYPE, MLDR, ERRIND, GTYPE, LDR, DATREC )
INTEGERWKIDworkstation identifier
INTEGERINDEXgeneral interior style index
INTEGERTYPEtype of returned values (PSET, PREALI)
INTEGERMLDRdimension of data record array
INTEGERERRINDOUT error indicator
INTEGERGTYPEOUT general interior type
INTEGERLDROUT number of array elements used in data record
CHARACTER∗80DATREC(LDR) OUT data record

Required PHIGS Operating States

(PHOP, WSOP, ∗, ∗)

DESCRIPTION

Purpose

INQUIRE GENERAL INTERIOR REPRESENTATION returns the contents of an entry in the general interior table of a workstation. 

This is a SunPHIGS Extension function based on PHIGS+ and is not part of the PHIGS standard. 

C Input Parameters

Applications using the C binding must allocate a buffer to be used by this function as memory space for storing data associated with the general interior representation.  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.  The size in general will not be zero but may be, depending on the general interior type. 

Even if the buffer size specified is too small, including the case of its being zero, some values will be returned.  These are the total_size and gitype, the general interior type.  Error PEBUFSPAC (2200) is returned if size is too small, but not if it is zero. 

All of the following data types are predefined in phigs.h. 

wsidThe workstation identifier. 

indexThe index of the entry to be returned.  If this entry is not present in the table and the type of returned value parameter is PREALIZED, the representation for general interior index one is returned. 

typeAn enumerated value specifying whether the values to be returned are those originally specified by the application (PSET), or those resulting after PHIGS mapped them to ones available on the workstation (PREALIZED).  A Pinqtype structure is defined as:

typedef enum {
PSET,
PREALIZED
} Pinqtype;

size
Size, in number of bytes, of the application-supplied buffer.

C Output Parameters

error_ind
A pointer to the location to store the error number of any error detected by this function.

bufferA pointer to the buffer (of size bytes). 

gitypeA pointer to the location to store the general interior type.  Defined values for general interior type are:

1PGI_ISOPARAMETRIC_CURVES

See SET GENERAL INTERIOR REPRESENTATION for a description of their meaning and the corresponding description of the data record contents. 

recA pointer to a Pgisrec structure, in which to return the general interior data record.  See SET GENERAL INTERIOR REPRESENTATION for a description of the data record contents corresponding to the returned type.  Pgisrec is defined as:

typedef union {
Pgis0001recgis1_datarec;/∗ isoparametric curves ∗/
} Pgisrec;

Pgis0001rec is defined as:

typedef struct {
Pinterstyleintstyle;/∗ interior type, hollow, solid, or empty only ∗/
Pcurveplacementcurve_placement;/∗ curve placement ∗/
Pintucount;/∗ curve count in the u dimension ∗/
Pintvcount;/∗ curve count in the v dimension ∗/
} Pgis0001rec;

Pinterstyle is defined as:

typedef enum {
PHOLLOW,
PSOLID,
PPATTERN,(invalid value for this general type)
PHATCH,(invalid value for this general type)
PEMPTY,
PGENERAL(invalid value for this general type)
} Pinterstyle;

Pcurveplacement is defined as:

typedef enum {
PCP_UNIFORM,
PCP_NON_UNIFORM
} Pcurveplacement;

total_size
A pointer to the location to return the actual size of the buffer needed to return all the information.

FORTRAN Input Parameters

Applications using the FORTRAN binding must supply a CHARACTER array to this function, into which will be placed the contents of the general interior representation data record.  The contents of the data record are subsequently extracted by the application with the function UNPACK DATA RECORD.  The allocated dimension of the character array is passed in the MLDR argument.  The dimension needed is returned in the LDR argument.  The caller can determine the required dimension by calling this function with MLDR set to zero, in which case PHIGS will return the dimension needed in LDR. 

Even if the dimension specified in MLDR is too small, including the case of its being zero, some values will be returned.  These are LDR and GTYPE, the general interior type. 

Error 2001 is returned if MLDR is too small, but not if it is zero. 

All of the following data types are predefined in phigs77.h. 

WKID
The workstation identifier.

INDEX
The index of the entry to be returned. If this entry is not present in the table and the type of returned value parameter is PREALI, the representation for general interior index one is returned. 

TYPE
An enumerated value specifying whether the values to be returned are those originally specified by the application (Set), or those resulting after PHIGS mapped them to ones available on the  workstation (Realized).  Valid values are:

0PSETSet
1PREALIRealized

MLDR
The dimension of the data record array, DATREC . 

FORTRAN Output Parameters

ERRIND
The error number of any error detected by this function.

GTYPE
The general interior type.  Predefined values are:

1PGIIPCIsoparametric Curves

LDRThe required dimension of the data record array, DATREC . 

DATREC(LDR)
The data record, which must be unpacked by UNPACK DATA RECORD.  The contents depend on the interior type specified.  See SET GENERAL INTERIOR REPRESENTATION for a description of its contents. 

Execution

If the inquired information is available, the error indicator is returned as zero and the requested information is returned in the output parameters. 

See SET GENERAL INTERIOR REPRESENTATION for the defined data record formats that may be returned in the data record parameter. 

If the specified general interior index is not present in the general interior table on the workstation and the specified type of returned value is Realized, the representation for general interior index one is returned. 

Except in the cases mentioned in the C and FORTRAN Parameters sections 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. 

Since this is an inquiry function, ERROR HANDLING is not invoked when an error is detected by this function. 

ERRORS

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

054Ignoring function, the specified workstation is not open

059Ignoring function, the specified workstation does not have output capability

101Ignoring function, the specified representation has not been defined

612Ignoring function, the general interior index is less than one

2200C-specific Binding Errors Buffer, overflow in input or inquiry function

2001FORTRAN-specific Binding Errors, ignoring function, output parameter size insufficient; a FORTRAN array or string being passed as an output parameter is too small to contain the returned value

SEE ALSO

SET GENERAL INTERIOR REPRESENTATION (3P+)
INQUIRE PREDEFINED GENERAL INTERIOR REPRESENTATION (3P+)
INQUIRE GENERAL INTERIOR FACILITIES (3P+)

Sun Release 4.0  —  Last change: 2 August 1989

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