describe ap (Kirk); delete lfs_mntinvalbuf, lfs_vinvalbuf, add
[unix-history] / usr / src / games / battlestar / com4.c
index 0971d4f..e896224 100644 (file)
@@ -1,12 +1,13 @@
 /*
 /*
- * Copyright (c) 1983 Regents of the University of California,
- * All rights reserved.  Redistribution permitted subject to
- * the terms of the Berkeley Software License Agreement.
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)com4.c     1.3 %G%";
-#endif
+static char sccsid[] = "@(#)com4.c     5.4 (Berkeley) %G%";
+#endif /* not lint */
 
 #include "externs.h"
 
 
 #include "externs.h"
 
@@ -299,14 +300,12 @@ puton()
 
 eat()
 {
 
 eat()
 {
-       register int n;
        int firstnumber, value;
 
        firstnumber = wordnumber;
        while(wordtype[++wordnumber] == ADJS);
        while(wordnumber <= wordcount){
                value = wordvalue[wordnumber];
        int firstnumber, value;
 
        firstnumber = wordnumber;
        while(wordtype[++wordnumber] == ADJS);
        while(wordnumber <= wordcount){
                value = wordvalue[wordnumber];
-               for (n=0; objsht[value][n]; n++);
                switch(value){
                        
                        case -1:
                switch(value){
                        
                        case -1:
@@ -314,7 +313,12 @@ eat()
                                return(firstnumber);
 
                        default:
                                return(firstnumber);
 
                        default:
-                               printf("You can't eat%s%s!\n",(objsht[value][n-1] == 's' ? " " : " a "),objsht[value]);
+                               printf("You can't eat%s%s!\n",
+                                       wordtype[wordnumber] == OBJECT &&
+                                       objsht[value]
+                                       [strlen(objsht[value]) - 1] == 's' ?
+                                       " " : " a ",
+                                       words[wordnumber]);
                                return(firstnumber);
 
                        case PAPAYAS:
                                return(firstnumber);
 
                        case PAPAYAS: