date and time created 88/10/21 15:21:52 by bostic
[unix-history] / usr / src / old / boggle / boggle.c
index 2baee71..cc1c8c0 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.  The Berkeley software License Agreement
+ * specifies the terms and conditions for redistribution.
+ */
+
+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1980 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif not lint
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)boggle.c   4.1 %G%";
-#endif
+static char sccsid[] = "@(#)boggle.c   5.3 (Berkeley) %G%";
+#endif not lint
 
 #include <ctype.h>
 #include <errno.h>
 
 #include <ctype.h>
 #include <errno.h>
@@ -53,7 +65,7 @@ extern char *ctime(), *getlogin();
 extern long lseek();
 
 /* dictionary interface */
 extern long lseek();
 
 /* dictionary interface */
-char defname[] = "/usr/games/bogdict";
+char defname[] = "/usr/games/lib/bogdict";
 char *dictname = &defname[0];
 FILE *dict;
 
 char *dictname = &defname[0];
 FILE *dict;
 
@@ -179,7 +191,7 @@ printinst ()
                printf("'break'.  While entering words, your erase character is only  effective\n");
                printf("within the current word and your line kill character is ignored.\n");
                printf("     Advanced players may wish to invoke the program with 1 or 2 +'s as\n");
                printf("'break'.  While entering words, your erase character is only  effective\n");
                printf("within the current word and your line kill character is ignored.\n");
                printf("     Advanced players may wish to invoke the program with 1 or 2 +'s as\n");
-               printf("the  first argument.  The first + removes the restriction that postions\n");
+               printf("the  first argument.  The first + removes the restriction that positions\n");
                printf("can only be used once in each word.  The second + causes a position  to\n");
                printf("be  considered  adjacent  to itself as well as its (up to) 8 neighbors.\n");
                printf("Hit any key to begin.\n");
                printf("can only be used once in each word.  The second + causes a position  to\n");
                printf("be  considered  adjacent  to itself as well as its (up to) 8 neighbors.\n");
                printf("Hit any key to begin.\n");
@@ -626,7 +638,7 @@ char **argv;
                        printboard();
                        games++;
                        if (logfile >= 0) {
                        printboard();
                        games++;
                        if (logfile >= 0) {
-                               sprintf(&logbuff[0], "%4d", games);
+                               (void)sprintf(&logbuff[0], "%4d", games);
                                lseek(logfile, logloc, 0);
                                write(logfile, &logbuff[0], 4);
                        }
                                lseek(logfile, logloc, 0);
                                write(logfile, &logbuff[0], 4);
                        }