summaryrefslogtreecommitdiff
path: root/src/options.h
blob: e8419b17c955bb179a973ef6c95a6f1131bd5d61 (plain)
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
29
30
31
32
33
34
35
36
37
#ifndef OPTIONS_H
#define OPTIONS_H OPTIONS_H

typedef struct FieldRange {
    int start;
    int end;
} FieldRange;

typedef struct FieldSelector {
    FieldRange *ranges;
    size_t nb_ranges;
} FieldSelector;

typedef struct {
	int benchmark;
	const char *filter;
	const char *init_search;
	const char *tty_filename;
	int show_scores;
	unsigned int num_lines;
	unsigned int scrolloff;
	const char *prompt;
	unsigned int workers;
	char input_delimiter;
	int show_info;

    const char *delimiters;

    FieldSelector search_fields;
    FieldSelector output_fields;
} options_t;

void options_init(options_t *options);
void options_parse(options_t *options, int argc, char *argv[]);
void options_uninit(options_t *options);

#endif