summaryrefslogtreecommitdiff
path: root/src/headers/uint32-footer
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2014-09-18 18:55:44 +0000
commit3534b428629be185e096be99e3bd5fdfe32d5544 (patch)
tree210ef3198ed66bc7f7b7bf6a85e4579f455e5a36 /src/headers/uint32-footer
downloadskalibs-3534b428629be185e096be99e3bd5fdfe32d5544.tar.xz
initial commit with rc for skalibs-2.0.0.0
Diffstat (limited to 'src/headers/uint32-footer')
-rw-r--r--src/headers/uint32-footer39
1 files changed, 39 insertions, 0 deletions
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