patch-2.1.109 linux/drivers/video/compatcon.c
Next file: linux/drivers/video/creatorfb.c
Previous file: linux/drivers/video/cgsixfb.c
Back to the patch index
Back to the overall index
- Lines: 124
- Date:
Fri Jul 10 15:18:31 1998
- Orig file:
v2.1.108/linux/drivers/video/compatcon.c
- Orig date:
Wed Jun 24 22:54:07 1998
diff -u --recursive --new-file v2.1.108/linux/drivers/video/compatcon.c linux/drivers/video/compatcon.c
@@ -43,11 +43,11 @@
static void compatcon_clear(struct vc_data *conp, int sy, int sx, int height,
int width);
static void compatcon_putc(struct vc_data *conp, int c, int ypos, int xpos);
-static void compatcon_putcs(struct vc_data *conp, const char *s, int count,
+static void compatcon_putcs(struct vc_data *conp, const unsigned short *s, int count,
int ypos, int xpos);
static void compatcon_cursor(struct vc_data *conp, int mode);
-static void compatcon_scroll(struct vc_data *conp, int t, int b, int dir,
- int count);
+static int compatcon_scroll(struct vc_data *conp, int t, int b, int dir,
+ int count);
static void compatcon_bmove(struct vc_data *conp, int sy, int sx, int dy,
int dx, int height, int width);
static int compatcon_switch(struct vc_data *conp);
@@ -62,10 +62,6 @@
* Internal routines
*/
-#if 0
-static int compatcon_show_logo(void);
-#endif
-
unsigned long video_num_columns;
unsigned long video_num_lines;
unsigned long video_size_row;
@@ -100,10 +96,6 @@
video_screen_size = video_num_lines*video_size_row;
con_type_init(&display_desc);
-#if 0
- if (!console_show_logo)
- console_show_logo = compatcon_show_logo;
-#endif
return display_desc;
}
@@ -152,11 +144,11 @@
return;
p = (u16 *)(video_mem_base+ypos*video_size_row+xpos*2);
- scr_writew(conp->vc_attr << 8 | c, p);
+ scr_writew(c, p);
}
-static void compatcon_putcs(struct vc_data *conp, const char *s, int count,
+static void compatcon_putcs(struct vc_data *conp, const unsigned short *s, int count,
int ypos, int xpos)
{
u16 *p;
@@ -166,9 +158,8 @@
return;
p = (u16 *)(video_mem_base+ypos*video_size_row+xpos*2);
- sattr = conp->vc_attr << 8;
while (count--)
- scr_writew(sattr | ((int) (*s++) & 0xff), p++);
+ scr_writew(*s++, p++);
}
@@ -187,11 +178,11 @@
}
-static void compatcon_scroll(struct vc_data *conp, int t, int b, int dir,
- int count)
+static int compatcon_scroll(struct vc_data *conp, int t, int b, int dir,
+ int count)
{
if (console_blanked)
- return;
+ return 0;
compatcon_cursor(conp, CM_ERASE);
@@ -226,6 +217,7 @@
compatcon_clear(conp, 0, t, conp->vc_rows, count);
break;
}
+ return 0;
}
@@ -279,7 +271,7 @@
static int compatcon_switch(struct vc_data *conp)
{
- return 0;
+ return 1;
}
@@ -327,21 +319,6 @@
return -ENOSYS;
}
-#if 0
-__initfunc(static int compatcon_show_logo( void ))
-{
- int height = 0;
- char *p;
-
- printk(linux_serial_image);
- for (p = linux_serial_image; *p; p++)
- if (*p == '\n')
- height++;
- return height;
-}
-#endif
-
-
/*
* The console `switch' structure for the console wrapper
*/
@@ -350,5 +327,6 @@
compatcon_startup, compatcon_init, compatcon_deinit, compatcon_clear,
compatcon_putc, compatcon_putcs, compatcon_cursor, compatcon_scroll,
compatcon_bmove, compatcon_switch, compatcon_blank, compatcon_get_font,
- compatcon_set_font, compatcon_set_palette, compatcon_scrolldelta
+ compatcon_set_font, compatcon_set_palette, compatcon_scrolldelta,
+ NULL, NULL
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov