From 3534b428629be185e096be99e3bd5fdfe32d5544 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 18 Sep 2014 18:55:44 +0000 Subject: initial commit with rc for skalibs-2.0.0.0 --- src/headers/uint32-footer | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/headers/uint32-footer (limited to 'src/headers/uint32-footer') diff --git a/src/headers/uint32-footer b/src/headers/uint32-footer new file mode 100644 index 0000000..7cfe7ba --- /dev/null +++ b/src/headers/uint32-footer @@ -0,0 +1,39 @@ +extern void uint32_pack (char *, uint32) ; +extern void uint32_pack_big (char *, uint32) ; +extern void uint32_unpack (char const *, uint32 *) ; +extern void uint32_unpack_big (char const *, uint32 *) ; +extern void uint32_reverse (char *, unsigned int) ; + +#define UINT32_FMT 11 +#define UINT32_OFMT 13 +#define UINT32_XFMT 9 +#define UINT32_BFMT 33 + +#define uint32_fmt_base(s, u, b) uint64_fmt_base(s, (uint64)(uint32)(u), b) +#define uint320_fmt_base(s, u, n, b) uint640_fmt_base(s, (uint64)(uint32)(u), n, b) + +#define uint32_fmt(s, u) uint64_fmt(s, (uint64)(uint32)(u)) +#define uint320_fmt(s, u, n) uint640_fmt(s, (uint64)(uint32)(u), n) +#define uint32_ofmt(s, o) uint64_ofmt(s, (uint64)(uint32)(o)) +#define uint320_ofmt(s, o, n) uint640_ofmt(s, (uint64)(uint32)(o), n) +#define uint32_xfmt(s, x) uint64_xfmt(s, (uint64)(uint32)(x)) +#define uint320_xfmt(s, x, n) uint640_xfmt(s, (uint64)(uint32)(x), n) +#define uint32_bfmt(s, b) uint64_bfmt(s, (uint64)(uint32)(b)) +#define uint320_bfmt(s, b, n) uint640_bfmt(s, (uint64)(uint32)(b), n) + +extern unsigned int uint32_fmtlist (char *, uint32 const *, unsigned int) ; + +extern unsigned int uint32_scan_base (char const *, uint32 *, unsigned char) ; +extern unsigned int uint320_scan_base (char const *, uint32 *, unsigned char) ; +#define uint32_scan(s, u) uint32_scan_base(s, (u), 10) +#define uint320_scan(s, u) uint320_scan_base(s, (u), 10) +#define uint32_oscan(s, u) uint32_scan_base(s, (u), 8) +#define uint320_oscan(s, u) uint320_scan_base(s, (u), 8) +#define uint32_xscan(s, u) uint32_scan_base(s, (u), 16) +#define uint320_xscan(s, u) uint320_scan_base(s, (u), 16) +#define uint32_bscan(s, u) uint32_scan_base(s, (u), 2) +#define uint320_bscan(s, u) uint320_scan_base(s, (u), 2) + +extern unsigned int uint32_scanlist (uint32 *, unsigned int, char const *, unsigned int *) ; + +#endif -- cgit v1.2.3