1- /* $NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $ */
1+ /* $NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $ */
22
33/*-
44 * Copyright (c) 1991, 1993
@@ -48,7 +48,7 @@ __COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
4848#if 0
4949static char sccsid [] = "@(#)main.c 8.1 (Berkeley) 6/2/93" ;
5050#else
51- __RCSID ("$NetBSD: main.c,v 1.8 1997/10/11 01:53:31 lukem Exp $" );
51+ __RCSID ("$NetBSD: main.c,v 1.9 1998/08/24 22:07:37 hubertf Exp $" );
5252#endif
5353#endif /* not lint */
5454
@@ -75,15 +75,15 @@ main(argc, argv)
7575 if (setuid (getuid ()) < 0 )
7676 warn ("setuid" );
7777
78- init (NULL ); /* Initialize everything */
78+ init (); /* Initialize everything */
7979 signal (SIGINT , trapdel );
8080
8181 if (argc > 1 ) { /* Restore file specified */
8282 /* Restart is label 8305 (Fortran) */
8383 i = restore (argv [1 ]); /* See what we've got */
8484 switch (i ) {
8585 case 0 : /* The restore worked fine */
86- yea = Start (0 );
86+ yea = Start ();
8787 k = null ;
8888 unlink (argv [1 ]); /* Don't re-use the save */
8989 goto l8 ; /* Get where we're going */
@@ -113,7 +113,7 @@ l2000: if (loc == 0)
113113 kk = & stext [loc ];
114114 if ((abb [loc ] % abbnum ) == 0 || kk -> seekadr == 0 )
115115 kk = & ltext [loc ];
116- if (!forced (loc ) && dark (0 )) {
116+ if (!forced (loc ) && dark ()) {
117117 if (wzdark && pct (35 )) {
118118 die (90 );
119119 goto l2000 ;
@@ -131,7 +131,7 @@ l2000: if (loc == 0)
131131 goto l8 ;
132132 if (loc == 33 && pct (25 ) && !closng )
133133 rspeak (8 );
134- if (!dark (0 )) {
134+ if (!dark ()) {
135135 abb [loc ]++ ;
136136 for (i = atloc [loc ]; i != 0 ; i = links [i ]) { /* 2004 */
137137 obj = i ;
@@ -170,7 +170,7 @@ l2600: checkhints(); /* to 2600-2602 */
170170 if (toting (i ) && prop [i ] < 0 ) /* 2604 */
171171 prop [i ] = -1 - prop [i ];
172172 }
173- wzdark = dark (0 ); /* 2605 */
173+ wzdark = dark (); /* 2605 */
174174 if (knfloc > 0 && knfloc != loc )
175175 knfloc = 1 ;
176176 getin (& wd1 , & wd2 );
@@ -442,7 +442,7 @@ l4000: verb = k;
442442 obj = obj * 100 + messag ;
443443 if (closed && toting (oyster ))
444444 obj = oyster ;
445- if (obj > 100 || obj == 0 || dark (0 ))
445+ if (obj > 100 || obj == 0 || dark ())
446446 goto l8000 ;
447447 goto l9270 ;
448448 case 30 : /* suspend=8300 */
@@ -456,7 +456,7 @@ l4000: verb = k;
456456 if (!yes (200 , 54 , 54 ))
457457 goto l2012 ;
458458 datime (& saved , & savet );
459- ciao (argv [ 0 ] ); /* Do we quit? */
459+ ciao (); /* Do we quit? */
460460 continue ; /* Maybe not */
461461 case 31 : /* hours=8310 */
462462 printf ("Colossal cave is closed 9am-5pm Mon " );
@@ -533,7 +533,7 @@ l4000: verb = k;
533533 goto l2011 ;
534534 prop [lamp ] = 0 ;
535535 rspeak (40 );
536- if (dark (0 ))
536+ if (dark ())
537537 rspeak (16 );
538538 goto l2012 ;
539539
@@ -571,7 +571,7 @@ l4000: verb = k;
571571 }
572572 l9130 : case 13 :/* pour */
573573 if (obj == bottle || obj == 0 )
574- obj = liq (0 );
574+ obj = liq ();
575575 if (obj == 0 )
576576 goto l8000 ;
577577 if (!toting (obj ))
@@ -608,12 +608,12 @@ l4000: verb = k;
608608 spk = 71 ;
609609 goto l2011 ;
610610 l9150 : case 15 :/* 9150 - drink */
611- if (obj == 0 && liqloc (loc ) != water && (liq (0 ) != water
611+ if (obj == 0 && liqloc (loc ) != water && (liq () != water
612612 || !here (bottle )))
613613 goto l8000 ;
614614 if (obj != 0 && obj != water )
615615 spk = 110 ;
616- if (spk == 110 || liq (0 ) != water || !here (bottle ))
616+ if (spk == 110 || liq () != water || !here (bottle ))
617617 goto l2011 ;
618618 prop [bottle ] = 1 ;
619619 place [water ] = 0 ;
@@ -640,7 +640,7 @@ l4000: verb = k;
640640 }
641641 case 19 :
642642 case 20 : /* 9190: find, invent */
643- if (at (obj ) || (liq (0 ) == obj && at (bottle ))
643+ if (at (obj ) || (liq () == obj && at (bottle ))
644644 || k == liqloc (loc ))
645645 spk = 94 ;
646646 for (i = 1 ; i <= 5 ; i ++ )
@@ -680,7 +680,7 @@ l4000: verb = k;
680680 rspeak (bonus );
681681 done (2 );
682682 l9270 : case 27 :/* read */
683- if (dark (0 ))
683+ if (dark ())
684684 goto l5190 ;
685685 if (obj == magzin )
686686 spk = 190 ;
@@ -749,7 +749,7 @@ l5110: if (k != dwarf)
749749 for (i = 1 ; i <= 5 ; i ++ )
750750 if (dloc [i ] == loc && dflag >= 2 )
751751 goto l5010 ;
752- l5120 : if ((liq (0 ) == k && here (bottle )) || k == liqloc (loc ))
752+ l5120 : if ((liq () == k && here (bottle )) || k == liqloc (loc ))
753753 goto l5010 ;
754754 if (obj != plant || !at (plant2 ) || prop [plant2 ] == 0 )
755755 goto l5130 ;
0 commit comments