edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] indenting
@ 2014-01-30 15:09 Karl Dahlke
  2014-01-30 15:24 ` Chris Brannon
  0 siblings, 1 reply; 4+ messages in thread
From: Karl Dahlke @ 2014-01-30 15:09 UTC (permalink / raw)
  To: Edbrowse-dev

I almost don't care, so if other people do that will win the day.
Would you prefer a different style of indenting?
I came up with this one over ten years ago, but now I
really don't like it, because of the mix of spaces and tabs.
Guess I was trying to prevent really long lines, so only indent by 4.
Well the way to prevent long lines is by programming better.
Linux kernel indents by tabs, by blocks of 8 spaces,
and all the braces and other styles I like too.
Would we be better off using their indent script,
or maybe some other script?
I just like being able to list a line and count tabs
and know the indent, like when I work in the kernel,
but edbrowse source doesn't work like that.
If you have kernel source look at scripts/Lindent.
Indenting by tabs is pretty much the standard.

Also I wonder if we should not run eb.h through such a script.
It's just externs and defines.
And now with the extern C { } around it,
everything is indented for no reason.
It's just a little awkward / confusing.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] indenting
  2014-01-30 15:09 [Edbrowse-dev] indenting Karl Dahlke
@ 2014-01-30 15:24 ` Chris Brannon
  2014-01-30 16:09   ` Adam Thompson
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Brannon @ 2014-01-30 15:24 UTC (permalink / raw)
  To: Edbrowse-dev

I don't care at all.  Whatever the agreed-upon style happens to be, I'll
stick to it.  I have no problem with using the indent script from the
kernel source.

> Also I wonder if we should not run eb.h through such a script.

Maybe not.  I won't be surprised if the indentation on struct
declarations gets out of sync at some point, but this file doesn't
change all that much.

-- Chris

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Edbrowse-dev] indenting
  2014-01-30 15:24 ` Chris Brannon
@ 2014-01-30 16:09   ` Adam Thompson
  0 siblings, 0 replies; 4+ messages in thread
From: Adam Thompson @ 2014-01-30 16:09 UTC (permalink / raw)
  To: Chris Brannon; +Cc: Edbrowse-dev

On Thu, Jan 30, 2014 at 07:24:40AM -0800, Chris Brannon wrote:
> I don't care at all.  Whatever the agreed-upon style happens to be, I'll
> stick to it.  I have no problem with using the indent script from the
> kernel source.

Same here, I usually code then format with the indent script anyway,
since I usually use speech and edbrowse's rather nice feature to search for the balancing
brace to check what's going on, and then use a braille display if I need to
examine the code more closely.

It kind of makes sense to use the kernel indent script though,
particularly if you're used to the kernel style.

> > Also I wonder if we should not run eb.h through such a script.
> 
> Maybe not.  I won't be surprised if the indentation on struct
> declarations gets out of sync at some point, but this file doesn't
> change all that much.

Probably not.  If we're always using tabs then fixing the structs is easy anyway.
That being said, I'm probably the most likely one to forget to do this.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Edbrowse-dev]  indenting
@ 2014-01-30 17:40 Karl Dahlke
  0 siblings, 0 replies; 4+ messages in thread
From: Karl Dahlke @ 2014-01-30 17:40 UTC (permalink / raw)
  To: Edbrowse-dev

well then ...
I will probably wait until the code is quiescent, which it isn't now,
but when everyone is leaving it alone I'll run all of it through kernel Lindent
and we'll go with that.
Maybe just before new version cutover.
No hurry.

Karl Dahlke

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-01-30 17:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 15:09 [Edbrowse-dev] indenting Karl Dahlke
2014-01-30 15:24 ` Chris Brannon
2014-01-30 16:09   ` Adam Thompson
2014-01-30 17:40 Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).