XINU
fgetc.c
Go to the documentation of this file.
1 
6 extern int getc(int);
8 
9 #ifndef EOF
10 #define EOF (-2)
12 #endif
13 
19 int fgetc(
20  int dev)
21 {
22  int result = (int)getc(dev);
23 
24  if (0 > result)
25  {
26  return EOF;
27  }
28  else
29  {
30  return result;
31  }
32 }
#define EOF
End Of Fileを示す値
Definition: fgetc.c:11
int fgetc(int dev)
デバイス(ファイル)から文字を読み込む。
Definition: fgetc.c:19
int getc(int)
デバイスから1Byte読み込むgetc()のextern宣言
Definition: getc.c:9