.\" -*- 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 mbsinit 3 "28 Enero 2024" "Páginas de manual de Linux 6.06" .SH NOMBRE mbsinit \- comprueba el estado inicial de cambios .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .P \fBint mbsinit(const mbstate_t *\fP\fIps\fP\fB);\fP .fi .SH DESCRIPCIÓN Character conversion between the multibyte representation and the wide character representation uses conversion state, of type \fImbstate_t\fP. Conversion of a string uses a finite\-state machine; when it is interrupted after the complete conversion of a number of characters, it may need to save a state for processing the remaining characters. Such a conversion state is needed for the sake of encodings such as ISO/IEC\~2022 and UTF\-7. .P El estado inicial es el estado al principio de la conversión de la cadena. Existen dos clases de estado: el que usan las funciones de conversión de multibyte a carácter ancho, tal como \fBmbsrtowcs\fP(3), y el que usan las funciones de conversión de carácter ancho a multibyte, tal como \fBwcsrtombs\fP(3), aunque ambos encajan en un \fImbstate_t\fP, y ambos poseen la misma representación para un estado inicial. .P For 8\-bit encodings, all states are equivalent to the initial state. For multibyte encodings like UTF\-8, EUC\-*, BIG5, or SJIS, the wide character to multibyte conversion functions never produce non\-initial states, but the multibyte to wide\-character conversion functions like \fBmbrtowc\fP(3) do produce non\-initial states when interrupted in the middle of a character. .P Una forma posible de crear un \fImbstate_t\fP en un estado inicial es asignarle un cero: .P .in +4n .EX mbstate_t state; memset(&state, 0, sizeof(state)); .EE .in .P En Linux, lo siguiente también funciona, aunque podría producir advertencias del compilador: .P .in +4n .EX mbstate_t state = { 0 }; .EE .in .P La función \fBmbsinit\fP() comprueba si \fI*ps\fP se corresponde con un estado inicial. .SH "VALOR DEVUELTO" \fBmbsinit\fP() returns nonzero if \fI*ps\fP is an initial state, or if \fIps\fP is NULL. Otherwise, it returns 0. .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 \fBmbsinit\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, C99. .SH NOTAS El comportamiento de \fBmbsinit\fP() depende de la categoría \fBLC_CTYPE\fP de la localización actual. .SH "VÉASE TAMBIÉN" \fBmbrlen\fP(3), \fBmbrtowc\fP(3), \fBmbsrtowcs\fP(3), \fBwcrtomb\fP(3), \fBwcsrtombs\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Juan Piernas y Miguel Pérez Ibars . .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 .