Skip to content

Commit c047a5b

Browse files
[libc][docgen] simplify posix links (#119595)
Usually posix functions have individual doc pages, and each header has its own list of required macro definitions. Use a simpler key of "in-latest-posix" to signal that the URL convention can be followed. Add support for a "removed-in-posix-2008" key which will link to the 2004 docs for functions like bcmp, bcopy, bzero, index, and rindex from strings.h. I don't want to add all of these links for pthreads.h, so automating this will make documenting these go much faster.
1 parent 139e69b commit c047a5b

30 files changed

+889
-524
lines changed

libc/docs/headers/assert.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ Macros
1515
* - Macro
1616
- Implemented
1717
- C23 Standard Section
18-
- POSIX.1-2024 Standard Section
18+
- POSIX Docs
1919
* - __STDC_VERSION_ASSERT_H__
2020
- |check|
2121
- 7.2.1
2222
-
2323
* - assert
2424
-
2525
- 7.2.1
26-
-
26+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/assert.h.html>`__
2727

libc/docs/headers/ctype.rst

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,60 +15,116 @@ Functions
1515
* - Function
1616
- Implemented
1717
- C23 Standard Section
18-
- POSIX.1-2024 Standard Section
18+
- POSIX Docs
1919
* - isalnum
2020
- |check|
2121
- 7.4.1.1
22+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isalnum.html>`__
23+
* - isalnum_l
24+
- |check|
2225
-
26+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isalnum_l.html>`__
2327
* - isalpha
2428
- |check|
2529
- 7.4.1.2
30+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isalpha.html>`__
31+
* - isalpha_l
32+
- |check|
2633
-
34+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isalpha_l.html>`__
2735
* - isblank
2836
- |check|
2937
- 7.4.1.3
38+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isblank.html>`__
39+
* - isblank_l
40+
- |check|
3041
-
42+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isblank_l.html>`__
3143
* - iscntrl
3244
- |check|
3345
- 7.4.1.4
46+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/iscntrl.html>`__
47+
* - iscntrl_l
48+
- |check|
3449
-
50+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/iscntrl_l.html>`__
3551
* - isdigit
3652
- |check|
3753
- 7.4.1.5
54+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isdigit.html>`__
55+
* - isdigit_l
56+
- |check|
3857
-
58+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isdigit_l.html>`__
3959
* - isgraph
4060
- |check|
4161
- 7.4.1.6
62+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isgraph.html>`__
63+
* - isgraph_l
64+
- |check|
4265
-
66+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isgraph_l.html>`__
4367
* - islower
4468
- |check|
4569
- 7.4.1.7
70+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/islower.html>`__
71+
* - islower_l
72+
- |check|
4673
-
74+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/islower_l.html>`__
4775
* - isprint
4876
- |check|
4977
- 7.4.1.8
78+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isprint.html>`__
79+
* - isprint_l
80+
- |check|
5081
-
82+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isprint_l.html>`__
5183
* - ispunct
5284
- |check|
5385
- 7.4.1.9
86+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/ispunct.html>`__
87+
* - ispunct_l
88+
- |check|
5489
-
90+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/ispunct_l.html>`__
5591
* - isspace
5692
- |check|
5793
- 7.4.1.10
94+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isspace.html>`__
95+
* - isspace_l
96+
- |check|
5897
-
98+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isspace_l.html>`__
5999
* - isupper
60100
- |check|
61101
- 7.4.1.11
102+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isupper.html>`__
103+
* - isupper_l
104+
- |check|
62105
-
106+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isupper_l.html>`__
63107
* - isxdigit
64108
- |check|
65109
- 7.4.1.12
110+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isxdigit.html>`__
111+
* - isxdigit_l
112+
- |check|
66113
-
114+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/isxdigit_l.html>`__
67115
* - tolower
68116
- |check|
69117
- 7.4.2.1
118+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/tolower.html>`__
119+
* - tolower_l
120+
- |check|
70121
-
122+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/tolower_l.html>`__
71123
* - toupper
72124
- |check|
73125
- 7.4.2.2
126+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/toupper.html>`__
127+
* - toupper_l
128+
- |check|
74129
-
130+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/toupper_l.html>`__

libc/docs/headers/errno.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ Macros
1515
* - Macro
1616
- Implemented
1717
- C23 Standard Section
18-
- POSIX.1-2024 Standard Section
18+
- POSIX Docs
1919
* - EDOM
2020
-
2121
- 7.5
22-
-
22+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html>`__
2323
* - EILSEQ
2424
-
2525
- 7.5
26-
-
26+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html>`__
2727
* - ERANGE
2828
-
2929
- 7.5
30-
-
30+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html>`__
3131
* - errno
3232
-
3333
- 7.5
34-
-
34+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/errno.h.html>`__
3535

libc/docs/headers/fenv.rst

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Macros
1515
* - Macro
1616
- Implemented
1717
- C23 Standard Section
18-
- POSIX.1-2024 Standard Section
18+
- POSIX Docs
1919
* - FE_ALL_EXCEPT
2020
- |check|
2121
- 7.6.12
22-
-
22+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
2323
* - FE_DEC_DOWNWARD
2424
-
2525
- 7.6.14
@@ -43,51 +43,51 @@ Macros
4343
* - FE_DFL_ENV
4444
- |check|
4545
- 7.6.17
46-
-
46+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
4747
* - FE_DFL_MODE
4848
-
4949
- 7.6.11
5050
-
5151
* - FE_DIVBYZERO
5252
- |check|
5353
- 7.6.9
54-
-
55-
* - FE_DOWNARD
56-
-
54+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
55+
* - FE_DOWNWARD
56+
- |check|
5757
- 7.6.13
58-
-
58+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
5959
* - FE_INEXACT
6060
- |check|
6161
- 7.6.9
62-
-
62+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
6363
* - FE_INVALID
6464
- |check|
6565
- 7.6.9
66-
-
66+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
6767
* - FE_OVERFLOW
6868
- |check|
6969
- 7.6.9
70-
-
70+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
7171
* - FE_TONEAREST
7272
- |check|
7373
- 7.6.13
74-
-
74+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
7575
* - FE_TONEARESTFROMZERO
7676
-
7777
- 7.6.13
7878
-
7979
* - FE_TOWARDZERO
8080
- |check|
8181
- 7.6.13
82-
-
82+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
8383
* - FE_UNDERFLOW
8484
- |check|
8585
- 7.6.9
86-
-
86+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
8787
* - FE_UPWARD
8888
- |check|
8989
- 7.6.13
90-
-
90+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/fenv.h.html>`__
9191
* - __STDC_VERSION_FENV_H__
9292
-
9393
- 7.6.5
@@ -104,7 +104,7 @@ Functions
104104
* - Function
105105
- Implemented
106106
- C23 Standard Section
107-
- POSIX.1-2024 Standard Section
107+
- POSIX Docs
108108
* - fe_dec_getround
109109
-
110110
- 7.6.5.3
@@ -116,60 +116,60 @@ Functions
116116
* - feclearexcept
117117
- |check|
118118
- 7.6.4.1
119-
-
119+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feclearexcept.html>`__
120120
* - fegetenv
121121
- |check|
122122
- 7.6.6.1
123-
-
123+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetenv.html>`__
124124
* - fegetexceptflag
125125
- |check|
126126
- 7.6.4.2
127-
-
127+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetexceptflag.html>`__
128128
* - fegetmode
129129
-
130130
- 7.6.5.1
131131
-
132132
* - fegetround
133133
- |check|
134134
- 7.6.5.2
135-
-
135+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fegetround.html>`__
136136
* - feholdexcept
137137
- |check|
138138
- 7.6.6.2
139-
-
139+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feholdexcept.html>`__
140140
* - feraiseexcept
141141
- |check|
142142
- 7.6.4.3
143-
-
143+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feraiseexcept.html>`__
144144
* - fesetenv
145145
- |check|
146146
- 7.6.6.3
147-
-
147+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fesetenv.html>`__
148148
* - fesetexcept
149149
- |check|
150150
- 7.6.4.4
151151
-
152152
* - fesetexceptflag
153153
- |check|
154154
- 7.6.4.5
155-
-
155+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fesetexceptflag.html>`__
156156
* - fesetmode
157157
-
158158
- 7.6.5.4
159159
-
160160
* - fesetround
161161
- |check|
162162
- 7.6.5.5
163-
-
163+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fesetround.html>`__
164164
* - fetestexcept
165165
- |check|
166166
- 7.6.4.7
167-
-
167+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fetestexcept.html>`__
168168
* - fetestexceptflag
169169
- |check|
170170
- 7.6.4.6
171171
-
172172
* - feupdateenv
173173
- |check|
174174
- 7.6.6.4
175-
-
175+
- `POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/feupdateenv.html>`__

0 commit comments

Comments
 (0)