1 /**
2  * This file is part of the Detox package.
3  *
4  * Copyright (c) Doug Harple <detox.dharple@gmail.com>
5  *
6  * For the full copyright and license information, please view the LICENSE
7  * file that was distributed with this source code.
8  */
9 
10 #ifndef __DETOX_H
11 #define __DETOX_H
12 
13 /*
14  * Holds information about all of the defined sequences
15  */
16 struct detox_sequence_list {
17 	struct detox_sequence_list *next;
18 
19 	char *name;
20 
21 	/*
22 	 * The top of the linked list of entries for this sequence
23 	 */
24 	struct detox_sequence_entry *head;
25 
26 	char *source_filename;
27 };
28 
29 /*
30  * Holds information about an entry within a specific sequence
31  */
32 struct detox_sequence_entry {
33 	struct detox_sequence_entry *next;
34 
35 	unsigned char *(*cleaner) (unsigned char *str, void *options);
36 	void *options;
37 };
38 
39 /*
40  * Holds information about files the user has asked us to ignore
41  */
42 struct detox_ignore_entry {
43 	struct detox_ignore_entry *next;
44 
45 	unsigned char *filename;
46 };
47 
48 /*
49  * Holds the result of a config file parse
50  */
51 struct detox_parse_results {
52 	struct detox_sequence_list *sequences;
53 	struct detox_ignore_entry *files_to_ignore;
54 };
55 
56 /*
57  * Holds command line options
58  */
59 struct detox_options {
60 	int dry_run;
61 	int is_inline_bin;
62 	int is_inline_mode;
63 	int list_sequences;
64 	int recurse;
65 	int remove_trailing;
66 	int special;
67 	int verbose;
68 
69 	struct detox_sequence_entry *sequence_to_use;
70 	struct detox_ignore_entry *files_to_ignore;
71 
72 	char *sequence_name;
73 
74 	char *check_config_file;
75 
76 	char **files;
77 };
78 
79 #endif				/* __DETOX_H */
80