Consoles (1/3)
Dan Kegel
dank at kegel.com
Wed Feb 26 22:17:27 CST 2003
Eric Pouech wrote:
> Before Dan gets a sore throat by screaming out too loud, it's time to
> remove the console creation code from our CUI programs
> It's not the purpose of a CUI program to dictate its environment, but
> rather to make the best efforts to behave in the context its creator
> have(th) given it... (including console, input/output stream...)
Huzzah!
> --- programs/wcmd/wcmdmain.c 25 Feb 2003 03:58:42 -0000 1.24
> +++ programs/wcmd/wcmdmain.c 26 Feb 2003 19:36:00 -0000
> @@ -50,7 +50,7 @@
> int main (int argc, char *argv[]) {
>
> char string[1024], args[MAX_PATH], param[MAX_PATH];
> -int status, i;
> +int i;
> DWORD count;
> HANDLE h;
>
> @@ -77,14 +77,6 @@
> return 0;
> }
>
> -/*
> - * Allocate a console and set it up.
> - */
> -
> - status = FreeConsole ();
> - if (!status) WCMD_print_error();
> - status = AllocConsole();
> - if (!status) WCMD_print_error();
> SetConsoleMode (GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT | ENABLE_ECHO_INPUT |
> ENABLE_PROCESSED_INPUT);
> SetConsoleTitle("Wine Command Prompt");
Music to my ears!
Thanks, Eric!
- Dan
--
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045
More information about the wine-devel
mailing list