projects
/
wumpus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
704efe5
)
Code cleanup patches.
author
nemysis
<nemysis@gmx.ch>
Sun, 19 Jul 2015 14:14:13 +0000
(10:14 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 19 Jul 2015 14:14:13 +0000
(10:14 -0400)
superhack.c
patch
|
blob
|
history
wumpus.c
patch
|
blob
|
history
diff --git
a/superhack.c
b/superhack.c
index f4f616e79c980464072f99942efb8e928619977b..78531685b9dbdb45eae392b6a1f56ef73c34f11b 100644
(file)
--- a/
superhack.c
+++ b/
superhack.c
@@
-13,6
+13,9
@@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/socket.h>
static int path[5];
static int j, k, scratchloc, pies;
static int path[5];
static int j, k, scratchloc, pies;
@@
-80,8
+83,6
@@
char *prompt;
void print_instructions()
{
void print_instructions()
{
- char ebuf[BUFSIZ];
-
PM("Welcome to `Hunt the Superhack'\n")
PM(" The superhack lives on the 9th floor of 45 Technology Square in");
PM("Welcome to `Hunt the Superhack'\n")
PM(" The superhack lives on the 9th floor of 45 Technology Square in");
@@
-261,7
+262,6
@@
void throw()
}
}
- ammo:
if (finished == NOT)
{
(void) puts("You missed.");
if (finished == NOT)
{
(void) puts("You missed.");
@@
-350,9
+350,7
@@
goodmove:
}
}
}
}
-main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
if (argc >= 2 && strcmp(argv[1], "-s") == 0)
srand(atoi(argv[2]));
{
if (argc >= 2 && strcmp(argv[1], "-s") == 0)
srand(atoi(argv[2]));
@@
-423,6
+421,7
@@
char *argv[];
break;
}
}
break;
}
}
+ return 0;
}
/* superhack.c ends here */
}
/* superhack.c ends here */
diff --git
a/wumpus.c
b/wumpus.c
index 5aef1c3a19608601b9d2f7062b48ffee81c5979c..3afd5680919e03d6844c30872fd13d5c22ff3f1c 100644
(file)
--- a/
wumpus.c
+++ b/
wumpus.c
@@
-30,6
+30,10
@@
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/socket.h>
/* 5 REM *** HUNT THE WUMPUS *** */
/* 5 REM *** HUNT THE WUMPUS *** */
@@
-123,8
+127,6
@@
char *prompt;
void print_instructions()
{
void print_instructions()
{
- char ebuf[BUFSIZ];
-
/* 375 REM *** INSTRUCTIONS *** */
/* 380 PRINT "WELCOME TO 'HUNT THE WUMPUS'" */
puts("WELCOME TO 'HUNT THE WUMPUS'");
/* 375 REM *** INSTRUCTIONS *** */
/* 380 PRINT "WELCOME TO 'HUNT THE WUMPUS'" */
puts("WELCOME TO 'HUNT THE WUMPUS'");