ReactOS
0.4.16-dev-2-g02a6913
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
}
c
const GLubyte * c
Definition:
glext.h:8905
EOF
#define EOF
Definition:
stdio.h:24
c
#define c
Definition:
ke_i.h:80
char_avail
int char_avail
Definition:
ungetch.c:15
ungot_char
int ungot_char
Definition:
ungetch.c:16
_ungetch
int _ungetch(int c)
Definition:
ungetch.c:22
sdk
lib
crt
conio
ungetch.c
Generated on Thu Sep 12 2024 06:13:14 for ReactOS by
1.9.6