Category : UNIX Files
Archive   : UUPC11YS.ZIP
Filename : SETSTDIN.C

 
Output of file : SETSTDIN.C contained in archive : UUPC11YS.ZIP
/*
* $Id: SETSTDIN.C 1.1 1993/04/10 21:22:29 dmwatt Exp $
*
* $Log: SETSTDIN.C $
* Revision 1.1 1993/04/10 21:22:29 dmwatt
* Initial revision
*
* Revision 1.1 1993/04/09 06:22:00 dmwatt
* Written

*
*/

/*--------------------------------------------------------------------*/
/* System include files */
/*--------------------------------------------------------------------*/

#include

#ifdef WIN32

#include

/*--------------------------------------------------------------------*/
/* s e t s t d i n m o d e */
/* */
/* Set standard input on NT console for single char I/O */
/*--------------------------------------------------------------------*/

void setstdinmode(void)
{
HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
DWORD mode;
BOOL bSuccess;

bSuccess = GetConsoleMode(hStdIn, &mode);

/* Disable mouse events so that later Peeks() only get characters */
mode &= ~ENABLE_WINDOW_INPUT;
mode &= ~ENABLE_MOUSE_INPUT;
mode &= ~ENABLE_LINE_INPUT;
mode |= ENABLE_PROCESSED_INPUT;

SetConsoleMode(hStdIn, mode);
}

#endif


  3 Responses to “Category : UNIX Files
Archive   : UUPC11YS.ZIP
Filename : SETSTDIN.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/