]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/fgetws.3.patch
Libc-594.9.5.tar.gz
[apple/libc.git] / stdio / FreeBSD / fgetws.3.patch
1 --- fgetws.3 2003-05-20 15:22:41.000000000 -0700
2 +++ fgetws.3.edit 2006-08-12 09:44:23.000000000 -0700
3 @@ -41,7 +41,8 @@
4 .Dt FGETWS 3
5 .Os
6 .Sh NAME
7 -.Nm fgetws
8 +.Nm fgetws ,
9 +.Nm fgetws_l
10 .Nd get a line of wide characters from a stream
11 .Sh LIBRARY
12 .Lb libc
13 @@ -49,7 +50,21 @@
14 .In stdio.h
15 .In wchar.h
16 .Ft "wchar_t *"
17 -.Fn fgetws "wchar_t * restrict ws" "int n" "FILE * restrict fp"
18 +.Fo fgetws
19 +.Fa "wchar_t *restrict ws"
20 +.Fa "int n"
21 +.Fa "FILE *restrict stream"
22 +.Fc
23 +.In stdio.h
24 +.In wchar.h
25 +.In xlocale.h
26 +.Ft "wchar_t *"
27 +.Fo fgetws_l
28 +.Fa "wchar_t *restrict ws"
29 +.Fa "int n"
30 +.Fa "FILE *restrict stream"
31 +.Fa "locale_t loc"
32 +.Fc
33 .Sh DESCRIPTION
34 The
35 .Fn fgetws
36 @@ -57,7 +72,7 @@
37 reads at most one less than the number of characters specified by
38 .Fa n
39 from the given
40 -.Fa fp
41 +.Fa stream
42 and stores them in the wide character string
43 .Fa ws .
44 Reading stops when a newline character is found,
45 @@ -66,6 +81,14 @@
46 If any characters are read and there is no error, a
47 .Ql \e0
48 character is appended to end the string.
49 +.Pp
50 +While the
51 +.Fn fgetws
52 +function uses the current locale, the
53 +.Fn fgetws_l
54 +function may be passed a locale directly. See
55 +.Xr xlocale 3
56 +for more information.
57 .Sh RETURN VALUES
58 Upon successful completion,
59 .Fn fgetws
60 @@ -84,7 +107,8 @@
61 The
62 .Fn fgetws
63 function
64 -does not distinguish between end-of-file and error, and callers must use
65 +does not distinguish between end-of-file and error;
66 +callers must use
67 .Xr feof 3
68 and
69 .Xr ferror 3
70 @@ -96,7 +120,7 @@
71 .Bl -tag -width Er
72 .It Bq Er EBADF
73 The given
74 -.Fa fp
75 +.Fa stream
76 argument is not a readable stream.
77 .It Bq Er EILSEQ
78 The data obtained from the input stream does not form a valid
79 @@ -116,7 +140,8 @@
80 .Sh SEE ALSO
81 .Xr feof 3 ,
82 .Xr ferror 3 ,
83 -.Xr fgets 3
84 +.Xr fgets 3 ,
85 +.Xr xlocale 3
86 .Sh STANDARDS
87 The
88 .Fn fgetws