Module Name: src Committed By: dyoung Date: Fri Sep 13 17:26:28 UTC 2019
Modified Files: src/usr.bin/unexpand: unexpand.c Log Message: Fix `unexpand -a -t n`, which also did not treat `-t n` like it established stops n, 2 n, 3 n, .... To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/unexpand/unexpand.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/unexpand/unexpand.c diff -u src/usr.bin/unexpand/unexpand.c:1.16 src/usr.bin/unexpand/unexpand.c:1.17 --- src/usr.bin/unexpand/unexpand.c:1.16 Fri Sep 13 16:53:05 2019 +++ src/usr.bin/unexpand/unexpand.c Fri Sep 13 17:26:27 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: unexpand.c,v 1.16 2019/09/13 16:53:05 dyoung Exp $ */ +/* $NetBSD: unexpand.c,v 1.17 2019/09/13 17:26:27 dyoung Exp $ */ /*- * Copyright (c) 1980, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19 #if 0 static char sccsid[] = "@(#)unexpand.c 8.1 (Berkeley) 6/6/93"; #endif -__RCSID("$NetBSD: unexpand.c,v 1.16 2019/09/13 16:53:05 dyoung Exp $"); +__RCSID("$NetBSD: unexpand.c,v 1.17 2019/09/13 17:26:27 dyoung Exp $"); #endif /* not lint */ /* @@ -136,7 +136,7 @@ tabify(const char *line, size_t len) size_t dcol, ocol, limit, n; dcol = ocol = 0; - limit = nstops == 0 ? UINT_MAX : tabstops[nstops - 1] - 1; + limit = nstops <= 1 ? UINT_MAX : tabstops[nstops - 1] - 1; e = line + len; for (p = line; p < e; p++) { if (*p == ' ') {