forked from rhash/RHash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrhash_main.h
50 lines (40 loc) · 945 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
/* rhash_main.h */
#ifndef RHASH_MAIN_H
#define RHASH_MAIN_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* Runtime data.
*/
struct rhash_t
{
FILE *out;
FILE *log;
FILE *upd_fd; /* descriptor of a crc file to update */
#ifdef _WIN32
wchar_t* program_dir;
unsigned saved_cursor_size;
unsigned output_flags;
#endif
char* printf_str;
struct print_item *print_list;
struct strbuf_t *template_text;
struct rhash_context* rctx;
int interrupted; /* non-zero if program was interrupted */
/* missed, ok and processed files statistics */
unsigned processed;
unsigned ok;
unsigned miss;
uint64_t total_size;
uint64_t batch_size;
int error_flag; /* non-zero if any error occurred */
};
/** 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 */