Skip to content

Commit 7329086

Browse files
[libc][docs] stub out assert, errno, and locale (llvm#118852)
[libc][docs] stub out assert, errno, and locale These were the remaining c89 library headers (besides string.h and stdlib.h; I will split strings.rst in a follow up commit). The macro support detection in docgen doesn't quite work for some of these headers. Add the stubs for these headers for now, and fix up docgen later. See the "NIST publication": Link: https://www.open-std.org/jtc1/sc22/wg14/www/projects.html
1 parent a9aff44 commit 7329086

File tree

7 files changed

+184
-0
lines changed

7 files changed

+184
-0
lines changed

libc/docs/headers/assert.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. include:: ../check.rst
2+
3+
========
4+
assert.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-2024 Standard Section
19+
* - __STDC_VERSION_ASSERT_H__
20+
- |check|
21+
- 7.2.1
22+
-
23+
* - assert
24+
-
25+
- 7.2.1
26+
-
27+

libc/docs/headers/errno.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.. include:: ../check.rst
2+
3+
=======
4+
errno.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-2024 Standard Section
19+
* - EDOM
20+
-
21+
- 7.5
22+
-
23+
* - EILSEQ
24+
-
25+
- 7.5
26+
-
27+
* - ERANGE
28+
-
29+
- 7.5
30+
-
31+
* - errno
32+
-
33+
- 7.5
34+
-
35+

libc/docs/headers/index.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ Implementation Status
44
.. toctree::
55
:maxdepth: 1
66

7+
assert
78
complex
89
ctype
10+
errno
911
fenv
12+
locale
1013
math/index.rst
1114
search
1215
setjmp

libc/docs/headers/locale.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. include:: ../check.rst
2+
3+
========
4+
locale.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-2024 Standard Section
19+
* - LC_ALL
20+
- |check|
21+
- 7.11
22+
-
23+
* - LC_COLLATE
24+
- |check|
25+
- 7.11
26+
-
27+
* - LC_CTYPE
28+
- |check|
29+
- 7.11
30+
-
31+
* - LC_MONETARY
32+
- |check|
33+
- 7.11
34+
-
35+
* - LC_NUMERIC
36+
- |check|
37+
- 7.11
38+
-
39+
* - LC_TIME
40+
- |check|
41+
- 7.11
42+
-
43+
44+
Functions
45+
=========
46+
47+
.. list-table::
48+
:widths: auto
49+
:align: center
50+
:header-rows: 1
51+
52+
* - Function
53+
- Implemented
54+
- C23 Standard Section
55+
- POSIX.1-2024 Standard Section
56+
* - localeconv
57+
- |check|
58+
- 7.11.2.1
59+
-
60+
* - setlocale
61+
- |check|
62+
- 7.11.1.1
63+
-

libc/utils/docgen/assert.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"macros": {
3+
"__STDC_VERSION_ASSERT_H__": {
4+
"c-definition": "7.2.1"
5+
},
6+
"assert": {
7+
"c-definition": "7.2.1"
8+
}
9+
}
10+
}

libc/utils/docgen/errno.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"macros": {
3+
"EDOM": {
4+
"c-definition": "7.5"
5+
},
6+
"EILSEQ": {
7+
"c-definition": "7.5"
8+
},
9+
"ERANGE": {
10+
"c-definition": "7.5"
11+
},
12+
"errno": {
13+
"c-definition": "7.5"
14+
}
15+
}
16+
}

libc/utils/docgen/locale.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"macros": {
3+
"LC_ALL": {
4+
"c-definition": "7.11"
5+
},
6+
"LC_COLLATE": {
7+
"c-definition": "7.11"
8+
},
9+
"LC_CTYPE": {
10+
"c-definition": "7.11"
11+
},
12+
"LC_MONETARY": {
13+
"c-definition": "7.11"
14+
},
15+
"LC_NUMERIC": {
16+
"c-definition": "7.11"
17+
},
18+
"LC_TIME": {
19+
"c-definition": "7.11"
20+
}
21+
},
22+
"functions": {
23+
"setlocale": {
24+
"c-definition": "7.11.1.1"
25+
},
26+
"localeconv": {
27+
"c-definition": "7.11.2.1"
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)