wscanf.3.patch   [plain text]


--- wscanf.3.bsdnew	2009-11-11 13:33:22.000000000 -0800
+++ wscanf.3	2009-11-11 13:33:22.000000000 -0800
@@ -37,12 +37,12 @@
 .Dt WSCANF 3
 .Os
 .Sh NAME
-.Nm wscanf ,
 .Nm fwscanf ,
 .Nm swscanf ,
-.Nm vwscanf ,
+.Nm vfwscanf ,
 .Nm vswscanf ,
-.Nm vfwscanf
+.Nm vwscanf ,
+.Nm wscanf
 .Nd wide character input format conversion
 .Sh LIBRARY
 .Lb libc
@@ -50,22 +50,46 @@
 .In stdio.h
 .In wchar.h
 .Ft int
-.Fn wscanf "const wchar_t * restrict format" ...
+.Fo fwscanf
+.Fa "FILE *restrict stream"
+.Fa "const wchar_t *restrict format"
+.Fa ...
+.Fc
 .Ft int
-.Fn fwscanf "FILE * restrict stream" "const wchar_t * restrict format" ...
+.Fo swscanf
+.Fa "const wchar_t *restrict ws"
+.Fa "const wchar_t *restrict format"
+.Fa ...
+.Fc
 .Ft int
-.Fn swscanf "const wchar_t * restrict str" "const wchar_t * restrict format" ...
+.Fo wscanf
+.Fa "const wchar_t *restrict format"
+.Fa ...
+.Fc
 .In stdarg.h
+.In stdio.h
+.In wchar.h
 .Ft int
-.Fn vwscanf "const wchar_t * restrict format" "va_list ap"
+.Fo vfwscanf
+.Fa "FILE *restrict stream"
+.Fa "const wchar_t *restrict format"
+.Fa "va_list arg"
+.Fc
 .Ft int
-.Fn vswscanf "const wchar_t * restrict str" "const wchar_t * restrict format" "va_list ap"
+.Fo vswscanf
+.Fa "const wchar_t *restrict ws"
+.Fa "const wchar_t *restrict format"
+.Fa "va_list arg"
+.Fc
 .Ft int
-.Fn vfwscanf "FILE * restrict stream" "const wchar_t * restrict format" "va_list ap"
+.Fo vwscanf
+.Fa "const wchar_t *restrict format"
+.Fa "va_list arg"
+.Fc
 .Sh DESCRIPTION
 The
 .Fn wscanf
-family of functions scans input according to a
+family of functions scans input, according to a
 .Fa format
 as described below.
 This format may contain
@@ -85,7 +109,8 @@ reads input from the stream pointer
 and
 .Fn swscanf
 reads its input from the wide character string pointed to by
-.Fa str .
+.Fa ws .
+.Pp
 The
 .Fn vfwscanf
 function
@@ -117,6 +142,7 @@ conversion below).
 All conversions are introduced by the
 .Cm %
 (percent sign) character.
+.Pp
 The
 .Fa format
 string
@@ -130,10 +156,16 @@ Scanning stops
 when an input character does not match such a format character.
 Scanning also stops
 when an input conversion cannot be made (see below).
+.Pp
+Extended locale versions of these functions are documented in
+.Xr wscanf_l 3 .
+See
+.Xr xlocale 3
+for more information.
 .Sh CONVERSIONS
 Following the
 .Cm %
-character introducing a conversion
+character introducing a conversion,
 there may be a number of
 .Em flag
 characters, as follows:
@@ -429,15 +461,12 @@ of
 causes an immediate return of
 .Dv EOF .
 .Sh RETURN VALUES
-These
-functions
-return
-the number of input items assigned, which can be fewer than provided
-for, or even zero, in the event of a matching failure.
-Zero
-indicates that, while there was input available,
+These functions return the number of input items assigned,
+which can be fewer than provided for, or even zero,
+in the event of a matching failure.
+Zero indicates that, while there was input available,
 no conversions were assigned;
-typically this is due to an invalid input character,
+typically, this is due to an invalid input character,
 such as an alphabetic character for a
 .Ql %d
 conversion.
@@ -455,14 +484,15 @@ the number of conversions which were suc
 .Xr wcstod 3 ,
 .Xr wcstol 3 ,
 .Xr wcstoul 3 ,
-.Xr wprintf 3
+.Xr wprintf 3 ,
+.Xr wscanf_l 3
 .Sh STANDARDS
 The
 .Fn fwscanf ,
 .Fn wscanf ,
 .Fn swscanf ,
 .Fn vfwscanf ,
-.Fn vwscanf
+.Fn vwscanf ,
 and
 .Fn vswscanf
 functions