mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 19:21:38 +00:00
Create a branch for Aleksandar Andrejevic for his work on NTVDM. See http://jira.reactos.org/browse/CORE-7250 for more details.
svn path=/branches/ntvdm/; revision=59241
This commit is contained in:
parent
3e3200acef
commit
4f0b8d3db0
20620 changed files with 0 additions and 1232833 deletions
29
lib/sdk/crt/conio/ungetch.c
Normal file
29
lib/sdk/crt/conio/ungetch.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/msvcrt/conio/ungetch.c
|
||||
* PURPOSE: Ungets a character from stdin
|
||||
* PROGRAMER: DJ Delorie
|
||||
Ariadne [ Adapted from djgpp libc ]
|
||||
* UPDATE HISTORY:
|
||||
* 28/12/98: Created
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
|
||||
int char_avail = 0;
|
||||
int ungot_char = 0;
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int _ungetch(int c)
|
||||
{
|
||||
if (char_avail)
|
||||
return(EOF);
|
||||
ungot_char = c;
|
||||
char_avail = 1;
|
||||
return(c);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue