ReactOS  0.4.14-dev-376-gaedba84
ungetch.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details
4  * PROJECT: ReactOS system libraries
5  * FILE: lib/sdk/crt/conio/ungetch.c
6  * PURPOSE: Ungets a character from stdin
7  * PROGRAMER: DJ Delorie
8  Ariadne [ Adapted from djgpp libc ]
9  * UPDATE HISTORY:
10  * 28/12/98: Created
11  */
12 
13 #include <precomp.h>
14 
15 int char_avail = 0;
16 int ungot_char = 0;
17 
18 
19 /*
20  * @implemented
21  */
22 int _ungetch(int c)
23 {
24  if (char_avail)
25  return(EOF);
26  ungot_char = c;
27  char_avail = 1;
28  return(c);
29 }
int char_avail
Definition: ungetch.c:15
int ungot_char
Definition: ungetch.c:16
int _ungetch(int c)
Definition: ungetch.c:22
const GLubyte * c
Definition: glext.h:8905
#define EOF
Definition: stdio.h:24
#define c
Definition: ke_i.h:80