You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
744 B
C
25 lines
744 B
C
#ifndef UINT16_H
|
|
#define UINT16_H
|
|
|
|
typedef unsigned short uint16;
|
|
|
|
#if defined(__i386__) && !defined(NO_UINT16_MACROS)
|
|
#define uint16_pack(out,in) (*(uint16*)(out)=(in))
|
|
#define uint16_unpack(in,out) (*(out)=*(uint16*)(in))
|
|
#define uint16_read(in) (*(uint16*)(in))
|
|
extern void uint16_pack_big(char *out,uint16 in);
|
|
extern void uint16_unpack_big(const char *in,uint16* out);
|
|
extern uint16 uint16_read_big(const char *in);
|
|
#else
|
|
|
|
extern void uint16_pack(char *out,uint16 in);
|
|
extern void uint16_pack_big(char *out,uint16 in);
|
|
extern void uint16_unpack(const char *in,uint16* out);
|
|
extern void uint16_unpack_big(const char *in,uint16* out);
|
|
extern uint16 uint16_read(const char *in);
|
|
extern uint16 uint16_read_big(const char *in);
|
|
|
|
#endif
|
|
|
|
#endif
|