24f35eba82307b0a9b2be45b5c38e471f3b8356c
[matches/swarm.git] / src / options.h
1 #ifndef _OPTIONS_H
2 #define _OPTIONS_H
3
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include <stdbool.h>
7 #include <sys/select.h>
8
9 #define COMMAND_FILE ".swarm.command"
10
11 #define SHELL_EXIT_MESSAGE "\nexit 666\n"
12 #define SHELL_EXIT_CODE 666 // make sure this matches the above
13
14 typedef struct
15 {
16         char * program;
17         char * name;
18         char * shell;
19         char * master_addr;
20         char * logfile;
21         char * outfile;
22         int verbosity;
23         int port;
24         char * prepend;
25         char * append;
26         char * end;
27         int endlen;
28         int nCPU;
29         int master_pid;
30         bool daemon;
31         bool daemon_wrapper;
32         bool encrypt;
33         bool interactive;
34         bool handle_signals;
35
36 } Options;
37
38
39 extern Options options;
40
41 extern void Initialise(int argc, char ** argv, Options * o);
42 extern void ParseArguments(int argc, char ** argv, Options * o);
43
44 extern char * strdup();
45
46
47 #endif //_OPTIONS_H
48
49

UCC git Repository :: git.ucc.asn.au