[libc-commits] [libc] 998d1eb - [libc][cleanup] Docs clean up
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Sat Oct 15 08:30:00 PDT 2022
Author: Jeff Bailey
Date: 2022-10-15T15:29:48Z
New Revision: 998d1ebb27543501fb4d2665d9c19b9dcf9f679d
URL: https://github.com/llvm/llvm-project/commit/998d1ebb27543501fb4d2665d9c19b9dcf9f679d
DIFF: https://github.com/llvm/llvm-project/commit/998d1ebb27543501fb4d2665d9c19b9dcf9f679d.diff
LOG: [libc][cleanup] Docs clean up
* Make consistent heading names
* Factor out |check| into an include for reuse
* Use it everywhere (No more YES or UTF-8)
* Remove unneeded summary from pages. People know why they're there.
* Ensure source location headers everywhere.
Differential Revision: https://reviews.llvm.org/D136016
Added:
libc/docs/check.rst
Modified:
libc/docs/date_and_time.rst
libc/docs/math.rst
libc/docs/stdio.rst
libc/docs/strings.rst
Removed:
################################################################################
diff --git a/libc/docs/check.rst b/libc/docs/check.rst
new file mode 100644
index 0000000000000..750ab605308e8
--- /dev/null
+++ b/libc/docs/check.rst
@@ -0,0 +1,6 @@
+.. role:: raw-html(raw)
+ :format: html
+
+.. |check| replace:: :raw-html:`✅`
+
+
diff --git a/libc/docs/date_and_time.rst b/libc/docs/date_and_time.rst
index 1e001a72c004e..7a2b8975285b1 100644
--- a/libc/docs/date_and_time.rst
+++ b/libc/docs/date_and_time.rst
@@ -1,41 +1,54 @@
-=============
-Date and Time
-=============
+=======================
+Date and Time Functions
+=======================
- ============= ===
- Function_Name C99
- ============= ===
- clock
- mktime ✅
- time
- asctime ✅
- ctime
- gmtime ✅
- localtime
- strftime
- ============= ===
+.. include:: check.rst
-=================== =====
+---------------
+Source location
+---------------
+
+- The main source for string functions is located at:
+ ``libc/src/time``
+
+---------------------
+Implementation Status
+---------------------
+
+============= =======
+Function_Name C99
+============= =======
+clock
+mktime |check|
+time
+asctime |check|
+ctime
+gmtime |check|
+localtime
+strftime
+============= =======
+
+=================== =======
Function_Name POSIX
-=================== =====
-asctime ✅
-asctime_r ✅
+=================== =======
+asctime |check|
+asctime_r |check|
clock
clock_getcpuclockid
clock_getres
-clock_gettime ✅
+clock_gettime |check|
clock_nanosleep
clock_settime
ctime
ctime_r
diff time
getdate
-gmtime ✅
-gmtime_r ✅
+gmtime |check|
+gmtime_r |check|
localtime
localtime_r
-mktime ✅
-nanosleep ✅
+mktime |check|
+nanosleep |check|
strftime
strptime
time
@@ -45,5 +58,5 @@ timer_gettime
timer_getoverrun
timer_settime
tzset
-=================== =====
+=================== =======
diff --git a/libc/docs/math.rst b/libc/docs/math.rst
index fcf9d72b5fd42..42dfef748e143 100644
--- a/libc/docs/math.rst
+++ b/libc/docs/math.rst
@@ -1,21 +1,19 @@
-===========================
-Math Functions in LLVM-libc
-===========================
+==============
+Math Functions
+==============
-.. role:: raw-html(raw)
- :format: html
-
-.. |check| replace:: :raw-html:`✅`
+.. include:: check.rst
.. contents:: Table of Contents
:depth: 4
:local:
-Summary
-=======
+Source Locations
+================
-* This document tracks the status of the implementation of math functions in
- LLVM libc.
+- The main source is located at: `libc/src/math <https://github.com/llvm/llvm-project/tree/main/libc/src/math>`_.
+- The tests are located at: `libc/test/src/math <https://github.com/llvm/llvm-project/tree/main/libc/test/src/math>`_.
+- The floating point utilities are located at: `libc/src/__support/FPUtil <https://github.com/llvm/llvm-project/tree/main/libc/src/__support/FPUtil>`_.
Implementation Requirements / Goals
===================================
@@ -48,13 +46,6 @@ Implementation Requirements / Goals
platforms.
-Source Locations
-================
-
-- The main source is located at: `libc/src/math <https://github.com/llvm/llvm-project/tree/main/libc/src/math>`_.
-- The tests are located at: `libc/test/src/math <https://github.com/llvm/llvm-project/tree/main/libc/test/src/math>`_.
-- The floating point utilities are located at: `libc/src/__support/FPUtil <https://github.com/llvm/llvm-project/tree/main/libc/src/__support/FPUtil>`_.
-
Add a new math function to LLVM libc
====================================
diff --git a/libc/docs/stdio.rst b/libc/docs/stdio.rst
index 14067eb40958b..b0ffd67d69518 100644
--- a/libc/docs/stdio.rst
+++ b/libc/docs/stdio.rst
@@ -1,13 +1,8 @@
-=============================
-StdIO Functions in LLVM-libc
-=============================
-
--------
-Summary
--------
+===============
+StdIO Functions
+===============
-This document tracks the status of the implementation of stdio functions in LLVM
-Libc.
+.. include:: check.rst
---------------
Source location
@@ -44,23 +39,23 @@ the ``FILE`` object is only available on linux.
============= =========
Function_Name Available
============= =========
-fopen YES
+fopen |check|
freopen
-fclose YES
-fflush YES
+fclose |check|
+fflush |check|
setbuf
setvbuf
ftell
fgetpos
-fseek YES
+fseek |check|
fsetpos
rewind
tmpfile
-clearerr YES
-feof YES
-ferror YES
-flockfile YES
-funlockfile YES
+clearerr |check|
+feof |check|
+ferror |check|
+flockfile |check|
+funlockfile |check|
============= =========
Operations on system files
@@ -72,7 +67,7 @@ These functions operate on files on the host's system, without using the
============= =========
Function_Name Available
============= =========
-remove YES
+remove |check|
rename
tmpnam
============= =========
@@ -89,10 +84,10 @@ Function_Name Available
(f)getc
fgets
getchar
-fread YES
+fread |check|
(f)putc
-(f)puts YES
+(f)puts |check|
putchar
-fwrite YES
+fwrite |check|
ungetc
============= =========
diff --git a/libc/docs/strings.rst b/libc/docs/strings.rst
index df0f6e1ffa18b..c475134937861 100644
--- a/libc/docs/strings.rst
+++ b/libc/docs/strings.rst
@@ -1,14 +1,8 @@
-=============================
-String Functions in LLVM-libc
-=============================
+================
+String Functions
+================
--------
-Summary
--------
-
-This site tracks the status of the implementation of string functions in LLVM
-Libc. This includes a few extra functions that are not in string.h, such as
-functions converting strings to numbers.
+.. include:: check.rst
---------------
Source location
@@ -40,12 +34,12 @@ Primary memory functions
============= =========
Function Name Available
============= =========
-bzero YES
-bcmp YES
-memcpy YES
-memset YES
-memcmp YES
-memmove YES
+bzero |check|
+bcmp |check|
+memcpy |check|
+memset |check|
+memcmp |check|
+memmove |check|
============= =========
@@ -55,10 +49,10 @@ Other Raw Memory Functions
============= =========
Function Name Available
============= =========
-memchr YES
-memrchr YES
-memccpy YES
-mempcpy YES
+memchr |check|
+memrchr |check|
+memccpy |check|
+mempcpy |check|
============= =========
String Memory Functions
@@ -67,14 +61,14 @@ String Memory Functions
============= =========
Function Name Available
============= =========
-stpcpy YES
-stpncpy YES
-strcpy YES
-strncpy YES
-strcat YES
-strncat YES
-strdup YES
-strndup YES
+stpcpy |check|
+stpncpy |check|
+strcpy |check|
+strncpy |check|
+strcat |check|
+strncat |check|
+strdup |check|
+strndup |check|
============= =========
String Examination Functions
@@ -83,18 +77,18 @@ String Examination Functions
============= =========
Function Name Available
============= =========
-strlen YES
-strnlen YES
-strcmp YES
-strncmp YES
-strchr YES
-strrchr YES
-strspn YES
-strcspn YES
-strpbrk YES
-strstr YES
-strtok YES
-strtok_r YES
+strlen |check|
+strnlen |check|
+strcmp |check|
+strncmp |check|
+strchr |check|
+strrchr |check|
+strspn |check|
+strcspn |check|
+strpbrk |check|
+strstr |check|
+strtok |check|
+strtok_r |check|
============= =========
String Conversion Functions
@@ -119,19 +113,19 @@ with LLVM-libc built on 2022-04-14 and Debian GLibc version 2.33-6. The targets
============= =========
Function Name Available
============= =========
-atof YES
-atoi YES
-atol YES
-atoll YES
-strtol YES
-strtoll YES
-strtoul YES
-strtoull YES
-strtof YES
-strtod YES
-strtold YES
-strtoimax YES
-strtoumax YES
+atof |check|
+atoi |check|
+atol |check|
+atoll |check|
+strtol |check|
+strtoll |check|
+strtoul |check|
+strtoull |check|
+strtof |check|
+strtod |check|
+strtold |check|
+strtoimax |check|
+strtoumax |check|
============= =========
String Error Functions
More information about the libc-commits
mailing list