blob: 0a065c020da785f5f10e85271ab54a511de53b86 (
plain)
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
42
43
44
45
46
47
|
#ifndef __LSEARCHER_H__
#define __LSEARCHER_H__
#include <sys/param.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "debug.h"
#include "safe.h"
#define NBG 128
#define MAXSTR 1024
#define OFFSET 14
#define PARITY 128
#define SWITCH 30
#define UMLAUT 31
#define LDC_MIN 0
#define LDC_MAX 28
#define BIGRAM_MIN (UCHAR_MAX - CHAR_MAX)
#define BIGRAM_MAX UCHAR_MAX
#define ASCII_MIN 32
#define ASCII_MAX CHAR_MAX
#define TO7BIT(x) ((x) = (x) & 127)
#define TOLOWER(c) ('A' <= (c) && (c) <= 'Z' ? (c) | 0x20 : (c))
typedef bool resultf(uchar_t *);
typedef void donef();
typedef unsigned char *ucaddr_t;
typedef struct {
uchar_t bigram1[NBG], bigram2[NBG];
uchar_t *addr;
uint32_t *prefixdb;
size_t size;
} lindex;
void kill_search();
int search(lindex *, uchar_t *, resultf, donef, bool, bool);
#endif
|