-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathread_config.h
More file actions
101 lines (91 loc) · 1.98 KB
/
read_config.h
File metadata and controls
101 lines (91 loc) · 1.98 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
struct config
{
char action[CONFIG_DEFAULT_BUFFER];
char engine[CONFIG_DEFAULT_BUFFER];
char search[CONFIG_DEFAULT_BUFFER];
char file[CONFIG_DEFAULT_BUFFER];
int limit;
int read_buffer;
char output[CONFIG_DEFAULT_BUFFER];
} config;
/**
* getConfig()
* Get the configuration of a file
*
* Input: (Char*) filename: The Filename
* Input: (Struct config *) conf: The config structure
* Return: unsigned Int
*/
unsigned int getConfig(char * filename, struct config * conf);
/**
* knownParam()
* Check if a param is known
*
* Input: (Char*) param: The parameter
* Return: unsigned Int
*/
unsigned int knownParam(char * param);
/**
* validateConfig()
* Validate the configuration file
*
* Input: (Struct config *) conf: The config structure
* Return: unsigned Int
*/
unsigned int validateConfig(struct config * conf);
/**
* validateActionInput()
* Validate the action
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateActionInput(char * value);
/**
* validateEngineInput()
* Validate the engine
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateEngineInput(char * value);
/**
* validateSearchInput()
* Validate the search
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateSearchInput(char * value);
/**
* validateFileInput()
* Validate the file (path or file)
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateFileInput(char * value);
/**
* validateLimitInput()
* Validate the limit
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateLimitInput(int value);
/**
* validateReadBufferInput()
* Validate the read buffer
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateReadBufferInput(int value);
/**
* validateOutputInput()
* Validate the output
*
* Input: (char*) value: The value
* Return: unsigned Int
*/
unsigned int validateOutputInput(char * value);