/*******************************************************************************
*
* Project: seft (search engine for text)
*
* File: main.h
*
* Author: Owen de Kretser (oldk@cs.mu.oz.au)
*
* Organisation: Dept. of CS&SE, University of Melbourne
*
* Date: April 1999
*
* Purpose:
*
*******************************************************************************/
#ifndef __MAIN
#define __MAIN
/***** #includes **************************************************************/
#include "util.h"
#include "tst.h"
#include "types.h"
#ifdef INC_TIMING
#include "timing.h"
#endif
/***** #defines and Macros ****************************************************/
#define MAX_QUERY_LEN 200
#define INIT_WORD_SIZE 10000
#define INCR_WORD_SIZE 1000
#define INIT_TERM_SIZE 100
#define INCR_TERM_SIZE 10
#define MAX_DOCS 100000
#define DEFAULT_WINDOW_SIZE 5
#define DEFAULT_MAX_WINDOWS 3
#define MAX_LINE_LENGTH 80
#define ASCII 256
#define ASCII7 128
#define MAX_WORD_LEN 16
#define WORD_SHIFT 4 // log2(MAX_WORD_LEN)
/***** Data Structures ********************************************************/
typedef struct
{
int max_windows;
char* file_name;
char* query_string;
long* seek_buffer;
FILE* temp_file;
char* doc_separator;
FILE* query_file;
int window_size;
bool no_output;
bool no_hilite;
bool do_formfeed;
int stem_method;
TERM *query_table;
WORD *word_array;
int no_words;
int line_no;
int min_length;
int no_docs;
int no_terms;
int N;
int max_words;
int max_terms;
long curr_pos;
long *doc_idx;
int* lookup;
Tptr tst_root;
} query_data;
/***** Function Prototypes ****************************************************/
/******************************************************************************/
#endif
|