gd_naliases(3)

gd_naliases3

Report the number of aliases of a field in a dirfile

Usage

#include <getdata.h>

unsigned int gd_naliases(DIRFILE *dirfile, const char *field_code);

Overview

The gd_naliases() function queries a dirfile(5) database specified by dirfile and counts the number of aliases of the entry (including the entry's name) specified by field_code.

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

Return value

Upon successful completion, gd_naliases() returns an unsigned integer indicating the number of aliases of the specified field code in the dirfile. If successful, this count will be at least one.

On error, this function returns zero and stores a negative-valued error code in the DIRFILE object which may be retrieved by a subsequent call to gd_error(3). Possible error codes are:
.TP 8 GD_E_BAD_CODE The supplied field code was not found in the database.
.TP 8 GD_E_BAD_DIRFILE The supplied dirfile was invalid.

A descriptive error string for the error may be obtained by calling gd_error_string(3).

Releases

5 releases since Debian 9 (Stretch); the text changed 1 time.

  1. 9
  2. 10–13

History

The gd_naliases() function appeared in GetData-0.8.0.

From libgetdata-doc 0.11.0-15 in Debian 13 (Trixie). Parsed by carta from the page's man source.