cdds_isreg - is DDS binary data a regular file

SYNOPSIS

#include "cdds.h"

int cdds_isreg(bin);

BIN_TAG bin

DESCRIPTION

This function returns a positive value if the binary data is associated with a regular file, otherwise a zero value is returned, indicating that it may be data associated with a pipe, FIFO, socket, character-special file or block-special file. Only if a file is regular can it be seek'd upon.

INPUT

bin is a binary tag, previously obtained from cdds_open. It specifies a particular binary stream.

OUTPUT

A negative value is returned if bin is invalid. Otherwise, the value will indicated whether the file is regular or not by a '0' for 'false' and a positive value for 'true'.

EXAMPLES

          
            BIN_TAG bin;
            ...
            if (cdds_isreg(in_bin) > 0) cdds_lseek(bin, 0, -1, SEEK_CUR);
            ...
          

AUTHOR

J. W. Ehlers, EPTG (Aug 1996)