.\" -*- 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 mbsrtowcs 3 "19 novembre 2023" "Pages du manuel de Linux 6.06" .SH NOM mbsrtowcs \- convert a multibyte string to a wide\-character string (restartable) .SH BIBLIOTHÈQUE Bibliothèque C standard (\fIlibc\fP, \fI\-lc\fP) .SH SYNOPSIS .nf \fB#include \fP .P \fBsize_t mbsrtowcs(wchar_t \fP\fIdest\fP\fB[restrict .\fP\fIdsize\fP\fB], const char **restrict \fP\fIsrc\fP\fB,\fP \fB size_t \fP\fIdsize\fP\fB, mbstate_t *restrict \fP\fIps\fP\fB);\fP .fi .SH DESCRIPTION If \fIdest\fP is not NULL, convert the multibyte string \fI*src\fP to a wide\-character string starting at \fIdest\fP. At most \fIdsize\fP wide characters are written to \fIdest\fP. The shift state \fI*ps\fP is updated. The conversion is effectively performed by repeatedly calling \fImbrtowc(dest, *src, n, ps)\fP where \fIn\fP is some positive number, as long as this call succeeds, and then incrementing \fIdest\fP by one and \fI*src\fP by the number of bytes consumed. The conversion can stop for three reasons: .IP \- 3 Une séquence multioctet incorrecte a été rencontrée. Dans ce cas, \fI*src\fP pointera sur la séquence incorrecte, et la fonction renvoie \fI(size_t)\ \-1\fP en positionnant \fIerrno\fP à la valeur \fBEILSEQ\fP. .IP \- \fIdsize\fP non\-L\[aq]\e0\[aq] wide characters have been stored at \fIdest\fP. In this case, \fI*src\fP is left pointing to the next multibyte sequence to be converted, and the number of wide characters written to \fIdest\fP is returned. .IP \- La séquence multioctet a été complètement convertie, y compris le caractère nul (\[aq]\e0\[aq]) final, ce qui a pour effet de bord de ramener \fI*ps\fP à l'état initial. Dans ce cas, \fI*src\fP est mis à NULL, et le nombre de caractères écrits dans \fIdest\fP, moins le caractère large nul final, est renvoyé. .P If \fIdest\fP is NULL, \fIdsize\fP is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no length limit exists. .P Dans tous les cas, si \fIps\fP est un pointeur NULL, un état anonyme statique, réservé à la fonction \fBmbsnrtowcs\fP() est utilisé à sa place. .P In order to avoid the case 2 above, the programmer should make sure \fIdsize\fP is greater than or equal to \fImbsrtowcs(NULL,src,0,ps)+1\fP. .P The programmer must ensure that there is room for at least \fIdsize\fP wide characters at \fIdest\fP. .P This function is a restartable version of \fBmbstowcs\fP(3). .SH "VALEUR RENVOYÉE" The number of wide characters that make up the converted part of the wide\-character string, not including the terminating null wide character. If an invalid multibyte sequence was encountered, \fI(size_t)\ \-1\fP is returned, and \fIerrno\fP set to \fBEILSEQ\fP. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lbx l l l. Interface Attribut Valeur T{ .na .nh \fBmbsrtowcs\fP() T} Sécurité des threads T{ .na .nh MT\-Unsafe race:mbsrtowcs/!ps T} .TE .SH STANDARDS C11, POSIX.1\-2008. .SH HISTORIQUE POSIX.1\-2001, C99. .SH NOTES Le comportement de \fBmbsrtowcs\fP() dépend de la catégorie \fBLC_CTYPE\fP de la localisation en cours. .P Passer NULL dans \fBps\fP n'est pas sûr dans un contexte multithread. .SH "VOIR AUSSI" \fBiconv\fP(3), \fBmbrtowc\fP(3), \fBmbsinit\fP(3), \fBmbsnrtowcs\fP(3), \fBmbstowcs\fP(3) .PP .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier , David Prévot , Jean-Baptiste Holcroft et Grégoire Scano . .PP Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. .PP Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .