/[grub]/grub2/kern/term.c
ViewVC logotype

Diff of /grub2/kern/term.c

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

revision 1.9 by okuji, Sat Aug 20 05:26:51 2005 UTC revision 1.10 by okuji, Sat Oct 15 09:22:32 2005 UTC
# Line 34  static int grub_more_lines; Line 34  static int grub_more_lines;
34  /* If the more pager is active.  */  /* If the more pager is active.  */
35  static int grub_more;  static int grub_more;
36    
37    /* The current cursor state.  */
38    static int cursor_state = 1;
39    
40  void  void
41  grub_term_register (grub_term_t term)  grub_term_register (grub_term_t term)
42  {  {
# Line 77  grub_term_set_current (grub_term_t term) Line 80  grub_term_set_current (grub_term_t term)
80        
81    grub_cur_term = term;    grub_cur_term = term;
82    grub_cls ();    grub_cls ();
83      grub_setcursor (grub_getcursor ());
84    return GRUB_ERR_NONE;    return GRUB_ERR_NONE;
85  }  }
86    
# Line 229  grub_setcolor (grub_uint8_t normal_color Line 233  grub_setcolor (grub_uint8_t normal_color
233  int  int
234  grub_setcursor (int on)  grub_setcursor (int on)
235  {  {
236    static int prev = 1;    int ret = cursor_state;
   int ret = prev;  
237    
238    if (grub_cur_term->setcursor)    if (grub_cur_term->setcursor)
239      {      {
240        (grub_cur_term->setcursor) (on);        (grub_cur_term->setcursor) (on);
241        prev = on;        cursor_state = on;
242      }      }
243        
244    return ret;    return ret;
245  }  }
246    
247    int
248    grub_getcursor (void)
249    {
250      return cursor_state;
251    }
252    
253  void  void
254  grub_refresh (void)  grub_refresh (void)
255  {  {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

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