X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/1f2f436a38f7ae2d39a943ad2898d8fed4ed2e58..6465356a983ac139f81d3b7913cdb548477c346c:/stdio/FreeBSD/wscanf.3 diff --git a/stdio/FreeBSD/wscanf.3 b/stdio/FreeBSD/wscanf.3 index 21d32ab..54fa5d6 100644 --- a/stdio/FreeBSD/wscanf.3 +++ b/stdio/FreeBSD/wscanf.3 @@ -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 successfully completed is returned. .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