home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1543 < prev    next >
Encoding:
Text File  |  1992-09-10  |  2.6 KB  |  73 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!gnu.ai.mit.edu!jla
  3. From: jla@gnu.ai.mit.edu (Joseph Arceneaux)
  4. Subject: index-1.6 stdin bug? & question
  5. Message-ID: <9209110002.AA06880@geech.gnu.ai.mit.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: jla@ai.mit.edu
  8. Organization: GNUs Not Usenet
  9. References: <9209092039.AA03285@tweedledumb.cygnus.com>
  10. Distribution: gnu
  11. Date: Thu, 10 Sep 1992 16:02:47 GMT
  12. Approved: bug-gnu-utils@prep.ai.mit.edu
  13. Lines: 58
  14.  
  15.    From: burley@cygnus.com (Craig Burley)
  16.    Date: Wed, 9 Sep 92 16:39:28 EDT
  17.  
  18.    First, a bugfix, without which indent-1.6 can't reliably read from standard
  19.    input:
  20.  
  21. This bug has been fixed, along with several others.  Unfortunately, I
  22. do not know when I can make a new release, as Lucid, Inc is severing
  23. my net connection and I don't yet know when I will get another
  24. established.  Hopefully this won't be very long.
  25.  
  26.    Second, a question, as a new user of indent:
  27.  
  28.    I get the impression that indent doesn't care at all about the _incoming_
  29.    whitespace, i.e. that it doesn't learn anything about the program by looking
  30.    at the nature of whitespace.  Is this a correct impression?  (I'm thinking
  31.    in terms of the "design" of indent; based on the docs, which I
  32.    admit I haven't 
  33.    read in great detail, it looks like it changes whitespace, but doesn't
  34.    try and interpret incoming whitespace per se.)
  35.  
  36. I don't think there is a document describing the "design" of indent.
  37. In any event, the "design" is pretty inelegant, and it has been hacked
  38. maliciously over the years.
  39.  
  40. It is true that indent pays little attention to incoming whitespace.
  41. However, conerning subtle differences in output between various
  42. elements of a chain like:
  43.  
  44.   indent -st foo.c | indent | indent | indent | ...
  45.  
  46. I have devoted some effort to ensuring that the output of all elements
  47. is exactly the same.  If it is not, there is a bug.  Note that this
  48. example is not the same as the one you provided:
  49.  
  50.        bash$ indent < foo.c | indent -T bool -T ffelexToken | indent > bar.c
  51.  
  52.    produces a file named bar.c that is different in subtle ways from the
  53.    file named baz.c produced by
  54.  
  55.        bash$ indent < foo.c > baz.c
  56.  
  57. Identifying typenames with -T *can* change the indentation of your
  58. code, and this is intended.
  59.  
  60. If you think indent is doing this incorrectly, or there is some other,
  61. related bug, then please send me a minimal example of such code.
  62.  
  63. Joe
  64.  
  65. ----
  66. Joseph Arceneaux
  67. Free Software Foundation
  68. jla@ai.mit.edu                PO Box 460633
  69. +1 415 285 9088               San Francisco, CA 94146
  70.  
  71. Help abolish software patents -- send mail for details.
  72.  
  73.