GRASS GIS 7 Programmer's Manual
7.0.5(2016)-r00000
endian.c
Go to the documentation of this file.
1
24
int
G_is_little_endian
(
void
)
25
{
26
union
27
{
28
int
testWord;
29
char
testByte[
sizeof
(int)];
30
} endianTest;
31
32
endianTest.testWord = 1;
33
34
if
(endianTest.testByte[0] == 1)
35
return
1;
/* true: little endian */
36
37
return
0;
/* false: big endian */
38
}
G_is_little_endian
int G_is_little_endian(void)
Tests for little ENDIAN.
Definition:
endian.c:24
gis
endian.c
Generated on Thu Oct 13 2016 05:31:23 for GRASS GIS 7 Programmer's Manual by
1.8.12