This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

DOS/Windows-specific code: utils.c




    * utils.c:

    #ifdef __GO32__
    #include <pc.h>
    #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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]