From f398efa1ac52e967d9673a0efebd9a27f17d60bf Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 11 Dec 2022 21:42:29 +0200 Subject: Generate docs using doxygen instead of sphinx --- lib/stdio.h | 14 ++++++++++++-- lib/stdlib.h | 8 ++++++++ lib/string.h | 8 ++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/stdio.h b/lib/stdio.h index 9a0c41e..5ef68f1 100644 --- a/lib/stdio.h +++ b/lib/stdio.h @@ -2,8 +2,15 @@ #include +///@defgroup libk libk +///@{ +///@defgroup stdio stdio +///@{ + #ifdef __cplusplus -/** An object type used for streams */ +/** + * An object type used for streams + */ struct kIoDevice { /** Function that prints a character to the stream */ virtual void putc(char) = 0; @@ -29,8 +36,8 @@ extern "C" { #endif /** * Write the formatted string to stdout - * * Supports ``%s`` (string), ``%d`` (decimal), ``%u`` (unsigned), ``%x`` (hexadecimal) + * @return number of bytes written */ int printf(const char *restrict format, ...); @@ -46,3 +53,6 @@ int vfprintf(FILE *restrict stream, const char *restrict format, va_list ap); #ifdef __cplusplus } #endif + +///@} +///@} diff --git a/lib/stdlib.h b/lib/stdlib.h index bd8474d..84d9b2d 100644 --- a/lib/stdlib.h +++ b/lib/stdlib.h @@ -2,6 +2,11 @@ #include +///@defgroup libk libk +///@{ +///@defgroup stdlib stdlib +///@{ + /** * Allocate size bytes and return a pointer to the allocated memory */ @@ -21,3 +26,6 @@ void *memset(void *s, int c, long unsigned n); * Copy n bytes from memory area src to memory area dest. The memory areas must not overlap. */ void *memcpy(void *restrict dest, const void *restrict src, long unsigned n); + +///@} +///@} diff --git a/lib/string.h b/lib/string.h index 460057c..c8196c8 100644 --- a/lib/string.h +++ b/lib/string.h @@ -1,5 +1,10 @@ #pragma once +///@defgroup libk libk +///@{ +///@defgroup string string +///@{ + #define OCTAL 8 #define DECIMAL 10 #define HEX 16 @@ -18,3 +23,6 @@ char *utoa(char *p, unsigned x, int base); #ifdef __cplusplus } #endif + +///@} +///@} -- cgit v1.2.1