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 Load_Itemlist(void);
19 extern void Server_Start(void);
20 extern int giServer_Port;
21 extern char* gsItemListFile;
22 extern char* gsCoke_SerialPort;
26 char *gsCokebankPath = "cokebank.db";
34 int main(int argc, char *argv[])
39 for( i = 1; i < argc; i++ )
42 if( arg[0] == '-' && arg[1] != '-')
47 giServer_Port = atoi(argv[++i]);
50 giDebugLevel = atoi(argv[++i]);
57 else if( arg[0] == '-' && arg[1] == '-' ) {
58 if( strcmp(arg, "--itemsfile") == 0 ) {
59 gsItemListFile = argv[++i];
61 if( strcmp(arg, "--cokeport") == 0 ) {
62 gsCoke_SerialPort = argv[++i];
73 Init_Cokebank(gsCokebankPath);
79 signal(SIGINT, sigint_handler);