Scroll to navigation

ferror(3) Library Functions Manual ferror(3)

이름

clearerr, feof, ferror - 스트림 상태를 검사하고 리셋한다.

라이브러리

표준 C 라이브러리 (libc, -lc)

요약

#include <stdio.h>
void clearerr(FILE *stream);
int feof(FILE *stream);
int ferror(FILE *stream);

설명

함수 clearerr() 는 EOF를 지우고 stream을 위한 에러 지시자는 스트림이 가리킨다.

함순 feof() 는 stream이 가리키는 스트림을 위한 EOF 지시자를 검사하고, 만일 설정되어 있다면 0이 아닌 값을 반환한다. EOF 지시자는 clearerr()함수에 의해서만 지워질수 있다.

함수 ferror() 는 stream이 가리키는 스트림을 위한 에러 지시자를 검사하고, 만일 설정되어 있아면 0이 아닌 값을 반환한다. 에러 지시자는 clearerr() 함수에 의해서만 리셋될수 있다.

For nonlocking counterparts, see unlocked_stdio(3).

반환값

The feof() function returns nonzero if the end-of-file indicator is set for stream; otherwise, it returns zero.

The ferror() function returns nonzero if the error indicator is set for stream; otherwise, it returns zero.

에러

These functions should not fail and do not set errno.

속성

이 섹션에서 사용되는 용어에 대한 설명은 attributes(7)을 참조하십시오.

상호 작용 속성 번호
clearerr(), feof(), ferror() Thread safety MT-Safe

표준

C11, POSIX.1-2008.

이력

C89, POSIX.1-2001.

주의

POSIX.1-2008 specifies that these functions shall not change the value of errno if stream is valid.

CAVEATS

Normally, programs should read the return value of an input function, such as fgetc(3), before using functions of the feof(3) family. Only when the function returned the sentinel value EOF it makes sense to distinguish between the end of a file or an error with feof(3) or ferror(3).

추가 참조

open(2), fdopen(3), fileno(3), stdio(3), unlocked_stdio(3)

번역

이 매뉴얼 페이지의 한국어 번역은 다음에 의해 편집되었습니다: 정강훈 <skyeyes@soback.kornet.net>

이 번역은 무료 문서입니다. 저작권 조건에 대해서는 GNU General Public License 버전 3 이상을 읽으십시오. 책임이 없습니다.

이 매뉴얼 페이지의 번역에서 오류를 발견하면 translation-team-ko@googlegroups.com 로 이메일을 보내주십시오.

2023년 7월 20일 Linux man-pages 6.05.01