Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mbstowcs(3C) — DG/UX 5.4R3.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

reentrant(3)

mbchar(3C)

setlocale(3C)

environ(5)

chrtbl(1M)



mbstring(3C)                   DG/UX 5.4R3.00                   mbstring(3C)


NAME
       mbstring: mbstowcs, wcstombs - multibyte string functions

SYNOPSIS
       #include <stdlib.h>

       sizet mbstowcs (wchart *pwcs, const char *s, sizet n);

       sizet wcstombs (char *s, const wchart *pwcs, sizet n);

DESCRIPTION
       mbstowcs converts a sequence of multibyte characters from the array
       pointed to by s into a sequence of corresponding wide character codes
       and stores these codes into the array pointed to by pwcs, stopping
       after n codes are stored or a code with value zero (a converted null
       character) is stored.  If an invalid multibyte character is
       encountered, mbstowcs returns (sizet)-1.  Otherwise, mbstowcs
       returns the number of array elements modified, not including the
       terminating zero code, if any.

       wcstombs converts a sequence of wide character codes from the array
       pointed to by pwcs into a sequence of multibyte characters and stores
       these multibyte characters into the array pointed to by s, stopping
       if a multibyte character would exceed the limit of n total bytes or
       if a null character is stored.  If a wide character code is
       encountered that does not correspond to a valid multibyte character,
       wcstombs returns (sizet)-1.  Otherwise, wcstombs returns the number
       of bytes modified, not including a terminating null character, if
       any.


   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |              point    safe  |
                     +---------+-----------------------------+
                     |mbstring |     Y          N        N   |
                     |mbstowcs |     Y          N        N   |
                     |wcstombs |     Y          N        N   |
                     +---------+-----------------------------+

SEE ALSO
       reentrant(3), mbchar(3C), setlocale(3C), environ(5).
       chrtbl(1M).












Licensed material--property of copyright holder(s)                         1


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026