]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | --- wscanf.3.orig 2007-04-08 18:49:37.000000000 -0700 |
2 | +++ wscanf.3 2007-04-08 20:05:10.000000000 -0700 | |
3 | @@ -41,12 +41,12 @@ | |
4 | .Dt WSCANF 3 | |
5 | .Os | |
6 | .Sh NAME | |
7 | -.Nm wscanf , | |
8 | .Nm fwscanf , | |
9 | .Nm swscanf , | |
10 | -.Nm vwscanf , | |
11 | +.Nm vfwscanf , | |
12 | .Nm vswscanf , | |
13 | -.Nm vfwscanf | |
14 | +.Nm vwscanf , | |
15 | +.Nm wscanf | |
16 | .Nd wide character input format conversion | |
17 | .Sh LIBRARY | |
18 | .Lb libc | |
19 | @@ -54,22 +54,46 @@ | |
20 | .In stdio.h | |
21 | .In wchar.h | |
22 | .Ft int | |
23 | -.Fn wscanf "const wchar_t * restrict format" ... | |
24 | +.Fo fwscanf | |
25 | +.Fa "FILE *restrict stream" | |
26 | +.Fa "const wchar_t *restrict format" | |
27 | +.Fa ... | |
28 | +.Fc | |
29 | .Ft int | |
30 | -.Fn fwscanf "FILE * restrict stream" "const wchar_t * restrict format" ... | |
31 | +.Fo swscanf | |
32 | +.Fa "const wchar_t *restrict ws" | |
33 | +.Fa "const wchar_t *restrict format" | |
34 | +.Fa ... | |
35 | +.Fc | |
36 | .Ft int | |
37 | -.Fn swscanf "const wchar_t * restrict str" "const wchar_t * restrict format" ... | |
38 | +.Fo wscanf | |
39 | +.Fa "const wchar_t *restrict format" | |
40 | +.Fa ... | |
41 | +.Fc | |
42 | .In stdarg.h | |
43 | +.In stdio.h | |
44 | +.In wchar.h | |
45 | .Ft int | |
46 | -.Fn vwscanf "const wchar_t * restrict format" "va_list ap" | |
47 | +.Fo vfwscanf | |
48 | +.Fa "FILE *restrict stream" | |
49 | +.Fa "const wchar_t *restrict format" | |
50 | +.Fa "va_list arg" | |
51 | +.Fc | |
52 | .Ft int | |
53 | -.Fn vswscanf "const wchar_t * restrict str" "const wchar_t * restrict format" "va_list ap" | |
54 | +.Fo vswscanf | |
55 | +.Fa "const wchar_t *restrict ws" | |
56 | +.Fa "const wchar_t *restrict format" | |
57 | +.Fa "va_list arg" | |
58 | +.Fc | |
59 | .Ft int | |
60 | -.Fn vfwscanf "FILE * restrict stream" "const wchar_t * restrict format" "va_list ap" | |
61 | +.Fo vwscanf | |
62 | +.Fa "const wchar_t *restrict format" | |
63 | +.Fa "va_list arg" | |
64 | +.Fc | |
65 | .Sh DESCRIPTION | |
66 | The | |
67 | .Fn wscanf | |
68 | -family of functions scans input according to a | |
69 | +family of functions scans input, according to a | |
70 | .Fa format | |
71 | as described below. | |
72 | This format may contain | |
73 | @@ -89,7 +113,8 @@ | |
74 | and | |
75 | .Fn swscanf | |
76 | reads its input from the wide character string pointed to by | |
77 | -.Fa str . | |
78 | +.Fa ws . | |
79 | +.Pp | |
80 | The | |
81 | .Fn vfwscanf | |
82 | function | |
83 | @@ -121,6 +146,7 @@ | |
84 | All conversions are introduced by the | |
85 | .Cm % | |
86 | (percent sign) character. | |
87 | +.Pp | |
88 | The | |
89 | .Fa format | |
90 | string | |
91 | @@ -134,10 +160,16 @@ | |
3d9156a7 A |
92 | when an input character does not match such a format character. |
93 | Scanning also stops | |
94 | when an input conversion cannot be made (see below). | |
95 | +.Pp | |
96 | +Extended locale versions of these functions are documented in | |
97 | +.Xr wscanf_l 3 . | |
98 | +See | |
99 | +.Xr xlocale 3 | |
100 | +for more information. | |
101 | .Sh CONVERSIONS | |
102 | Following the | |
103 | .Cm % | |
224c7076 A |
104 | -character introducing a conversion |
105 | +character introducing a conversion, | |
106 | there may be a number of | |
107 | .Em flag | |
108 | characters, as follows: | |
109 | @@ -433,15 +465,12 @@ | |
110 | causes an immediate return of | |
111 | .Dv EOF . | |
112 | .Sh RETURN VALUES | |
113 | -These | |
114 | -functions | |
115 | -return | |
116 | -the number of input items assigned, which can be fewer than provided | |
117 | -for, or even zero, in the event of a matching failure. | |
118 | -Zero | |
119 | -indicates that, while there was input available, | |
120 | +These functions return the number of input items assigned, | |
121 | +which can be fewer than provided for, or even zero, | |
122 | +in the event of a matching failure. | |
123 | +Zero indicates that, while there was input available, | |
124 | no conversions were assigned; | |
125 | -typically this is due to an invalid input character, | |
126 | +typically, this is due to an invalid input character, | |
127 | such as an alphabetic character for a | |
128 | .Ql %d | |
129 | conversion. | |
130 | @@ -459,14 +488,15 @@ | |
3d9156a7 A |
131 | .Xr wcstod 3 , |
132 | .Xr wcstol 3 , | |
133 | .Xr wcstoul 3 , | |
134 | -.Xr wprintf 3 | |
135 | +.Xr wprintf 3 , | |
136 | +.Xr wscanf_l 3 | |
137 | .Sh STANDARDS | |
138 | The | |
139 | .Fn fwscanf , | |
224c7076 A |
140 | .Fn wscanf , |
141 | .Fn swscanf , | |
142 | .Fn vfwscanf , | |
143 | -.Fn vwscanf | |
144 | +.Fn vwscanf , | |
145 | and | |
146 | .Fn vswscanf | |
147 | functions |