Skip to content

Commit 659834d

Browse files
docgen refresh (#118709)
- **[libc][docgen] Use Macro for macro table name** - **fix setjmp json, otherwise can't regen** - **regen all docs**
1 parent 1ef9410 commit 659834d

File tree

7 files changed

+43
-16
lines changed

7 files changed

+43
-16
lines changed

libc/docs/fenv.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/setjmp.rst

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

3-
setjmp.h Functions
4-
==================
3+
========
4+
setjmp.h
5+
========
6+
7+
Macros
8+
======
9+
10+
.. list-table::
11+
:widths: auto
12+
:align: center
13+
:header-rows: 1
14+
15+
* - Macro
16+
- Implemented
17+
- C23 Standard Section
18+
- POSIX.1-2017 Standard Section
19+
* - __STDC_VERSION_SETJMP_H__
20+
-
21+
- 7.13.2
22+
-
23+
24+
Functions
25+
=========
526

627
.. list-table::
728
:widths: auto
@@ -10,7 +31,13 @@ setjmp.h Functions
1031

1132
* - Function
1233
- Implemented
13-
- Standard
34+
- C23 Standard Section
35+
- POSIX.1-2017 Standard Section
1436
* - longjmp
1537
- |check|
1638
- 7.13.2.1
39+
-
40+
* - setjmp
41+
- |check|
42+
- 7.13.1.1
43+
-

libc/docs/signal.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/stdbit.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/docs/threads.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Macros
1212
:align: center
1313
:header-rows: 1
1414

15-
* - Function
15+
* - Macro
1616
- Implemented
1717
- C23 Standard Section
1818
- POSIX.1-2017 Standard Section

libc/utils/docgen/docgen.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,15 @@ def load_api(header: Header) -> Dict:
9292
return json.loads(api)
9393

9494

95-
def print_tbl_dir():
95+
def print_tbl_dir(name):
9696
print(
9797
f"""
9898
.. list-table::
9999
:widths: auto
100100
:align: center
101101
:header-rows: 1
102102
103-
* - Function
103+
* - {name}
104104
- Implemented
105105
- C23 Standard Section
106106
- POSIX.1-2017 Standard Section"""
@@ -112,7 +112,7 @@ def print_functions_rst(header: Header, functions: Dict):
112112
print(tbl_hdr)
113113
print("=" * len(tbl_hdr))
114114

115-
print_tbl_dir()
115+
print_tbl_dir("Function")
116116

117117
for name in sorted(functions.keys()):
118118
print(f" * - {name}")
@@ -138,7 +138,7 @@ def print_macros_rst(header: Header, macros: Dict):
138138
print(tbl_hdr)
139139
print("=" * len(tbl_hdr))
140140

141-
print_tbl_dir()
141+
print_tbl_dir("Macro")
142142

143143
for name in sorted(macros.keys()):
144144
print(f" * - {name}")

libc/utils/docgen/setjmp.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"macros": {
33
"__STDC_VERSION_SETJMP_H__": {
4-
"defined": "7.13.2"
5-
},
6-
"setjmp": {
7-
"defined": "7.13.1.1"
4+
"c-definition": "7.13.2"
85
}
96
},
107
"functions": {
8+
"setjmp": {
9+
"c-definition": "7.13.1.1"
10+
},
1111
"longjmp": {
12-
"defined": "7.13.2.1"
12+
"c-definition": "7.13.2.1"
1313
}
1414
}
1515
}

0 commit comments

Comments
 (0)