.\" -*- 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 wprintf 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf \- conversión con formato de la salida de caracteres anchos .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP \fB#include \fP .PP \fBint wprintf(const wchar_t *restrict \fP\fIformat\fP\fB, ...);\fP \fBint fwprintf(FILE *restrict \fP\fIstream\fP\fB,\fP \fB const wchar_t *restrict \fP\fIformat\fP\fB, ...);\fP \fBint swprintf(wchar_t \fP\fIwcs\fP\fB[restrict .\fP\fImaxlen\fP\fB], size_t \fP\fImaxlen\fP\fB,\fP \fB const wchar_t *restrict \fP\fIformat\fP\fB, ...);\fP .PP \fBint vwprintf(const wchar_t *restrict \fP\fIformat\fP\fB, va_list \fP\fIargs\fP\fB);\fP \fBint vfwprintf(FILE *restrict \fP\fIstream\fP\fB,\fP \fB const wchar_t *restrict \fP\fIformat\fP\fB, va_list \fP\fIargs\fP\fB);\fP \fBint vswprintf(wchar_t \fP\fIwcs\fP\fB[restrict .\fP\fImaxlen\fP\fB], size_t \fP\fImaxlen\fP\fB,\fP \fB const wchar_t *restrict \fP\fIformat\fP\fB, va_list \fP\fIargs\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 .\" .BR wprintf (), .\" .BR fwprintf (), .\" .BR swprintf (), .\" .BR vwprintf (), .\" .BR vfwprintf (), .\" .BR vswprintf (): A continuación se muestran todas las funciones: .nf _XOPEN_SOURCE >= 500 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi .SH DESCRIPCIÓN La familia de funciones \fBwprintf\fP() es equivalente para caracteres anchos a la familia de funciones \fBprintf\fP(3). Realizan la salida con formato de caracteres anchos. .PP Las funciones \fBwprintf\fP() y \fBvwprintf\fP() realizan la salida de caracteres anchos a \fIstdout\fP. \fIstdout\fP no debe estar orientada a bytes. Vea \fBfwide\fP(3) para más información. .PP Las funciones \fBfwprintf\fP() y \fBvfwprintf\fP() realizan la salida de caracteres anchos a \fIstream\fP. \fIstream\fP no debe estar orientado a bytes. Vea \fBfwide\fP(3) para más información. .PP Las funciones \fBswprintf\fP() y \fBvswprintf\fP() realizan la salida de caracteres anchos a un array de caracteres anchos. El programador debe garantizar que hay espacio suficiente en \fIwcs\fP para, al menos, \fImaxlen\fP caracteres anchos. .PP Estas funciones son como las funciones \fBprintf\fP(3), \fBvprintf\fP(3), \fBfprintf\fP(3), \fBvfprintf\fP(3), \fBsprintf\fP(3) y \fBvsprintf\fP(3), salvo por las siguientes diferencias: .TP \fB\[bu]\fP La cadena \fIformat\fP es una cadena de caracteres anchos. .TP \fB\[bu]\fP La salida está formada por caracteres anchos, no por bytes. .TP \fB\[bu]\fP \fBswprintf\fP() y \fBvswprintf\fP() toman un argumento \fImaxlen\fP, \fBsprintf\fP(3) y \fBvsprintf\fP(3) no. (Las funciones \fBsnprintf\fP(3) y \fBvsnprintf\fP(3) toman un argumento \fImaxlen\fP, pero en Linux no devuelven \-1 ante un desbordamiento de buffer.) .PP El tratamiento de los caracteres de conversión \fBc\fP y \fBs\fP es distinto: .TP \fBc\fP Si no está presente un modificador \fBl\fP, el argumento \fIint\fP se convierte a un carácter ancho, mediante una llamada a la función \fBbtowc\fP(3), y se escribe el carácter ancho resultante. Si está presente un modificador \fBl\fP, se escribe el argumento (carácter ancho) \fIwint_t\fP. .TP \fBs\fP If no \fBl\fP modifier is present: the \fIconst\ char\ *\fP argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state. Characters from the array are converted to wide characters (each by a call to the \fBmbrtowc\fP(3) function with a conversion state starting in the initial state before the first byte). The resulting wide characters are written up to (but not including) the terminating null wide character (L\[aq]\e0\[aq]). If a precision is specified, no more wide characters than the number specified are written. Note that the precision determines the number of \fIwide characters\fP written, not the number of \fIbytes\fP or \fIscreen positions\fP. The array must contain a terminating null byte (\[aq]\e0\[aq]), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached. If an \fBl\fP modifier is present: the \fIconst\ wchar_t\ *\fP argument is expected to be a pointer to an array of wide characters. Wide characters from the array are written up to (but not including) a terminating null wide character. If a precision is specified, no more than the number specified are written. The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array. .SH "VALOR DEVUELTO" Las funciones devuelven el número de caracteres anchos escritos, excluyendo el carácter ancho terminador nulo en el caso de las funciones \fBswprintf\fP() y \fBvswprintf\fP(). Las funciones devuelven \-1 en caso de error. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBwprintf\fP(), \fBfwprintf\fP(), \fBswprintf\fP(), \fBvwprintf\fP(), \fBvfwprintf\fP(), \fBvswprintf\fP() T} Seguridad del hilo Configuración regional de multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, C99. .SH NOTAS El comportamiento de \fBwprintf\fP() y compañía depende de la categoría \fBLC_CTYPE\fP de la localización actual. .PP If the \fIformat\fP string contains non\-ASCII wide characters, the program will work correctly only if the \fBLC_CTYPE\fP category of the current locale at run time is the same as the \fBLC_CTYPE\fP category of the current locale at compile time. This is because the \fIwchar_t\fP representation is platform\- and locale\-dependent. (The glibc represents wide characters using their Unicode (ISO/IEC 10646) code point, but other platforms don't do this. Also, the use of C99 universal character names of the form \eunnnn does not solve this problem.) Therefore, in internationalized programs, the \fIformat\fP string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using \fBgettext\fP(3) or \fBiconv\fP(3), followed by \fBmbstowcs\fP(3)). .SH "VÉASE TAMBIÉN" \fBfprintf\fP(3), \fBfputwc\fP(3), \fBfwide\fP(3), \fBprintf\fP(3), \fBsnprintf\fP(3) .\" .BR wscanf (3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por 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 .