Module Name: src
Committed By: christos
Date: Mon Mar 12 18:06:24 UTC 2012
Modified Files:
src/usr.bin/pr: pr.c
Log Message:
PR/41880: Ralph G. Previous fix for PR/5797 broke since space separator.
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/usr.bin/pr/pr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/pr/pr.c
diff -u src/usr.bin/pr/pr.c:1.21 src/usr.bin/pr/pr.c:1.22
--- src/usr.bin/pr/pr.c:1.21 Tue Sep 6 14:26:06 2011
+++ src/usr.bin/pr/pr.c Mon Mar 12 14:06:24 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: pr.c,v 1.21 2011/09/06 18:26:06 joerg Exp $ */
+/* $NetBSD: pr.c,v 1.22 2012/03/12 18:06:24 christos Exp $ */
/*-
* Copyright (c) 1991 Keith Muller.
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
#if 0
from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: pr.c,v 1.21 2011/09/06 18:26:06 joerg Exp $");
+__RCSID("$NetBSD: pr.c,v 1.22 2012/03/12 18:06:24 christos Exp $");
#endif
#endif /* not lint */
@@ -1138,14 +1138,7 @@ otln(char *buf, int cnt, int *svips, int
/*
* 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
*/
@@ -1190,14 +1183,7 @@ otln(char *buf, int cnt, int *svips, int
}
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
*/