File: defs.h

package info (click to toggle)
glimpse 4.1-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,344 kB
  • ctags: 2,254
  • sloc: ansic: 32,194; makefile: 561; sh: 170; perl: 142
file content (19 lines) | stat: -rw-r--r-- 1,296 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _GIMPSE_DEFS_H_
#define _GIMPSE_DEFS_H_
#define MAX_ARGS	80	/* English alphabets + numbers + pattern + progname + arguments + extras */
#define MAXFILEOPT	1024	/* includes length of args too: #args is <= MAX_ARGS */
#define BLOCKSIZE	8192	/* For compression: what is the optimal unit of disk i/o = n * pagesize */

/*
 * These are some parameters that allow us to switch between offset computation
 * and just index computation when the index is built at a byte-level: since
 * offset computation is a waste if we can't narrow down search enough (since
 * we must look all over and the lists become too long => bottleneck). This may
 * not be needed if we used trees to store intervals --- we'll do it later :-).
 */

#define MAX_DISPARITY	100	/* if least frequent word occurrs in < 1/100 times most frequent word, resort to agrep: don't intersect lists (byte-level) */
#define MIN_OCCURRENCES	20	/* Min no. of occurrences before we check for highly frequent words using MAX_UNION */
#define MAX_UNION	500	/* Don't even perform the Union of offsets if least < 1/500 times most freq word (we are on track of stop list kinda words) */
#define MAX_ABSOLUTE	MAX_SORTLINE_LEN	/* Don't even perform the Union of offsets if a word occurs more than 16K times (independent of #of files) */
#endif