Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #include "stdio.h"
  2. int fgetc(FILE* file)
  3. {
  4.         if ((file->mode & 3!=FILE_OPEN_READ) && (file->mode & FILE_OPEN_PLUS==0))
  5.                 return EOF;
  6.         if (file->filepos>=file->filesize)
  7.                 return EOF;
  8.         else
  9.         {
  10.                 return (int)file->buffer[file->filepos++];
  11.         }
  12. }