.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) Bruno Haible .\" .\" SPDX-License-Identifier: GPL-2.0-or-later .\" .\" References consulted: .\" GNU glibc-2 source code and manual .\" Dinkumware C library reference http://www.dinkumware.com/ .\" OpenGroup's Single UNIX specification http://www.UNIX-systems.org/online.html .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH wcsnrtombs 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE wcsnrtombs \- convierte una cadena de caracteres anchos a una cadena mulibyte .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBsize_t wcsnrtombs(char \fP\fIdest\fP\fB[restrict .\fP\fIlen\fP\fB], const wchar_t **restrict \fP\fIsrc\fP\fB,\fP \fB size_t \fP\fInwc\fP\fB, size_t \fP\fIlen\fP\fB, mbstate_t *restrict \fP\fIps\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBwcsnrtombs\fP(): .nf Desde glibc 2.10: _POSIX_C_SOURCE >= 200809L Antes de glibc 2.10: _GNU_SOURCE .fi .SH DESCRIPCIÓN La función \fBwcsnrtombs\fP() es como la función \fBwcsrtombs\fP(3), salvo que el número de caracteres anchos a convertir, empezando en \fI*src\fP, está limitado a \fInwc\fP. .PP If \fIdest\fP is not NULL, the \fBwcsnrtombs\fP() function converts at most \fInwc\fP wide characters from the wide\-character string \fI*src\fP to a multibyte string starting at \fIdest\fP. At most \fIlen\fP bytes are written to \fIdest\fP. The shift state \fI*ps\fP is updated. The conversion is effectively performed by repeatedly calling \fIwcrtomb(dest, *src, ps)\fP, as long as this call succeeds, and then incrementing \fIdest\fP by the number of bytes written and \fI*src\fP by one. The conversion can stop for three reasons: .IP \[bu] 3 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, \fI*src\fP se deja apuntando al carácter ancho inválido, se devuelve \fI(size_t)\ \-1\fP y \fIerrno\fP toma el valor \fBEILSEQ\fP. .IP \[bu] \fInwc\fP wide characters have been converted without encountering a null wide character (L\[aq]\e0\[aq]), or the length limit forces a stop. In this case, \fI*src\fP is left pointing to the next wide character to be converted, and the number of bytes written to \fIdest\fP is returned. .IP \[bu] The wide\-character string has been completely converted, including the terminating null wide character (which has the side effect of bringing back \fI*ps\fP to the initial state). In this case, \fI*src\fP is set to NULL, and the number of bytes written to \fIdest\fP, excluding the terminating null byte (\[aq]\e0\[aq]), is returned. .PP Si \fIdest\fP es NULL, \fIlen\fP 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. .PP In both of the above cases, if \fIps\fP is NULL, a static anonymous state known only to the \fBwcsnrtombs\fP() function is used instead. .PP El programador tiene que asegurarse de que hay espacio para al menos \fIlen\fP bytes en \fIdest\fP. .SH "VALOR DEVUELTO" La función \fBwcsnrtombs\fP() 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 \fI(size_t)\ \-1\fP y \fIerrno\fP toma el valor \fBEILSEQ\fP. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lb lb lbx l l l. Interfaz Atributo Valor T{ .na .nh \fBwcsnrtombs\fP() T} Seguridad del hilo T{ .na .nh MT\-Unsafe race:wcsnrtombs/!ps T} .TE .sp 1 .SH ESTÁNDARES POSIX.1\-2008. .SH NOTAS El comportamiento de \fBwcsnrtombs\fP() depende de la categoría \fBLC_CTYPE\fP de la localización actual. .PP Pasar NULL como valor de \fIps\fP no es seguro en un entorno multihilos. .SH "VÉASE TAMBIÉN" \fBiconv\fP(3), \fBmbsinit\fP(3), \fBwcsrtombs\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Pedro Pablo Fábrega y Juan Piernas . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .