Subversion Repositories Kolibri OS

Rev

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

  1. #include "stdio.h"
  2. int ungetc(int c,FILE* file)
  3. {
  4.         if (c==EOF)
  5.                 return EOF;
  6.         if (file->filepos<=0 || file->filepos>file->filesize)
  7.                 return EOF;
  8.         file->filepos--;
  9.         file->buffer[file->filepos]=(char)c;
  10.         return c;
  11. }
  12.