oracular (3) wcsnrtombs.3.gz

Provided by: manpages-es-dev_4.23.1-1_all bug

NOMBRE

       wcsnrtombs - convierte una cadena de caracteres anchos a una cadena mulibyte

BIBLIOTECA

       Biblioteca Estándar C (libc, -lc)

SINOPSIS

       #include <wchar.h>

       size_t wcsnrtombs(char dest[restrict .len], const wchar_t **restrict src,
                         size_t nwc, size_t len, mbstate_t *restrict ps);

   Requisitos de Macros de Prueba de Características para glibc (véase feature_test_macros(7)):

       wcsnrtombs():
           Desde glibc 2.10:
               _POSIX_C_SOURCE >= 200809L
           Antes de glibc 2.10:
               _GNU_SOURCE

DESCRIPCIÓN

       La  función  wcsnrtombs()  es  como  la  función wcsrtombs(3), salvo que el número de caracteres anchos a
       convertir, empezando en *src, está limitado a nwc.

       If dest is not  NULL,  the  wcsnrtombs()   function  converts  at  most  nwc  wide  characters  from  the
       wide-character  string  *src  to  a  multibyte string starting at dest.  At most len bytes are written to
       dest.  The shift state *ps is updated.  The conversion is effectively  performed  by  repeatedly  calling
       wcrtomb(dest, *src, ps), as long as this call succeeds, and then incrementing dest by the number of bytes
       written and *src by one.  The conversion can stop for three reasons:

       •  Se ha encontrado un carácter ancho que no se  puede  representar  como  una  secuencia  multibyte  (de
          acuerdo  con la localización actual). En este caso, *src se deja apuntando al carácter ancho inválido,
          se devuelve (size_t) -1 y errno toma el valor EILSEQ.

       •  nwc wide characters have been converted without encountering a null wide  character  (L'\0'),  or  the
          length  limit  forces  a  stop.   In this case, *src is left pointing to the next wide character to be
          converted, and the number of bytes written to dest is returned.

       •  The wide-character string has been completely converted, including the terminating null wide character
          (which  has  the side effect of bringing back *ps to the initial state).  In this case, *src is set to
          NULL, and the number of bytes written  to  dest,  excluding  the  terminating  null  byte  ('\0'),  is
          returned.

       Si  dest  es NULL, len se ignora, y la conversión procede como arriba, salvo que los bytes convertidos no
       se escriben en memoria, y no existe límite de longitud.

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

       El programador tiene que asegurarse de que hay espacio para al menos len bytes en dest.

VALOR DEVUELTO

       La  función  wcsnrtombs()  devuelve  el  número de bytes que conforman la parte de la secuencia multibyte
       convertida, sin incluir el byte nulo terminador. Si encontró un carácter ancho  que  no  pudo  convertir,
       devuelve (size_t) -1 y errno toma el valor EILSEQ.

ATRIBUTOS

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

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

ESTÁNDARES

       POSIX.1-2008.

NOTAS

       El comportamiento de wcsnrtombs() 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

       iconv(3), mbsinit(3), wcsrtombs(3)

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⟩.