UNGETC.3
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:1k
源码类别:
操作系统开发
开发平台:
C/C++
- ." @(#)ungetc.3s 6.1 (Berkeley) 5/15/85
- ."
- .TH UNGETC 3 "May 15, 1985"
- .AT 3
- .SH NAME
- ungetc - push character back into input stream
- .SH SYNOPSIS
- .nf
- .ft B
- #include <stdio.h>
- int ungetc(int fIcfP, FILE *fIstreamfP)
- .ft R
- .fi
- .SH DESCRIPTION
- .B Ungetc
- pushes the character
- .I c
- back on an input stream. That character will be returned by the next
- .B getc
- call on that stream.
- .B Ungetc
- returns
- .IR c .
- .PP
- One character of pushback is guaranteed provided
- something has been read from the stream and the stream is actually buffered.
- Attempts to push EOF are rejected.
- .PP
- .BR Fseek (3)
- erases all memory of pushed back characters.
- .SH "SEE ALSO"
- .BR getc (3),
- .BR setbuf (3),
- .BR fseek (3).
- .SH DIAGNOSTICS
- .B Ungetc
- returns
- .SM
- .B EOF
- if it can't push a character back.