- else if( arg[0] == '-' && arg[1] == '-' ) {
- if( strcmp(arg, "--itemsfile") == 0 ) {
- if( i + 1 >= argc ) return -1;
- gsItemListFile = argv[++i];
- }
- else if( strcmp(arg, "--cokeport") == 0 ) {
- if( i + 1 >= argc ) return -1;
- gsCoke_SerialPort = argv[++i];
- }
- else if( strcmp(arg, "--snackport") == 0 ) {
- if( i + 1 >= argc ) return -1;
- gsSnack_SerialPort = argv[++i];
- }
- else if( strcmp(arg, "--doorpass") == 0 ) {
- FILE *fp;
- char buf[30];
- if( i + 1 >= argc ) return -1;
- fp = fopen(argv[++i], "r");
- if( !fp ) {
- fprintf(stderr, "ERROR: Unable to read password file\n");
- perror("reading LAT password");
- return -1;
- }
- fgets(buf, sizeof buf, fp);
- fclose(fp);
- gsDoor_Password = strdup(buf);
- }
- else if( strcmp(arg, "--cokebank") == 0 ) {