1
2
3
4
5
6
7
8
9gd_linterp_tablename(3) GETDATA gd_linterp_tablename(3)
10
11
12
14 gd_linterp_tablename — retrieve the pathname of a look-up table in a
15 Dirfile
16
17
19 #include <getdata.h>
20
21 char *gd_linterp_tablename(DIRFILE *dirfile, const char *field_code);
22
23
25 The gd_linterp_tablename() function retrieves the pathname of the look-
26 up table (LUT) used by the LINTERP field specified by field_code in the
27 dirfile specified by dirfile. If field_code contains a valid represen‐
28 tation suffix, it will be ignored.
29
30 Note: this function returns a fully canonicalised, absolute path. The
31 value of the table member in a gd_entry_t object (see gd_entry(3)) is
32 the path which appears in the format specification on disk, which may
33 be a path relative to the fragment directory.
34
35
37 On success, gd_linterp_tablename() returns the full pathname of the LUT
38 associated with the specified field in a newly-allocated buffer. By
39 default, this buffer is allocated with malloc(3), but a different memo‐
40 ry manager may be specified by calling gd_alloc_funcs(3) before calling
41 this function. The caller is responsible for deallocating the returned
42 buffer.
43
44 On error, this function returns NULL and stores a negative-valued error
45 code in the DIRFILE object which may be retrieved by a subsequent call
46 to gd_error(3). Possible error codes are:
47
48 GD_E_ALLOC
49 The library was unable to allocate memory.
50
51 GD_E_BAD_CODE
52 The field specified by field_code was not found.
53
54 GD_E_BAD_DIRFILE
55 The supplied dirfile was invalid.
56
57 GD_E_BAD_FIELD_TYPE
58 The field specified by field_code was not a LINTERP field.
59
60 A descriptive error string for the error may be obtained by calling
61 gd_error_string(3).
62
63
65 The gd_linterp_tablename() function appeared in GetData-0.8.1.
66
67
69 gd_alloc_funcs(3), gd_entry(3), gd_error(3), gd_error_string(3),
70 dirfile(5), dirfile-format(5)
71
72
73
74Version 0.10.0 25 December 2016 gd_linterp_tablename(3)