BBC Micro C library
stdint.h
Go to the documentation of this file.
1 /*
2 Copyright 2020 Peter Howkins
3 
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files (the
6 "Software"), to deal in the Software without restriction, including
7 without limitation the rights to use, copy, modify, merge, publish,
8 distribute, sublicense, and/or sell copies of the Software, and to
9 permit persons to whom the Software is furnished to do so, subject to
10 the following conditions:
11 
12 The above copyright notice and this permission notice shall be included
13 in all copies or substantial portions of the Software.
14 
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
19 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
20 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
21 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 */
23 #ifndef STDINT____H
24 #define STDINT____H
25 
34 typedef unsigned char uint8_t;
35 #define UINT8_MAX 255
36 
37 typedef unsigned int uint16_t;
38 #define UINT16_MAX 65535
39 
40 typedef unsigned long uint32_t;
41 #define UINT32_MAX 4294967295
42 
43 typedef signed char int8_t;
44 #define INT8_MAX 127
45 #define INT8_MIN -128
46 
47 typedef int int16_t;
48 #define INT16_MAX 32767‬
49 #define INT16_MIN -32768
50 
51 typedef long int32_t;
52 #define INT32_MAX 2147483647‬
53 #define INT32_MIN -2147483648‬
54 
55 typedef int16_t intptr_t;
56 #define INTPTR_MAX INT16_MAX
57 #define INTPTR_MIN INT16_MIN
58 
60 #define UINTPTR_MAX UINT16_MAX
61 
63 #define UINTMAX_MAX UINT32_MAX
64 
65 typedef int32_t intmax_t;
66 #define INTMAX_MAX INT32_MAX
67 #define INTMAX_MIN INT32_MIN
68 
70 typedef uint8_t uint_least8_t;
71 #define UINT_LEAST8_MAX UINT8_MAX
72 
73 typedef uint16_t uint_least16_t;
74 #define UINT_LEAST16_MAX UINT16_MAX
75 
76 typedef uint32_t uint_least32_t;
77 #define UINT_LEAST32_MAX UINT32_MAX
78 
79 typedef int8_t int_least8_t;
80 #define INT_LEAST8_MAX INT8_MAX
81 #define INT_LEAST8_MIN INT8_MIN
82 
83 typedef int16_t int_least16_t;
84 #define INT_LEAST16_MAX INT16_MAX
85 #define INT_LEAST16_MIN INT16_MIN
86 
87 typedef int32_t int_least32_t;
88 #define INT_LEAST32_MAX INT32_MAX
89 #define INT_LEAST32_MIN INT32_MIN
90 
92 typedef uint8_t uint_fast8_t;
93 #define UINT_FAST8_MAX UINT8_MAX
94 
95 typedef uint16_t uint_fast16_t;
96 #define UINT_FAST16_MAX UINT16_MAX
97 
98 typedef uint32_t uint_fast32_t;
99 #define UINT_FAST32_MAX UINT32_MAX
100 
101 typedef int8_t int_fast8_t;
102 #define INT_FAST8_MAX INT8_MAX
103 #define INT_FAST8_MIN INT8_MIN
104 
105 typedef int16_t int_fast16_t;
106 #define INT_FAST16_MAX INT16_MAX
107 #define INT_FAST16_MIN INT16_MIN
108 
109 typedef int32_t int_fast32_t;
110 #define INT_FAST32_MAX INT32_MAX
111 #define INT_FAST32_MIN INT32_MIN
112 
113 #endif /* STDINT____H */
int int16_t
Definition: stdint.h:47
int16_t intptr_t
Definition: stdint.h:55
unsigned char uint8_t
Definition: stdint.h:34
int32_t intmax_t
Definition: stdint.h:65
unsigned long uint32_t
Definition: stdint.h:40
unsigned int uint16_t
Definition: stdint.h:37
signed char int8_t
Definition: stdint.h:43
uint32_t uintmax_t
Definition: stdint.h:62
uint16_t uintptr_t
Definition: stdint.h:59
long int32_t
Definition: stdint.h:51