Print this page
5025 import and use mandoc
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Approved by: TBD


  19 
  20 \fBwint_t\fR \fBfgetwc\fR(\fBFILE *\fR\fIstream\fR);
  21 .fi
  22 .LP
  23 .nf
  24 #include <stdio.h>
  25 #include <wchar.h>
  26 #include <xlocale.h>
  27 
  28 \fBwint_t\fR \fBfgetwc_l\fR(\fBFILE *\fR\fIstream\fR, \fBlocale_t\fR, \fIloc\fR);
  29 .fi
  30 
  31 .SH DESCRIPTION
  32 .sp
  33 .LP
  34 The \fBfgetwc()\fR and \fBfgetwc_l()\fR functions obtain the next
  35 character (if present) from the input stream pointed to by \fIstream\fR,
  36 convert that to the corresponding wide-character code and advance the
  37 associated file position indicator for the stream (if defined).
  38 Whereas \fBfgetwc()\fR uses the current locale, \fBfgetwc_l()\fR uses the
  39 locale specified by \fIloc\R.
  40 .LP
  41 If an error occurs, the resulting value of the file position indicator for the
  42 stream is indeterminate.
  43 .LP
  44 The \fBfgetwc()\fR and \fBfgetwc_l()\fR functions may mark the \fBst_atime\fR
  45 field of the file
  46 associated with \fIstream\fR for update. The \fBst_atime\fR field will be
  47 marked for update by the first successful execution of \fBfgetwc()\fR,
  48 \fBfgetc\fR(3C), \fBfgets\fR(3C), \fBfgetws\fR(3C), \fBfread\fR(3C),
  49 \fBfscanf\fR(3C), \fBgetc\fR(3C), \fBgetchar\fR(3C), \fBgets\fR(3C), or
  50 \fBscanf\fR(3C) using \fIstream\fR that returns data not supplied by a prior
  51 call to \fBungetc\fR(3C) or \fBungetwc\fR(3C).
  52 .SH RETURN VALUES
  53 .LP
  54 Upon successful completion both functions return the
  55 wide-character code of the character read from the input stream pointed to by
  56 \fIstream\fR converted to a type \fBwint_t\fR.
  57 .LP
  58 For standard-conforming (see \fBstandards\fR(5)) applications, if the
  59 end-of-file indicator for the stream is set, \fBfgetwc()\fR and




  19 
  20 \fBwint_t\fR \fBfgetwc\fR(\fBFILE *\fR\fIstream\fR);
  21 .fi
  22 .LP
  23 .nf
  24 #include <stdio.h>
  25 #include <wchar.h>
  26 #include <xlocale.h>
  27 
  28 \fBwint_t\fR \fBfgetwc_l\fR(\fBFILE *\fR\fIstream\fR, \fBlocale_t\fR, \fIloc\fR);
  29 .fi
  30 
  31 .SH DESCRIPTION
  32 .sp
  33 .LP
  34 The \fBfgetwc()\fR and \fBfgetwc_l()\fR functions obtain the next
  35 character (if present) from the input stream pointed to by \fIstream\fR,
  36 convert that to the corresponding wide-character code and advance the
  37 associated file position indicator for the stream (if defined).
  38 Whereas \fBfgetwc()\fR uses the current locale, \fBfgetwc_l()\fR uses the
  39 locale specified by \fIloc\fR.
  40 .LP
  41 If an error occurs, the resulting value of the file position indicator for the
  42 stream is indeterminate.
  43 .LP
  44 The \fBfgetwc()\fR and \fBfgetwc_l()\fR functions may mark the \fBst_atime\fR
  45 field of the file
  46 associated with \fIstream\fR for update. The \fBst_atime\fR field will be
  47 marked for update by the first successful execution of \fBfgetwc()\fR,
  48 \fBfgetc\fR(3C), \fBfgets\fR(3C), \fBfgetws\fR(3C), \fBfread\fR(3C),
  49 \fBfscanf\fR(3C), \fBgetc\fR(3C), \fBgetchar\fR(3C), \fBgets\fR(3C), or
  50 \fBscanf\fR(3C) using \fIstream\fR that returns data not supplied by a prior
  51 call to \fBungetc\fR(3C) or \fBungetwc\fR(3C).
  52 .SH RETURN VALUES
  53 .LP
  54 Upon successful completion both functions return the
  55 wide-character code of the character read from the input stream pointed to by
  56 \fIstream\fR converted to a type \fBwint_t\fR.
  57 .LP
  58 For standard-conforming (see \fBstandards\fR(5)) applications, if the
  59 end-of-file indicator for the stream is set, \fBfgetwc()\fR and