Subject: Re: [libssh2] source code formatting

Re: [libssh2] source code formatting

From: James Housley <jim_at_thehousleys.net>
Date: Fri, 10 Nov 2006 09:57:23 -0500

On Nov 10, 2006, at 9:43 AM, Daniel Stenberg wrote:

> Hi
>
> Since I've just started getting my feet wet wading around in this
> code and I
> even got my first patch applied and committed by James, I now feel
> brave
> enough to ask this:
>
> How about re-indenting the entire source code?
>
> I find the source code very awkward to work with, very much because
> of the
> overly long source lines. I come from a world where we limit source
> code lines
> to less than 80 columns, and this code has lines going beyond 200
> columns and
> many many being longer than 80.

I figured out that most of the code is based on tab indenting with
tab being 4 characters. I am also not a big fan of 80 character
lines for several reasons.

* Projects like this have long function names and descriptive
variables names, ie not "x". Wrapping at 80 a lot of times makes it
harder to read. Since very few people are actually using 80x25
screens, most of my FreeBSD work is 80x43. A longer line length,
like 132 is a better size.

>
> I know source code indenting is a religious thing and basically
> about feelings
> and what you're used to, but I thought I'd still ask since I do
> feel pain when
> reading code using the current layout. I'm fine with whatever
> indent rules you
> want otherwise, I just can't bare the line lengths.
>
> I am planning on doing further work on libssh2, and I wouldn't mind
> paving the
> road for that. I also wouldn't mind getting CVS commit access, but
> I figure I
> should wait a little and prove myself worthy first.

This is just my opinion and not sent to the mailing list. But I will
continue to commit you changes to keep both projects going.

Jim

--
/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
  X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
jeh@FreeBSD.org      http://www.FreeBSD.org     The Power to Serve
jim@TheHousleys.Net  http://www.TheHousleys.net
---------------------------------------------------------------------
In theory there is no difference between theory and practice.
In practice there is no similarity.
       -- From the "I wish I'd said that" archives.
Received on 2006-11-10