CreateLib.h
上传用户:hyb6888
上传日期:2016-01-24
资源大小:5186k
文件大小:2k
- // reateLib.h: interface for the CreateLib class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "windows.h"
- #include "stdio.h"
- #if !defined(AFX_REATELIB_H__A93CA9E0_A363_4A5E_BC30_3C92584E2B09__INCLUDED_)
- #define AFX_REATELIB_H__A93CA9E0_A363_4A5E_BC30_3C92584E2B09__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "tool.h"
- #include "stdio.h"
- class mynode
- {
- public:
- char *Enstr;
- char *Chistr;
- char *ChistrEx;
- mynode *Next;
- int len;
- mynode( )
- {
- Enstr=NULL;
- Chistr=NULL;
- ChistrEx=NULL;
- Next=NULL;
- len=3;
- }
- };
- class CreateLib
- {
- unsigned long Sqrt(long num,int p);//求平方
- long getheadID(char *ss,int long lon); //由指定的编码转换成头接点号
- inertNewdnode(mynode *NP,mynode *pHead);
- inertNewdnodeEx(mynode *NP,mynode *pHead);
- writeChLib(mynode *pHead,HANDLE outfp); //输出中文字库
- unsigned long writeIndex(mynode *pHead,HANDLE outfp,unsigned long count); //输出地址
- int CreatNode(FILE *fp);
- int CreatNodeEx(FILE *fp,tool *mytool);
- int Base, GoldeNum, GoldeLen;
- unsigned long ht;
- // 对于主程序是小程序,分配大的内存会引起主程序终止。因此改为使用指针。
- // mynode pChHead[20000];
- mynode *pChHead;
- //LocGoldeNum=27时,使用头二个字符本变量为729,
- //头三个19683,但要视变量而定LocGoldeNum
- //而且要设为外部变量,否则堆栈会满
- long LIBnum;//汉字库的个数
- long LIBlonEnCh;//字库的长度
- public:
- CreateLib();
- virtual ~CreateLib();
- int CreatChiLib(char *CodeSource,char *userdefine,char *ExCodeSource,char *outfname,long Locbase, long LocGoldeNum, long LocGoldeLen);
- };
- #endif // !defined(AFX_REATELIB_H__A93CA9E0_A363_4A5E_BC30_3C92584E2B09__INCLUDED_)