Browse Subversion Repository
Contents of /branches/mty-makai/wdict.h
Parent Directory
| Revision Log
Revision 125 -
( show annotations)
( download)
( as text)
Mon Apr 16 14:50:11 2007 UTC
(16 years, 11 months ago)
by notanpe
File MIME type: text/x-chdr
File size: 1041 byte(s)
魔改造用ブランチ
| 1 |
/*********************************************************************** |
| 2 |
* |
| 3 |
* file: wdict.h |
| 4 |
* |
| 5 |
* $Id$ |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef WDICT_H__ |
| 10 |
#define WDICT_H__ |
| 11 |
|
| 12 |
#include "crypt64.h" |
| 13 |
|
| 14 |
struct WDICT; /* vague */ |
| 15 |
|
| 16 |
/* 語の属性 */ |
| 17 |
#define CA_U 0x0001U |
| 18 |
#define CA_C 0x0002U |
| 19 |
#define CA_A 0x0004U |
| 20 |
|
| 21 |
/* 語を構成 */ |
| 22 |
struct DICT_CHAR |
| 23 |
{ |
| 24 |
uint64_t bmp; /* エンコードされた語(LSBから) */ |
| 25 |
unsigned xp :10; /* 大小拡張 */ |
| 26 |
unsigned len : 4; /* 文字長 */ |
| 27 |
unsigned e : 1; /* 末尾特定 */ |
| 28 |
unsigned attr : 3; /* 語の属性 */ |
| 29 |
}; |
| 30 |
|
| 31 |
extern struct WDICT *wdict_add(int tn, |
| 32 |
int pos, |
| 33 |
struct DICT_CHAR const *word); |
| 34 |
|
| 35 |
extern void wdict_setnode(struct WDICT *pd, |
| 36 |
struct ITREE *node); |
| 37 |
extern void wdict_setup_lr(void); |
| 38 |
|
| 39 |
extern int wdict_ishit(SLICE const *hit, /* 生成比較器がセットしたヒット配列[tn] */ |
| 40 |
int an, int ab, /* SLICE::a[an].bit(ab) */ |
| 41 |
uint64_t bmp); /* デコード済み文字列 */ |
| 42 |
|
| 43 |
extern void wdict_dump(int lv, struct WDICT const *dict); |
| 44 |
|
| 45 |
#endif /* WDICT_H__ */ |
| 46 |
|
| 47 |
/* |
| 48 |
* Local Variables: |
| 49 |
* tab-width: 4 |
| 50 |
* End: |
| 51 |
* |
| 52 |
* EOF */ |
Properties
| svn:eol-style |
native
|
| svn:keywords |
Author Date Id Rev URL
|
|