File: rhash_main.h

package info (click to toggle)
rhash 1.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,408 kB
  • sloc: ansic: 19,132; sh: 1,196; xml: 933; makefile: 662; python: 431; java: 364; cs: 288; perl: 196; ruby: 76; sed: 16
file content (54 lines) | stat: -rw-r--r-- 902 bytes parent folder | download
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
/* 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;
	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 */