By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!Just one for now. I reckon it's a one-liner and probably wouldn't hurt TCC a bit. That beats users having to deal with it.How many externals? I mean, if it's just the one, hacking around it with an alias might make more sense than changing TCC.
aGlobals.hSTDIN = GetStdHandle( STD_INPUT_HANDLE );
// get hidden console mode flags
GetConsoleMode( aGlobals.hSTDIN, &dwSTDINFlags );
// turn off mouse input and window input
dwSTDINFlags = ( dwSTDINFlags | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT ) & ~( ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT );
SetConsoleMode( aGlobals.hSTDIN, dwSTDINFlags );
TCC already resets STDIN after an external.
Code:aGlobals.hSTDIN = GetStdHandle( STD_INPUT_HANDLE ); // get hidden console mode flags GetConsoleMode( aGlobals.hSTDIN, &dwSTDINFlags ); // turn off mouse input and window input dwSTDINFlags = ( dwSTDINFlags | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT ) & ~( ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT ); SetConsoleMode( aGlobals.hSTDIN, dwSTDINFlags );
Aha! That explains it. I've been working on a CONMODE.EXE to query/manipulate the mode flags for CONIN$ and CONOUT$. In my testing, if I setdwSTDINFlags = ( dwSTDINFlags | ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT ) & ~( ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT ); SetConsoleMode( aGlobals.hSTDIN, dwSTDINFlags );