feof clearerr ferror fileno (翻译 man 3)

 

 

 

FERROR(3)                     Linux Programmer's Manual                     FERROR(3)

NAME

       clearerr, feof, ferror, fileno - check and reset stream status
//检查并重新设置流的状态

SYNOPSIS

       #include <stdio.h>

       void clearerr(FILE *stream);

       int feof(FILE *stream);

       int ferror(FILE *stream);

       int fileno(FILE *stream);

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       fileno(): _POSIX_C_SOURCE >= 1 || _XOPEN_SOURCE || _POSIX_SOURCE

DESCRIPTION

       The function clearerr() clears the end-of-file and error indicators for the
       stream pointed to by stream.
//clearerr()清除stream指向流的EOF和错误标识
       The function feof() tests the end-of-file indicator for the stream pointed to
       by stream, returning nonzero if it is set.  The end-of-file indicator can only
       be cleared by the function clearerr().
//feof()测试stream指向的流的EOF标志位,返回非0如果EOF设置的话.
//EOF标志位只能够被clearerr()清除
The function ferror() tests the error indicator for the stream pointed to by stream, returning nonzero if it is set. The error indicator can only be reset by the clearerr() function. //ferror()测试stream指向的流的error标志位,返回非0如果error设置的话.
//error标志位只能够被clearerr()清除
The function fileno() examines the argument stream and returns its integer descriptor. //fileno()流的参数并返回它的整数描述符 For nonlocking counterparts, see unlocked_stdio(3).
//要查看不阻塞的版本,参见unlocked_stdio(3)

ERRORS

       These functions should not fail and do not set the external variable errno.
       (However, in case fileno() detects that its argument is not a valid stream, it
       must return -1 and set errno to EBADF.)
//这些函数不会失败也不会设置外部的变量erno.(然而,万一fileno()检测它的参数不是一个有效的流,
//它一定会返回-1并且设置errno为EBADF)

CONFORMING TO

       The functions clearerr(), feof(), and ferror() conform to C89 and C99.

SEE ALSO

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

COLOPHON

       This page is part of release 3.29 of the Linux man-pages project.  A
       description of the project, and information about reporting bugs, can be found
       at http://www.kernel.org/doc/man-pages/.

                                      2008-08-29                            FERROR(3)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值