logo       

Indenting the source: msg#00034

lang.nasm.devel

Subject: Indenting the source

Okay, I personally find the style used in outbin.c (and quite possibly other files) to be atrocious; it's hard to read and even harder to make emacs not to butcher.

I would like to propose making the following GNU indent command the preferred style:

indent -kr -i4 -ts8 -nut -sob -ss -ncs

... it is very simple K&R-style indent with 4 spaces indentation. It's not the one I usually use, but my preferred style is hard to generate for non-Emacs uses.

The commands mean, in order:

-kr -- K&R style
-i4 -- indent is 4 spaces
-ts8 -- a tab character is 8 spaces
-nut -- don't generate tab characters
-sob -- swallow optional blank lines
-ss -- space before semicolons in one-line for and while
-ncs -- no space after casts

This is similar to what the Linux kernel uses, except the indentation is 4. I'm proposing to not use tabs simply because it makes life harder for some editors to have indent != tab size, if people disagree then I'd remove that. I really want to avoid tab size != 8 though.

-hpa


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise