📄 shiyan.lst
字号:
C51 COMPILER V7.08 SHIYAN 11/17/2006 22:52:39 PAGE 1
C51 COMPILER V7.08, COMPILATION OF MODULE SHIYAN
OBJECT MODULE PLACED IN shiyan.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE shiyan.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include<reg1210.h>
2 #include <stdio.h>
3 #include<string.h>
4 #include"PY_mb.h"
5 #include"51t9py_indexa.h"
6 #define CNTLQ 0x11
7 #define CNTLS 0x13
8 #define DEL 0x7F
9 #define BACKSPACE 0x08
10 #define CR 0x0D
11 #define LF 0x0A
12
13 unsigned char cpt9PY_Mblen;
14 struct t9PY_index code * cpt9PY_Mb[16];
15
16 unsigned char T9PY_Get_Match_PY_MB(char *p_PadInput,struct t9PY_index code ** List_match_PY_Mb)
17 {
18 1 struct t9PY_index *p_PY_CurrenIndex,*p_PY_LastIndex,*p_PY_TempIndex;
19 1 unsigned char i,j,cInputStrLength;
20 1 unsigned char T9PY_Match_NUM=0; //完全匹配拼音数量
21 1 j=0; //j为匹配最大值
22 1 if(*p_PadInput=='\0')return(0); //如果输入空字符返回0//
23 1
24 1 cInputStrLength=strlen(p_PadInput); //获取输入拼音串长度//
25 1
26 1
27 1 p_PY_CurrenIndex=&(t9PY_index2[0]); //首索引地址赋值,p_PY_CurrenIndex为当前拼音
-索引地址
28 1 p_PY_LastIndex=t9PY_index2+sizeof(t9PY_index2)/sizeof(t9PY_index2[0]);//最后索引地址之后的地址(作下一
-语句比较用)
29 1 while(p_PY_CurrenIndex < p_PY_LastIndex) //遍历字母索引表.或者使用语句: while((p_PY_CurrenIndex->t9PY_T9
-[0])!='\n')
30 1 {
31 2 for(i=0;i<cInputStrLength;i++)
32 2 {
33 3 if(*(p_PadInput+i)!=*((*p_PY_CurrenIndex).t9PY_T9+i)) //检查是否匹配
34 3 {
35 4 if (i+1 > j)
36 4 {
37 5 j=i+1; //j为不匹配字符串中前面字符匹配的最大值,例如:被比较字符串(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -