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


   7 .\"  This notice shall appear on any product containing this material.
   8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  11 .TH WCSRTOMBS 3C "Jul 13, 2014"
  12 .SH NAME
  13 wcsnrtombs, wcsnrtombs_l, wcsrtombs, wcsrtombs_l \- convert a wide-character string to a character string
  14 (restartable)
  15 .SH SYNOPSIS
  16 .LP
  17 .nf
  18 #include <wchar.h>
  19 
  20 \fBsize_t\fR \fBwcsrtombs\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  21      \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR);
  22 .fi
  23 .LP
  24 .nf
  25 \fBsize_t\fR \fBwcsnrtombs\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  26      \fBsize_t\fR \fInwc\fR, \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR);

  27 .LP
  28 .nf
  29 #include <wchar.h>
  30 #include <xlocale.h>
  31 
  32 \fBsize_t\fR \fBwcsrtombs_l\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  33      \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR, \fBlocale_t\fR \fIloc\fR);
  34 .fi
  35 .LP
  36 .nf
  37 \fBsize_t\fR \fBwcsnrtombs_l\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  38      \fBsize_t\fR \fInwc\fR, \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR, \fBlocale_t\fR \fIloc\fR);
  39 .fi
  40 .SH DESCRIPTION
  41 .LP
  42 The \fBwcsrtombs()\fR function converts a sequence of wide-characters from the
  43 array indirectly pointed to by \fIsrc\fR into a sequence of corresponding
  44 characters, beginning in the conversion state described by the object pointed
  45 to by \fIps\fR. If \fIdst\fR is not a null pointer, the converted characters
  46 are then stored into the array pointed to by \fIdst\fR. Conversion continues up




   7 .\"  This notice shall appear on any product containing this material.
   8 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
  10 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  11 .TH WCSRTOMBS 3C "Jul 13, 2014"
  12 .SH NAME
  13 wcsnrtombs, wcsnrtombs_l, wcsrtombs, wcsrtombs_l \- convert a wide-character string to a character string
  14 (restartable)
  15 .SH SYNOPSIS
  16 .LP
  17 .nf
  18 #include <wchar.h>
  19 
  20 \fBsize_t\fR \fBwcsrtombs\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  21      \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR);
  22 .fi
  23 .LP
  24 .nf
  25 \fBsize_t\fR \fBwcsnrtombs\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  26      \fBsize_t\fR \fInwc\fR, \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR);
  27 .fi
  28 .LP
  29 .nf
  30 #include <wchar.h>
  31 #include <xlocale.h>
  32 
  33 \fBsize_t\fR \fBwcsrtombs_l\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  34      \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR, \fBlocale_t\fR \fIloc\fR);
  35 .fi
  36 .LP
  37 .nf
  38 \fBsize_t\fR \fBwcsnrtombs_l\fR(\fBchar *restrict\fR \fIdst\fR, \fBconst wchar_t **restrict\fR \fIsrc\fR,
  39      \fBsize_t\fR \fInwc\fR, \fBsize_t\fR \fIlen\fR, \fBmbstate_t *restrict\fR \fIps\fR, \fBlocale_t\fR \fIloc\fR);
  40 .fi
  41 .SH DESCRIPTION
  42 .LP
  43 The \fBwcsrtombs()\fR function converts a sequence of wide-characters from the
  44 array indirectly pointed to by \fIsrc\fR into a sequence of corresponding
  45 characters, beginning in the conversion state described by the object pointed
  46 to by \fIps\fR. If \fIdst\fR is not a null pointer, the converted characters
  47 are then stored into the array pointed to by \fIdst\fR. Conversion continues up