diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-10-11 16:11:01 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-10-11 16:11:01 +0200 |
commit | 8c1d64354dff12a715a854ccee8888fa8026bcd3 (patch) | |
tree | 596bde052d1ff83517e77b1c4a0ff95b384334b6 | |
parent | fix inclusions (diff) | |
download | slibc-8c1d64354dff12a715a854ccee8888fa8026bcd3.tar.gz slibc-8c1d64354dff12a715a854ccee8888fa8026bcd3.tar.bz2 slibc-8c1d64354dff12a715a854ccee8888fa8026bcd3.tar.xz |
m + m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | include/slibc/features.h | 9 | ||||
-rw-r--r-- | include/stdio.h | 6 | ||||
-rw-r--r-- | src/stdio/printf.c | 6 |
3 files changed, 12 insertions, 9 deletions
diff --git a/include/slibc/features.h b/include/slibc/features.h index c5a1e1b..b36fbb2 100644 --- a/include/slibc/features.h +++ b/include/slibc/features.h @@ -111,10 +111,17 @@ /** - * Format for the `format` GCC function attribute. + * Format for the `format` GCC function attribute, + * for `*printf` functions. */ #define slibc_printf printf /* TODO write GCC extension */ +/** + * Format for the `format` GCC function attribute, + * for `*scanf` functions. + */ +#define slibc_scanf scanf /* TODO write GCC extension */ + #endif diff --git a/include/stdio.h b/include/stdio.h index 598c6ef..419ba5a 100644 --- a/include/stdio.h +++ b/include/stdio.h @@ -140,11 +140,9 @@ int dprintf(int, const char* restrict, ...) /** * This function is identical to `fprintf`, - * except it is limited to buffer-backed - * streams, and uses the buffer as the first - * argument rather than then the stream. + * it prints to a buffer rather than a stream. * - * This is identical to `sprintf` with + * This is identical to `snprintf` with * `SIZE_MAX` as the second argument. * * @param buffer The output buffer. diff --git a/src/stdio/printf.c b/src/stdio/printf.c index f63de94..e5c603c 100644 --- a/src/stdio/printf.c +++ b/src/stdio/printf.c @@ -397,11 +397,9 @@ int dprintf(int fd, const char* restrict format, ...) /** * This function is identical to `fprintf`, - * except it is limited to buffer-backed - * streams, and uses the buffer as the first - * argument rather than then the stream. + * it prints to a buffer rather than a stream. * - * This is identical to `sprintf` with + * This is identical to `snprintf` with * `SIZE_MAX` as the second argument. * * @param buffer The output buffer. |