Provided by: manpages-es-dev_4.13-4_all bug

NOMBRE

       wcrtomb - convierte una carácter ancho a un secuencia multibyte

SINOPSIS

       #include <wchar.h>

       size_t wcrtomb(char *s, wchar_t wc, mbstate_t *ps);

DESCRIPCIÓN

       The  main case for this function is when s is not NULL and wc is not a null wide character
       (L'\0').  In this case, the wcrtomb() function converts  the  wide  character  wc  to  its
       multibyte  representation and stores it at the beginning of the character array pointed to
       by s.  It updates  the  shift  state  *ps,  and  returns  the  length  of  said  multibyte
       representation, that is, the number of bytes written at s.

       A  different case is when s is not NULL, but wc is a null wide character (L'\0').  In this
       case, the wcrtomb()  function stores at the character array pointed  to  by  s  the  shift
       sequence  needed  to  bring  *ps  back  to the initial state, followed by a '\0' byte.  It
       updates the shift state *ps (i.e., brings it into the  initial  state),  and  returns  the
       length of the shift sequence plus one, that is, the number of bytes written at s.

       Un  tercer  caso  es  cuando  s  es NULL. En este caso wc se ignora, y la función devuelve
       efectivamente

           wcrtomb(buf, L'\0', ps)

       donde buf es un buffer anónimo interno.

       In all of the above cases, if ps is NULL, a static  anonymous  state  known  only  to  the
       wcrtomb()  function is used instead.

VALOR DEVUELTO

       La  función  wcrtomb()  devuelve  el  número de bytes que han sido o serían escritos en el
       array de bytes s. Si wc no se puede representar como un secuencia multibyte (de acuerdo  a
       la localización actual), devuelve (size_t) -1 y errno se pone con el valor EILSEQ.

ATRIBUTOS

       Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

       ┌──────────┬────────────────────┬────────────────────────────┐
       │InterfazAtributoValor                      │
       ├──────────┼────────────────────┼────────────────────────────┤
       │wcrtomb() │ Seguridad del hilo │ MT-Unsafe race:wcrtomb/!ps │
       └──────────┴────────────────────┴────────────────────────────┘

CONFORME A

       POSIX.1-2001, POSIX.1-2008, C99.

NOTAS

       El comportamiento de wcrtomb() depende de la categoría LC_CTYPE de la localización actual.

       Pasar NULL como valor de ps no es seguro en un entorno multihilos.

VÉASE TAMBIÉN

       mbsinit(3), wcsrtombs(3)

COLOFÓN

       Esta  página es parte de la versión 5.10 del proyecto Linux man-pages. Puede encontrar una
       descripción del proyecto, información sobre cómo informar errores y la última  versión  de
       esta página en https://www.kernel.org/doc/man-pages/.

TRADUCCIÓN

       La  traducción  al  español  de  esta página del manual fue creada por Pedro Pablo Fábrega
       <pfabrega@arrakis.es> y Juan Piernas <piernas@ditec.um.es>

       Esta traducción es documentación libre; lea  la  GNU  General  Public  License  Version  3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩  o posterior con respecto a las condiciones de
       copyright.  No existe NINGUNA RESPONSABILIDAD.

       Si encuentra algún error en la traducción de esta  página  del  manual,  envíe  un  correo
       electrónico a debian-l10n-spanish@lists.debian.org ⟨⟩.