有一结构体定义,在Keil C下能编译通过,在BC4.0环境编译报错,大家看看如何改改才能合BC的要求。
Keil C环境如下: #define uchar unsigned char #define uint unsigned int #define ulong unsigned long
/*汉字X方向宽度*/ #define HZ_SIZE_X 2 /*汉字Y方向宽度*/ #define HZ_SIZE_Y 16
#define HZ_NUM 128
typedef struct _HzModel { /* 汉字内码 */ uint uiHZcode;
/* 点阵字模 向下为x,向右为y*/ uchar model[HZ_SIZE_X][HZ_SIZE_Y];
}HZ_MODEL;
code HZ_MODEL ZK_Data[]= { { 0xD0BB, //谢 0x02,0x08,0x44,0x88,0x2F,0xC8,0x28,0x88,0x0F,0x88,0x08,0xFE,0xEF,0x88,0x28,0x88, 0x28,0xC8,0x3F,0xA8,0x21,0xA8,0x2A,0x88,0x34,0x88,0x28,0x88,0x12,0xA8,0x01,0x10},
{ 0xCAB9, //使 0x10,0x40,0x10,0x44,0x1F,0xFE,0x20,0x40,0x27,0xFC,0x64,0x44,0xA4,0x44,0x24,0x44, 0x27,0xFC,0x24,0x44,0x22,0x40,0x21,0x80,0x20,0xC0,0x21,0x30,0x26,0x0E,0x28,0x04}, ...... }
BC环境如下 #define uchar unsigned char #define uint unsigned int #define ulong unsigned long
/*汉字X方向宽度*/ #define HZ_SIZE_X 2 /*汉字Y方向宽度*/ #define HZ_SIZE_Y 16
#define HZ_NUM 128
typedef struct _HzModel { /* 汉字内码 */ uint uiHZcode;
/* 点阵字模 向下为x,向右为y*/ uchar model[HZ_SIZE_X][HZ_SIZE_Y];
}HZ_MODEL;
const HZ_MODEL ZK_Data[]= { { 0xD0BB, //谢 0x02,0x08,0x44,0x88,0x2F,0xC8,0x28,0x88,0x0F,0x88,0x08,0xFE,0xEF,0x88,0x28,0x88, 0x28,0xC8,0x3F,0xA8,0x21,0xA8,0x2A,0x88,0x34,0x88,0x28,0x88,0x12,0xA8,0x01,0x10},
{ 0xCAB9, //使 0x10,0x40,0x10,0x44,0x1F,0xFE,0x20,0x40,0x27,0xFC,0x64,0x44,0xA4,0x44,0x24,0x44, 0x27,0xFC,0x24,0x44,0x22,0x40,0x21,0x80,0x20,0xC0,0x21,0x30,0x26,0x0E,0x28,0x04},
{ 0xD3C3, //用 0x00,0x08,0x3F,0xFC,0x21,0x08,0x21,0x08,0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08, 0x21,0x08,0x3F,0xF8,0x21,0x08,0x21,0x08,0x21,0x08,0x41,0x08,0x41,0x28,0x80,0x10},
...... }; |