From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: gdb@sources.redhat.com Cc: ac131313@cygnus.com Subject: DOS/Windows-specific code: utils.c Date: Tue, 08 May 2001 04:51:00 -0000 Message-id: <200105081153.OAA06313@is.elta.co.il> References: <20010503211502.21716.qmail@web6401.mail.yahoo.com> <3AF1DAA0.3060702@cygnus.com> <200105071609.TAA24129@is.elta.co.il> X-SW-Source: 2001-05/msg00110.html * utils.c: #ifdef __GO32__ #include #endif See the next snippet. * utils.c:init_page_info() /* These defaults will be used if we are unable to get the correct values from termcap. */ #if defined(__GO32__) lines_per_page = ScreenRows (); chars_per_line = ScreenCols (); #else lines_per_page = 24; chars_per_line = 80; [...] #if !defined (MPW) && !defined (_WIN32) /* No termcap under MPW, although might be cool to do something by looking at worksheet or console window sizes. */ /* Initialize the screen height and width from termcap. */ { char *termtype = getenv ("TERM"); Looks like using HAVE_TERMCAP (default to 1, 0 on Windows and DJGPP), and allowing for a GET_SCREEN_SIZE macro which would return the screen dimensions, should solve this. Comments? * utils.c:quit() #ifdef __MSDOS__ /* No steenking SIGINT will ever be coming our way when the program is resumed. Don't lie. */ fprintf_unfiltered (gdb_stderr, "Quit\n"); #else if (job_control /* If there is no terminal switching for this target, then we can't possibly get screwed by the lack of job control. */ || current_target.to_terminal_ours == NULL) fprintf_unfiltered (gdb_stderr, "Quit\n"); else fprintf_unfiltered (gdb_stderr, "Quit (expect signal SIGINT when the program is resumed)\n"); #endif I'm not sure we should bother about this one. * utils.c: #if defined(_MSC_VER) /* should test for wingdb instead? */ /* * Windows translates all keyboard and mouse events * into a message which is appended to the message * queue for the process. */ void notice_quit (void) { int k = win32pollquit (); if (k == 1) quit_flag = 1; else if (k == 2) immediate_quit = 1; } I think this should go to win32-nat.c.