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

NAME

14       gd_verbose_prefix — set the prefix on error messages printed by GetData
15
16

SYNOPSIS

18       #include <getdata.h>
19
20       int gd_verbose_prefix(DIRFILE *dirfile, const char *prefix);
21
22

DESCRIPTION

24       The  gd_verbose_prefix()  sets the prefix printed before error messages
25       output by the GetData library for the dirfile(5) database specified  by
26       dirfile.  If prefix is NULL, the current prefix (if any) is deleted and
27       no new prefix is saved.
28
29       GetData only prints error messages for a given Dirfile if opened  along
30       with  the  GD_VERBOSE flag, or if the flag has been subsequently set on
31       the dirfile using gd_flags(3).  If this flag is not set, this  function
32       still updates the prefix, but GetData does not use it.
33
34       If  GD_VERBOSE  is set, when the library encounters an error, it prints
35       the supplied prefix (if any), followed immediately by the error message
36       (which  is  the  message returned by gd_error_string(3)), followed by a
37       newline.  All output goes to the caller's standard error (stderr(3)).
38
39       The dirfile argument must point to a valid  DIRFILE  object  previously
40       created by a call to gd_open(3).
41
42

RETURN VALUE

44       Upon  successful  completion, gd_verbose_prefix() returns zero.  On er‐
45       ror, it returns a negative-valued error  code.   Possible  error  codes
46       are:
47
48       GD_E_ALLOC
49               The library was unable to allocate memory.
50
51       The  error  code  is  also  stored in the DIRFILE object and may be re‐
52       trieved after this function returns by calling gd_error(3).  A descrip‐
53       tive   error   string   for  the  error  may  be  obtained  by  calling
54       gd_error_string(3).
55
56

HISTORY

58       The gd_verbose_prefix() function appared in GetData-0.8.0.
59
60       In GetData-0.10.0, the error return from this function changed from  -1
61       to a negative-valued error code.
62
63

SEE ALSO

65       gd_error(3),  gd_error_string(3),  gd_flags(3),  gd_open(3), stderr(3),
66       dirfile(5)
67
68
69
70Version 0.10.0                 25 December 2016           gd_verbose_prefix(3)
Impressum