[GRASS5] src/libes/gis/ new function G_is_little_endian()
Radim.Blazek at dhv.cz
Tue Jan 16 12:41:47 EST 2001
Markus Neteler wrote:
> > > as it is used in various places in GRASS, I have added
> > > G_is_little_endian() function to test little/big endianess
> > > in
> > > src/libes/gis/endian.c
> > > (GISLIB)
> > > * G_is_little_endian ()
> > At least in theory third 'PDP'(3412) byte order exists.
> > I have defined in new include/vect/dig_vect.h
> > #define ENDIAN_LITTLE 0
> > #define ENDIAN_BIG 1
> > #define ENDIAN_OTHER 2
> > If you have written that function we could move that definition
> > into gis.h. Maybe G_get_byte_order() would be better.
> Sounds good to me. If you would like to change that in
> then I will update the related modules. I wasn't aware of
> /usr/include/endian.h, sorry.
I will add into gis.h:
#define GRASS_LITTLE_ENDIAN 0
#define GRASS_BIG_ENDIAN 1
#define GRASS_OTHER_ENDIAN 2
and into src/libes/gis/endian.c new function
G_get_byte_order() which returns GRASS_LITTLE/BIG_ENDIAN
(use code from G_is_little_endian()).
After new vect lib tests we could move byte order test into
gislib in grass51.
If you agree please add note about GRASSS_ prefix for environment
variables and constant names to SUBMITTING.
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev