aboutsummaryrefslogtreecommitdiffstats
path: root/src/define-functions.h
blob: 82d59a719f00ffd407e69b73ec07e069f77f4bbe (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/* See LICENSE file for copyright and license details. */

#ifndef DONT_INCLUDE_FLOAT
# define PROCESS process_lf
# define TYPE double
# define SCAN_TYPE "lf"
# define PRINT_CAST double
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
#endif

#ifndef DONT_INCLUDE_DOUBLE
# define PROCESS process_f
# define TYPE float
# define SCAN_TYPE "f"
# define PRINT_CAST double
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
#endif

#ifdef INCLUDE_DOUBLE_LONG
# define PROCESS process_llf
# define TYPE long double
# define SCAN_TYPE "Lf"
# define PRINT_CAST long double
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
#endif

#ifdef INCLUDE_UINT8
# define PROCESS process_u8
# define TYPE uint8_t
# define SCAN_TYPE SCNu8
# define PRINT_CAST unsigned
# define INTEGER_TYPE
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
# undef INTEGER_TYPE
#endif

#ifdef INCLUDE_UINT16
# define PROCESS process_u16
# define TYPE uint16_t
# define SCAN_TYPE SCNu16
# define PRINT_CAST unsigned
# define INTEGER_TYPE
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
# undef INTEGER_TYPE
#endif

#ifdef INCLUDE_UINT32
# define PROCESS process_u32
# define TYPE uint32_t
# define SCAN_TYPE SCNu32
# define PRINT_CAST uint32_t
# define INTEGER_TYPE
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
# undef INTEGER_TYPE
#endif

#ifdef INCLUDE_UINT64
# define PROCESS process_u64
# define TYPE uint64_t
# define SCAN_TYPE SCNu64
# define PRINT_CAST uint64_t
# define INTEGER_TYPE
# include FILE
# undef PROCESS
# undef TYPE
# undef SCAN_TYPE
# undef PRINT_CAST
# undef INTEGER_TYPE
#endif