date and time created 88/06/01 18:39:34 by bostic
[unix-history] / usr / src / games / backgammon / common_source / fancy.c
index d8ef9bb..8442b26 100644 (file)
@@ -1,12 +1,18 @@
 /*
  * Copyright (c) 1980 Regents of the University of California.
 /*
  * Copyright (c) 1980 Regents of the University of California.
- * All rights reserved.  The Berkeley software License Agreement
- * specifies the terms and conditions for redistribution.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that this notice is preserved and that due credit is given
+ * to the University of California at 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'' without express or implied warranty.
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)fancy.c    5.1 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)fancy.c    5.3 (Berkeley) %G%";
+#endif /* not lint */
 
 #include "back.h"
 
 
 #include "back.h"
 
@@ -51,6 +57,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;
 
@@ -385,7 +393,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 */
@@ -404,7 +411,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);
        }
 
@@ -545,7 +552,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)  {
@@ -624,7 +630,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)  {
@@ -648,7 +653,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;
@@ -703,7 +707,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)
@@ -718,6 +722,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);
 }