-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathhashindex.h
41 lines (30 loc) · 1.3 KB
/
hashindex.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/***************************************************************************
hashindex.cpp - hashed indexes for string include
-------------------
begin : Sun Nov 5 2002
copyright : (C) 2001-2002 by Alexander Bilichenko
email : [email protected]
***************************************************************************/
#ifndef _HASHINDEX_H_INCLUDED_
#define _HASHINDEX_H_INCLUDED_
#include "basetypes.h"
#define HASHINDEX_ER_OK 0
#define HASHINDEX_ER_ALREADY_EXIST 1
#define HASHINDEX_ER_NOT_FOUND 2
#define HASHINDEX_ER_IO_CREATE 3
#define HASHINDEX_ER_IO_READ 4
#define HASHINDEX_ER_IO_WRITE 5
#define HASHINDEX_ER_FORMAT 6
#define HASHTAB_LEN 256
#define HASHINDEX_BLOCK_SIZE 2000
#define HASHINDEX_NULL 0xFFFFFFFF
typedef struct _HASHINDEX_BLOCKINFO {
WORD Used;
DWORD Next;
} HASHINDEX_BLOCKINFO, *PHASHINDEX_BLOCKINFO;
int AddStringToHashedIndex(const char *s, DWORD Index);
int GetIndexOfString(const char *s, DWORD *Index);
int DeleteStringFromHashedIndex(const char *s);
int GenerateHashwordList(char **names);
int GenerateIndexList(DWORD **index);
#endif