gd_linterp_tablename(3)

NAME
gd_linterp_tablename — retrieve the pathname of a look-up table in a Dirfile

SYNOPSIS
#include <getdata.h>

char *gd_linterp_tablename(DIRFILE *dirfile, const char *field_code);

DESCRIPTION
The function retrieves the pathname of the look-up table (LUT) used by the LINTERP field specified by in the dirfile specified by If contains a valid representation suffix, it will be ignored. Note: this function returns a fully canonicalised, absolute path. The value of the member in a gd_entry_t object (see is the path which appears in the format specification on disk, which may be a path relative to the fragment directory.

RETURN VALUE
On success, returns the full pathname of the LUT associated with the specified field in a newly-allocated buffer. By default, this buffer is allocated with but a different memory manager may be specified by calling before calling this function. The caller is responsible for deallocating the returned buffer. On error, this function returns NULL and stores a negative-valued error code in the DIRFILE object which may be retrieved by a subsequent call to Possible error codes are: The library was unable to allocate memory. The field specified by was not found. The supplied dirfile was invalid. The field specified by was not a LINTERP field.

A descriptive error string for the error may be obtained by calling

HISTORY
The function appeared in GetData-0.8.1.

SEE ALSO
dirfile(5), dirfile-format(5)