aboutsummaryrefslogtreecommitdiffstats
path: root/man3/scanf.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-02-27 10:59:42 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-02-27 10:59:42 +0100
commit68c63bfd76342f606109b7f32300d67d0ef54ebf (patch)
tree71359ecd7416f2aac256f0b643521adb5db54b92 /man3/scanf.3
parentdbe840685db427d2883cbd4d3758e8ee7af191d9 (diff)
downloadman-pages-68c63bfd76342f606109b7f32300d67d0ef54ebf.tar.gz
scanf.3: ffix
Reported-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/scanf.3')
-rw-r--r--man3/scanf.38
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/scanf.3 b/man3/scanf.3
index 502569a45c..adab15060a 100644
--- a/man3/scanf.3
+++ b/man3/scanf.3
@@ -660,9 +660,9 @@ modifier for assignment allocation (as documented in DESCRIPTION, above).
Note that the
.B a
modifier is not available if the program is compiled with
-.I "gcc -std=c99"
+.I "gcc \-std=c99"
or
-.IR "gcc -D_ISOC99_SOURCE"
+.IR "gcc \-D_ISOC99_SOURCE"
(unless
.B _GNU_SOURCE
is also specified), in which case the
@@ -689,7 +689,7 @@ conversion specifiers (e.g.,
It avoids ambiguity with respect to the
.B %a
floating-point conversion specifier (and is unaffected by
-.IR "gcc -std=c99"
+.IR "gcc \-std=c99"
etc.).
.SH BUGS
All functions are fully C89 conformant, but provide the
@@ -743,7 +743,7 @@ char *p;
int n;
errno = 0;
-n = scanf("%m[a-z]", &p);
+n = scanf("%m[a\-z]", &p);
if (n == 1) {
printf("read: %s\\n", p);
free(p);