#include "worgen.h" #include "dltf.h" #include "vll.h"FUNCTION c_r1dltf (fd, host, key, descr, asdltf, dtlen, dtype)
long *fd; char *host; char *key; char *descr; struct ASDLTF *asdltf; long *dtlen; char *dtype;
File descriptor of an opened DLTF file. The file descriptor is set in this routine and should not be altered.
Host filename of the DLTF.
DLTF entry name. The return string contains the DLTF entry name in upper-case so that it can be propagated to other support routines. Note that the length of the key is limited to twelve characters even though the file format allows sixteen. This is because LUT numbers are appended to the key value to form the names of the second type of DLTF records. Thus, the twelve characters with the maximum appended three characters plus one for the null become the sixteen character maximum allowed in the key field of label services.
String containing a user-specified description of the DLTF entry.
An ASDLTF structure or a FORTRAN integer array dimensioned to DLTFSZ that contains the DLTF field information. The structure contains the number of bands in the DLTF entry, the actual band numbers, the window (SL,SS,NL,NS) of the image used, the X and Y zoom factors of image planes, the X and Y zoom factors of the graphics planes, the X and Y shift values of the image planes, and the X and Y shift values of the graphics planes.
Total number of bytes required for the data portion of the second DLTF record type. This parameter is used to allocate the space necessary to read the second type of DLTF records.
The data type of the DLTF entry. This value can be either B or I2 for BYTE and I*2.
The c_r1dltf() performs three main objectives. First, it is used to open the DLTF for input. The file descriptor for the DLTF is assigned and is used for all subsequent reads. The routine also checks for the existence of the DLTF entry, and validates its data type.
Second, the routine reads the first type of DLTF record and returns the fields as output parameters.
Finally, the routine reads the first band member of the DLTF entry and then returns the length of the data portion of the second DLTF record type. This is necessary because memory must be allocated for the data portion of the second DLTF record before the call to c_r2dltf() is made.
c_r1dltf() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed