liblash

A bianry tree implementation used for game development from scratch
git clone git://holbrook.no/liblash.git
Log | Files | Refs | LICENSE

endian.h (331B)


      1 #ifndef LASH_ENDIAN_H_
      2 #define LASH_ENDIAN_H_
      3 
      4 #define CONVERT_BIGENDIAN 0x00
      5 #define CONVERT_LITTLEENDIAN 0x01
      6 
      7 union le {
      8 	short *s;
      9 	int *i;
     10 	long long *ll;
     11 	unsigned char *c;
     12 };
     13 
     14 int le(int l, void *n);
     15 int is_le();
     16 int to_endian(char direction, int l, void *n);
     17 void flip_endian(int l, union le *n);
     18 
     19 #endif // LASH_ENDIAN_H_