.\" -*- 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 .\" ISO/IEC 9899:1999 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH wcsrtombs 3 "17 Noviembre 2024" "Páginas de Manual de Linux 6.12" .SH NOMBRE wcsrtombs \- convierte una cadena de caracteres anchos a una cadena multibyte .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP,\ \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .P \fBsize_t wcsrtombs(char \fP\fIdest\fP\fB[restrict .\fP\fIsize\fP\fB], const wchar_t **restrict \fP\fIsrc\fP\fB,\fP \fB size_t \fP\fIsize\fP\fB, mbstate_t *restrict \fP\fIps\fP\fB);\fP .fi .SH DESCRIPCIÓN If \fIdest\fP is not NULL, the \fBwcsrtombs\fP() function converts the wide\-character string \fI*src\fP to a multibyte string starting at \fIdest\fP. At most \fIsize\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] The size 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 (L\[aq]\[rs]0\[aq]), 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]\[rs]0\[aq]), is returned. .P If \fIdest\fP is NULL, \fIsize\fP is ignored, and the conversion proceeds as above, except that the converted bytes are not written out to memory, and that no size limit exists. .P En los dos casos anteriores, si \fIps\fP es un puntero NULL se usa en su lugar un estado estático anónimo sólo conocido por la función \fBwcsrtombs\fP(). .P The programmer must ensure that there is room for at least \fIsize\fP bytes at \fIdest\fP. .SH "VALOR DEVUELTO" La función \fBwcsrtombs\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 \fBwcsrtombs\fP() T} Seguridad del hilo T{ .na .nh MT\-Carrera insegura:wcsrtombs/!ps T} .TE .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, C99. .SH NOTAS El comportamiento de \fBwcsrtombs\fP() depende de la categoría \fBLC_CTYPE\fP de la localización actual. .P 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), \fBwcrtomb\fP(3), \fBwcsnrtombs\fP(3), \fBwcstombs\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 .