[libc-commits] [libc] [libc][docs] generate docs for ctype.h #87833 (PR #87946)
Zander Dumont-Strom via libc-commits
libc-commits at lists.llvm.org
Mon Apr 8 09:56:53 PDT 2024
https://github.com/zdumonts updated https://github.com/llvm/llvm-project/pull/87946
>From 4de9438bdc9b145de7e899d63f80c91abfda9c92 Mon Sep 17 00:00:00 2001
From: Zander Dumont-Strom <zdumonts at ucsc.edu>
Date: Sun, 7 Apr 2024 14:43:34 -0700
Subject: [PATCH 1/3] [libc][docs] generate docs for ctype.h #87833
---
libc/docs/ctype.rst | 53 ++++++++++++++++++++++++++++++++++++
libc/docs/index.rst | 1 +
libc/utils/docgen/ctype.json | 45 ++++++++++++++++++++++++++++--
3 files changed, 96 insertions(+), 3 deletions(-)
create mode 100644 libc/docs/ctype.rst
diff --git a/libc/docs/ctype.rst b/libc/docs/ctype.rst
new file mode 100644
index 00000000000000..c2897e0c58dc1d
--- /dev/null
+++ b/libc/docs/ctype.rst
@@ -0,0 +1,53 @@
+ctype.h Functions
+=================
+
+.. list-table::
+ :widths: auto
+ :align: center
+ :header-rows: 1
+
+ * - Function
+ - Implemented
+ - Standard
+ * - isalnum
+ - |check|
+ - 7.4.1.1
+ * - isalpha
+ - |check|
+ - 7.4.1.2
+ * - isblank
+ - |check|
+ - 7.4.1.3
+ * - iscntrl
+ - |check|
+ - 7.4.1.4
+ * - isdigit
+ - |check|
+ - 7.4.1.5
+ * - isgraph
+ - |check|
+ - 7.4.1.6
+ * - islower
+ - |check|
+ - 7.4.1.7
+ * - isprint
+ - |check|
+ - 7.4.1.8
+ * - ispunct
+ - |check|
+ - 7.4.1.9
+ * - isspace
+ - |check|
+ - 7.4.1.10
+ * - isupper
+ - |check|
+ - 7.4.1.11
+ * - isxdigit
+ - |check|
+ - 7.4.1.12
+ * - tolower
+ - |check|
+ - 7.4.2.1
+ * - toupper
+ - |check|
+ - 7.4.2.2
diff --git a/libc/docs/index.rst b/libc/docs/index.rst
index 65ccb91e92ffe1..8470c8d9287c2f 100644
--- a/libc/docs/index.rst
+++ b/libc/docs/index.rst
@@ -69,6 +69,7 @@ stages there is no ABI stability in any form.
fenv
libc_search
c23
+ ctype
.. toctree::
:hidden:
diff --git a/libc/utils/docgen/ctype.json b/libc/utils/docgen/ctype.json
index 4102c2dd110911..233ed36bc8fb64 100644
--- a/libc/utils/docgen/ctype.json
+++ b/libc/utils/docgen/ctype.json
@@ -1,7 +1,46 @@
{
"functions": {
- "isalnum": null,
- "isalpha": null,
- "isblank": null
+ "isalnum": {
+ "defined": "7.4.1.1"
+ },
+ "isalpha": {
+ "defined": "7.4.1.2"
+ },
+ "isblank": {
+ "defined": "7.4.1.3"
+ },
+ "iscntrl": {
+ "defined": "7.4.1.4"
+ },
+ "isdigit": {
+ "defined": "7.4.1.5"
+ },
+ "isgraph": {
+ "defined": "7.4.1.6"
+ },
+ "islower": {
+ "defined": "7.4.1.7"
+ },
+ "isprint": {
+ "defined": "7.4.1.8"
+ },
+ "ispunct": {
+ "defined": "7.4.1.9"
+ },
+ "isspace": {
+ "defined": "7.4.1.10"
+ },
+ "isupper": {
+ "defined": "7.4.1.11"
+ },
+ "isxdigit": {
+ "defined": "7.4.1.12"
+ },
+ "tolower" : {
+ "defined": "7.4.2.1"
+ },
+ "toupper": {
+ "defined": "7.4.2.2"
+ }
}
}
>From c6f50852a93e9b0068ab708ef960d4eff80ebbff Mon Sep 17 00:00:00 2001
From: Zander Dumont-Strom <zdumonts at ucsc.edu>
Date: Mon, 8 Apr 2024 09:52:38 -0700
Subject: [PATCH 2/3] fix indentation
---
libc/utils/docgen/ctype.json | 88 ++++++++++++++++++------------------
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/libc/utils/docgen/ctype.json b/libc/utils/docgen/ctype.json
index 233ed36bc8fb64..eb9d5951ca42c5 100644
--- a/libc/utils/docgen/ctype.json
+++ b/libc/utils/docgen/ctype.json
@@ -1,46 +1,46 @@
-{
- "functions": {
- "isalnum": {
- "defined": "7.4.1.1"
- },
- "isalpha": {
- "defined": "7.4.1.2"
- },
- "isblank": {
- "defined": "7.4.1.3"
- },
- "iscntrl": {
- "defined": "7.4.1.4"
- },
- "isdigit": {
- "defined": "7.4.1.5"
- },
- "isgraph": {
- "defined": "7.4.1.6"
- },
- "islower": {
- "defined": "7.4.1.7"
- },
- "isprint": {
- "defined": "7.4.1.8"
- },
- "ispunct": {
- "defined": "7.4.1.9"
- },
- "isspace": {
- "defined": "7.4.1.10"
- },
- "isupper": {
- "defined": "7.4.1.11"
- },
- "isxdigit": {
- "defined": "7.4.1.12"
- },
- "tolower" : {
- "defined": "7.4.2.1"
- },
- "toupper": {
- "defined": "7.4.2.2"
+{
+ "functions": {
+ "isalnum": {
+ "defined": "7.4.1.1"
+ },
+ "isalpha": {
+ "defined": "7.4.1.2"
+ },
+ "isblank": {
+ "defined": "7.4.1.3"
+ },
+ "iscntrl": {
+ "defined": "7.4.1.4"
+ },
+ "isdigit": {
+ "defined": "7.4.1.5"
+ },
+ "isgraph": {
+ "defined": "7.4.1.6"
+ },
+ "islower": {
+ "defined": "7.4.1.7"
+ },
+ "isprint": {
+ "defined": "7.4.1.8"
+ },
+ "ispunct": {
+ "defined": "7.4.1.9"
+ },
+ "isspace": {
+ "defined": "7.4.1.10"
+ },
+ "isupper": {
+ "defined": "7.4.1.11"
+ },
+ "isxdigit": {
+ "defined": "7.4.1.12"
+ },
+ "tolower" : {
+ "defined": "7.4.2.1"
+ },
+ "toupper": {
+ "defined": "7.4.2.2"
+ }
}
- }
}
>From e4ffe65a134e6276b5bd2c48cc921a4e02586df6 Mon Sep 17 00:00:00 2001
From: Zander Dumont-Strom <zdumonts at ucsc.edu>
Date: Mon, 8 Apr 2024 09:56:41 -0700
Subject: [PATCH 3/3] fix tab size
---
libc/utils/docgen/ctype.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libc/utils/docgen/ctype.json b/libc/utils/docgen/ctype.json
index eb9d5951ca42c5..d6ecf35ee2cf81 100644
--- a/libc/utils/docgen/ctype.json
+++ b/libc/utils/docgen/ctype.json
@@ -1,4 +1,4 @@
-{
+{
"functions": {
"isalnum": {
"defined": "7.4.1.1"
More information about the libc-commits
mailing list