- while (*i)
- {
- if ((i=(char *)lgetw()) == 0) break; /* check for EOF */
- while ((*i==' ') || (*i=='\t')) i++; /* eat leading whitespace */
- switch(*i)
- {
- case 'b': if (strcmp(i,"bold-objects") == 0) boldon=1;
- break;
-
- case 'e': if (strcmp(i,"enable-checkpointing") == 0) ckpflag=1;
- break;
-
- case 'i': if (strcmp(i,"inverse-objects") == 0) boldon=0;
- break;
-
- case 'f': if (strcmp(i,"female") == 0) sex=0; /* male or female */
- break;
-
- case 'm': if (strcmp(i,"monster:")== 0) /* name favorite monster */
- {
- if ((i=lgetw())==0) break;
- if (strlen(i)>=MAXMNAME) i[MAXMNAME-1]=0;
- strcpy(usermonster[usermpoint],i);
- if (usermpoint >= MAXUM) break; /* defined all of em */
- if (isalpha(j=usermonster[usermpoint][0]))
- {
- for (k=1; k<MAXMONST+8; k++) /* find monster */
- if (monstnamelist[k] == j)
- {
- monster[k].name = &usermonster[usermpoint++][0];
- break;
- }
- }
- }
- else if (strcmp(i,"male") == 0) sex=1;
- break;
-
- case 'n': if (strcmp(i,"name:") == 0) /* defining players name */
- {
- if ((i=lgetw())==0) break;
- if (strlen(i)>=LOGNAMESIZE) i[LOGNAMESIZE-1]=0;
- strcpy(logname,i); flag=0;
- }
- else if (strcmp(i,"no-introduction") == 0) nowelcome=1;
- else if (strcmp(i,"no-beep") == 0) nobeep=1;
- break;
-
- case 'p': if (strcmp(i,"process-name:")== 0)
- {
- if ((i=lgetw())==0) break;
- if (strlen(i)>=PSNAMESIZE) i[PSNAMESIZE-1]=0;
- strcpy(psname,i);
- }
- else if (strcmp(i,"play-day-play") == 0) dayplay=1;
- break;
-
- case 's': if (strcmp(i,"savefile:") == 0) /* defining savefilename */
- {
- if ((i=lgetw())==0) break;
- strcpy(savefilename,i); flag=0;
- }
- break;
- };
- }
- if (flag) strcpy(logname,loginname);
+ while (*i) {
+ if ((i = lgetw()) == NULL)
+ break; /* check for EOF */
+ while ((*i == ' ') || (*i == '\t'))
+ i++; /* eat leading whitespace */
+
+ if (strcmp(i, "bold-objects") == 0)
+ boldon = 1;
+ else if (strcmp(i, "enable-checkpointing") == 0)
+ ckpflag = 1;
+ else if (strcmp(i, "inverse-objects") == 0)
+ boldon = 0;
+ else if (strcmp(i, "female") == 0)
+ sex = 0; /* male or female */
+ else if (strcmp(i, "monster:") == 0) { /* name favorite monster */
+ if ((i = lgetw()) == 0)
+ break;
+ strlcpy(usermonster[usermpoint], i, MAXMNAME);
+ if (usermpoint >= MAXUM)
+ continue; /* defined all of em */
+ if (isalpha(j = usermonster[usermpoint][0])) {
+ for (k = 1; k < MAXMONST + 8; k++) /* find monster */
+ if (monstnamelist[k] == j) {
+ monster[k].name = &usermonster[usermpoint++][0];
+ break;
+ }
+ }
+ } else if (strcmp(i, "male") == 0)
+ sex = 1;
+ else if (strcmp(i, "name:") == 0) { /* defining players name */
+ if ((i = lgetw()) == 0)
+ break;
+ strlcpy(logname, i, LOGNAMESIZE);
+ flag = 0;
+ } else if (strcmp(i, "no-introduction") == 0)
+ nowelcome = 1;
+ else if (strcmp(i, "no-beep") == 0)
+ nobeep = 1;
+ else if (strcmp(i, "process-name:") == 0) {
+ if ((i = lgetw()) == 0)
+ break;
+ strlcpy(psname, i, PSNAMESIZE);
+ } else if (strcmp(i, "play-day-play") == 0) {
+ /* bypass time restrictions: ignored */
+ } else if (strcmp(i, "savefile:") == 0) { /* defining savefilename */
+ if ((i = lgetw()) == 0)
+ break;
+ strcpy(savefilename, i);
+ flag = 0;
+ }