Subject: bin/7958: indent(1) could use a tab-aware flag for line wrap
To: None <gnats-bugs@gnats.netbsd.org>
From: VaX#n8 <vax@linkdead.paranoia.com>
List: netbsd-bugs
Date: 07/11/1999 00:35:44
>Number: 7958
>Category: bin
>Synopsis: indent doesn't wrap properly with tab != 1
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sun Jul 11 00:35:00 1999
>Last-Modified:
>Originator: VaX#n8
>Organization:
extreme to the point of being neurotic
>Release: classified
>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.
>Audit-Trail:
>Unformatted: