summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-12-09 11:35:25 +0100
committerAlejandro Colomar <alx@kernel.org>2023-12-09 11:55:22 +0100
commit4ea602c6ab2716c00d189d28199a9236180d2145 (patch)
tree4012a86a81ef5e376dfcca8aa03f11e9b857ce8b
parent628d27c3c1d8362a7e73198460b8c6a739be4973 (diff)
scanf.3: CAVEATS: These functions don't distinguish newlines easily
One could use "%*1[\n]" for specifying a newline, and "%*[ \t] for other white space. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--man3/scanf.35
1 files changed, 5 insertions, 0 deletions
diff --git a/man3/scanf.3 b/man3/scanf.3
index 01d18bac3..de2702b35 100644
--- a/man3/scanf.3
+++ b/man3/scanf.3
@@ -136,6 +136,11 @@ T} Thread safety MT-Safe locale
C11, POSIX.1-2008.
.SH HISTORY
C99, POSIX.1-2001.
+.SH CAVEATS
+These functions make it difficult to
+distinguish newlines from other white space,
+This is especially problematic with line-buffered input,
+like the standard input stream.
.SH SEE ALSO
.BR fgets (3),
.BR getline (3),