gd_flags(3)

NAME
gd_flags — alter GetData operational flags

SYNOPSIS
#include <getdata.h>

unsigned long gd_flags(DIRFILE *dirfile, unsigned long set, unsigned long reset);

DESCRIPTION
The function modifies the operational flags of the dirfile(5) database specified by and returns the new value of the flags register.

The flags which may be queried or modified with this interface are a subset of the open flags (see These are: When dirfile metadata are flushed to disk (either explicitly via gd_metaflush(3), gd_rewrite_fragment(3), or or implicitly by closing the dirfile), an attempt will be made to create a nicer looking format specification (from a human-readable standpoint). What this explicitly means is not part of the API, and any particular behaviour should not be relied on. If the dirfile has been opened read-only, this flag is ignored. Specifies that whenever an error is triggered by the library when working on this dirfile, the corresponding error string, which can be retrieved by calling should be written on the caller's standard error stream (stderr(3)) by GetData. The error string may be prefixed by a string specified by the caller; see Without this flag, GetData writes nothing to standard error. (GetData never writes to standard output.)

Flags which appear only in will be turned on (enabled); flags which appear only in will be turned off (disabled); flags which appear in both and will be toggled. Flags which appear in neither of these are left unchanged. Accordingly, to simply query the current flags, both and should be zero, and to explicitly specify all the flags, ignoring their old values, the new flags register should be given in and it's bitwise complement in

RETURN VALUE
The function returns a bitwise or'd collection those of the above flags which are enabled after performing the modifications specified (if any). This function does not fail.

HISTORY
The function appeared in GetData-0.8.0.

SEE ALSO
dirfile(5)