PatchworkOS
Loading...
Searching...
No Matches
inttypes.h
Go to the documentation of this file.
1#ifndef _INTTYPES_H
2#define _INTTYPES_H 1
3
4#ifdef __cplusplus
5extern "C"
6{
7#endif
8
9#include "_internal/config.h"
10
11typedef __INTMAX_TYPE__ intmax_t;
12typedef __UINTMAX_TYPE__ uintmax_t;
13
14typedef struct
15{
18} imaxdiv_t;
19
20/* 7.8.1 Macros for format specifiers */
21
22#define PRIdLEAST8 "d"
23#define PRIiLEAST8 "i"
24#define PRIoLEAST8 "o"
25#define PRIuLEAST8 "u"
26#define PRIxLEAST8 "x"
27#define PRIXLEAST8 "X"
28
29#define PRIdFAST8 "d"
30#define PRIiFAST8 "i"
31#define PRIoFAST8 "o"
32#define PRIuFAST8 "u"
33#define PRIxFAST8 "x"
34#define PRIXFAST8 "X"
35
36#define PRIdLEAST16 "d"
37#define PRIiLEAST16 "i"
38#define PRIoLEAST16 "o"
39#define PRIuLEAST16 "u"
40#define PRIxLEAST16 "x"
41#define PRIXLEAST16 "X"
42
43#define PRIdFAST16 "d"
44#define PRIiFAST16 "i"
45#define PRIoFAST16 "o"
46#define PRIuFAST16 "u"
47#define PRIxFAST16 "x"
48#define PRIXFAST16 "X"
49
50#define PRIdLEAST32 "d"
51#define PRIiLEAST32 "i"
52#define PRIoLEAST32 "o"
53#define PRIuLEAST32 "u"
54#define PRIxLEAST32 "x"
55#define PRIXLEAST32 "X"
56
57#define PRIdFAST32 "d"
58#define PRIiFAST32 "i"
59#define PRIoFAST32 "o"
60#define PRIuFAST32 "u"
61#define PRIxFAST32 "x"
62#define PRIXFAST32 "X"
63
64#define PRIdLEAST64 "d"
65#define PRIiLEAST64 "i"
66#define PRIoLEAST64 "o"
67#define PRIuLEAST64 "u"
68#define PRIxLEAST64 "x"
69#define PRIXLEAST64 "X"
70
71#define PRIdFAST64 "d"
72#define PRIiFAST64 "i"
73#define PRIoFAST64 "o"
74#define PRIuFAST64 "u"
75#define PRIxFAST64 "x"
76#define PRIXFAST64 "X"
77
78#define PRIdMAX "d"
79#define PRIiMAX "i"
80#define PRIoMAX "o"
81#define PRIuMAX "u"
82#define PRIxMAX "x"
83#define PRIXMAX "X"
84
85#define PRIdPTR "d"
86#define PRIiPTR "i"
87#define PRIoPTR "o"
88#define PRIuPTR "u"
89#define PRIxPTR "x"
90#define PRIXPTR "X"
91
92/*
93#define SCNdLEAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST8_PREFIX, d ) )
94#define SCNiLEAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST8_PREFIX, i ) )
95#define SCNoLEAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST8_PREFIX, o ) )
96#define SCNuLEAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST8_PREFIX, u ) )
97#define SCNxLEAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST8_PREFIX, x ) )
98
99#define SCNdFAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST8_PREFIX, d ) )
100#define SCNiFAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST8_PREFIX, i ) )
101#define SCNoFAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST8_PREFIX, o ) )
102#define SCNuFAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST8_PREFIX, u ) )
103#define SCNxFAST8 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST8_PREFIX, x ) )
104
105#define SCNdLEAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST16_PREFIX, d ) )
106#define SCNiLEAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST16_PREFIX, i ) )
107#define SCNoLEAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST16_PREFIX, o ) )
108#define SCNuLEAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST16_PREFIX, u ) )
109#define SCNxLEAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST16_PREFIX, x ) )
110
111#define SCNdFAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST16_PREFIX, d ) )
112#define SCNiFAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST16_PREFIX, i ) )
113#define SCNoFAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST16_PREFIX, o ) )
114#define SCNuFAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST16_PREFIX, u ) )
115#define SCNxFAST16 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST16_PREFIX, x ) )
116
117#define SCNdLEAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST32_PREFIX, d ) )
118#define SCNiLEAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST32_PREFIX, i ) )
119#define SCNoLEAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST32_PREFIX, o ) )
120#define SCNuLEAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST32_PREFIX, u ) )
121#define SCNxLEAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST32_PREFIX, x ) )
122
123#define SCNdFAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST32_PREFIX, d ) )
124#define SCNiFAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST32_PREFIX, i ) )
125#define SCNoFAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST32_PREFIX, o ) )
126#define SCNuFAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST32_PREFIX, u ) )
127#define SCNxFAST32 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST32_PREFIX, x ) )
128
129#define SCNdLEAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST64_PREFIX, d ) )
130#define SCNiLEAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST64_PREFIX, i ) )
131#define SCNoLEAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST64_PREFIX, o ) )
132#define SCNuLEAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST64_PREFIX, u ) )
133#define SCNxLEAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_LEAST64_PREFIX, x ) )
134
135#define SCNdFAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST64_PREFIX, d ) )
136#define SCNiFAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST64_PREFIX, i ) )
137#define SCNoFAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST64_PREFIX, o ) )
138#define SCNuFAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST64_PREFIX, u ) )
139#define SCNxFAST64 _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INT_FAST64_PREFIX, x ) )
140
141#define SCNdMAX _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTMAX_PREFIX, d ) )
142#define SCNiMAX _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTMAX_PREFIX, i ) )
143#define SCNoMAX _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTMAX_PREFIX, o ) )
144#define SCNuMAX _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTMAX_PREFIX, u ) )
145#define SCNxMAX _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTMAX_PREFIX, x ) )
146
147#define SCNdPTR _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTPTR_PREFIX, d ) )
148#define SCNiPTR _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTPTR_PREFIX, i ) )
149#define SCNoPTR _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTPTR_PREFIX, o ) )
150#define SCNuPTR _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTPTR_PREFIX, u ) )
151#define SCNxPTR _PDCLIB_value2string( _PDCLIB_concat( _PDCLIB_INTPTR_PREFIX, x ) )
152*/
153
154/* 7.8.2 Functions for greatest-width integer types */
155
157
159
160_PUBLIC intmax_t strtoimax(const char* _RESTRICT nptr, char** _RESTRICT endptr, int base);
161_PUBLIC uintmax_t strtoumax(const char* _RESTRICT nptr, char** _RESTRICT endptr, int base);
162
163#ifdef __cplusplus
164}
165#endif
166
167#endif
_PUBLIC imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom)
Definition imaxdiv.c:3
_PUBLIC intmax_t strtoimax(const char *_RESTRICT nptr, char **_RESTRICT endptr, int base)
__UINTMAX_TYPE__ uintmax_t
Definition inttypes.h:12
_PUBLIC uintmax_t strtoumax(const char *_RESTRICT nptr, char **_RESTRICT endptr, int base)
_PUBLIC intmax_t imaxabs(intmax_t j)
__INTMAX_TYPE__ intmax_t
Definition inttypes.h:11
#define _PUBLIC
Definition config.h:41
#define _RESTRICT
Definition config.h:17
intmax_t rem
Definition inttypes.h:17
intmax_t quot
Definition inttypes.h:16