mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 18:40:17 +00:00
Replaced Win32 ctrl-c handler with C-library atexit handler (taking care of ctrl-c too) now that we have a Contiki Quit menu calling exit().
This commit is contained in:
parent
e3dab56825
commit
253dcb44ce
@ -30,7 +30,7 @@
|
||||
*
|
||||
* Author: Oliver Schmidt <ol.sc@web.de>
|
||||
*
|
||||
* $Id: ctk-console.c,v 1.3 2006/08/21 22:27:10 oliverschmidt Exp $
|
||||
* $Id: ctk-console.c,v 1.4 2006/09/09 23:20:39 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@ -66,13 +66,6 @@ static unsigned short xpos;
|
||||
static unsigned short ypos;
|
||||
static unsigned char button;
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
static BOOL WINAPI
|
||||
consolehandler(DWORD event)
|
||||
{
|
||||
console_exit();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
console_init(void)
|
||||
@ -100,7 +93,7 @@ console_init(void)
|
||||
GetConsoleCursorInfo(stdouthandle, &saved_cursorinfo);
|
||||
SetConsoleCursorInfo(stdouthandle, &cursorinfo);
|
||||
|
||||
SetConsoleCtrlHandler(consolehandler, TRUE);
|
||||
atexit(console_exit);
|
||||
|
||||
memset(blank, ' ', sizeof(blank));
|
||||
memset(hline, 0xC4, sizeof(hline));
|
||||
|
Loading…
Reference in New Issue
Block a user