Skip to content

Commit

Permalink
[libc][docs] adds macro handling, POSIX status, and validation to doc…
Browse files Browse the repository at this point in the history
…gen (#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.
  • Loading branch information
Flandini authored May 23, 2024
1 parent 89e3da8 commit 0f6c4d8
Show file tree
Hide file tree
Showing 12 changed files with 1,041 additions and 245 deletions.
25 changes: 22 additions & 3 deletions libc/docs/ctype.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.. include:: check.rst

ctype.h Functions
=================
=======
ctype.h
=======

Functions
=========

.. list-table::
:widths: auto
Expand All @@ -10,46 +14,61 @@ ctype.h Functions

* - Function
- Implemented
- Standard
- C23 Standard Section
- POSIX.1-2017 Standard Section
* - 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
-
117 changes: 114 additions & 3 deletions libc/docs/fenv.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
.. include:: check.rst

fenv.h Functions
================
======
fenv.h
======

Macros
======

.. list-table::
:widths: auto
Expand All @@ -10,55 +14,162 @@ fenv.h Functions

* - Function
- Implemented
- Standard
- C23 Standard Section
- POSIX.1-2017 Standard Section
* - FE_ALL_EXCEPT
- |check|
- 7.6.12
-
* - FE_DEC_DOWNWARD
-
- 7.6.14
-
* - FE_DEC_TONEAREST
-
- 7.6.14
-
* - FE_DEC_TONEARESTFROMZERO
-
- 7.6.14
-
* - FE_DEC_TOWARDZERO
-
- 7.6.14
-
* - FE_DEC_UPWARD
-
- 7.6.14
-
* - FE_DFL_ENV
- |check|
- 7.6.17
-
* - FE_DFL_MODE
-
- 7.6.11
-
* - FE_DIVBYZERO
- |check|
- 7.6.9
-
* - FE_DOWNARD
-
- 7.6.13
-
* - FE_INEXACT
- |check|
- 7.6.9
-
* - FE_INVALID
- |check|
- 7.6.9
-
* - FE_OVERFLOW
- |check|
- 7.6.9
-
* - FE_TONEAREST
- |check|
- 7.6.13
-
* - FE_TONEARESTFROMZERO
-
- 7.6.13
-
* - FE_TOWARDZERO
- |check|
- 7.6.13
-
* - FE_UNDERFLOW
- |check|
- 7.6.9
-
* - FE_UPWARD
- |check|
- 7.6.13
-
* - __STDC_VERSION_FENV_H__
-
- 7.6.5
-

Functions
=========

.. list-table::
:widths: auto
:align: center
:header-rows: 1

* - Function
- Implemented
- C23 Standard Section
- POSIX.1-2017 Standard Section
* - fe_dec_getround
-
- 7.6.5.3
-
* - fe_dec_setround
-
- 7.6.5.6
-
* - feclearexcept
- |check|
- 7.6.4.1
-
* - fegetenv
- |check|
- 7.6.6.1
-
* - fegetexceptflag
- |check|
- 7.6.4.2
-
* - fegetmode
-
- 7.6.5.1
-
* - fegetround
- |check|
- 7.6.5.2
-
* - feholdexcept
- |check|
- 7.6.6.2
-
* - feraiseexcept
- |check|
- 7.6.4.3
-
* - fesetenv
- |check|
- 7.6.6.3
-
* - fesetexcept
- |check|
- 7.6.4.4
-
* - fesetexceptflag
- |check|
- 7.6.4.5
-
* - fesetmode
-
- 7.6.5.4
-
* - fesetround
- |check|
- 7.6.5.5
-
* - fetestexcept
- |check|
- 7.6.4.7
-
* - fetestexceptflag
- |check|
- 7.6.4.6
-
* - feupdateenv
- |check|
- 7.6.6.4
-
Loading

0 comments on commit 0f6c4d8

Please sign in to comment.