/[hurd]/hurd/console/display.c
ViewVC logotype

Diff of /hurd/console/display.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by marcus, Tue Sep 10 12:05:06 2002 UTC revision 1.21 by marcus, Tue Sep 10 18:05:41 2002 UTC
# Line 48  Line 48 
48    
49  struct changes  struct changes
50  {  {
51      uint32_t flags;
52    struct    struct
53    {    {
54      uint32_t col;      uint32_t col;
# Line 66  struct changes Line 67  struct changes
67    off_t start;    off_t start;
68    off_t end;    off_t end;
69    
70  #define DISPLAY_CHANGE_CURSOR_POS 1  #define DISPLAY_CHANGE_CURSOR_POS       0x0001
71  #define DISPLAY_CHANGE_CURSOR_STATUS 2  #define DISPLAY_CHANGE_CURSOR_STATUS    0x0002
72  #define DISPLAY_CHANGE_SCREEN_CUR_LINE 4  #define DISPLAY_CHANGE_SCREEN_CUR_LINE  0x0004
73  #define DISPLAY_CHANGE_SCREEN_SCR_LINES 8  #define DISPLAY_CHANGE_SCREEN_SCR_LINES 0x0008
74  #define DISPLAY_CHANGE_BELL_AUDIBLE 16  #define DISPLAY_CHANGE_BELL_AUDIBLE     0x0010
75  #define DISPLAY_CHANGE_BELL_VISIBLE 32  #define DISPLAY_CHANGE_BELL_VISIBLE     0x0020
76  #define DISPLAY_CHANGE_MATRIX 64  #define DISPLAY_CHANGE_FLAGS            0x0030
77    #define DISPLAY_CHANGE_MATRIX           0x0040
78    unsigned int which;    unsigned int which;
79  };  };
80    
# Line 646  display_flush_filechange (display_t disp Line 648  display_flush_filechange (display_t disp
648        display->changes.which &= ~DISPLAY_CHANGE_BELL_VISIBLE;        display->changes.which &= ~DISPLAY_CHANGE_BELL_VISIBLE;
649      }      }
650    
651      if (type & DISPLAY_CHANGE_FLAGS
652          && display->changes.which & DISPLAY_CHANGE_FLAGS
653          && display->changes.flags != user->flags)
654        {
655          notify = 1;
656          next->what.flags = 1;
657          bump_written = 1;
658          display->changes.which &= ~DISPLAY_CHANGE_FLAGS;
659        }
660    
661    if (bump_written)    if (bump_written)
662      user->changes.written++;      user->changes.written++;
663    if (notify)    if (notify)
# Line 1609  display_output_some (display_t display, Line 1621  display_output_some (display_t display,
1621    display->changes.screen.scr_lines = display->user->screen.scr_lines;    display->changes.screen.scr_lines = display->user->screen.scr_lines;
1622    display->changes.bell_audible = display->user->bell.audible;    display->changes.bell_audible = display->user->bell.audible;
1623    display->changes.bell_visible = display->user->bell.visible;    display->changes.bell_visible = display->user->bell.visible;
1624      display->changes.flags = display->user->flags;
1625    display->changes.which = ~DISPLAY_CHANGE_MATRIX;    display->changes.which = ~DISPLAY_CHANGE_MATRIX;
1626    
1627    while (!err && *length > 0)    while (!err && *length > 0)
# Line 1913  display_output (display_t display, int n Line 1926  display_output (display_t display, int n
1926    return amount;    return amount;
1927  }  }
1928    
1929    
1930  ssize_t  ssize_t
1931  display_read (display_t display, int nonblock, off_t off,  display_read (display_t display, int nonblock, off_t off,
1932                char *data, size_t len)                char *data, size_t len)
# Line 1923  display_read (display_t display, int non Line 1937  display_read (display_t display, int non
1937    return len;    return len;
1938  }  }
1939    
1940    
1941  /* Resume the output on the display DISPLAY.  */  /* Resume the output on the display DISPLAY.  */
1942  void  void
1943  display_start_output (display_t display)  display_start_output (display_t display)
# Line 1933  display_start_output (display_t display) Line 1948  display_start_output (display_t display)
1948        display->output.stopped = 0;        display->output.stopped = 0;
1949        condition_broadcast (&display->output.resumed);        condition_broadcast (&display->output.resumed);
1950      }      }
1951      display->changes.flags = display->user->flags;
1952      display->changes.which = DISPLAY_CHANGE_FLAGS;
1953      display->user->flags &= ~CONS_FLAGS_SCROLL_LOCK;
1954      display_flush_filechange (display, DISPLAY_CHANGE_FLAGS);
1955    mutex_unlock (&display->lock);    mutex_unlock (&display->lock);
1956  }  }
1957    
# Line 1943  display_stop_output (display_t display) Line 1962  display_stop_output (display_t display)
1962  {  {
1963    mutex_lock (&display->lock);    mutex_lock (&display->lock);
1964    display->output.stopped = 1;    display->output.stopped = 1;
1965      display->changes.flags = display->user->flags;
1966      display->changes.which = DISPLAY_CHANGE_FLAGS;
1967      display->user->flags |= CONS_FLAGS_SCROLL_LOCK;
1968      display_flush_filechange (display, DISPLAY_CHANGE_FLAGS);
1969    mutex_unlock (&display->lock);    mutex_unlock (&display->lock);
1970  }  }
1971    

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26