🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #791

index-1.6 stdin bug? & question

#791
From: Joseph Arceneaux
Date: Thu, 10 Sep 1992 16:02
57 lines
2685 bytes
   From: burley@cygnus.com (Craig Burley)
   Date: Wed, 9 Sep 92 16:39:28 EDT

   First, a bugfix, without which indent-1.6 can't reliably read from standard
   input:

This bug has been fixed, along with several others.  Unfortunately, I
do not know when I can make a new release, as Lucid, Inc is severing
my net connection and I don't yet know when I will get another
established.  Hopefully this won't be very long.

   Second, a question, as a new user of indent:

   I get the impression that indent doesn't care at all about the _incoming_
   whitespace, i.e. that it doesn't learn anything about the program by looking
   at the nature of whitespace.  Is this a correct impression?  (I'm thinking
   in terms of the "design" of indent; based on the docs, which I
   admit I haven't 
   read in great detail, it looks like it changes whitespace, but doesn't
   try and interpret incoming whitespace per se.)

I don't think there is a document describing the "design" of indent.
In any event, the "design" is pretty inelegant, and it has been hacked
maliciously over the years.

It is true that indent pays little attention to incoming whitespace.
However, conerning subtle differences in output between various
elements of a chain like:

  indent -st foo.c | indent | indent | indent | ...

I have devoted some effort to ensuring that the output of all elements
is exactly the same.  If it is not, there is a bug.  Note that this
example is not the same as the one you provided:

       bash$ indent < foo.c | indent -T bool -T ffelexToken | indent > bar.c

   produces a file named bar.c that is different in subtle ways from the
   file named baz.c produced by

       bash$ indent < foo.c > baz.c

Identifying typenames with -T *can* change the indentation of your
code, and this is intended.

If you think indent is doing this incorrectly, or there is some other,
related bug, then please send me a minimal example of such code.

Joe

----
Joseph Arceneaux
Free Software Foundation
jla@ai.mit.edu                PO Box 460633
+1 415 285 9088               San Francisco, CA 94146

Help abolish software patents -- send mail for details.
Technical Details
Message-ID: <9209110002.AA06880@geech.gnu.ai.mit.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!jla
References: <9209092039.AA03285@tweedledumb.cygnus.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!jla
From: jla@gnu.ai.mit.edu (Joseph Arceneaux)
Subject: index-1.6 stdin bug? & question
Message-ID: <9209110002.AA06880@geech.gnu.ai.mit.edu>
Sender: gnulists@ai.mit.edu
Reply-To: jla@ai.mit.edu
Organization: GNUs Not Usenet
References: <9209092039.AA03285@tweedledumb.cygnus.com>
Distribution: gnu
Date: Thu, 10 Sep 1992 16:02:47 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 58