logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

gd_verbose_prefix — set the prefix on error messages printed by GetData

Description

       The  gd_verbose_prefix()  sets the prefix printed before error messages output by the GetData library for
       the dirfile(5) database specified by dirfile.  If prefix is NULL, the current prefix (if any) is  deleted
       and no new prefix is saved.

       GetData  only  prints  error messages for a given Dirfile if opened along with the GD_VERBOSE flag, or if
       the flag has been subsequently set on the dirfile using gd_flags(3).  If this flag is not set, this func‐
       tion still updates the prefix, but GetData does not use it.

       If GD_VERBOSE is set, when the library encounters an error, it prints the supplied prefix (if any),  fol‐
       lowed immediately by the error message (which is the message returned by gd_error_string(3)), followed by
       a newline.  All output goes to the caller's standard error (stderr(3)).

       The dirfile argument must point to a valid DIRFILE object previously created by a call to gd_open(3).

History

       The gd_verbose_prefix() function appared in GetData-0.8.0.

       In GetData-0.10.0, the error return from this function changed from -1 to a negative-valued error code.

Name

       gd_verbose_prefix — set the prefix on error messages printed by GetData

Return Value

       Upon successful completion, gd_verbose_prefix() returns zero.  On error, it returns a negative-valued er‐
       ror code.  Possible error codes are:

       GD_E_ALLOC
               The library was unable to allocate memory.

       The  error  code is also stored in the DIRFILE object and may be retrieved after this function returns by
       calling  gd_error(3).   A  descriptive  error  string  for  the  error  may  be   obtained   by   calling
       gd_error_string(3).

See Also

gd_error(3), gd_error_string(3), gd_flags(3), gd_open(3), stderr(3), dirfile(5)

Version 0.10.0                                  25 December 2016                            gd_verbose_prefix(3)

Synopsis

#include<getdata.h>intgd_verbose_prefix(DIRFILE*dirfile,constchar*prefix);

See Also