mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
Initializing the console Just-In-Time on CTK startup and starting up the WinPcap before CTK allows WinPcap to print initialization errors (especially a missing command line arg) without clearing the shell output.
This commit is contained in:
parent
c1b0a3f0d3
commit
3a8fb3ad9f
@ -30,7 +30,7 @@
|
||||
*
|
||||
* Author: Oliver Schmidt <ol.sc@web.de>
|
||||
*
|
||||
* $Id: contiki-main.c,v 1.6 2007/04/11 00:17:25 oliverschmidt Exp $
|
||||
* $Id: contiki-main.c,v 1.7 2007/04/14 14:57:19 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@ -55,10 +55,10 @@
|
||||
#include "program-handler.h"
|
||||
|
||||
PROCINIT(&etimer_process,
|
||||
&wpcap_process,
|
||||
&cfs_win32_process,
|
||||
&ctk_conio_service_process,
|
||||
&ctk_process,
|
||||
&wpcap_process,
|
||||
&tcpip_process,
|
||||
&resolv_process,
|
||||
&program_handler_process);
|
||||
@ -102,8 +102,6 @@ main(void)
|
||||
|
||||
procinit_init();
|
||||
|
||||
console_init();
|
||||
|
||||
program_handler_add(&directory_dsc, "Directory", 1);
|
||||
program_handler_add(&www_dsc, "Web browser", 1);
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
*
|
||||
* Author: Oliver Schmidt <ol.sc@web.de>
|
||||
*
|
||||
* $Id: ctk-console.c,v 1.7 2007/04/14 14:28:19 oliverschmidt Exp $
|
||||
* $Id: ctk-console.c,v 1.8 2007/04/14 14:57:53 oliverschmidt Exp $
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@ -83,6 +83,12 @@ console_init(void)
|
||||
{
|
||||
CONSOLE_SCREEN_BUFFER_INFO consoleinfo;
|
||||
CONSOLE_CURSOR_INFO cursorinfo = {1, FALSE};
|
||||
static unsigned char done;
|
||||
|
||||
if(done) {
|
||||
return;
|
||||
}
|
||||
done = 1;
|
||||
|
||||
stdinhandle = GetStdHandle(STD_INPUT_HANDLE);
|
||||
stdouthandle = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
@ -190,11 +196,15 @@ clrscr(void)
|
||||
void
|
||||
bgcolor(unsigned char c)
|
||||
{
|
||||
/* Presume this to be one the first calls. */
|
||||
console_init();
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
bordercolor(unsigned char c)
|
||||
{
|
||||
/* Presume this to be one the first calls. */
|
||||
console_init();
|
||||
}
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user