瀏覽代碼

Make vga_font const to avoid warning about large symbol

tags/v0.9.3
Michael Brown 19 年之前
父節點
當前提交
462234f373
共有 1 個檔案被更改,包括 12 行新增12 行删除
  1. 12
    12
      src/core/btext.c

+ 12
- 12
src/core/btext.c 查看文件

@@ -29,12 +29,12 @@
29 29
 static void scrollscreen(void);
30 30
 #endif
31 31
 
32
-static void draw_byte(unsigned char c, u32 locX, u32 locY);
32
+static void draw_byte(const unsigned char c, u32 locX, u32 locY);
33 33
 #if 0
34
-static void draw_byte_32(unsigned char *bits, u32 *base, u32 rb);
35
-static void draw_byte_16(unsigned char *bits, u32 *base, u32 rb);
34
+static void draw_byte_32(const unsigned char *bits, u32 *base, u32 rb);
35
+static void draw_byte_16(const unsigned char *bits, u32 *base, u32 rb);
36 36
 #endif
37
-static void draw_byte_8(unsigned char *bits, u32 *base, u32 rb);
37
+static void draw_byte_8(const unsigned char *bits, u32 *base, u32 rb);
38 38
 
39 39
 static u32 g_loc_X;
40 40
 static u32 g_loc_Y;
@@ -49,7 +49,7 @@ static u32 g_max_loc_Y;
49 49
 #define cmapsz  (16*96)
50 50
 #endif
51 51
 
52
-static unsigned char vga_font[cmapsz];
52
+static const unsigned char vga_font[cmapsz];
53 53
 
54 54
 u32 boot_text_mapped;
55 55
 
@@ -275,14 +275,14 @@ btext_drawhex(u32 v)
275 275
 #endif
276 276
 
277 277
 static void BTEXT
278
-draw_byte(unsigned char c, u32 locX, u32 locY)
278
+draw_byte(const unsigned char c, u32 locX, u32 locY)
279 279
 {
280 280
 	boot_infos_t* bi	= &disp_bi;
281 281
 	unsigned char *base	= calc_base(bi, locX << 3, locY << 4);
282 282
 #if CHAR_256==1
283
-        unsigned char *font     = &vga_font[(((u32)c)) * 16];
283
+        unsigned const char *font     = &vga_font[(((u32)c)) * 16];
284 284
 #else
285
-	unsigned char *font	= &vga_font[(((u32)c-0x20)) * 16];
285
+	unsigned const char *font	= &vga_font[(((u32)c-0x20)) * 16];
286 286
 #endif
287 287
 
288 288
 	u32 rb			= bi->dispDeviceRowBytes;
@@ -331,7 +331,7 @@ static const u32 expand_bits_16[4] BTDATA = {
331 331
 #endif
332 332
 #if 0
333 333
 static void BTEXT
334
-draw_byte_32(unsigned char *font, u32 *base, u32 rb)
334
+draw_byte_32(const unsigned char *font, u32 *base, u32 rb)
335 335
 {
336 336
 	u32 l, bits;
337 337
 	u32 fg = 0xFFFFFFFF;
@@ -353,7 +353,7 @@ draw_byte_32(unsigned char *font, u32 *base, u32 rb)
353 353
 }
354 354
 
355 355
 static void BTEXT
356
-draw_byte_16(unsigned char *font, u32 *base, u32 rb)
356
+draw_byte_16(const unsigned char *font, u32 *base, u32 rb)
357 357
 {
358 358
 	u32 l, bits;
359 359
 	u32 fg = 0xFFFFFFFF;
@@ -372,7 +372,7 @@ draw_byte_16(unsigned char *font, u32 *base, u32 rb)
372 372
 }
373 373
 #endif
374 374
 static void BTEXT
375
-draw_byte_8(unsigned char *font, u32 *base, u32 rb)
375
+draw_byte_8(const unsigned char *font, u32 *base, u32 rb)
376 376
 {
377 377
 	u32 l, bits;
378 378
 	u32 fg = 0x0F0F0F0F;
@@ -450,7 +450,7 @@ INIT_FN ( INIT_CONSOLE, btext_init, NULL, NULL );
450 450
 /**********************************************/
451 451
 
452 452
 
453
-static unsigned char vga_font[cmapsz] BTDATA = {
453
+static const unsigned char vga_font[cmapsz] BTDATA = {
454 454
 #if CHAR_256==1
455 455
 	/* 0 0x00 '^@' */
456 456
 	0x00, /* 00000000 */

Loading…
取消
儲存