c_lsclos - Closes a label services file

SYNTAX

#include "las.h"
#include "vll.h"
FUNCTION c_lsclos (fd, hostname, action)

     long               *fd;
     char               *hostname;
     long               *action;

PARAMETERS

fd (input, integer)

File descriptor of an opened label services file. The file descriptor is set by c_lsopen() and should not be altered.

hostname (input, character, length (CMLEN))

Host filename of the label services file.

action (input, integer)

Action flag. Valid values are:

     = 0:     Normal close
     = 1:     Physically remove records marked for deletion
     = 2:     Delete file

DESCRIPTION

The c_lsclos() call is used to close the label services file. If the action flag is set to 1, the records that are not marked for deletion are copied into a temporary file. After all valid records have been copied, the temporary file is renamed to be the original label services filename.

RETURN VALUE

c_lsclos() returns

     E_SUCC (0)  --> successful completion 
     E_FAIL (-1) --> operation failed