.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" @(#)ferror.3 6.8 (Berkeley) 6/29/91 .\" .\" .\" Converted for Linux, Mon Nov 29 14:24:40 1993, faith@cs.unc.edu .\" Added remark on EBADF for fileno, aeb, 2001-03-22 .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH FERROR 3 "6 março 2019" "" "Manual do Programador do Linux" .SH NOME clearerr, feof, ferror, fileno \- verifica e redefine estado de um fluxo .SH SINOPSE \fB#include \fP .PP \fBvoid clearerr(FILE *\fP\fIfluxo\fP\fB);\fP .PP \fBint feof(FILE *\fP\fIfluxo\fP\fB);\fP .PP \fBint ferror(FILE *\fP\fIfluxo\fP\fB);\fP .PP \fBint fileno(FILE *\fP\fIfluxo\fP\fB);\fP .PP .RS -4 Requisitos de macro de teste de recursos para o glibc (consulte \fBfeature_test_macros\fP(7)): .RE .PP \fBfileno\fP(): _POSIX_C_SOURCE .SH DESCRIÇÃO A função \fBclearerr\fP() limpa os indicadores de fim de arquivo (eof) e de erro para o \fIfluxo\fP. .PP A função \fBfeof\fP() testa o indicador de fim de arquivo para o fluxo apontado por \fIfluxo\fP, retornando um valor diferente de zero se estiver definido. O indicador de fim de arquivo somente pode ser desligado apenas pela função \fBclearerr\fP(). .PP A função \fBferror\fP() testa o indicador de erro para o o fluxo apontado por \fIfluxo\fP, retornando um valor diferente de zero se estiver definido. O indicador de erro somente pode ser redefinido apenas pela função \fBclearerr\fP(). .PP A função \fBfileno\fP() examina o argumento \fIfluxo\fP e retorna o descritor de arquivo inteiro usado para implementar este fluxo. O descritor de arquivo ainda pertence a \fIfluxo\fP e será fechado quando \fBfclose\fP(3) for chamada. Duplique o descritor de arquivo com \fBdup\fP(2) antes de passá\-lo para o código que pode fechá\-lo. .PP Para contrapartes não bloqueantes, veja \fBunlocked_stdio\fP(3). .SH ERROS Estas funções não devem falhar e não ajustam a variável externa \fIerrno\fP. (Entretanto, no caso de \fBfileno\fP() detectar que o argumento não é um fluxo válido, deve retornar \-1 e definir \fIerrno\fP para \fBEBADF\fP). .SH ATRIBUTOS Para uma explicação dos termos usados nesta seção, consulte \fBattributes\fP(7). .TS allbox; lbw19 lb lb l l l. Interface Atributo Valor T{ \fBclearerr\fP(), \fBfeof\fP(), .br \fBferror\fP(), \fBfileno\fP() T} Thread safety MT\-Safe .TE .SH "DE ACORDO COM" As funções \fBclearerr\fP(), \fBfeof\fP() e \fBferror\fP() estão de acordo com C89, C99, POSIX.1\-2001 e POSIX.1\-2008. .PP A função \fBfileno\fP() está de acordo com POSIX.1\-2001 e POSIX.1\-2008. .SH "VEJA TAMBÉM" \fBopen\fP(2), \fBfdopen\fP(3), \fBstdio\fP(3), \fBunlocked_stdio\fP(3) .SH COLOFÃO Esta página faz parte da versão 5.10 do projeto Linux \fIman\-pages\fP. Uma descrição do projeto, informações sobre relatórios de bugs e a versão mais recente desta página podem ser encontradas em \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por Felipe M Pereira , André Luiz Fassone e Rafael Fontenelle . . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .