From 92dbe587293674e5fd99d29ae2625f39d8842ea8 Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 12 Mar 2023 11:15:45 +0100 Subject: [PATCH] libc: Unify function descriptions --- libc/include/ctype.h | 2 ++ libc/include/stdio.h | 12 ++++++------ libc/include/unistd.h | 12 ++++++------ 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libc/include/ctype.h b/libc/include/ctype.h index 8bcb16d9..25bf69c2 100644 --- a/libc/include/ctype.h +++ b/libc/include/ctype.h @@ -1,5 +1,7 @@ /* ctype.h: Character handling. */ +// FIXME: Add function descriptions. + #ifndef _CTYPE_H #define _CTYPE_H diff --git a/libc/include/stdio.h b/libc/include/stdio.h index 942eecd8..a37fac48 100644 --- a/libc/include/stdio.h +++ b/libc/include/stdio.h @@ -26,13 +26,13 @@ extern "C" int fflush(FILE*); - /* Opens a file and binds a stream to it. */ + /* Open a file and binds a stream to it. */ FILE* fopen(const char* path, const char* mode); - /* Closes a file and frees up its stream. */ + /* Close a file and frees up its stream. */ int fclose(FILE* stream); - /* Reads arbitrarily sized items from a stream. */ + /* Read arbitrarily sized items from a stream. */ size_t fread(void* buf, size_t size, size_t nmemb, FILE* stream); size_t fwrite(const void*, size_t, size_t, FILE*); @@ -40,13 +40,13 @@ extern "C" int fseek(FILE*, long, int); long ftell(FILE*); - /* Returns whether the error indicator was set in stream. */ + /* Return whether the error indicator was set in stream. */ int ferror(FILE* stream); - /* Returns whether the end-of-file indicator was set in stream. */ + /* Return whether the end-of-file indicator was set in stream. */ int feof(FILE* stream); - /* Clears the error and end-of-file indicators in stream. */ + /* Clear the error and end-of-file indicators in stream. */ void clearerr(FILE* stream); void setbuf(FILE*, char*); diff --git a/libc/include/unistd.h b/libc/include/unistd.h index c35d7030..5ce1e3ba 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -16,26 +16,26 @@ extern "C" pid_t fork(); - /* Returns the current process' process ID. */ + /* Return the current process' process ID. */ pid_t getpid(void); int execv(const char*, char* const*); int execve(const char*, char* const*, char* const*); int execvp(const char*, char* const*); - /* Calls the operating system kernel for a specific service. */ + /* Call the operating system kernel for a specific service. */ long syscall(long num, ...); - /* Sleeps for X microseconds. */ + /* Sleep for X microseconds. */ int usleep(useconds_t us); - /* Sleeps for X seconds. */ + /* Sleep for X seconds. */ unsigned long sleep(unsigned long seconds); - /* Closes a file descriptor. */ + /* Close a file descriptor. */ int close(int fd); - /* Reads bytes from a file descriptor. */ + /* Read bytes from a file descriptor. */ ssize_t read(int fd, void* buf, size_t size); #ifdef __cplusplus