=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rs/rs.c,v retrieving revision 1.12 retrieving revision 1.13 diff -c -r1.12 -r1.13 *** src/usr.bin/rs/rs.c 2005/05/14 17:01:41 1.12 --- src/usr.bin/rs/rs.c 2005/05/14 17:12:51 1.13 *************** *** 1,4 **** ! /* $OpenBSD: rs.c,v 1.12 2005/05/14 17:01:41 millert Exp $ */ /*- * Copyright (c) 1993 --- 1,4 ---- ! /* $OpenBSD: rs.c,v 1.13 2005/05/14 17:12:51 millert Exp $ */ /*- * Copyright (c) 1993 *************** *** 39,45 **** #if 0 static const char sccsid[] = "@(#)rs.c 8.1 (Berkeley) 6/6/93"; #else ! static const char rcsid[] = "$OpenBSD: rs.c,v 1.12 2005/05/14 17:01:41 millert Exp $"; #endif #endif /* not lint */ --- 39,45 ---- #if 0 static const char sccsid[] = "@(#)rs.c 8.1 (Berkeley) 6/6/93"; #else ! static const char rcsid[] = "$OpenBSD: rs.c,v 1.13 2005/05/14 17:12:51 millert Exp $"; #endif #endif /* not lint */ *************** *** 303,323 **** max = n; colwidths[i] = max + gutter; } ! } ! /* for (i = 0; i < orows; i++) { ! for (j = i; j < nelem; j += orows) ! prints(ep[j], (j - i) / orows); ! putchar('\n'); ! } ! else ! for (i = 0; i < orows; i++) { ! for (j = 0; j < ocols; j++) ! prints(*ep++, j); ! putchar('\n'); ! }*/ ! else for (i = 0; i < ocols; i++) colwidths[i] = colw; if (!(flags & NOTRIMENDCOL)) { if (flags & RIGHTADJUST) colwidths[0] -= gutter; --- 303,312 ---- max = n; colwidths[i] = max + gutter; } ! } else { for (i = 0; i < ocols; i++) colwidths[i] = colw; + } if (!(flags & NOTRIMENDCOL)) { if (flags & RIGHTADJUST) colwidths[0] -= gutter; *************** *** 327,335 **** n = orows * ocols; if (n > nelem && (flags & RECYCLE)) nelem = n; - /*for (i = 0; i < ocols; i++) - fprintf(stderr, "%d ",colwidths[i]); - fprintf(stderr, "is colwidths, nelem %d\n", nelem);*/ } #define BSIZE 2048 --- 316,321 ---- *************** *** 353,364 **** printf(" %d line %d\n", curlen, irows); } if (!putlength && endblock - curline < BUFSIZ) { /* need storage */ - /*ww = endblock-curline; tt += ww;*/ - /*printf("#wasted %d total %d\n",ww,tt);*/ if (!(curline = (char *) malloc(BSIZE))) errx(1, "File too large"); endblock = curline + BSIZE; - /*printf("#endb %d curline %d\n",endblock,curline);*/ } for (p = curline, i = 1; i < BUFSIZ; *p++ = c, i++) if ((c = getchar()) == EOF || c == '\n') --- 339,347 ---- *************** *** 472,480 **** case 'z': /* squeeze col width */ flags |= SQUEEZE; break; - /*case 'p': - ipagespace = atoi(++p); (default is 1) - break;*/ case 'o': /* col order */ getlist(&cord, optarg); break; --- 455,460 ---- *************** *** 493,503 **** ac -= optind; av += optind; - /*if (!osep) - osep = isep;*/ switch (ac) { - /*case 3: - opages = atoi(av[2]);*/ case 2: ocols = atoi(av[1]); case 1: --- 473,479 ----