For the -i option, don't convert a single space before a tab stop to a
tab. Fixes PR bin/5797 from Todd Vierling.
This commit is contained in:
parent
6f0558d9f6
commit
fdbafc0681
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pr.c,v 1.7 1998/12/19 20:16:50 christos Exp $ */
|
||||
/* $NetBSD: pr.c,v 1.8 2000/07/13 02:07:53 simonb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991 Keith Muller.
|
||||
@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\n\
|
||||
#if 0
|
||||
from: static char sccsid[] = "@(#)pr.c 8.1 (Berkeley) 6/6/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pr.c,v 1.7 1998/12/19 20:16:50 christos Exp $");
|
||||
__RCSID("$NetBSD: pr.c,v 1.8 2000/07/13 02:07:53 simonb Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -1125,6 +1125,13 @@ otln(buf, cnt, svips, svops, mor)
|
||||
* got a non space char; contract out spaces
|
||||
*/
|
||||
while (ops < ips) {
|
||||
/*
|
||||
* use one space if necessary
|
||||
*/
|
||||
if (ips - ops == 1) {
|
||||
putchar(' ');
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* use as many ochar as will fit
|
||||
*/
|
||||
@ -1170,6 +1177,13 @@ otln(buf, cnt, svips, svops, mor)
|
||||
|
||||
if (mor < 0) {
|
||||
while (ops < ips) {
|
||||
/*
|
||||
* use one space if necessary
|
||||
*/
|
||||
if (ips - ops == 1) {
|
||||
putchar(' ');
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* use as many ochar as will fit
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user