Skip to content

Commit f2bb988

Browse files
committed
[cstdint, cinttypes.syn] Reorganize <cstdint> presentation
1 parent 6528979 commit f2bb988

File tree

2 files changed

+38
-17
lines changed

2 files changed

+38
-17
lines changed

source/iostreams.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -14952,7 +14952,7 @@
1495214952
\indexlibrary{\idxcode{SCNuPTR}}%
1495314953
\indexlibrary{\idxcode{SCNxPTR}}%
1495414954
\begin{codeblock}
14955-
#include <cstdint>
14955+
#include <cstdint> // see \ref{cstdint}
1495614956

1495714957
namespace std {
1495814958
using imaxdiv_t = @\seebelow@;

source/support.tex

+37-16
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@
11421142

11431143
\rSec1[cstdint]{Integer types}
11441144

1145-
\rSec2[cstdint.syn]{Header \tcode{<cstdint>} synopsis}
1145+
\synopsis{Header \tcode{<cstdint>} synopsis}
11461146
\indextext{\idxhdr{cstdint}}%
11471147
\indexlibrary{\idxhdr{cstdint}}%
11481148
\indexlibrary{\idxcode{int8_t}}%
@@ -1211,31 +1211,52 @@
12111211

12121212
using uintmax_t = @\textit{unsigned integer type}@;
12131213
using uintptr_t = @\textit{unsigned integer type}@; // optional
1214-
} // namespace std
1215-
\end{codeblock}
1214+
}
12161215

1217-
\pnum
1218-
The header also defines numerous macros of the form:
1216+
#define INT@\placeholdernc{N}@_MIN @\seebelow@
1217+
#define INT@\placeholdernc{N}@_MAX @\seebelow@
1218+
#define UINT@\placeholdernc{N}@_MAX @\seebelow@
12191219

1220-
\begin{codeblock}
1221-
INT_[FAST LEAST]{8 16 32 64}_MIN
1222-
[U]INT_[FAST LEAST]{8 16 32 64}_MAX
1223-
INT{MAX PTR}_MIN
1224-
[U]INT{MAX PTR}_MAX
1225-
{PTRDIFF SIG_ATOMIC WCHAR WINT}{_MAX _MIN}
1226-
SIZE_MAX
1227-
\end{codeblock}
1220+
#define INT_LEAST@\placeholdernc{N}@_MIN @\seebelow@
1221+
#define INT_LEAST@\placeholdernc{N}@_MAX @\seebelow@
1222+
#define UINT_LEAST@\placeholdernc{N}@_MAX @\seebelow@
12281223

1229-
plus function macros of the form:
1224+
#define INT_FAST@\placeholdernc{N}@_MIN @\seebelow@
1225+
#define INT_FAST@\placeholdernc{N}@_MAX @\seebelow@
1226+
#define UINT_FAST@\placeholdernc{N}@_MAX @\seebelow@
12301227

1231-
\begin{codeblock}
1232-
[U]INT{8 16 32 64 MAX}_C
1228+
#define INTPTR_MIN @\seebelow@
1229+
#define INTPTR_MAX @\seebelow@
1230+
#define UINTPTR_MAX @\seebelow@
1231+
1232+
#define INTMAX_MIN @\seebelow@
1233+
#define INTMAX_MAX @\seebelow@
1234+
#define UINTMAX_MAX @\seebelow@
1235+
1236+
#define PTRDIFF_MIN @\seebelow@
1237+
#define PTRDIFF_MAX @\seebelow@
1238+
#define SIG_ATOMIC_MIN @\seebelow@
1239+
#define SIG_ATOMIC_MAX @\seebelow@
1240+
#define SIZE_MAX @\seebelow@
1241+
1242+
#define WCHAR_MIN @\seebelow@
1243+
#define WCHAR_MAX @\seebelow@
1244+
#define WINT_MIN @\seebelow@
1245+
#define WINT_MAX @\seebelow@
1246+
1247+
#define INT@\placeholdernc{N}@_C(value) @\seebelow@
1248+
#define UINT@\placeholdernc{N}@_C(value) @\seebelow@
1249+
1250+
#define INTMAX_C(value) @\seebelow@
1251+
#define UINTMAX_C(value) @\seebelow@
12331252
\end{codeblock}
12341253

12351254
\pnum
12361255
The header defines all types and macros the same as
12371256
the C standard library header \tcode{<stdint.h>}.
12381257

1258+
\xref ISO C~7.20.
1259+
12391260
\rSec1[support.start.term]{Start and termination}
12401261

12411262
\pnum

0 commit comments

Comments
 (0)