1 #ifndef _CLINE_H |
1 /* |
2 #define _CLINE_H |
2 * cline.h |
|
3 * |
|
4 * Created on: 23.05.2011 |
|
5 * Author: beckermi |
|
6 */ |
3 |
7 |
4 #include <stdio.h> |
8 #ifndef CLINE_H_ |
5 #include <string.h> |
9 #define CLINE_H_ |
6 #include <stdbool.h> |
|
7 #include <stdlib.h> |
|
8 #include <dirent.h> |
|
9 |
10 |
10 |
11 #include "stdinc.h" |
11 typedef struct _suffix_list { |
12 #include "settings.h" |
12 int count; |
|
13 char** items; |
|
14 } suffix_list_t; |
|
15 |
|
16 typedef struct _settings { |
|
17 char fileSeparator; |
|
18 suffix_list_t* suffixList; |
|
19 bool recursive; |
|
20 bool includeSuffixes; |
|
21 bool matchesOnly; |
|
22 } settings_t; |
|
23 |
13 |
24 #ifdef _cplusplus |
14 #ifdef _cplusplus |
25 extern "C" { |
15 extern "C" { |
26 #endif |
16 #endif |
27 settings_t* new_settings_t(); |
|
28 void destroy_settings_t(settings_t*); |
|
29 suffix_list_t* new_suffix_list_t(); |
|
30 void destroy_suffix_list_t(suffix_list_t*); |
|
31 void add_suffix(suffix_list_t*, char*); |
|
32 |
17 |
33 void printHelpText(const char*); |
18 void printHelpText(const char*); |
34 int exit_with_help(char*, settings_t*, int); |
19 int exit_with_help(char*, settings_t*, int); |
|
20 |
35 #ifdef _cplusplus |
21 #ifdef _cplusplus |
36 } |
22 } |
37 #endif |
23 #endif |
38 |
24 |
39 #endif /* _CLINE_H */ |
25 #endif /* CLINE_H_ */ |