Chinaunix首页 | 论坛 | 博客
  • 博客访问: 537232
  • 博文数量: 156
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1183
  • 用 户 组: 普通用户
  • 注册时间: 2013-11-22 11:42
文章分类

全部博文(156)

文章存档

2015年(67)

2014年(89)

分类: LINUX

2015-04-17 14:32:30

FERROR(3)                  Linux Programmer’s Manual                 FERROR(

3)

 

NAME

       clearerr,  feof, ferror, fileno - check and reset stream status

       //检查和调整流状态

 

SYNOPSIS

       #include

 

       void clearerr(FILE *stream);

       int feof(FILE *stream);

       int ferror(FILE *stream);

       int fileno(FILE *stream);

 

DESCRIPTION

       The function clearerr()  clears  the  end-of-file  and  error

       indicators for the stream pointed to by stream.

       //clearerr()函数清空文件结束位置和通过参数stream错误指向流。

 

       The  function  feof() tests the end-of-file indicator for the

       stream pointed to by stream, returning non-zero if it is set.

The end-of-file indicator can only be cleared by the function clearerr().

       //feof()函数测试文件结束位置通过参数stream指向流标志,如果它被设置,返回非0.

         end-of-file通过clearerr()函数标志能被清除

 

       The function ferror()  tests  the  error  indicator  for  the

       stream pointed to by stream, returning non-zero if it is set.

       The error indicator can only be reset by the clearerr() function.

       //ferror()函数通过参数stream指向流测试错误,如果它被设置就返回非0

         错误标志仅能通过clearerr()函数被设置

 

       The  function  fileno()  examines  the  argument  stream  and

       returns its integer descriptor.

       //fileno()函数检查参数流,返回其整数描述符

 

       For non-locking counterparts, see 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.)

       //这些函数不应该失败,不设置外部变量errno(然而,以防fileno()检测到它的参数不是一个有效的流,它必须返回-1,对EBADF设置errno)

 

CONFORMING TO

       The  functions  clearerr(),  feof(),  and ferror() conform to

  C89.

 

SEE ALSO

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

 

                                  2001-10-16                         FERROR(3)

(END)

阅读(2472) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~