Subject: Re: Parentheses and KNF
To: Wolfgang Solfrank <ws@tools.de>
From: Ted Lemon <mellon@hoffman.vix.com>
List: current-users
Date: 08/20/1998 13:25:25
> 				dirbuf.d_fileno = cntobn(pmp,
> 				    pmp->pm_rootdirblk) * dirsperblk;
> 
> I like this more:
> 
> 				dirbuf.d_fileno = cntobn(pmp,
> 							 pmp->pm_rootdirblk)
> 						  * dirsperblk;

It's actually pretty hard to indent like this in vi, although I have
to admit that I do it anyway.   In emacs, the easiest way to get close
to the style you're talking about is to rewrite the statement
slightly:

> 				dirbuf.d_fileno = (cntobn(pmp,
> 							  pmp->pm_rootdirblk)
> 						   * dirsperblk);

Then standard electric C mode will indent correctly.

			       _MelloN_