1
2
3
4
5
6
7
8
9gd_endianness(3)                    GETDATA                   gd_endianness(3)
10
11
12

NAME

14       gd_endianness — report the byte sex of fields in a Dirfile
15
16

SYNOPSIS

18       #include <getdata.h>
19
20       unsigned long gd_endianness(DIRFILE *dirfile, int fragment_index);
21
22

DESCRIPTION

24       The gd_endianness() function queries a dirfile(5) database specified by
25       dirfile  and  retrieves  the  byte  sex  of  the  fragment  indexed  by
26       fragment_index.  The byte sex of a fragment indicates the endianness of
27       data files associated with RAW fields defined in  the  specified  frag‐
28       ment.   The  endianness  of  a fragment containing no RAW fields is not
29       meaningful.
30
31       The dirfile argument must point to a valid  DIRFILE  object  previously
32       created by a call to gd_open(3).
33
34

RETURN VALUE

36       Upon successful completion, gd_endianness() returns the byte sex of the
37       specified   fragment,   which   will   be   either   GD_BIG_ENDIAN   or
38       GD_LITTLE_ENDIAN.   This will be bitwise-or'd with either GD_ARM_ENDIAN
39       or  GD_NOT_ARM_ENDIAN,  indicating  whether  double-precision  floating
40       point  data  in  this  fragment are stored in the old ARM middle-endian
41       format.
42
43       On error, this function returns zero and stores a negative-valued error
44       code  in the DIRFILE object which may be retrieved by a subsequent call
45       to gd_error(3).  Possible error codes are:
46
47       GD_E_BAD_DIRFILE
48               The supplied dirfile was invalid.
49
50       GD_E_BAD_INDEX
51               The supplied index was out of range.
52
53       A descriptive error string for the error may  be  obtained  by  calling
54       gd_error_string(3).
55
56

HISTORY

58       The get_endianness() function appeared in GetData-0.5.0.
59
60       In  GetData-0.7.0,  this function was renamed to gd_endianness().  This
61       version also added the GD_ARM_ENDIAN and GD_NOT_ARM_ENDIAN flags.
62
63

SEE ALSO

65       gd_alter_endianness(3), gd_getdata(3), gd_error(3), gd_error_string(3),
66       gd_open(3), dirfile(5), dirfile-format(5)
67
68
69
70Version 0.10.0                 25 December 2016               gd_endianness(3)
Impressum