-
-
Notifications
You must be signed in to change notification settings - Fork 116
/
rhash_main.h
57 lines (47 loc) · 978 Bytes
/
rhash_main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/* rhash_main.h */
#ifndef RHASH_MAIN_H
#define RHASH_MAIN_H
#include "file.h"
#ifdef __cplusplus
extern "C" {
#endif
enum StopFlags {
InterruptedFlag = 1,
FatalErrorFlag = 2
};
/**
* Runtime data.
*/
struct rhash_t
{
FILE* out;
FILE* log;
file_t out_file;
file_t log_file;
file_t upd_file;
file_t config_file;
char* printf_str;
struct print_item* print_list;
struct strbuf_t* template_text;
struct update_ctx* update_context;
struct rhash_context* rctx;
uint64_t last_hash_mask;
unsigned hash_ids[64];
size_t hash_ids_count;
int is_sfv;
int non_fatal_error;
unsigned stop_flags;
/* missed, ok and processed files statistics */
unsigned processed;
unsigned ok;
unsigned miss;
uint64_t total_size;
uint64_t batch_size;
};
/** static variable, holding most of the runtime data */
extern struct rhash_t rhash_data;
void rhash_destroy(struct rhash_t*);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* RHASH_MAIN_H */