Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
145 halyavin 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
}