Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pread_item(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

pread_item(3g)  —  Subroutines

Name

pread_item − Reads the data record of the current metafile item and writes the record to its last argument. 

 
Operating States: PHOP, WSOP, ∗, ∗
PHIGS standard function

Syntax

void pread_item (
  Pint         wsid,                  /∗ (I) Workstation identifier ∗/
  Pint         max_item_data_length,  /∗ (I) Maximum length of the item
                                             data record ∗/
  Pitem_data  ∗item_data              /∗ (O) Item data record ∗/
)

Data Structures

typedef union {
    int      impl_dep;    /∗ metafile records ∗/
    Pdata    unsupp;      /∗ unsupported metafile item data ∗/
} Pitem_data;
    typedef struct {
        size_t   size;    /∗ size of the data ∗/
        void    ∗data;    /∗ pointer to the data ∗/
    } Pdata;

Description

pread_item reads the data record of the current metafile item and then writes the record to its last argument. 

You should compare the maximum length for the data record (as passed to this function) with the actual length of the data record (as pget_item_type writes to one of its arguments). If the actual size of the record is larger than the maximum allocated space, Digital PHIGS truncates the record, causing loss of information.  To skip an item, specify the value 0 as the maximum record length. 

After returning the data record to the application program, this function makes the next item in the metafile the current item. 

Digital PHIGS Version 4.1 does not support this function.

See Also

pget_item_type
pinterpret_item
pwrite_item

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