summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorYuri Pankov <yuri.pankov@nexenta.com>2017-03-28 07:04:11 +0300
committerRichard Lowe <richlowe@richlowe.net>2017-04-26 18:22:42 -0400
commit6fdae1bd5fdc8d68034ee6408f5e6ed9d197fe6b (patch)
tree897b5f76f9fa639cff3ed3c467214c168b1eaad0 /usr/src
parent6175f5a92a3a312be8142de7390d92df1d05bd75 (diff)
downloadillumos-joyent-6fdae1bd5fdc8d68034ee6408f5e6ed9d197fe6b.tar.gz
656 need man pages for mbstowcs(3C) and mbstowcs_l(3C)
7960 need man pages for wcstombs(3C) and wcstombs_l(3C) Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/man/man3c/Makefile10
-rw-r--r--usr/src/man/man3c/mbstowcs.3c115
-rw-r--r--usr/src/man/man3c/wcstombs.3c116
-rw-r--r--usr/src/pkg/manifests/system-library.man3c.inc18
4 files changed, 248 insertions, 11 deletions
diff --git a/usr/src/man/man3c/Makefile b/usr/src/man/man3c/Makefile
index 61591de7e7..64e8b512cc 100644
--- a/usr/src/man/man3c/Makefile
+++ b/usr/src/man/man3c/Makefile
@@ -234,6 +234,7 @@ MANFILES= __fbufsize.3c \
mbrtowc.3c \
mbsinit.3c \
mbsrtowcs.3c \
+ mbstowcs.3c \
mbtowc.3c \
membar_ops.3c \
memory.3c \
@@ -536,6 +537,7 @@ MANFILES= __fbufsize.3c \
wcstod.3c \
wcstoimax.3c \
wcstol.3c \
+ wcstombs.3c \
wcstoul.3c \
wcstring.3c \
wcswidth.3c \
@@ -969,7 +971,6 @@ MANLINKS= FD_CLR.3c \
mbsnrtowcs.3c \
mbsnrtowcs_l.3c \
mbsrtowcs_l.3c \
- mbstowcs.3c \
mbstowcs_l.3c \
mbtowc_l.3c \
memalign.3c \
@@ -1359,6 +1360,7 @@ MANLINKS= FD_CLR.3c \
wcstok.3c \
wcstold.3c \
wcstoll.3c \
+ wcstombs_l.3c \
wcstoull.3c \
wcstoumax.3c \
wcswcs.3c \
@@ -1936,8 +1938,8 @@ mbsinit_l.3c := LINKSRC = mbsinit.3c
mbsnrtowcs.3c := LINKSRC = mbsrtowcs.3c
mbsnrtowcs_l.3c := LINKSRC = mbsrtowcs.3c
mbsrtowcs_l.3c := LINKSRC = mbsrtowcs.3c
-mbstowcs.3c := LINKSRC = mbsrtowcs.3c
-mbstowcs_l.3c := LINKSRC = mbsrtowcs.3c
+
+mbstowcs_l.3c := LINKSRC = mbstowcs.3c
mbtowc_l.3c := LINKSRC = mbtowc.3c
@@ -2443,6 +2445,8 @@ watoll.3c := LINKSRC = wcstol.3c
wcstoll.3c := LINKSRC = wcstol.3c
wstol.3c := LINKSRC = wcstol.3c
+wcstombs_l.3c := LINKSRC = wcstombs.3c
+
wcstoull.3c := LINKSRC = wcstoul.3c
wcscat.3c := LINKSRC = wcstring.3c
diff --git a/usr/src/man/man3c/mbstowcs.3c b/usr/src/man/man3c/mbstowcs.3c
new file mode 100644
index 0000000000..ce2e017050
--- /dev/null
+++ b/usr/src/man/man3c/mbstowcs.3c
@@ -0,0 +1,115 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source. A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2017 Nexenta Systems, Inc.
+.\"
+.Dd March 28, 2017
+.Dt MBSTOWCS 3C
+.Os
+.Sh NAME
+.Nm mbstowcs ,
+.Nm mbstowcs_l
+.Nd convert a multibyte character string to a wide-character string
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft size_t
+.Fo mbstowcs
+.Fa "wchar_t *restrict pwcs"
+.Fa "const char *restrict s"
+.Fa "size_t n"
+.Fc
+.In stdlib.h
+.In xlocale.h
+.Ft size_t
+.Fo mbstowcs_l
+.Fa "wchar_t *restrict pwcs"
+.Fa "const char *restrict s"
+.Fa "size_t n"
+.Fa "locale_t loc"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn mbstowcs
+function converts a multibyte character string
+.Fa s
+beginning in the initial conversion state into a wide-character string.
+If
+.Fa pwcs
+is not
+.Dv NULL ,
+the converted characters are stored into array pointed to by
+.Fa pwcs .
+.Pp
+Conversion continues up to and including a terminating null character, which is
+also stored, or until
+.Fa n
+wide-characters have been stored into the array pointed to by
+.Fa pwcs .
+.Pp
+The behavior of
+.Fn mbstowcs
+function is affected by the
+.Ev LC_CTYPE
+category of the current locale.
+.Pp
+The
+.Fn mbstowcs_l
+function behaves identically to
+.Fn mbstowcs ,
+except instead of using the current locale, it uses the locale as specified by
+.Fa loc .
+.Sh RETURN VALUES
+The
+.Fn mbstowcs
+and
+.Fn mbstowcs_l
+functions return the number of wide-characters successfully converted, not
+including the terminating null
+.Pq if any ,
+or
+.Li \-1
+if conversion encounters a sequence of bytes that does not form a valid
+character.
+.Sh ERRORS
+The
+.Fn mbstowcs
+and
+.Fn mbstowcs_l
+functions will fail if:
+.Bl -tag -width Er
+.It Er EILSEQ
+An invalid multibyte sequence was detected.
+.It Er EINVAL
+The conversion state is invalid.
+.El
+.Sh INTERFACE STABILITY
+The
+.Fn mbstowcs
+function is
+.Sy Standard .
+The
+.Fn mbstowcs_l
+function is
+.Sy Uncommited .
+.Sh MT-LEVEL
+.Sy MT-Safe
+.Sh SEE ALSO
+.Xr mbsnrtowcs 3C ,
+.Xr mbtowc 3C ,
+.Xr newlocale 3C ,
+.Xr setlocale 3C ,
+.Xr uselocale 3C ,
+.Xr wcstombs 3C ,
+.Xr attributes 5 ,
+.Xr environ 5 ,
+.Xr standards 5
diff --git a/usr/src/man/man3c/wcstombs.3c b/usr/src/man/man3c/wcstombs.3c
new file mode 100644
index 0000000000..b068bc0c8e
--- /dev/null
+++ b/usr/src/man/man3c/wcstombs.3c
@@ -0,0 +1,116 @@
+.\"
+.\" This file and its contents are supplied under the terms of the
+.\" Common Development and Distribution License ("CDDL"), version 1.0.
+.\" You may only use this file in accordance with the terms of version
+.\" 1.0 of the CDDL.
+.\"
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source. A copy of the CDDL is also available via the Internet at
+.\" http://www.illumos.org/license/CDDL.
+.\"
+.\"
+.\" Copyright 2017 Nexenta Systems, Inc.
+.\"
+.Dd March 28, 2017
+.Dt WCSTOMBS 3C
+.Os
+.Sh NAME
+.Nm wcstombs ,
+.Nm wcstombs_l
+.Nd convert a wide-character string to a multibyte character string
+.Sh LIBRARY
+.Lb libc
+.Sh SYNOPSIS
+.In stdlib.h
+.Ft size_t
+.Fo wcstombs
+.Fa "char *restrict s"
+.Fa "const wchar_t *restrict pwcs"
+.Fa "size_t n"
+.Fc
+.In stdlib.h
+.In xlocale.h
+.Ft size_t
+.Fo wcstombs_l
+.Fa "char *restrict s"
+.Fa "const wchar_t *restrict pwcs"
+.Fa "size_t n"
+.Fa "locale_t loc"
+.Fc
+.Sh DESCRIPTION
+The
+.Fn wcstombs
+function converts a wide-character string
+.Fa pwcs
+into a multibyte character string, beginning in the initial conversion state.
+If
+.Fa s
+is not
+.Dv NULL ,
+converted characters are stored into the array pointed to by
+.Fa s .
+.Pp
+Conversion continues up to and including a terminating null wide-character,
+which is also stored, or until
+.Fa n
+bytes have been stored into the array pointed to by
+.Fa s .
+If the latter case results in partial multibyte character at the end of the
+string, it is not stored.
+.Pp
+The behavior of
+.Fn wcstombs
+function is affected by the
+.Ev LC_CTYPE
+category of the current locale.
+.Pp
+The
+.Fn wcstombs_l
+function behaves identically to
+.Fn wcstombs ,
+except instead of using the current locale, it uses the locale as specified by
+.Fa loc .
+.Sh RETURN VALUES
+The
+.Fn wcstombs
+and
+.Fn wcstombs_l
+functions return the number of bytes in the resulting character sequence, not
+including the terminating null
+.Pq if any ,
+or
+.Li \-1
+if a code is reached that does not correspond to a valid character.
+.Sh ERRORS
+The
+.Fn wcstombs
+and
+.Fn wcstombs_l
+functions will fail if:
+.Bl -tag -width Er
+.It Er EILSEQ
+A wide-character code does not correspond to a valid character.
+.It Er EINVAL
+The conversion state is invalid.
+.El
+.Sh INTERFACE STABILITY
+The
+.Fn wcstombs
+function is
+.Sy Standard .
+The
+.Fn wcstombs_l
+function is
+.Sy Uncommited .
+.Sh MT-LEVEL
+.Sy MT-Safe
+.Sh SEE ALSO
+.Xr mbstowcs 3C ,
+.Xr newlocale 3C ,
+.Xr setlocale 3C ,
+.Xr uselocale 3C ,
+.Xr wcsnrtombs 3C ,
+.Xr wctomb 3C ,
+.Xr attributes 5 ,
+.Xr environ 5 ,
+.Xr standards 5
diff --git a/usr/src/pkg/manifests/system-library.man3c.inc b/usr/src/pkg/manifests/system-library.man3c.inc
index 91c54dd6ea..f913eecea4 100644
--- a/usr/src/pkg/manifests/system-library.man3c.inc
+++ b/usr/src/pkg/manifests/system-library.man3c.inc
@@ -20,7 +20,6 @@ file path=usr/share/man/man3c/__fbufsize.3c
file path=usr/share/man/man3c/_longjmp.3c
file path=usr/share/man/man3c/_stack_grow.3c
file path=usr/share/man/man3c/a64l.3c
-file path=usr/share/man/man3c/aligned_alloc.3c
file path=usr/share/man/man3c/abort.3c
file path=usr/share/man/man3c/abs.3c
file path=usr/share/man/man3c/addsev.3c
@@ -36,8 +35,9 @@ file path=usr/share/man/man3c/aio_write.3c
file path=usr/share/man/man3c/aiocancel.3c
file path=usr/share/man/man3c/aioread.3c
file path=usr/share/man/man3c/aiowait.3c
-file path=usr/share/man/man3c/assert.3c
+file path=usr/share/man/man3c/aligned_alloc.3c
file path=usr/share/man/man3c/arc4random.3c
+file path=usr/share/man/man3c/assert.3c
file path=usr/share/man/man3c/atexit.3c
file path=usr/share/man/man3c/atomic_add.3c
file path=usr/share/man/man3c/atomic_and.3c
@@ -152,6 +152,7 @@ file path=usr/share/man/man3c/fwide.3c
file path=usr/share/man/man3c/fwprintf.3c
file path=usr/share/man/man3c/fwrite.3c
file path=usr/share/man/man3c/fwscanf.3c
+file path=usr/share/man/man3c/get_nprocs.3c
file path=usr/share/man/man3c/getcpuid.3c
file path=usr/share/man/man3c/getcwd.3c
file path=usr/share/man/man3c/getdate.3c
@@ -168,7 +169,6 @@ file path=usr/share/man/man3c/getloadavg.3c
file path=usr/share/man/man3c/getlogin.3c
file path=usr/share/man/man3c/getmntent.3c
file path=usr/share/man/man3c/getnetgrent.3c
-file path=usr/share/man/man3c/get_nprocs.3c
file path=usr/share/man/man3c/getopt.3c
file path=usr/share/man/man3c/getpagesize.3c
file path=usr/share/man/man3c/getpagesizes.3c
@@ -229,6 +229,7 @@ file path=usr/share/man/man3c/mbrlen.3c
file path=usr/share/man/man3c/mbrtowc.3c
file path=usr/share/man/man3c/mbsinit.3c
file path=usr/share/man/man3c/mbsrtowcs.3c
+file path=usr/share/man/man3c/mbstowcs.3c
file path=usr/share/man/man3c/mbtowc.3c
file path=usr/share/man/man3c/membar_ops.3c
file path=usr/share/man/man3c/memory.3c
@@ -326,8 +327,8 @@ file path=usr/share/man/man3c/pthread_join.3c
file path=usr/share/man/man3c/pthread_key_create.3c
file path=usr/share/man/man3c/pthread_key_delete.3c
file path=usr/share/man/man3c/pthread_kill.3c
-file path=usr/share/man/man3c/pthread_mutex_getprioceiling.3c
file path=usr/share/man/man3c/pthread_mutex_consistent.3c
+file path=usr/share/man/man3c/pthread_mutex_getprioceiling.3c
file path=usr/share/man/man3c/pthread_mutex_init.3c
file path=usr/share/man/man3c/pthread_mutex_lock.3c
file path=usr/share/man/man3c/pthread_mutex_timedlock.3c
@@ -531,6 +532,7 @@ file path=usr/share/man/man3c/wcsstr.3c
file path=usr/share/man/man3c/wcstod.3c
file path=usr/share/man/man3c/wcstoimax.3c
file path=usr/share/man/man3c/wcstol.3c
+file path=usr/share/man/man3c/wcstombs.3c
file path=usr/share/man/man3c/wcstoul.3c
file path=usr/share/man/man3c/wcstring.3c
file path=usr/share/man/man3c/wcswidth.3c
@@ -820,6 +822,7 @@ link path=usr/share/man/man3c/func_to_decimal.3c target=string_to_decimal.3c
link path=usr/share/man/man3c/funlockfile.3c target=flockfile.3c
link path=usr/share/man/man3c/gconvert.3c target=econvert.3c
link path=usr/share/man/man3c/gcvt.3c target=ecvt.3c
+link path=usr/share/man/man3c/get_nprocs_conf.3c target=get_nprocs.3c
link path=usr/share/man/man3c/getattrat.3c target=fgetattr.3c
link path=usr/share/man/man3c/getc.3c target=fgetc.3c
link path=usr/share/man/man3c/getc_unlocked.3c target=fgetc.3c
@@ -837,7 +840,6 @@ link path=usr/share/man/man3c/gethrvtime.3c target=gethrtime.3c
link path=usr/share/man/man3c/getlogin_r.3c target=getlogin.3c
link path=usr/share/man/man3c/getmntany.3c target=getmntent.3c
link path=usr/share/man/man3c/getnetgrent_r.3c target=getnetgrent.3c
-link path=usr/share/man/man3c/get_nprocs_conf.3c target=get_nprocs.3c
link path=usr/share/man/man3c/getpassphrase.3c target=getpass.3c
link path=usr/share/man/man3c/getpwent.3c target=getpwnam.3c
link path=usr/share/man/man3c/getpwent_r.3c target=getpwnam.3c
@@ -969,8 +971,7 @@ link path=usr/share/man/man3c/mbsinit_l.3c target=mbsinit.3c
link path=usr/share/man/man3c/mbsnrtowcs.3c target=mbsrtowcs.3c
link path=usr/share/man/man3c/mbsnrtowcs_l.3c target=mbsrtowcs.3c
link path=usr/share/man/man3c/mbsrtowcs_l.3c target=mbsrtowcs.3c
-link path=usr/share/man/man3c/mbstowcs.3c target=mbsrtowcs.3c
-link path=usr/share/man/man3c/mbstowcs_l.3c target=mbsrtowcs.3c
+link path=usr/share/man/man3c/mbstowcs_l.3c target=mbstowcs.3c
link path=usr/share/man/man3c/mbtowc_l.3c target=mbtowc.3c
link path=usr/share/man/man3c/memalign.3c target=malloc.3c
link path=usr/share/man/man3c/membar_consumer.3c target=membar_ops.3c
@@ -985,8 +986,8 @@ link path=usr/share/man/man3c/memmem.3c target=memory.3c
link path=usr/share/man/man3c/memmove.3c target=memory.3c
link path=usr/share/man/man3c/memset.3c target=memory.3c
link path=usr/share/man/man3c/minor.3c target=makedev.3c
-link path=usr/share/man/man3c/mkfifoat.3c target=mkfifo.3c
link path=usr/share/man/man3c/mkdtemp.3c target=mkstemp.3c
+link path=usr/share/man/man3c/mkfifoat.3c target=mkfifo.3c
link path=usr/share/man/man3c/mkostemp.3c target=mkstemp.3c
link path=usr/share/man/man3c/mkostemps.3c target=mkstemp.3c
link path=usr/share/man/man3c/mkstemps.3c target=mkstemp.3c
@@ -1429,6 +1430,7 @@ link path=usr/share/man/man3c/wcstof.3c target=wcstod.3c
link path=usr/share/man/man3c/wcstok.3c target=wcstring.3c
link path=usr/share/man/man3c/wcstold.3c target=wcstod.3c
link path=usr/share/man/man3c/wcstoll.3c target=wcstol.3c
+link path=usr/share/man/man3c/wcstombs_l.3c target=wcstombs.3c
link path=usr/share/man/man3c/wcstoull.3c target=wcstoul.3c
link path=usr/share/man/man3c/wcstoumax.3c target=wcstoimax.3c
link path=usr/share/man/man3c/wcswcs.3c target=wcstring.3c