INQUIRE ARCHIVE FILES(3P) — SUNPHIGS LIBRARY
NAME
INQUIRE ARCHIVE FILES − inquire the currently open archive file identifiers and names
SYNOPSIS
C Syntax
void
pinqarfiles ( size, error_ind, buffer, ar_files, total_size )
Pintsize;size of application list
Pint∗error_ind;OUT error indicator
Pchar∗buffer;OUT pointer to buffer
Parchivefilelst∗ar_files;OUT list of archive file names and ids
Pint∗total_size;OUT size of list in PHIGS
FORTRAN Syntax
SUBROUTINE pqarf ( N, ERRIND, NUMBER, AFID, ARCFIL )
INTEGERNlist element requested
INTEGERERRINDOUT error indicator
INTEGERNUMBEROUT number of archive files open
INTEGERAFIDOUT Nth open archive file identifier
INTEGERARCFILOUT Nth open archive file name
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use INQUIRE ARCHIVE FILES to determine the names and identifiers of all currently open archive files.
C Input Parameters
sizeSize, in number of bytes, of the application supplied buffer in which the returned data will be stored.
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 size bytes) in which the open archive file information is to be returned. Note: The buffer is for use by the system. The system assigns the appropriate pointers within the ar_files parameter to the memory space pointed to by buffer. The application accesses the returned information through the ar_files parameter. If the buffer allocated is not large enough to hold all of ar_files, none of the information is returned, but total_size is returned with the number of bytes needed. If you call INQUIRE ARCHIVE FILES with a buffer size of 0, total_size is returned with the size of the buffer that you will need to allocate.
ar_files
A pointer to a structure Parchivefilelst, containing a list of the currently open archive file identifiers and names. Parchivefilelst is defined in phigs.h as follows:
typedef struct{
Pintnumber;/∗ number of identifiers and names ∗/
Pint∗ids;/∗ list of identifiers ∗/
Pchar∗∗names;/∗ list of names ∗/
} Parchivefilelst;
The number component specifies the number of currently open archive files. The ids component is a pointer to a list, number long, of the identifiers of all currently open archive files. The names component is a pointer to a list of number character pointers, giving the corresponding file names of all currently open archive files.
total_size
A pointer which returns the actual size of the buffer needed to return all the information requested.
FORTRAN Input Parameters
NElement of the list of open archive files to return; only one such element may be inquired per subroutine call. If a value of 0 is used here, no archive file data will be returned, but the total number of open archive files will be returned in NUMBER.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
NUMBER
The total number of open archive files.
AFIDThe Nth archile file identifier from the list of currently open archive files.
ARCFIL
The Nth archile file logical unit number from the list of currently open archive files.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
OPEN ARCHIVE FILE (3P)
CLOSE ARCHIVE FILE (3P)
INQUIRE ARCHIVE STATE VALUE (3P)
Sun Release 4.0 — Last change: 1 August 1989