This commit was manufactured by cvs2svn to create tag 'FreeBSD-release/1.0'.
[unix-history] / usr.bin / cksum / print.c
index 62779d1..d0ffeb3 100644 (file)
@@ -1,6 +1,6 @@
 /*-
 /*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1991, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -32,7 +32,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)print.c    5.1 (Berkeley) 4/4/91";
+static char sccsid[] = "@(#)print.c    8.1 (Berkeley) 6/6/93";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -44,7 +44,10 @@ pcrc(fn, val, len)
        char *fn;
        u_long val, len;
 {
        char *fn;
        u_long val, len;
 {
-       (void)printf("%lu %lu %s\n", val, len, fn);
+       (void)printf("%lu %lu", val, len);
+       if (fn)
+               (void)printf(" %s", fn);
+       (void)printf("\n");
 }
 
 void
 }
 
 void
@@ -52,7 +55,10 @@ psum1(fn, val, len)
        char *fn;
        u_long val, len;
 {
        char *fn;
        u_long val, len;
 {
-       (void)printf("%lu %lu %s\n", val, (len + 1023) / 1024, fn);
+       (void)printf("%lu %lu", val, (len + 1023) / 1024);
+       if (fn)
+               (void)printf(" %s", fn);
+       (void)printf("\n");
 }
 
 void
 }
 
 void
@@ -60,5 +66,8 @@ psum2(fn, val, len)
        char *fn;
        u_long val, len;
 {
        char *fn;
        u_long val, len;
 {
-       (void)printf("%lu %lu %s\n", val, (len + 511) / 512, fn);
+       (void)printf("%lu %lu", val, (len + 511) / 512);
+       if (fn)
+               (void)printf(" %s", fn);
+       (void)printf("\n");
 }
 }