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

Diff of /hurd/console/vga-display.c

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

revision 1.1 by marcus, Sun Mar 17 18:04:49 2002 UTC revision 1.2 by roland, Mon Mar 18 06:57:54 2002 UTC
# Line 23  Line 23 
23  #include <unistd.h>  #include <unistd.h>
24  #include <iconv.h>  #include <iconv.h>
25  #include <argp.h>  #include <argp.h>
26    #include <string.h>
27    
28  #include <sys/io.h>  #include <sys/io.h>
29  #include <sys/mman.h>  #include <sys/mman.h>
# Line 264  vga_display_scroll (void *console, int a Line 265  vga_display_scroll (void *console, int a
265          }          }
266        mutex_unlock (&vga_lock);        mutex_unlock (&vga_lock);
267      }      }
268    mutex_unlock (&cons->lock);      mutex_unlock (&cons->lock);
269    return 0;    return 0;
270  }  }
271    
# Line 290  limit_cursor (struct emu *emu) Line 291  limit_cursor (struct emu *emu)
291      emu->x = emu->width - 1;      emu->x = emu->width - 1;
292    else if (emu->x < 0)    else if (emu->x < 0)
293      emu->x = 0;      emu->x = 0;
294      
295    if (emu->y >= emu->height)    if (emu->y >= emu->height)
296      emu->y = emu->height - 1;      emu->y = emu->height - 1;
297    else if (emu->y < 0)    else if (emu->y < 0)
# Line 483  handle_esc_bracket (struct emu *emu, cha Line 484  handle_esc_bracket (struct emu *emu, cha
484                          emu->params[0] ?: 1, emu->attr | ' ');                          emu->params[0] ?: 1, emu->attr | ' ');
485        break;        break;
486      case '@':                   /* insert character(s): <ich1>, <ich> */      case '@':                   /* insert character(s): <ich1>, <ich> */
487        screen_scroll_right (emu->screen, emu->x, emu->y,        screen_scroll_right (emu->screen, emu->x, emu->y,
488                             emu->width - emu->x, 1,                             emu->width - emu->x, 1,
489                             emu->params[0] ?: 1, emu->attr | ' ');                             emu->params[0] ?: 1, emu->attr | ' ');
490        break;        break;
# Line 570  vga_display_output_one (struct vga_displ Line 571  vga_display_output_one (struct vga_displ
571                }                }
572              else              else
573                {                {
574                  if (cons->current_line == cons->video_buffer_lines - 1)                  if (cons->current_line == cons->video_buffer_lines - 1)
575                    cons->current_line = 0;                    cons->current_line = 0;
576                  else                  else
577                    cons->current_line++;                    cons->current_line++;
# Line 647  vga_display_output_one (struct vga_displ Line 648  vga_display_output_one (struct vga_displ
648                int charval = dynafont_lookup (cons->df, chr);                int charval = dynafont_lookup (cons->df, chr);
649                int line = (cons->current_line + cons->cursor_y)                int line = (cons->current_line + cons->cursor_y)
650                  % cons->video_buffer_lines;                  % cons->video_buffer_lines;
651                  
652                cons->video_buffer[(line * cons->width + cons->cursor_x) * 2]                cons->video_buffer[(line * cons->width + cons->cursor_x) * 2]
653                  = charval & 0xff;                  = charval & 0xff;
654                cons->video_buffer[(line * cons->width + cons->cursor_x) * 2 + 1]                cons->video_buffer[(line * cons->width + cons->cursor_x) * 2 + 1]
# Line 790  vga_display_output (void *console, char Line 791  vga_display_output (void *console, char
791        /* First process all successfully converted characters.  */        /* First process all successfully converted characters.  */
792        for (i = 0; i < CONV_OUTBUF_SIZE - outsize; i++)        for (i = 0; i < CONV_OUTBUF_SIZE - outsize; i++)
793          vga_display_output_one (cons, outbuf[i]);          vga_display_output_one (cons, outbuf[i]);
794          
795        if (nconv == (size_t) -1)        if (nconv == (size_t) -1)
796          {          {
797            /* Conversion didn't work out.  */            /* Conversion didn't work out.  */

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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