Print this page
Garrett's man page edits.
*** 15,72 ****
.nf
#include <stdio.h>
#include <wchar.h>
\fBwint_t\fR \fBgetwc\fR(\fBFILE\fR \fI*stream\fR);
\fBwint_t\fR \fBgetwc_l\fR(\fBFILE\fR \fI*stream\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBgetwc()\fR function is equivalent to \fBfgetwc\fR(3C), except that if it
is implemented as a macro it may evaluate \fIstream\fR more than once, so the
! argument should never be an expression with side effects. The
! \fBgetwc_l\fR function is similar to \fBfgetwc\fR, except instead of
! acting on the current locale as specified by \fBsetlocale\fR(3C) and
! \fBuselocale\fR(3C), it uses the locale specified by \fIloc\fR.
.SH RETURN VALUES
- .sp
.LP
Refer to \fBfgetwc\fR(3C).
.SH ERRORS
- .sp
.LP
Refer to \fBfgetwc\fR(3C).
.SH USAGE
- .sp
.LP
This interface is provided to align with some current implementations and with
possible future \fBISO\fR standards.
- .sp
.LP
! Because it may be implemented as a macro, \fBgetwc()\fR may treat incorrectly a
! \fIstream\fR argument with side effects. In particular,
! \fBgetwc\fR(*\fIf\fR\|++) may not work as expected. Therefore, use of this
! function is not recommended; \fBfgetwc\fR(3C) should be used instead.
.SH ATTRIBUTES
- .sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
- .sp
-
- .sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
! Interface Stability Standard
_
MT-Level MT-Safe
.TE
.SH SEE ALSO
- .sp
.LP
! \fBfgetwc\fR(3C), \fBsetlocale\fR(3C), \fBuselocale\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
--- 15,77 ----
.nf
#include <stdio.h>
#include <wchar.h>
\fBwint_t\fR \fBgetwc\fR(\fBFILE\fR \fI*stream\fR);
+ .fi
+ .LP
+ .nf
+ #include <stdio.h>
+ #include <wchar.h>
+ #include <xlocale.h>
\fBwint_t\fR \fBgetwc_l\fR(\fBFILE\fR \fI*stream\fR, \fBlocale_t\fR \fIloc\fR);
.fi
.SH DESCRIPTION
.sp
.LP
The \fBgetwc()\fR function is equivalent to \fBfgetwc\fR(3C), except that if it
is implemented as a macro it may evaluate \fIstream\fR more than once, so the
! argument should never be an expression with side effects.
! .LP
! The \fBgetwc_l()\fR function is similar to \fBgetwc()\fR, except instead of
! acting on the current locale, it uses the locale specified by \fIloc\fR.
.SH RETURN VALUES
.LP
Refer to \fBfgetwc\fR(3C).
.SH ERRORS
.LP
Refer to \fBfgetwc\fR(3C).
.SH USAGE
.LP
This interface is provided to align with some current implementations and with
possible future \fBISO\fR standards.
.LP
! Because they may be implemented as macros, these functions may treat incorrectly
! a \fIstream\fR argument with side effects. In particular,
! \fBgetwc\fR(*\fIf\fR\|++) may not work as expected. Therefore, use of these
! functions is not recommended; \fBfgetwc\fR(3C) and \fBfgetwc_l\fR(3C)
! should be used instead.
.SH ATTRIBUTES
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
! Interface Stability See below.
_
MT-Level MT-Safe
.TE
+ .LP
+ The
+ .B getwc()
+ function is Standard. The
+ .B getwc_l()
+ function is Uncommitted.
.SH SEE ALSO
.LP
! \fBfgetwc\fR(3C), \fBnewlocale\fR(3C), \fBsetlocale\fR(3C), \fBuselocale\fR(3C),
! \fBattributes\fR(5), \fBstandards\fR(5)