getc.3s
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 3S 代码 · 共 86 行
3S
86 行
.\" SCCSID: @(#)getc.3s 8.1 9/11/90.TH getc 3s.SH Namegetc, getchar, fgetc, getw \- get character or word from stream.SH Syntax.B #include <stdio.h>.PP.B int getc(stream).br.SM.B FILE.B *stream;.PP.B int getchar().PP .B int fgetc(stream).br.SM.B FILE.B *stream;.PP.B int getw(stream).br.SM.B FILE.B *stream;.SH Description.NXR "getc subroutine (standard I/O)".NXR "getchar subroutine".NXR "fgetc subroutine (standard I/O)".NXR "getw subroutine".NXA "getc subroutine (standard I/O)" "unget subroutine".NXR "stream" "getting character from".NXR "stream" "getting word from"The.PN getcfunction returns the next character from the named input.IR stream ..PPThe.PN getcharfunction is identical to .PN getc(stdin)..PPThe.PN fgetcfunction behaves like .PN getc ,but is a genuine function, not a macro.It may be used to save object text..PPThe.PN getwfunction returns the nextword (in a 32-bit integer on a VAX-11 or MIPS machine) from the named input.IR stream .It returns the constant EOFupon end of file or error, but since that is a goodinteger value,.I feofand.MS ferror 3sshould be used to check the success of.PN getw .The.PN getwassumes no special alignment in the file..SH RestrictionsBecause it is implemented as a macro,.PN getctreats a stream argument with side effects incorrectly.In particular, `getc(*f++);' doesn't work as expected..SH DiagnosticsThese functions return the integer constant EOFat end of file or upon read error..PPA stop with message,`Reading bad file', means an attempt has been made toread from a stream that has not been opened forreading by.PN fopen ..SH See Alsofopen(3s), fread(3s), gets(3s), putc(3s), scanf(3s), ungetc(3s)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?