c_gofrd - Reads a record from a graphics overlay file

SYNTAX

#include "worgen.h"
#include "gof.h"
FUNCTION c_gofrd (fd, obyte, nbyte, type, gofptr)

     int		*fd;
     int		*obyte;
     int		*nbyte;
     int		*type;
     union GOF		*gofptr;

PARAMETERS

fd (input, integer)

File descriptor of the GOF.

obyte (output, integer)

The total number of bytes read.

nbyte (output, integer)

The number of bytes to the next record (i.e. the number of bytes to skip to set the file pointer to the beginning of the next record).

type (input, integer)

The type of GOF record to be read. Valid values are:

     = HDR:     for GOF header record 
     = HPOLIN:  for a line or polygon header record
                (i.e. line or polygon record without the X/Y point pairs) 
     = PNT:     for a point record
     = ANNOT:   for graphics annotation
     = XYPAIRS: for X/Y point pairs of a line or polygon

gofptr (output, union)

A record that contains the GOF information. This union consists of four structures (HEADER, POINT, POLIN, and ANNOT). This union, as well as the structures, are defined in the gof.h include file.

DESCRIPTION

c_gofrd() is used to read a record from a graphics overlay file. To read a full polygon or line record two calls to c_gofrd() are required, the first read using type HPOLIN the second using XYPAIRS.

RETURN VALUE

c_gofrd() returns

     E_SUCC (0)  --> successful completion
     E_FAIL (-1) --> operation failed
     E_EOF  (-2) --> end of file detected  (no message)

SPECIAL CONSIDERATIONS

c_gofrd() is C callable only.