Lines 26-31
Link Here
|
26 |
#include "daargs.h" |
26 |
#include "daargs.h" |
27 |
#include "dautil.h" |
27 |
#include "dautil.h" |
28 |
|
28 |
|
|
|
29 |
#include <string.h> |
30 |
#include <strings.h> |
31 |
|
29 |
#define DEFAULT_OPTION_COUNT 3 |
32 |
#define DEFAULT_OPTION_COUNT 3 |
30 |
|
33 |
|
31 |
extern struct DAContext *_daContext; |
34 |
extern struct DAContext *_daContext; |
Lines 38-43
Link Here
|
38 |
static void _daContextAddOptions(DAProgramOption *options, int count); |
41 |
static void _daContextAddOptions(DAProgramOption *options, int count); |
39 |
static void printHelp(char *description); |
42 |
static void printHelp(char *description); |
40 |
|
43 |
|
|
|
44 |
static int contains(char *needle, char *haystack); |
45 |
static int parseOption(DAProgramOption *option, int i, int argc, char** argv); |
46 |
static int readIntOption(int index, char **argv); |
41 |
|
47 |
|
42 |
/* |
48 |
/* |
43 |
* Public functions |
49 |
* Public functions |
Lines 116-122
Link Here
|
116 |
} |
122 |
} |
117 |
} |
123 |
} |
118 |
|
124 |
|
119 |
int |
125 |
static int |
120 |
contains(char *needle, char *haystack) |
126 |
contains(char *needle, char *haystack) |
121 |
{ |
127 |
{ |
122 |
char c, *pos; |
128 |
char c, *pos; |
Lines 130-136
Link Here
|
130 |
return (pos != NULL); |
136 |
return (pos != NULL); |
131 |
} |
137 |
} |
132 |
|
138 |
|
133 |
int |
139 |
static int |
134 |
parseOption(DAProgramOption *option, int i, int argc, char** argv) |
140 |
parseOption(DAProgramOption *option, int i, int argc, char** argv) |
135 |
{ |
141 |
{ |
136 |
option->used = True; |
142 |
option->used = True; |
Lines 169-175
Link Here
|
169 |
return i; |
175 |
return i; |
170 |
} |
176 |
} |
171 |
|
177 |
|
172 |
int |
178 |
static int |
173 |
readIntOption(int index, char **argv) |
179 |
readIntOption(int index, char **argv) |
174 |
{ |
180 |
{ |
175 |
int integer; |
181 |
int integer; |