.\" 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 "24 janvier 2014" 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 .sp \fBchar *gets(char *\fP\fIs\fP\fB);\fP .fi .SH DESCRIPTION \fINe jamais utiliser cette fonction\fP. \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 nul («\ \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 y avoir de certitude que la fonction renvoie quelque chose. .SH CONFORMITÉ C89, C99, POSIX.1\-2001. LSB déconseille l'utilisation de \fBgets\fP(). POSIX.1\-2008 marque \fBgets\fP() comme étant obsolète. ISO C11 retire la specification 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(). 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 3.65 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies peuvent être trouvées à l'adresse \%http://www.kernel.org/doc/man\-pages/. .SH TRADUCTION Depuis 2010, cette traduction est maintenue à l'aide de l'outil po4a par l'équipe de traduction francophone au sein du projet perkamon . .PP Christophe Blaess (1996-2003), Alain Portal (2003-2006). Florentin Duneau et l'équipe francophone de traduction de Debian\ (2006-2009). .PP Veuillez signaler toute erreur de traduction en écrivant à ou par un rapport de bogue sur le paquet \fBmanpages\-fr\fR. .PP Vous pouvez toujours avoir accès à la version anglaise de ce document en utilisant la commande «\ \fBman\ \-L C\fR \fI
\fR\ \fI\fR\ ».