3 * UCC (University [of WA] Computer Club) Electronic Accounting System
5 * main.c - Initialisation Code
7 * This file is licenced under the 3-clause BSD Licence. See the file
8 * COPYING for full details.
17 extern void Init_Cokebank(const char *Argument); // cokebank.c
18 extern void Init_Handlers(void);
19 extern void Load_Itemlist(void);
20 extern void Server_Start(void);
21 extern int giServer_Port;
22 extern char* gsItemListFile;
23 extern char* gsCoke_SerialPort;
27 char *gsCokebankPath = "cokebank.db";
35 int main(int argc, char *argv[])
40 for( i = 1; i < argc; i++ )
43 if( arg[0] == '-' && arg[1] != '-')
48 giServer_Port = atoi(argv[++i]);
51 giDebugLevel = atoi(argv[++i]);
58 else if( arg[0] == '-' && arg[1] == '-' ) {
59 if( strcmp(arg, "--itemsfile") == 0 ) {
60 gsItemListFile = argv[++i];
62 if( strcmp(arg, "--cokeport") == 0 ) {
63 gsCoke_SerialPort = argv[++i];
74 signal(SIGINT, sigint_handler);
76 Init_Cokebank(gsCokebankPath);