.\" -*- 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 mbsnrtowcs 3 "17 novembre 2024" "Pages du manuel de Linux 6.12" .SH NOM mbsnrtowcs \- Convertir une séquence multioctet en chaîne de caractères larges .SH BIBLIOTHÈQUE Bibliothèque C standard (\fIlibc\fP,\ \fI\-lc\fP) .SH SYNOPSIS .nf \fB#include \fP .P \fBsize_t mbsnrtowcs(wchar_t \fP\fIdest\fP\fB[restrict .\fP\fIsize\fP\fB], const char **restrict \fP\fIsrc\fP\fB,\fP \fB size_t \fP\fInms\fP\fB, size_t \fP\fIsize\fP\fB, mbstate_t *restrict \fP\fIps\fP\fB);\fP .fi .P .RS -4 Exigences de macros de test de fonctionnalités pour la glibc (consulter \fBfeature_test_macros\fP(7)) : .RE .P \fBmbsnrtowcs\fP()\ : .nf Depuis la glibc 2.10 : _POSIX_C_SOURCE >= 200809L Avant la glibc 2.10 : _GNU_SOURCE .fi .SH DESCRIPTION La fonction \fBmbsnrtowcs\fP() est équivalente à la fonction \fBmbsrtowcs\fP(3), sauf qu'elle ne convertit qu'un nombre limité à au plus \fInms\fP octets commençant en \fI*src\fP. .P If \fIdest\fP is not NULL, the \fBmbsnrtowcs\fP() function converts at most \fInms\fP bytes from the multibyte string \fI*src\fP to a wide\-character string starting at \fIdest\fP. At most \fIsize\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 \- The \fInms\fP limit forces a stop, or \fIsize\fP non\-L\[aq]\[rs]0\[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 \- The multibyte string has been completely converted, including the terminating null wide character (\[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 wide characters written to \fIdest\fP, excluding the terminating null wide character, is returned. .P Selon POSIX.1, si le tampon d'entrée se termine par un caractère incomplet, il n'est pas spécifié si la conversion s'arrête à la fin du caractère précédant (s'il existe) ou à la fin du tampon d'entrée. L'implémentation de la glibc suit le premier comportement. .P If \fIdest\fP is NULL, \fIsize\fP is ignored, and the conversion proceeds as above, except that the converted wide characters are not written out to memory, and that no destination size 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 The programmer must ensure that there is room for at least \fIsize\fP wide characters at \fIdest\fP. .SH "VALEUR RENVOYÉE" La fonction \fBmbsnrtowcs\fP() renvoie le nombre de caractères larges placés dans la zone convertie, sans compter le caractère nul final. Si une séquence multioctet incorrecte est rencontrée, la fonction renvoie \fI(size_t)\ \-1\fP, et \fIerrno\fP contient \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 \fBmbsnrtowcs\fP() T} Sécurité des threads T{ .na .nh MT\-Unsafe race:mbsnrtowcs/!ps T} .TE .SH STANDARDS POSIX.1\-2008. .SH NOTES Le comportement de \fBmbsnrtowcs\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), \fBmbsrtowcs\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 .