.\" 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
.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
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
.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 .
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.