c_ewrite - Random writes to an image file

SYNTAX

#include "las.h"

int c_ewrite (fdesc, eband, eline, euserbuf, nl_blk)

     struct FDESC       **fdesc;
     long               *eband;
     long               *eline;
     unsigned char      *euserbuf;
     long               *nlines;

PARAMETERS

fdesc (input, pointer to struct FDESC pointer)

Pointer to the file descriptor pointer obtained from c_eopenr().

eband (input, integer)

Band number of the file to be written to.

eline (input, integer)

Line number to be written relative to the starting line the file was opened to. (i.e. 1,2,3...)

euserbuf (input, byte array)

User's buffer from which the data is written.

nlines (input, integer)

Number of lines to be written at one time.

DESCRIPTION

The c_ewrite() call is used to write specified line(s) of a specified band to an image file. The amount of data written for a particular line is determined from the ns parameter on the c_eopenr() call and nlines parameter. c_ewrite() will return the total number of samples written.

RETURN VALUE

c_ewrite() returns

     Total number of samples written for success
     E_FAIL (-1) -->  failure