?? hx16.c
字號:
/****************************************Copyright (c)****************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.com
**
**------File Info-----------------------------------------------------------------------------------------
** File name: hz16.c
** Latest modified Date: 2007-12-12
** Latest Version: 1.0
** Descriptions: ASCII碼字庫及漢字自定義字庫的應用
**
**--------------------------------------------------------------------------------------------------------
** Created by: 張展威
** Created date: 2007-12-12
** Version: 1.0
** Descriptions:
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
*********************************************************************************************************/
#include "hx16.h"
/*********************************************************************************************************
** Function name: findHzIndex
** Descriptions: 查找漢字在自定義字庫中的索引
** input parameters: hz 指向漢字(機內碼)的指針
** output parameters: 無
** Returned value: 無
** Created By: 張展威
** Created date: 2007.12.12
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
**--------------------------------------------------------------------------------------------------------
*********************************************************************************************************/
unsigned int findHzIndex(unsigned char *hz) /* 在自定義漢字庫在查找所要顯示 */
/* 的漢字的位置 */
{
unsigned int i=0;
FNT_GB16 *ptGb16 = (FNT_GB16 *)GBHZ_16;
while(ptGb16[i].Index[0] > 0x80) {
if ((*hz == ptGb16[i].Index[0]) && (*(hz+1) == ptGb16[i].Index[1])) {
return i;
}
i++;
//if(i > (sizeof(GBHZ_16) / sizeof(FNT_GB16) - 1)) { /* 搜索下標約束 */
// break;
// }
}
return 0;
}
/*********************************************************************************************************
** End of File
*********************************************************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -