//********************************************
//文件名:JIAN-H3.C
//功能:建立汉字库头文件
//********************************************
#include
#include
void main()
{
unsigned char *str="输入密钥多余的参数"
"非法用户!错误剩次:正在加锁请稍等是否"
"将扇区据文件拷贝到A盘(Y/N)?已继"
"当前目录中,先其删除或移走再运行程序续"
"软放驱动器成功解没有找到按任一键退出";
unsigned k,l;
unsigned char c;
int i,j;
int qu,wei;
long sp;
FILE *fp,*hzlib;
l=strlen(str);
fp=fopen("hzku3.h","w");
fprintf(fp,"unsigned sb[%u]={\n",l/2);
j=1;
while(*str)
{
k=*str+(*(str+1))*256;
str=str+2;
printf("%u\n",k);
if(j fprintf(fp,"%u,",k);
else
fprintf(fp,"%u};\n",k);
if(j%8==0)
fprintf(fp,"\n");
j++;
}
str=str-l;
fprintf(fp,"unsigned buff[%u][32]={\n",l/2);
hzlib=fopen("hzk16","rb");
j=1;
while(*str)
{
fprintf(fp,"{");
qu=*str-0xa0;
wei=*(str+1)-0xa0;
sp=(qu-1)*94+wei-1;
sp*=32;
fseek(hzlib,(long)sp,0);
for(i=1;i {
c=fgetc(hzlib);
fprintf(fp,"0x%x,",c);
if(i%8==0)
fprintf(fp,"\n");
}
c=fgetc(hzlib);
if(j fprintf(fp,"0x%x},\n\n",c);
else
fprintf(fp,"0x%x}\n",c);
str=str+2;
j++;
}
fprintf(fp,"};");
fclose(fp);
fclose(hzlib);
}