.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu) .\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl) .\" Modified 2013-12-31, David Malcolm .\" Split gets(3) into its own page; fgetc() et al. move to fgetc(3) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH GETS 3 "15 septembre 2017" GNU "Manuel du programmeur Linux" .SH NOM gets \- Récupérer une chaîne sur l'entrée standard (OBSOLÈTE) .SH SYNOPSIS .nf \fB#include \fP .PP \fBchar *gets(char *\fP\fIs\fP\fB);\fP .fi .SH DESCRIPTION \fINe jamais utiliser cette fonction\fP. .PP \fBgets\fP() lit une ligne depuis \fIstdin\fP et la place dans le tampon pointé par \fIs\fP jusqu'à atteindre un retour chariot, ou \fBEOF\fP, qu'il remplace par un octet NULL («\ \e0\ »). Il n'y a pas de vérification de débordement de tampon (voir la section des \fBBOGUES\fP plus bas). .SH "VALEUR RENVOYÉE" \fBgets\fP() renvoie le pointeur \fIs\fP en cas de succès et NULL en cas d'erreur, ou si la fin de fichier est atteinte avant d'avoir pu lire au moins un caractère. Cependant, le débordement de tampon n'étant pas surveillé, il ne peut pas y avoir de certitude que la fonction renvoie quelque chose. .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBgets\fP() T} Sécurité des threads MT\-Safe .TE .sp 1 .SH CONFORMITÉ C89, C99, POSIX.1\-2001. .PP LSB déconseille l'utilisation de \fBgets\fP(). POSIX.1\-2008 marque \fBgets\fP() comme étant obsolète. ISO C11 retire la spécification de \fBgets\fP() du langage C et, depuis la version\ 2.16, les fichiers d'en\-tête glibc n'exposent pas la déclaration de fonction si la macro de test de fonctionnalités \fB_ISOC11_SOURCE\fP est définie. .SH BOGUES N'utilisez jamais \fBgets\fP(). Comme il est impossible de savoir à l'avance combien de caractères seront lus par \fBgets\fP(), et comme celui\-ci écrira tous les caractères lus, même s'ils débordent du tampon, cette fonction est extrêmement dangereuse à utiliser. On a déjà utilisé ce dysfonctionnement pour créer des trous de sécurité. UTILISEZ TOUJOURS \fBfgets\fP() À LA PLACE DE \fBgets\fP(). .PP Pour plus d'informations, consultez CWE\-242 (document intitulé sous le nom «\ Use of Inherently Dangerous Function\ ») à l'adresse http://cwe.mitre.org/data/definitions/242.html .SH "VOIR AUSSI" \fBread\fP(2), \fBwrite\fP(2), \fBferror\fP(3), \fBfgetc\fP(3), \fBfgets\fP(3), \fBfgetwc\fP(3), \fBfgetws\fP(3), \fBfopen\fP(3), \fBfread\fP(3), \fBfseek\fP(3), \fBgetline\fP(3), \fBgetwchar\fP(3), \fBputs\fP(3), \fBscanf\fP(3), \fBungetwc\fP(3), \fBunlocked_stdio\fP(3), \fBfeature_test_macros\fP(7) .SH COLOPHON Cette page fait partie de la publication\ 5.10 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .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 et Frédéric Hantrais . .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 .