X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/5b2abdfbf4211b6592cdd02b9507555a0ecbb04b..311854206c50ea4207e7e1faa4efeb20f1bc8290:/locale/rune.3 diff --git a/locale/rune.3 b/locale/rune.3 index 570e73d..2d5ddb7 100644 --- a/locale/rune.3 +++ b/locale/rune.3 @@ -33,9 +33,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)rune.3 8.2 (Berkeley) 12/11/93 -.\" $FreeBSD: src/lib/libc/locale/rune.3,v 1.10.2.6 2001/12/14 18:33:54 ru Exp $ +.\" $FreeBSD: src/lib/libc/locale/rune.3,v 1.22 2002/12/19 09:40:22 ru Exp $ .\" -.Dd December 11, 1993 +.Dd October 6, 2002 .Dt RUNE 3 .Os .Sh NAME @@ -69,6 +69,25 @@ .Ft int .Fn fputrune "rune_t rune" "FILE *stream" .Sh DESCRIPTION +.Bf Em +The +.Bx 4.4 +.Dq rune +functions have been deprecated in favour of the +.Tn ISO +C99 extended multibyte and wide character facilities +and should not be used in new applications. +.Ef +Consider using +.Xr setlocale 3 , +.Xr mbrtowc 3 , +.Xr wcrtomb 3 , +.Xr fgetwc 3 , +.Xr ungetwc 3 , +and +.Xr fputwc 3 +instead. +.Pp The .Fn setrunelocale controls the type of encoding used to represent runes as multibyte strings @@ -215,18 +234,18 @@ The function returns one of the following values: .Bl -tag -width Er .It Er 0 +The .Fn setrunelocale +function was successful. -.It Bq Er EFAULT +.It Bq Er EINVAL +The .Fa locale -was -.Dv NULL . +name was incorrect. .It Bq Er ENOENT The locale could not be found. .It Bq Er EFTYPE The file found was not a valid file. -.It Bq Er EINVAL -The encoding indicated by the locale was unknown. .El .Pp The @@ -249,16 +268,8 @@ binary LC_CTYPE file for the locale .Xr mbrune 3 , .Xr setlocale 3 , .Xr euc 4 , -.Xr utf2 4 -.Sh NOTES -The ANSI C type -.Em wchar_t -is the same as -.Em rune_t . -.Em Rune_t -was chosen to accent the purposeful choice of not basing the -system with the ANSI C -primitives, which were, shall we say, less aesthetic. +.Xr utf2 4 , +.Xr utf8 5 .Sh HISTORY These functions first appeared in .Bx 4.4 . @@ -266,12 +277,7 @@ These functions first appeared in The .Fn setrunelocale function and the other non-ANSI rune functions were inspired by -.Sy "Plan 9 from Bell Labs" -as a much more sane alternative to the ANSI multibyte and -wide character support. +.Sy "Plan 9 from Bell Labs" . .\"They were conceived at the San Diego 1993 Summer USENIX conference by .\"Paul Borman of Krystal Technologies, Keith Bostic of CSRG and Andrew Hume .\"of Bell Labs. -.Pp -All of the ANSI multibyte and wide character -support functions are built using the rune functions.