[COFF] C with Improvements :-)

Larry McVoy lm at mcvoy.com
Mon Jun 23 12:06:21 AEST 2025


On Mon, Jun 23, 2025 at 11:52:02AM +1000, Peter Yardley wrote:
> Yes,
> 
> I hate the dangling brace I line my braces up with the associated code block ???
> 
> if (???)
> 	{
> 	blah blah blah;
> 	}

I personally hate that, not sure if you are demonstrating how not to do it or
what?

I do

	if (whatever) stmt;

or
	if (whatever that is more complex) {
		stmt;
		stmt;
		stmt;
	}

I also do

	if ((whatever is complex) || (or even more complex) ||
	    (something that wouldn't fit in 80 columns) {
	    	stmt;
		stmt;
		stmt;
	}

I've mapped ^A in vi to be that 4 space indent, for 4 decades.

The 

	if (whatever)
	    {
	    	stmt;
	    }

is, I believe, GNU style and it just sucks.  GNU C is awful.  But when I
did the df/du/ls -h stuff I wrote it in that style, it's their house,
you abide by their rules.  Fun fact, Stallman hated me so much he rewrote
that stuff so I wasn't in their version history.


More information about the COFF mailing list