BSD 4_3_Tahoe release
[unix-history] / usr / src / games / backgammon / fancy.c
index 8be90db..8d3a8ab 100644 (file)
@@ -1,4 +1,23 @@
-static char sccsid[] = "       fancy.c 4.2     82/11/22        ";
+/*
+ * Copyright (c) 1980 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
+static char sccsid[] = "@(#)fancy.c    5.4 (Berkeley) 6/18/88";
+#endif /* not lint */
 
 #include "back.h"
 
 
 #include "back.h"
 
@@ -43,6 +62,8 @@ int   oldw;
 int    realr;
 int    realc;
 
 int    realr;
 int    realc;
 
+void   addbuf();
+
 fboard ()  {
        register int    i, j, l;
 
 fboard ()  {
        register int    i, j, l;
 
@@ -377,7 +398,6 @@ newpos ()  {
        int     j;                      /* index */
        int     n;                      /* temporary variable */
        char    *m;                     /* string containing CM movement */
        int     j;                      /* index */
        int     n;                      /* temporary variable */
        char    *m;                     /* string containing CM movement */
-       int     addbuf();               /* add a char to the output buffer */
 
 
        if (realr == -1)                /* see if already there */
 
 
        if (realr == -1)                /* see if already there */
@@ -396,7 +416,7 @@ newpos ()  {
 
        if (CM)  {                      /* try CM to get there */
                mode = 0;
 
        if (CM)  {                      /* try CM to get there */
                mode = 0;
-               m = tgoto (CM,c,r);
+               m = (char *)tgoto (CM,c,r);
                count = strlen (m);
        }
 
                count = strlen (m);
        }
 
@@ -537,7 +557,6 @@ newpos ()  {
 \f
 clear ()  {
        register int    i;
 \f
 clear ()  {
        register int    i;
-       int             addbuff();
 
                                        /* double space if can't clear */
        if (CL == 0)  {
 
                                        /* double space if can't clear */
        if (CL == 0)  {
@@ -616,7 +635,6 @@ register char       c;                      /* character to output */
 clend()  {
        register int    i;
        register char   *s;
 clend()  {
        register int    i;
        register char   *s;
-       int             addbuf();
 
 
        if (CD)  {
 
 
        if (CD)  {
@@ -640,7 +658,6 @@ cline ()  {
        register int    i;
        register int    c;
        register char   *s;
        register int    i;
        register int    c;
        register char   *s;
-       int             addbuf();
 
        if (curc > linect[curr])
                return;
 
        if (curc > linect[curr])
                return;
@@ -695,7 +712,7 @@ register char       *s;
        bufp = tbuf;                    /* get string entries */
        cap = tstr;
        for (code = tcap; *code; code += 2)
        bufp = tbuf;                    /* get string entries */
        cap = tstr;
        for (code = tcap; *code; code += 2)
-               **cap++ = tgetstr (code,&bufp);
+               **cap++ = (char *)tgetstr (code,&bufp);
 
                                        /* get pertinent lengths */
        if (HO)
 
                                        /* get pertinent lengths */
        if (HO)
@@ -710,6 +727,6 @@ register char       *s;
                lND = strlen (ND);
        if (LI < 24 || CO < 72 || !(CL && UP && ND))
                return (0);
                lND = strlen (ND);
        if (LI < 24 || CO < 72 || !(CL && UP && ND))
                return (0);
-       linect = calloc (LI+1,sizeof(int));
+       linect = (int *)calloc (LI+1,sizeof(int));
        return (1);
 }
        return (1);
 }