Initial commit (sort of)
[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 * shell;
18         char * master_addr;
19         char * logfile;
20         char * outfile;
21         int verbosity;
22         int port;
23         char * slavefile;
24         bool dummy_shell;
25         char * prepend;
26         char * append;
27         char * end;
28         int endlen;
29         int nCPU;
30         int master_pid;
31         bool daemon;
32         bool daemon_wrapper;
33         bool encrypt;
34         bool interactive;
35         bool handle_signals;
36
37 } Options;
38
39
40 extern Options options;
41
42 extern void Initialise(int argc, char ** argv, Options * o);
43 extern void ParseArguments(int argc, char ** argv, Options * o);
44
45 extern char * strdup();
46
47
48 #endif //_OPTIONS_H
49
50

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