]> mj.ucw.cz Git - libucw.git/blob - lib/custom.h
Initial version of SQL gathering utility gsql added.
[libucw.git] / lib / custom.h
1 /*
2  *      Sherlock: Custom Parts of Configuration
3  *
4  *      (c) 2001 Martin Mares <mj@ucw.cz>
5  */
6
7 /* Name of this customization (version suffix) */
8
9 #define SHER_SUFFIX ""
10
11 /* Features */
12
13 #define  SHERLOCK_CONFIG_LARGE_DB       /* Support for DB files >4GB */
14 #define  SHERLOCK_CONFIG_LFS            /* Large files on 32-bit systems */
15 #define  SHERLOCK_CONFIG_LFS_LIBC       /* LFS supported directly by libc */
16
17 /* Word types */
18
19 enum word_type {
20   WT_RESERVED,                          /* Reserved word type */
21   WT_TEXT,                              /* Ordinary text */
22   WT_EMPH,                              /* Emphasized text */
23   WT_SMALL,                             /* Small font */
24   WT_TITLE,                             /* Document title */
25   WT_SMALL_HEADING,                     /* Heading */
26   WT_BIG_HEADING,                       /* Larger heading */
27   WT_KEYWORD,                           /* Explicitly marked keyword */
28   WT_META,                              /* Various meta-information */
29   WT_ALT,                               /* Alternate texts for graphical elements */
30   WT_URL1,                              /* Word extracted from document URL (low and high weight) */
31   WT_URL2,
32   WT_MAX
33 };
34
35 /* Descriptive names used for user output */
36 #define WORD_TYPE_USER_NAMES                                                    \
37    "reserved", "text", "emph", "small", "title", "hdr1", "hdr2", "keywd",       \
38    "meta", "alt", "urlword1", "urlword2", "type12", "type13", "type14", "type15"
39
40 /* Keywords for word type names */
41 #define WORD_TYPE_NAMES                         \
42         T(WORD, ~0)                             \
43         T(TEXT, 1 << WT_TEXT)                   \
44         T(EMPH, 1 << WT_EMPH)                   \
45         T(SMALL, 1 << WT_SMALL)                 \
46         T(TITLE, 1 << WT_TITLE)                 \
47         T(HDR, (1 << WT_SMALL_HEADING) | (1 << WT_BIG_HEADING))  \
48         T(HDR1, 1 << WT_SMALL_HEADING)          \
49         T(HDR2, 1 << WT_BIG_HEADING)            \
50         T(KEYWD, 1 << WT_KEYWORD)               \
51         T(META, 1 << WT_META)                   \
52         T(ALT, 1 << WT_ALT)                     \
53         T(URLWORD, (1 << WT_URL1) | (1 << WT_URL2))
54
55 /* These types are not shown in document contexts */
56 #define WORD_TYPES_HIDDEN ((1 << WT_URL1) | (1 << WT_URL2))
57
58 /* These types are always matched without accents if accent mode is set to "auto" */
59 #define WORD_TYPES_NO_AUTO_ACCENT ((1 << WT_URL1) | (1 << WT_URL2))
60
61 /* String types */
62
63 enum string_type {
64   ST_RESERVED,                          /* Reserved string type */
65   ST_URL,                               /* URL of the document */
66   ST_HOST,                              /* Host name */
67   ST_DOMAIN,                            /* Domain name */
68   ST_REF,                               /* URL reference */
69   ST_BACKREF,                           /* Back-reference (frame or redirect source) */
70   ST_MAX
71 };
72
73 #define STRING_TYPE_USER_NAMES                                                  \
74    "URL", "host", "domain", "ref", "backref", "type5", "type6", "type7",        \
75    "type8", "type9", "type10", "type11", "type12", "type13", "type14", "type15"
76
77 #define STRING_TYPE_NAMES                       \
78         T(URL, 1 << ST_URL)                     \
79         T(HOST, 1 << ST_HOST)                   \
80         T(DOMAIN, 1 << ST_DOMAIN)               \
81         T(REF, 1 << ST_REF)                     \
82         T(BACKREF, 1 << ST_BACKREF)
83
84 #define STRING_TYPES_URL ((1 << ST_URL) | (1 << ST_REF) | (1 << ST_BACKREF))
85 /* These must be indexed in lowercase form */
86 #define STRING_TYPES_CASE_INSENSITIVE ((1 << ST_HOST) | (1 << ST_DOMAIN))