/[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.7 by okuji, Sun Apr 4 13:46:02 2004 UTC revision 1.8 by marco_g, Thu Aug 4 18:10:50 2005 UTC
# Line 1  Line 1 
1  /*  /*
2   *  GRUB  --  GRand Unified Bootloader   *  GRUB  --  GRand Unified Bootloader
3   *  Copyright (C) 2002,2003  Free Software Foundation, Inc.   *  Copyright (C) 2002,2003,2005  Free Software Foundation, Inc.
4   *   *
5   *  GRUB is free software; you can redistribute it and/or modify   *  GRUB is free software; you can redistribute it and/or modify
6   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 90  grub_term_get_current (void) Line 90  grub_term_get_current (void)
90  void  void
91  grub_putcode (grub_uint32_t code)  grub_putcode (grub_uint32_t code)
92  {  {
93      int height = grub_getwh () & 255;
94    
95    if (code == '\t' && grub_cur_term->getxy)    if (code == '\t' && grub_cur_term->getxy)
96      {      {
97        int n;        int n;
# Line 108  grub_putcode (grub_uint32_t code) Line 110  grub_putcode (grub_uint32_t code)
110        grub_putcode ('\r');        grub_putcode ('\r');
111    
112        grub_more_lines++;        grub_more_lines++;
113        /* XXX: Don't use a fixed height!  */  
114        if (grub_more && grub_more_lines == 24 - 1)        if (grub_more && grub_more_lines == height - 1)
115          {          {
116            char key;            char key;
117            int pos = grub_getxy ();            int pos = grub_getxy ();
118    
119            /* Show --MORE-- on the lower left side of the screen.  */            /* Show --MORE-- on the lower left side of the screen.  */
120            grub_gotoxy (1, 24 - 1);            grub_gotoxy (1, height - 1);
121            grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);            grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
122            grub_printf ("--MORE--");            grub_printf ("--MORE--");
123            grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);            grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
# Line 123  grub_putcode (grub_uint32_t code) Line 125  grub_putcode (grub_uint32_t code)
125            key = grub_getkey ();            key = grub_getkey ();
126                        
127            /* Remove the message.  */            /* Remove the message.  */
128            grub_gotoxy (1, 24 -1);            grub_gotoxy (1, height - 1);
129            grub_printf ("        ");            grub_printf ("        ");
130            grub_gotoxy (pos >> 8, pos & 0xFF);            grub_gotoxy (pos >> 8, pos & 0xFF);
131                        
# Line 218  grub_getxy (void) Line 220  grub_getxy (void)
220    return (grub_cur_term->getxy) ();    return (grub_cur_term->getxy) ();
221  }  }
222    
223    grub_uint16_t
224    grub_getwh (void)
225    {
226      return (grub_cur_term->getwh) ();
227    }
228    
229  void  void
230  grub_gotoxy (grub_uint8_t x, grub_uint8_t y)  grub_gotoxy (grub_uint8_t x, grub_uint8_t y)
231  {  {

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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