1
2
3
4
5
6
7
8
9gd_flags(3)                         GETDATA                        gd_flags(3)
10
11
12

NAME

14       gd_flags — alter GetData operational flags
15
16

SYNOPSIS

18       #include <getdata.h>
19
20       unsigned long gd_flags(DIRFILE *dirfile, unsigned long set, unsigned
21              long reset);
22
23

DESCRIPTION

25       The  gd_flags()  function  modifies  the  operational  flags   of   the
26       dirfile(5)  database specified by dirfile, and returns the new value of
27       the flags register.
28
29       The flags which may be queried or modified with this  interface  are  a
30       subset of the open flags (see gd_cbopen(3)).  These are:
31
32       GD_PRETTY_PRINT
33               When  dirfile  metadata  are flushed to disk (either explicitly
34               via gd_metaflush(3), gd_rewrite_fragment(3), or gd_flush(3)  or
35               implicitly  by closing the dirfile), an attempt will be made to
36               create a nicer looking format specification (from a human-read‐
37               able  standpoint).   What  this explicitly means is not part of
38               the API, and any particular behaviour should not be relied  on.
39               If the dirfile has been opened read-only, this flag is ignored.
40
41       GD_VERBOSE
42               Specifies  that  whenever  an error is triggered by the library
43               when working on this dirfile, the corresponding  error  string,
44               which can be retrieved by calling gd_error_string(3), should be
45               written on the caller's standard error  stream  (stderr(3))  by
46               GetData.   The  error string may be prefixed by a string speci‐
47               fied by the caller;  see  gd_verbose_prefix(3).   Without  this
48               flag, GetData writes nothing to standard error.  (GetData never
49               writes to standard output.)
50
51       Flags which appear only in set will be turned on (enabled); flags which
52       appear  only in reset will be turned off (disabled); flags which appear
53       in both set and reset will be toggled.  Flags which appear  in  neither
54       of  these are left unchanged.  Accordingly, to simply query the current
55       flags, both set and reset should be zero, and to explicitly specify all
56       the  flags, ignoring their old values, the new flags register should be
57       given in set, and it's bitwise complement in reset.
58
59

RETURN VALUE

61       The gd_flags() function returns a bitwise or'd collection those of  the
62       above flags which are enabled after performing the modifications speci‐
63       fied (if any).  This function does not fail.
64
65

HISTORY

67       The gd_flags() function appeared in GetData-0.8.0.
68
69

SEE ALSO

71       gd_open(3), gd_verbose_prefix(3), dirfile(5)
72
73
74
75Version 0.10.0                 25 December 2016                    gd_flags(3)
Impressum