date and time created 88/10/19 15:51:23 by bostic
[unix-history] / usr / src / games / sail / pl_7.c
index 12beb9a..a7e5f0c 100644 (file)
@@ -1,12 +1,23 @@
 /*
 /*
- * 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.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char *sccsid = "@(#)pl_7.c      2.9 85/04/23";
-#endif
+static char sccsid[] = "@(#)pl_7.c     5.5 (Berkeley) %G%";
+#endif /* not lint */
 
 #include "player.h"
 
 
 #include "player.h"
 
@@ -136,9 +147,11 @@ struct ship *ship;
 {
        static char buf[60];
 
 {
        static char buf[60];
 
-       if (ship != 0)
-               p = sprintf(buf, p, ship->shipname, colours(ship),
+       if (ship != 0) {
+               (void)sprintf(buf, p, ship->shipname, colours(ship),
                        sterncolour(ship));
                        sterncolour(ship));
+               p = buf;
+       }
        sc_prompt = p;
        sc_buf = "";
        sc_hasprompt = 1;
        sc_prompt = p;
        sc_buf = "";
        sc_hasprompt = 1;
@@ -205,7 +218,7 @@ register n;
                                *p++ = c;
                                (void) waddch(scroll_w, c);
                        } else
                                *p++ = c;
                                (void) waddch(scroll_w, c);
                        } else
-                               (void) putchar(CTRL(g));
+                               (void) putchar(CTRL('g'));
                }
        }
 }
                }
        }
 }