~ubuntu-branches/ubuntu/oneiric/libchewing/oneiric

« back to all changes in this revision

Viewing changes to include/hash.h

  • Committer: Bazaar Package Importer
  • Author(s): Kanru Chen
  • Date: 2006-05-15 16:17:40 UTC
  • mfrom: (1.1.2 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20060515161740-x7jqtejpdwn6jv72
Tags: 0.3.0-1
* New upstream release
* Bump major version to 3
* Change debhelper compatibility to 5
* Update standards-version to 3.7.2.0
* Not install *.la files anymore.
* Install -data files to libchewing3/chewing instead of chewing
  to maintain the compatibility of old -data packages
* Update README.Debian
* Change libchewing3-data architecture to any (Closes: #303000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *      Lu-chuan Kung and Kang-pen Chen.
6
6
 *      All rights reserved.
7
7
 *
8
 
 * Copyright (c) 2004
 
8
 * Copyright (c) 2004, 2006
9
9
 *      libchewing Core Team. See ChangeLog for details.
10
10
 *
11
11
 * See the file "COPYING" for information on usage and redistribution
14
14
 
15
15
#ifndef HASH_H
16
16
#define HASH_H
 
17
 
 
18
#ifdef __cplusplus
 
19
extern "C" {
 
20
#endif
 
21
 
17
22
#include "global.h"
18
23
#include "userphrase.h"
19
24
 
20
25
#define FIELD_SIZE (125)
21
26
#define N_HASH_BIT (14)
22
 
#define HASH_FILE  "hash.dat"
 
27
#define BIN_HASH_SIG "CBiH"
 
28
#define HASH_FILE  "uhash.dat"
23
29
#define HASH_TABLE_SIZE (1<<N_HASH_BIT)
24
30
 
25
31
#ifdef __MacOSX__
39
45
HASH_ITEM *HashInsert( UserPhraseData *pData );
40
46
HASH_ITEM *HashFindPhonePhrase( const uint16 phoneSeq[], HASH_ITEM *pHashLast );
41
47
void HashModify( HASH_ITEM *pItem );
42
 
int AlcUserPhraseSeq( UserPhraseData *pData, int len );
43
 
int ReadHash( char *path );
 
48
int AlcUserPhraseSeq( UserPhraseData *pData, int phonelen, int wordlen );
 
49
int ReadHash( const char *path );
44
50
void FreeHashTable( void );
45
51
 
 
52
#ifdef __cplusplus
 
53
}
 
54
#endif
 
55
 
46
56
#endif
47
57