X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/5aaf7aaa7d95bb26178ae2c192b84401f5544244..8c95a9e8b7ae0e2a480d7a6de0bf4ca933799c7e:/src/pack.h diff --git a/src/pack.h b/src/pack.h deleted file mode 100644 index 7cc3440..0000000 --- a/src/pack.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Portable binary serialisation of integral types. - * Copyright © 2009 Nick Bowler - * - * Copying and distribution of this file, with or without modification, - * are permitted in any medium without royalty provided the copyright - * notice and this notice are preserved. This file is offered as-is, - * without any warranty. - */ - -#ifndef PACK_H_ -#define PACK_H_ - -#include -#if !defined(PACK_HAVE_64BIT) && defined(ULLONG_MAX) && defined(LLONG_MAX) -# define PACK_HAVE_64BIT 1 -#endif - -void pack_16_be(unsigned char *, unsigned short); -void pack_32_be(unsigned char *, unsigned long); -#if PACK_HAVE_64BIT -void pack_64_be(unsigned char *, unsigned long long); -#endif - -void pack_16_le(unsigned char *, unsigned short); -void pack_32_le(unsigned char *, unsigned long); -#if PACK_HAVE_64BIT -void pack_64_le(unsigned char *, unsigned long long); -#endif - -unsigned short unpack_16_be(const unsigned char *); -unsigned long unpack_32_be(const unsigned char *); -#if PACK_HAVE_64BIT -unsigned long long unpack_64_be(const unsigned char *); -#endif - -unsigned short unpack_16_le(const unsigned char *); -unsigned long unpack_32_le(const unsigned char *); -#if PACK_HAVE_64BIT -unsigned long long unpack_64_le(const unsigned char *); -#endif - -short unpack_s16_be(const unsigned char *); -long unpack_s32_be(const unsigned char *); -#if PACK_HAVE_64BIT -long long unpack_s64_be(const unsigned char *); -#endif - -short unpack_s16_le(const unsigned char *); -long unpack_s32_le(const unsigned char *); -#if PACK_HAVE_64BIT -long long unpack_s64_le(const unsigned char *); -#endif - -#endif