get rid of sibuf; requires change to user interface because of
[unix-history] / usr / src / games / trek / getpar.c
index ef3c186..b684615 100644 (file)
@@ -1,6 +1,18 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * 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[] = "@(#)getpar.c   4.2     (Berkeley)      %G%";
-#endif not lint
+static char sccsid[] = "@(#)getpar.c   4.6 (Berkeley) %G%";
+#endif /* not lint */
 
 # include      <stdio.h>
 # include      "getpar.h"
 
 # include      <stdio.h>
 # include      "getpar.h"
@@ -70,7 +82,7 @@ char  *s;
        struct cvntab           *r;
 
        r = getcodpar(s, Yntab);
        struct cvntab           *r;
 
        r = getcodpar(s, Yntab);
-       return (r->value);
+       return ((int) r->value);
 }
 
 
 }
 
 
@@ -167,7 +179,7 @@ char        *t;
 
        if (t == 0)
                t = " \t\n;";
 
        if (t == 0)
                t = " \t\n;";
-       sprintf(format, "%%%d[^%s]", l, t);
+       (void)sprintf(format, "%%%d[^%s]", l, t);
        while (1)
        {
                if ((f = testnl()) && s)
        while (1)
        {
                if ((f = testnl()) && s)