fix font handling
This commit is contained in:
@@ -97,6 +97,7 @@ SECTIONS
|
||||
OBJDIR/fbmem.o(.text)
|
||||
OBJDIR/fbmon.o(.text)
|
||||
OBJDIR/fbmodedb.o(.text)
|
||||
OBJDIR/fnt_st_8x16.o(.text)
|
||||
OBJDIR/offscreen.o(.text)
|
||||
|
||||
OBJDIR/x86emu.o(.text)
|
||||
|
||||
@@ -95,6 +95,6 @@ struct font_head {
|
||||
void font_init(void); /* initialize BIOS font ring */
|
||||
void font_set_default(void); /* choose the default font */
|
||||
|
||||
extern const struct font_head *fnt_st_8x16;
|
||||
extern struct font_head *fnt;
|
||||
|
||||
#endif /* FONT_H */
|
||||
|
||||
@@ -34,6 +34,16 @@ void *memcpy(void *dst, const void *src, size_t n)
|
||||
return dst;
|
||||
}
|
||||
|
||||
void *memmove(void *dst, const void *src, size_t n)
|
||||
{
|
||||
uint8_t *to = dst;
|
||||
|
||||
while (to < (uint8_t *) dst + n)
|
||||
*to++ = * (uint8_t *) src++;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
void bzero(void *s, size_t n)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
@@ -19,15 +19,29 @@
|
||||
|
||||
#define plane_offset 2 /* interleaved planes */
|
||||
|
||||
#define v_fnt_st fnt_st_8x16->first_ade
|
||||
#define v_fnt_nd fnt_st_8x16->last_ade
|
||||
#define v_off_ad fnt_st_8x16->off_table
|
||||
#define v_fnt_st fnt->first_ade
|
||||
#define v_fnt_nd fnt->last_ade
|
||||
#define v_off_ad fnt->off_table
|
||||
#define v_bas_ad info_fb->screen_base
|
||||
|
||||
uint8_t *v_cur_ad; /* cursor address */
|
||||
int8_t v_stat_0; /* console status byte */
|
||||
uint16_t v_cur_cx;
|
||||
uint16_t v_cur_cy;
|
||||
int8_t v_cur_tim;
|
||||
uint16_t v_cel_mx;
|
||||
uint16_t v_cel_my;
|
||||
uint16_t v_cel_wr;
|
||||
int16_t v_cur_of;
|
||||
uint16_t v_cel_ht;
|
||||
int8_t v_period;
|
||||
const uint16_t *v_fnt_ad;
|
||||
int16_t v_fbt_wr;
|
||||
int16_t v_col_bg;
|
||||
int16_t v_col_fg;
|
||||
uint16_t v_fnt_wr;
|
||||
|
||||
|
||||
const int16_t v_planes = 8;
|
||||
extern struct fb_info *info_fb;
|
||||
#define v_lin_wr (info_fb->var.width / 2) /* length of a screen line in words */
|
||||
|
||||
@@ -335,3 +335,5 @@ const struct font_head fnt_st_8x16 = {
|
||||
0, /* struct font * next_font */
|
||||
0 /* UWORD next_seg */
|
||||
};
|
||||
|
||||
struct font_head *fnt = &fnt_st_8x16;
|
||||
|
||||
Reference in New Issue
Block a user