Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | "Bill Cunningham" <nospam@nspam.invalid> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Searching online "indent" |
| Date | 2015-06-05 20:59 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <mktgis$79o$1@dont-email.me> (permalink) |
| References | <indent-20150604033951@ram.dialup.fu-berlin.de><47ee2508-4b6a-427b-8406-af6e4048d97d@googlegroups.com> <20150604142255.274b17a0ff4a4f3e7ad765c5@gmail.com> |
"Etienne" <e.e.f.prudhomme@gmail.com> wrote in message
news:20150604142255.274b17a0ff4a4f3e7ad765c5@gmail.com...
> Correct me if I'm wrong, but it needs something more than search &
> replace if you've got no indentation of blocks. You'll need at least
> regex because it's impossible to say if something is in a block
> without conditions.
>
> Search & replace could be good to change the indentation style, but
> it can't say if those lines:
>
> |if(condition) {
> | char foo[] = "bar";
> | int lenght = strlen(foo);
> | int i;
> | for(i=0; i<length; i++) {
> ->| instruction;
> ->| instruction;
> ->|}
> |}
>
> are inside a block.
>
> By the way, why someone would format their code in only one line?
I personally love indent. I will run 'indent -kr -nut' and the file name for
kandr style indentation. And the -nut switch removes all tabs. I tend to tab
alot.
Bill
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Searching online "indent" David Kleinecke <dkleinecke@gmail.com> - 2015-06-04 10:01 -0700
Re: Searching online "indent" Etienne <e.e.f.prudhomme@gmail.com> - 2015-06-04 14:22 -0400
Re: Searching online "indent" "Bill Cunningham" <nospam@nspam.invalid> - 2015-06-05 20:59 -0400
Re: Searching online "indent" Keith Thompson <kst-u@mib.org> - 2015-06-05 20:41 -0700
csiph-web