BSD 4_3_Reno release
[unix-history] / usr / src / games / backgammon / common_source / fancy.c
index 8be90db..52101d3 100644 (file)
@@ -1,4 +1,25 @@
-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: (1) source distributions retain this entire copyright
+ * notice and comment, and (2) distributions including binaries display
+ * the following acknowledgement:  ``This product includes software
+ * developed by the University of California, Berkeley and its contributors''
+ * in the documentation or other materials provided with the distribution
+ * and in all advertising materials mentioning features or use of this
+ * software. Neither the name of the University nor the names of its
+ * contributors may 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 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)fancy.c    5.5 (Berkeley) 6/1/90";
+#endif /* not lint */
 
 #include "back.h"
 
 
 #include "back.h"
 
@@ -43,6 +64,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 +400,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 +418,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 +559,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 +637,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 +660,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 +714,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 +729,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);
 }