From 57a1c343ddbe7ac79057dd776d88e0d7b6587013 Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 23 Nov 2003 21:36:36 +0000 Subject: [PATCH] Unix CLI option to set windowtype Add the ability to select the windowtype on the command line on Unix using a new -wwindowtype option. I had thought the proposed patch could core dump, but the default windowtype selection occurs earlier and ensures that raw_print will always work. So, the only problem with the proposed patch was it didn't move the linux and sco special-case code until after the selection was made. That special-case code really should be moved to to wintty.c, IMO since it doesn't affect other windowtypes. --- doc/fixes35.0 | 1 + sys/unix/unixmain.c | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index eec9d25dd..14ba01d0c 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -55,6 +55,7 @@ grammar fixes for applying stethoscope to corpses and statues Platform- and/or Interface-Specific Fixes ----------------------------------------- +unix: new -wwindowtype option win32gui: better handling of "more" prompt for messages that would have scrolled off the window win32gui: set correct checkmark on "Lock Windows" menu item on startup diff --git a/sys/unix/unixmain.c b/sys/unix/unixmain.c index 8d269e901..7b577fb73 100644 --- a/sys/unix/unixmain.c +++ b/sys/unix/unixmain.c @@ -150,14 +150,7 @@ char *argv[]; check_linux_console(); #endif initoptions(); - init_nhwindows(&argc,argv); exact_username = whoami(); -#ifdef _M_UNIX - init_sco_cons(); -#endif -#ifdef __linux__ - init_linux_cons(); -#endif /* * It seems you really want to play. @@ -188,6 +181,13 @@ char *argv[]; #endif process_options(argc, argv); /* command line options */ + init_nhwindows(&argc, argv); /* now we can set up window system */ +#ifdef _M_UNIX + init_sco_cons(); +#endif +#ifdef __linux__ + init_linux_cons(); +#endif #ifdef DEF_PAGER if(!(catmore = nh_getenv("HACKPAGER")) && !(catmore = nh_getenv("PAGER"))) @@ -315,7 +315,6 @@ char *argv[]; { int i; - /* * Process options. */ @@ -404,6 +403,9 @@ char *argv[]; flags.initrace = i; } break; + case 'w': /* windowtype */ + choose_windows(&argv[0][2]); + break; case '@': flags.randomall = 1; break;