1get_endianness(3)                   GETDATA                  get_endianness(3)
2
3
4

NAME

6       get_endianness — report the byte sex of fields in a dirfile
7

SYNOPSIS

9       #include <getdata.h>
10
11       unsigned long get_endianness(DIRFILE *dirfile, int fragment_index);
12

DESCRIPTION

14       The  get_endianness()  function queries a dirfile(5) database specified
15       by dirfile and returns the byte sex for the fragment indexed  by  frag‐
16       ment_index.  The byte sex of a fragment indicate the endianness of data
17       stored in binary files associated with RAW fields defined in the speci‐
18       fied  fragment.   The endianness of a fragment containing no RAW fields
19       is ignored.
20
21       The dirfile argument must point to a valid  DIRFILE  object  previously
22       created by a call to dirfile_open(3).
23
24

RETURN VALUE

26       Upon  successful  completion,  get_endianness() returns the byte sex of
27       the specified fragment, which will be either GD_BIG_ENDIAN  or  GD_LIT‐
28       TLE_ENDIAN.   On error, it returns zero and sets the dirfile error to a
29       non-zero error value.  Possible error values are:
30
31       GD_E_BAD_DIRFILE
32               The supplied dirfile was invalid.
33
34       GD_E_BAD_INDEX
35               The supplied index was out of range.
36
37       The dirfile error may be retrieved by calling get_error(3).  A descrip‐
38       tive error string for the last error encountered can be obtained from a
39       call to get_error_string(3).
40

SEE ALSO

42       dirfile_alter_endianness(3), dirfile_open(3), getdata(3), get_error(3),
43       get_error_string(3), dirfile(5), dirfile-format(5)
44
45
46
47Version 0.5.0                   9 December 2008              get_endianness(3)
Impressum