updated to -mdoc version 3
[unix-history] / usr / src / usr.bin / comm / comm.c
index a254df0..4cb35bc 100644 (file)
@@ -15,14 +15,14 @@ char copyright[] =
 #endif /* not lint */
 
 #ifndef lint
 #endif /* not lint */
 
 #ifndef lint
-static char sccsid[] = "@(#)comm.c     5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)comm.c     5.7 (Berkeley) %G%";
 #endif /* not lint */
 
 #include <sys/file.h>
 #include <limits.h>
 #include <stdio.h>
 
 #endif /* not lint */
 
 #include <sys/file.h>
 #include <limits.h>
 #include <stdio.h>
 
-#define        MAXLINELEN      (_BSD_LINE_MAX + 1)
+#define        MAXLINELEN      (_POSIX2_LINE_MAX + 1)
 
 char *tabs[] = { "", "\t", "\t\t" };
 
 
 char *tabs[] = { "", "\t", "\t\t" };
 
@@ -67,12 +67,13 @@ done:       argc -= optind;
 
        /* for each column printed, add another tab offset */
        p = tabs;
 
        /* for each column printed, add another tab offset */
        p = tabs;
+       col1 = col2 = col3 = NULL;
        if (flag1)
                col1 = *p++;
        if (flag2)
                col2 = *p++;
        if (flag3)
        if (flag1)
                col1 = *p++;
        if (flag2)
                col2 = *p++;
        if (flag3)
-               col3 = *p++;
+               col3 = *p;
 
        for (read1 = read2 = 1;;) {
                /* read next line, check for EOF */
 
        for (read1 = read2 = 1;;) {
                /* read next line, check for EOF */