-
Notifications
You must be signed in to change notification settings - Fork 13
/
defaults.h
28 lines (23 loc) · 892 Bytes
/
defaults.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
#ifndef WP_DEFAULTS_H_
#define WP_DEFAULTS_H_
// whistlepig defaults
// (c) 2011 William Morgan. See COPYING for license terms.
//
// just some generic definitions that we use in many places.
#include <stdint.h>
// these two types are segment-specific. an index as a whole uses a larger
// datatype for docids, and doesn't do anything with positions. but we
// refer to them all over the place, so it's convenient to break them out
// here rather than in segment.h.
typedef uint32_t docid_t;
typedef uint32_t pos_t; // position of a term within a document
// if you define DEBUGOUTPUT, all the DEBUG statements will magically start
// printing stuff out...
#ifdef DEBUGOUTPUT
#define DEBUG(fmt, ...) do { \
fprintf(stdout, "DEBUG %s:%d (%s): " fmt "\n", __FILE__, __LINE__, __PRETTY_FUNCTION__, ## __VA_ARGS__); \
} while(0)
#else
#define DEBUG(fmt, ...) do { } while(0)
#endif
#endif