Mon, 30 May 2011 08:45:08 +0200
encapsulated common operations
1 #ifndef _CLINE_H
2 #define _CLINE_H
4 #include <stdio.h>
5 #include <string.h>
6 #include <stdbool.h>
7 #include <stdlib.h>
8 #include <dirent.h>
11 typedef struct _suffix_list {
12 int count;
13 char** items;
14 } suffix_list_t;
16 typedef struct _settings {
17 char fileSeparator;
18 suffix_list_t* suffixList;
19 bool recursive;
20 bool includeSuffixes;
21 bool matchesOnly;
22 } settings_t;
24 #ifdef _cplusplus
25 extern "C" {
26 #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*);
33 void printHelpText(const char*);
34 int exit_with_help(char*, settings_t*, int);
35 #ifdef _cplusplus
36 }
37 #endif
39 #endif /* _CLINE_H */