#include "las.h" #include "vll.h"FUNCTION c_lsrepl (fd, key, clen, dlen, cbuf, dbuf, dtype)
long *fd; char *key; long *clen; long *dlen; char *cbuf; unsigned char *dbuf; char *dtype;
File descriptor of an opened label services file. The file descriptor is set by c_lsopen() and should not be altered.
Key of the record to be replaced. Spaces may be embedded in the key; however, right justified spaces are ignored. If the key is NULL or a blank, the key of the record is unchanged. If a value is specified for the key, the existing key is overwritten.
The number of bytes in the character portion of the record to be written to the label services file.
The number of bytes in the data portion of the record to be written to the label services file.
Character buffer to be written to the character portion of the label services record.
Data buffer to be written to the data portion of the label services record.
Data type of the data portion of the record. Valid data types are:
= B : unsigned byte data = I2: signed two byte data = I4: signed four byte data = R4: four byte floating point data = R8: eight byte floating point data
The c_lsrepl() call is used to replace the record just read in the label services file. The c_lsrepl() function requires the file to be opened with read/write access.
A key value of "DELETED" is invalid.
The new record must contain the exact same number of bytes as the existing record. The character length and data length may be modified as long as the total is the same.
c_lsrepl() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed