remove non-printable characters
[unix-history] / usr / src / games / mille / save.c
index 0b4abf6..b643d47 100644 (file)
@@ -1,12 +1,19 @@
 /*
  * Copyright (c) 1983 Regents of the University of California.
 /*
  * Copyright (c) 1983 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[] = "@(#)save.c     5.1 (Berkeley) %G%";
-#endif not lint
+static char sccsid[] = "@(#)save.c     5.3 (Berkeley) %G%";
+#endif /* not lint */
+
 
 #include       "mille.h"
 #include       <sys/types.h>
 
 #include       "mille.h"
 #include       <sys/types.h>
@@ -71,8 +78,10 @@ over:
                                        clrtoeol();
                                }
                        }
                                        clrtoeol();
                                }
                        }
-                       else
-                               addstr(unctrl(*sp++));
+                       else {
+                               addstr(unctrl(*sp));
+                               ++sp;
+                       }
                        refresh();
                }
                *sp = '\0';
                        refresh();
                }
                *sp = '\0';
@@ -136,7 +145,7 @@ reg char    *file; {
        /*
         * initialize some necessary values
         */
        /*
         * initialize some necessary values
         */
-       sprintf(Initstr, "%s [%s]\n", file, buf);
+       (void)sprintf(Initstr, "%s [%s]\n", file, buf);
        Fromfile = file;
        return !On_exit;
 }
        Fromfile = file;
        return !On_exit;
 }