Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #62980

Re: Searching online "indent"

From James Kuyper <jameskuyper@verizon.net>
Newsgroups comp.lang.c
Subject Re: Searching online "indent"
Date 2015-06-04 16:52 -0400
Organization Self
Message-ID <5570BAA7.2020907@verizon.net> (permalink)
References (1 earlier) <cta0gdFr31aU1@mid.individual.net> <Netbeans-20150604170036@ram.dialup.fu-berlin.de> <20150604125943.8fa4c0b46f4ab3a05bda7d8f@gmail.com> <87oakvnwlk.fsf@bsb.me.uk> <beautifier-20150604205721@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 06/04/2015 02:58 PM, Stefan Ram wrote:
> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>> That requirement got snipped so it's easy to have missed it.  I wonder
>> if the suggestion to use NetBeans has the same flaw.
> 
>   Yeah. I want to totally neutralize any formatting decision
>   made by the original author. That is, two source codes that
>   have the same sequence of tokens but were formatted by
>   different authors should give the same result.

That's an understandable goal, but the tools I've used that had anything
close to that ability, didn't go quite that far. The tool I'm most
familiar with is GNU indent: it will insert line breaks where required
by the style rules that it is applying, including maximum line lengths,
and will remove line breaks that are prohibited by that style, and will
break up overly long lines - but it will not merge short lines. Without
such mergers, the normalization you're hoping to achieve won't happen.
Personally, I don't mind, because I sometimes insert more newlines than
be explained by any hard-and-fast style rule, in order to emphasize some
aspect of the structure of my statements that isn't covered by any of
those rules.

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Searching online "indent" Ian Collins <ian-news@hotmail.com> - 2015-06-04 15:54 +1200
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 07:22 -0700
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 08:55 -0700
  Re: Searching online "indent" "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2015-06-04 09:35 -0700
  Re: Searching online "indent" Etienne Prud'homme <e.e.f.prudhomme@gmail.com> - 2015-06-04 12:59 -0400
    Re: Searching online "indent" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-04 19:43 +0100
      Re: Searching online "indent" Etienne <e.e.f.prudhomme@gmail.com> - 2015-06-04 15:09 -0400
      Re: Searching online "indent" James Kuyper <jameskuyper@verizon.net> - 2015-06-04 16:52 -0400
      Re: Searching online "indent" Morris Dovey <mrdovey@iedu.com> - 2015-06-04 16:37 -0500
        Re: Searching online "indent" James Kuyper <jameskuyper@verizon.net> - 2015-06-04 18:02 -0400
          Re: Searching online "indent" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-04 23:37 +0100
  Re: Searching online "indent" Ian Collins <ian-news@hotmail.com> - 2015-06-05 07:23 +1200

csiph-web