]> code.citadel.org Git - citadel.git/blob - citadel/ft_wordbreaker.c
* More glue code for the fulltext indexer.
[citadel.git] / citadel / ft_wordbreaker.c
1 /*
2  * $Id$
3  *
4  * Default wordbreaker module for full text indexing.
5  *
6  */
7
8
9 #include "sysdep.h"
10 #include <stdlib.h>
11 #include <unistd.h>
12 #include <stdio.h>
13 #include <fcntl.h>
14 #include <signal.h>
15 #include <pwd.h>
16 #include <errno.h>
17 #include <sys/types.h>
18
19 #if TIME_WITH_SYS_TIME
20 # include <sys/time.h>
21 # include <time.h>
22 #else
23 # if HAVE_SYS_TIME_H
24 #  include <sys/time.h>
25 # else
26 #  include <time.h>
27 # endif
28 #endif
29
30 #include <sys/wait.h>
31 #include <string.h>
32 #include <limits.h>
33 #include "citadel.h"
34 #include "server.h"
35 #include "sysdep_decls.h"
36 #include "citserver.h"
37 #include "support.h"
38 #include "config.h"
39 #include "serv_extensions.h"
40 #include "database.h"
41 #include "msgbase.h"
42 #include "control.h"
43 #include "tools.h"
44 #include "ft_wordbreaker.h"
45
46
47 void wordbreaker(char *text, int *num_tokens, int **tokens) {
48
49         int wb_num_tokens = 0;
50         int wb_num_alloc = 0;
51         int *wb_tokens = NULL;
52
53         wb_num_tokens = 3;
54         wb_tokens = malloc(wb_num_tokens * sizeof(int));
55
56         wb_tokens[0] = 6;
57         wb_tokens[1] = 7;       /* FIXME this obviously isn't a wordbreaker */
58         wb_tokens[2] = 8;
59
60         *num_tokens = wb_num_tokens;
61         *tokens = wb_tokens;
62 }
63