NetBSD Problem Report #7958
Received: (qmail 12759 invoked from network); 11 Jul 1999 07:34:45 -0000
Message-Id: <199907110724.CAA29218@linkdead.paranoia.com>
Date: Sun, 11 Jul 1999 02:24:45 -0500 (CDT)
From: VaX#n8 <vax@linkdead.paranoia.com>
Reply-To: vax@carolina.rr.com (vax@paranoia.com)
To: gnats-bugs@gnats.netbsd.org
Subject: indent(1) could use a tab-aware flag for line wrap
X-Send-Pr-Version: 3.95
>Number: 7958
>Category: bin
>Synopsis: indent doesn't wrap properly with tab != 1
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jul 11 00:35:00 +0000 1999
>Closed-Date:
>Last-Modified: Fri Feb 11 22:20:00 +0000 2022
>Originator: VaX#n8
>Release: classified
>Organization:
extreme to the point of being neurotic
>Environment:
classified
>Description:
Program indent(1) is handy with the C code and a hit with the ladies.
However, it produces code which will not fit on my punch-cards if tab
expansion is performed in any way.
>How-To-Repeat:
$ echo 'main () { i am a contrived sentence designed to fool the vexing mr. indent am i not clever } ' > /tmp/foo
$ indent /tmp/foo /tmp/bar
$ cat /tmp/bar
main()
{
i am a contrived sentence designed to fool the vexing mr.indent am i not clever
}
$ od -c /tmp/bar
0000000 m a i n ( ) \n { \n \t i a m a
0000020 c o n t r i v e d s e n t e
0000040 n c e d e s i g n e d t o
0000060 f o o l t h e v e x i n g
0000100 m r . i n d e n t a m i n
0000120 o t c l e v e r \n } \n
0000134
>Fix:
One fix would add a switch to make the column-counter aware of horizontal
position, implicitly assuming some value for the tab stops. Sigh.
>Release-Note:
>Audit-Trail:
From: Roland Illig <roland.illig@gmx.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/7958
Date: Fri, 11 Feb 2022 23:19:31 +0100
Just a short status update: Even in 2022, NetBSD indent(1) still doesn't
wrap overly long lines, no matter whether tabs or spaces are used for
indentation.
See tests/usr.bin/indent/opt_l.c and tests/usr.bin/indent/opt_lpl.c for
a demonstration.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.