23 lines
311 B
C
23 lines
311 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
;
|
||
|
}
|
||
|
|
||
|
/* this handles EOF as wall */
|
||
|
int buffc = -1;
|
||
|
|
||
|
char getch()
|
||
|
{
|
||
|
char temp;
|
||
|
return (buffc < 0) ? getchar() : (temp = buffc, buffc = -1, temp);
|
||
|
}
|
||
|
|
||
|
void ungetch(int c)
|
||
|
{
|
||
|
if (buffc >= 0)
|
||
|
printf("warning: overriding character buffer\n");
|
||
|
buffc = c;
|
||
|
}
|