about summary refs log tree commit diff
path: root/src/headers/bits-template
blob: 23222d64331f92b6ad3eb37bd6479161826e89b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
extern void uint@BITS@_pack (char *, uint@BITS@_t) ;
extern void uint@BITS@_pack_big (char *, uint@BITS@_t) ;
extern void uint@BITS@_unpack (char const *, uint@BITS@_t *) ;
extern void uint@BITS@_unpack_big (char const *, uint@BITS@_t *) ;
extern uint@BITS@_t uint@BITS@_bswap (uint@BITS@_t) ;
extern void uint@BITS@_bswapp (uint@BITS@_t *) ;
extern void uint@BITS@_bswapn (uint@BITS@_t *, size_t) ;

#define UINT@BITS@_FMT @DFMT@
#define UINT@BITS@_OFMT @OFMT@
#define UINT@BITS@_XFMT @XFMT@
#define UINT@BITS@_BFMT @BFMT@

#define uint@BITS@_fmt_base uint64_fmt_generic
#define uint@BITS@0_fmt_base uint640_fmt_generic
#define uint@BITS@_fmt(s, u) uint@BITS@_fmt_base(s, (u), 10)
#define uint@BITS@0_fmt(s, u, n) uint@BITS@0_fmt_base(s, u, (n), 10)
#define uint@BITS@_ofmt(s, o) uint@BITS@_fmt_base(s, (o), 8)
#define uint@BITS@0_ofmt(s, o, n) uint@BITS@0_fmt_base(s, o, (n), 8)
#define uint@BITS@_xfmt(s, x) uint@BITS@_fmt_base(s, (x), 16)
#define uint@BITS@0_xfmt(s, x, n) uint@BITS@0_fmt_base(s, x, (n), 16)
#define uint@BITS@_bfmt(s, b) uint@BITS@_fmt_base(s, (b), 2)
#define uint@BITS@0_bfmt(s, b, n) uint@BITS@0_fmt_base(s, b, (n), 2)

extern size_t uint@BITS@_fmtlist (char *, uint@BITS@_t const *, size_t) ;

extern size_t uint@BITS@_scan_base (char const *, uint@BITS@_t *, uint8_t) ;
extern size_t uint@BITS@0_scan_base (char const *, uint@BITS@_t *, uint8_t) ;

#define uint@BITS@_scan(s, u) uint@BITS@_scan_base(s, (u), 10)
#define uint@BITS@0_scan(s, u) uint@BITS@0_scan_base(s, (u), 10)
#define uint@BITS@_oscan(s, u) uint@BITS@_scan_base(s, (u), 8)
#define uint@BITS@0_oscan(s, u) uint@BITS@0_scan_base(s, (u), 8)
#define uint@BITS@_xscan(s, u) uint@BITS@_scan_base(s, (u), 16)
#define uint@BITS@0_xscan(s, u) uint@BITS@0_scan_base(s, (u), 16)
#define uint@BITS@_bscan(s, u) uint@BITS@_scan_base(s, (u), 2)
#define uint@BITS@0_bscan(s, u) uint@BITS@0_scan_base(s, (u), 2)

extern size_t uint@BITS@_scanlist (uint@BITS@_t *, size_t, char const *, size_t *) ;

#define int@BITS@_fmt_base int64_fmt_generic
#define int@BITS@_fmt(s, u) int@BITS@_fmt_base(s, (u), 10)
#define int@BITS@_ofmt(s, o) int@BITS@_fmt_base(s, (o), 8)
#define int@BITS@_xfmt(s, x) int@BITS@_fmt_base(s, (x), 16)
#define int@BITS@_bfmt(s, b) int@BITS@_fmt_base(s, (b), 2)

extern size_t int@BITS@_fmtlist (char *, int@BITS@_t const *, size_t) ;

extern size_t int@BITS@_scan_base (char const *, int@BITS@_t *, uint8_t) ;
extern size_t int@BITS@0_scan_base (char const *, int@BITS@_t *, uint8_t) ;

#define int@BITS@_scan(s, u) int@BITS@_scan_base(s, (u), 10)
#define int@BITS@0_scan(s, u) int@BITS@0_scan_base(s, (u), 10)
#define int@BITS@_oscan(s, u) int@BITS@_scan_base(s, (u), 8)
#define int@BITS@0_oscan(s, u) int@BITS@0_scan_base(s, (u), 8)
#define int@BITS@_xscan(s, u) int@BITS@_scan_base(s, (u), 16)
#define int@BITS@0_xscan(s, u) int@BITS@0_scan_base(s, (u), 16)
#define int@BITS@_bscan(s, u) int@BITS@_scan_base(s, (u), 2)
#define int@BITS@0_bscan(s, u) int@BITS@0_scan_base(s, (u), 2)

extern size_t int@BITS@_scanlist (int@BITS@_t *, size_t, char const *, size_t *) ;