[syslinux] Thank you and patch line length

Gene Cumm gene.cumm at gmail.com
Sat Feb 28 12:40:33 PST 2009


On Sat, Feb 28, 2009 at 1:54 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> Gene Cumm wrote:
>> Peter, looking back at recent commits, I noticed that you updated
>> doc/comboot.txt to reflect that the new COMBOOT calls for directories
>> are officially to be included into version 3.74.  Thank you and I hope
>> that this functionality provides benefit for others.
>>
>> I also noticed that a part of that commit was to rework the line
>> length.  What is your preferred line length within the documentation
>> and within the code?  I'm ready to submit a patch for my revised
>> version of my read-only shell but would rather modify my tree to fit
>> your preferred line lengths first then submit the patch.
>
> For plaintext, typically the line break should be around 72 characters,
> with 79 as the absolute maximum.  It's not an exact science for me; what
> tends to happen is that I edit in emacs and then find myself with an
> overlong line, and I just hit emacs "reformat paragraph" command.

OK, that makes sense.  I had thought I kept it under 80 but that explains it.

> For code, do follow SubmittingPatches and keep the line length to < 80.
>  As far as indentation level, I'm not as picky as Linus; I've used both
> 4 and 8 spaces myself, and in some cases even just 2; I've considered
> doing a tree-wide reformat to either 4 or 8 spaces but haven't bothered.

There's another question: with indentation, tabs versus spaces.  I've
typically been in the habit of using tab characters and letting my
editor assume a tab size of 8.  I notice that some of the files use
tabs versus others using spaces.  I'd assume just different stages of
when each file was started and it's a low priority to be consistent.

I would think that it'd be better to use tabs across the board with
the assumption that they count as 8 characters when computing line
length but allows someone to view it at whatever width they like.  At
one point, I had decided that I liked having my tab width at 2 to take
up less space on my screen but this cause issues when most people
around me used 8 (including the console) so I switched back.

> However, please try to be consistent within a file.

That just makes complete sense.

>
>> Just an FYI: rosh now acts a lot more like ls (except currently
>> unsorted) with a few other smoothing finishes.  I wouldn't call it
>> complete yet but just more usable.
>
> Cool!

Thanks.

-- 
-Gene




More information about the Syslinux mailing list