Skip to content

Commit 0f6c4d8

Browse files
authored
[libc][docs] adds macro handling, POSIX status, and validation to docgen (#89421)
docgen now lists macro implementation status in the generated rst files. Adds POSIX definition link property to docgen json API (`posix-definition`) and changes the `defined` property of docgen json API to `c-definition`. Now that docgen's api is getting more specified, adds validation checks to docgen to start codifying the docgen api spec. To make sure this all looks good, I've added POSIX definition links to signal.h as a tester.
1 parent 89e3da8 commit 0f6c4d8

File tree

12 files changed

+1041
-245
lines changed

12 files changed

+1041
-245
lines changed

libc/docs/ctype.rst

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
.. include:: check.rst
22

3-
ctype.h Functions
4-
=================
3+
=======
4+
ctype.h
5+
=======
6+
7+
Functions
8+
=========
59

610
.. list-table::
711
:widths: auto
@@ -10,46 +14,61 @@ ctype.h Functions
1014

1115
* - Function
1216
- Implemented
13-
- Standard
17+
- C23 Standard Section
18+
- POSIX.1-2017 Standard Section
1419
* - isalnum
1520
- |check|
1621
- 7.4.1.1
22+
-
1723
* - isalpha
1824
- |check|
1925
- 7.4.1.2
26+
-
2027
* - isblank
2128
- |check|
2229
- 7.4.1.3
30+
-
2331
* - iscntrl
2432
- |check|
2533
- 7.4.1.4
34+
-
2635
* - isdigit
2736
- |check|
2837
- 7.4.1.5
38+
-
2939
* - isgraph
3040
- |check|
3141
- 7.4.1.6
42+
-
3243
* - islower
3344
- |check|
3445
- 7.4.1.7
46+
-
3547
* - isprint
3648
- |check|
3749
- 7.4.1.8
50+
-
3851
* - ispunct
3952
- |check|
4053
- 7.4.1.9
54+
-
4155
* - isspace
4256
- |check|
4357
- 7.4.1.10
58+
-
4459
* - isupper
4560
- |check|
4661
- 7.4.1.11
62+
-
4763
* - isxdigit
4864
- |check|
4965
- 7.4.1.12
66+
-
5067
* - tolower
5168
- |check|
5269
- 7.4.2.1
70+
-
5371
* - toupper
5472
- |check|
5573
- 7.4.2.2
74+
-

libc/docs/fenv.rst

Lines changed: 114 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
.. include:: check.rst
22

3-
fenv.h Functions
4-
================
3+
======
4+
fenv.h
5+
======
6+
7+
Macros
8+
======
59

610
.. list-table::
711
:widths: auto
@@ -10,55 +14,162 @@ fenv.h Functions
1014

1115
* - Function
1216
- Implemented
13-
- Standard
17+
- C23 Standard Section
18+
- POSIX.1-2017 Standard Section
19+
* - FE_ALL_EXCEPT
20+
- |check|
21+
- 7.6.12
22+
-
23+
* - FE_DEC_DOWNWARD
24+
-
25+
- 7.6.14
26+
-
27+
* - FE_DEC_TONEAREST
28+
-
29+
- 7.6.14
30+
-
31+
* - FE_DEC_TONEARESTFROMZERO
32+
-
33+
- 7.6.14
34+
-
35+
* - FE_DEC_TOWARDZERO
36+
-
37+
- 7.6.14
38+
-
39+
* - FE_DEC_UPWARD
40+
-
41+
- 7.6.14
42+
-
43+
* - FE_DFL_ENV
44+
- |check|
45+
- 7.6.17
46+
-
47+
* - FE_DFL_MODE
48+
-
49+
- 7.6.11
50+
-
51+
* - FE_DIVBYZERO
52+
- |check|
53+
- 7.6.9
54+
-
55+
* - FE_DOWNARD
56+
-
57+
- 7.6.13
58+
-
59+
* - FE_INEXACT
60+
- |check|
61+
- 7.6.9
62+
-
63+
* - FE_INVALID
64+
- |check|
65+
- 7.6.9
66+
-
67+
* - FE_OVERFLOW
68+
- |check|
69+
- 7.6.9
70+
-
71+
* - FE_TONEAREST
72+
- |check|
73+
- 7.6.13
74+
-
75+
* - FE_TONEARESTFROMZERO
76+
-
77+
- 7.6.13
78+
-
79+
* - FE_TOWARDZERO
80+
- |check|
81+
- 7.6.13
82+
-
83+
* - FE_UNDERFLOW
84+
- |check|
85+
- 7.6.9
86+
-
87+
* - FE_UPWARD
88+
- |check|
89+
- 7.6.13
90+
-
91+
* - __STDC_VERSION_FENV_H__
92+
-
93+
- 7.6.5
94+
-
95+
96+
Functions
97+
=========
98+
99+
.. list-table::
100+
:widths: auto
101+
:align: center
102+
:header-rows: 1
103+
104+
* - Function
105+
- Implemented
106+
- C23 Standard Section
107+
- POSIX.1-2017 Standard Section
14108
* - fe_dec_getround
15109
-
16110
- 7.6.5.3
111+
-
17112
* - fe_dec_setround
18113
-
19114
- 7.6.5.6
115+
-
20116
* - feclearexcept
21117
- |check|
22118
- 7.6.4.1
119+
-
23120
* - fegetenv
24121
- |check|
25122
- 7.6.6.1
123+
-
26124
* - fegetexceptflag
27125
- |check|
28126
- 7.6.4.2
127+
-
29128
* - fegetmode
30129
-
31130
- 7.6.5.1
131+
-
32132
* - fegetround
33133
- |check|
34134
- 7.6.5.2
135+
-
35136
* - feholdexcept
36137
- |check|
37138
- 7.6.6.2
139+
-
38140
* - feraiseexcept
39141
- |check|
40142
- 7.6.4.3
143+
-
41144
* - fesetenv
42145
- |check|
43146
- 7.6.6.3
147+
-
44148
* - fesetexcept
45149
- |check|
46150
- 7.6.4.4
151+
-
47152
* - fesetexceptflag
48153
- |check|
49154
- 7.6.4.5
155+
-
50156
* - fesetmode
51157
-
52158
- 7.6.5.4
159+
-
53160
* - fesetround
54161
- |check|
55162
- 7.6.5.5
163+
-
56164
* - fetestexcept
57165
- |check|
58166
- 7.6.4.7
167+
-
59168
* - fetestexceptflag
60169
- |check|
61170
- 7.6.4.6
171+
-
62172
* - feupdateenv
63173
- |check|
64174
- 7.6.6.4
175+
-

0 commit comments

Comments
 (0)