NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41880: extra spaces in pr(1) output



The following reply was made to PR bin/41880; it has been noted by GNATS.

From: Ralph G <gralph%post-ist-da.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/41880: extra spaces in pr(1) output
Date: Tue, 17 Nov 2009 20:44:28 +0100

 The following works for me:
 
 regards
 Ralph
 
 
 Index: pr.c
 ===================================================================
 RCS file: /cvsroot/src/usr.bin/pr/pr.c,v
 retrieving revision 1.20
 diff -u -r1.20 pr.c
 --- pr.c       13 Apr 2009 00:37:05 -0000      1.20
 +++ pr.c       17 Nov 2009 19:41:48 -0000
 @@ -1154,14 +1154,7 @@
                        /*
                         * got a non space char; contract out spaces
                         */
 -                      while (ops < ips) {
 -                              /*
 -                               * use one space if necessary
 -                               */
 -                              if (ips - ops == 1) {
 -                                      putchar(' ');
 -                                      break;
 -                              }
 +                      while (ips - ops > 1) {
                                /*
                                 * use as many ochar as will fit
                                 */
 @@ -1206,14 +1199,7 @@
                }
  
                if (mor < 0) {
 -                      while (ops < ips) {
 -                              /*
 -                               * use one space if necessary
 -                               */
 -                              if (ips - ops == 1) {
 -                                      putchar(' ');
 -                                      break;
 -                              }
 +                      while (ips - ops > 1) {
                                /*
                                 * use as many ochar as will fit
                                 */
 


Home | Main Index | Thread Index | Old Index