add Berkeley specific header
[unix-history] / usr / src / old / vfilters / rvcat / rvcat.c
index 486ee55..b11a0b2 100644 (file)
@@ -1,6 +1,24 @@
+/*
+ * Copyright (c) 1983 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
+char copyright[] =
+"@(#) Copyright (c) 1983 Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rvcat.c    4.6 (Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)rvcat.c    5.3 (Berkeley) %G%";
+#endif /* not lint */
 
 /*
  * Cat Simulator for Versatec and Varian
 
 /*
  * Cat Simulator for Versatec and Varian
@@ -595,7 +613,7 @@ account(who, from, acctfile)
         * Varian accounting is done by 8.5 inch pages;
         * Versatec accounting is by the (12 inch) foot.
         */
         * Varian accounting is done by 8.5 inch pages;
         * Versatec accounting is by the (12 inch) foot.
         */
-       fprintf(a, "t%6.2f\t", (lines / 200.0) / PAGE_LINES);
+       fprintf(a, "t%6.2f\t", (double)lines / (double)PAGE_LINES);
        if (from != NULL)
                fprintf(a, "%s:", from);
        fprintf(a, "%s\n", who);
        if (from != NULL)
                fprintf(a, "%s:", from);
        fprintf(a, "%s\n", who);
@@ -818,7 +836,7 @@ slop_lines(ncols)
        if (rcols < ncols) {
                if (write(vc, buf0p, BYTES_PER_LINE * rcols) < 0)
                        exit(1);
        if (rcols < ncols) {
                if (write(vc, buf0p, BYTES_PER_LINE * rcols) < 0)
                        exit(1);
-               clear(buf0p, rcols * BYTES_PER_LINE);
+               bzero(buf0p, rcols * BYTES_PER_LINE);
                buf0p = buffer;
                ncols -= rcols;
                ypos -= rcols;
                buf0p = buffer;
                ncols -= rcols;
                ypos -= rcols;
@@ -826,7 +844,7 @@ slop_lines(ncols)
        }
        if (write(vc, buf0p, BYTES_PER_LINE * ncols) < 0)
                exit(1);
        }
        if (write(vc, buf0p, BYTES_PER_LINE * ncols) < 0)
                exit(1);
-       clear(buf0p, BYTES_PER_LINE * ncols);
+       bzero(buf0p, BYTES_PER_LINE * ncols);
        buf0p += BYTES_PER_LINE * ncols;
        if (buf0p >= &buffer[BUFFER_SIZE])
                buf0p -= BUFFER_SIZE;
        buf0p += BYTES_PER_LINE * ncols;
        if (buf0p >= &buffer[BUFFER_SIZE])
                buf0p -= BUFFER_SIZE;
@@ -834,21 +852,13 @@ slop_lines(ncols)
        col -= RECONVERT(ncols);
 }
 
        col -= RECONVERT(ncols);
 }
 
-/*ARGSUSED*/
-clear(lp, nbytes)
-       int *lp;
-       int nbytes;
-{
-       asm("movc5 $0,(sp),$0,8(ap),*4(ap)");
-}
-
 /* Start a new page by formfeeding, resetting buffer and column counters. */
 new_page(lines_left)
        int lines_left;         /* ... on page. */
 {
        lines += lines_left;
        buf0p = buffer;         /* Clear out buffer and reset pointers. */
 /* Start a new page by formfeeding, resetting buffer and column counters. */
 new_page(lines_left)
        int lines_left;         /* ... on page. */
 {
        lines += lines_left;
        buf0p = buffer;         /* Clear out buffer and reset pointers. */
-       clear(buf0p, BYTES_PER_LINE * NLINES);
+       bzero(buf0p, BYTES_PER_LINE * NLINES);
        row = 0;
        col = 0;
        xpos = CONVERT(row);
        row = 0;
        col = 0;
        xpos = CONVERT(row);