Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Apr 1997 11:14:55 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        terry@lambert.org, handy@sag.space.lockheed.com, current@FreeBSD.ORG
Subject:   Re: Longer user names: take 2
Message-ID:  <199704301814.LAA02356@phaeton.artisoft.com>
In-Reply-To: <23458.862373325@time.cdrom.com> from "Jordan K. Hubbard" at Apr 29, 97 09:08:45 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> > + 		if( dflag) {
> > + 			for( dkp = ep->dkp; dkp != NULL; dkp = *((struct kinfo_
> proc **)(&dkp->kp_eproc.e_spare[ 0]))) {
> 
> That's a *really mutant* coding style you have there, Mr. Lambert. :-)
> Please, for Richie's sake, how about something more like:
> 
> 	if (dflag) {
> 		for (dkp = ep->dkp; dkp != NULL; dkp = *((struct kinfo_proc **)(&dkp->kp_eproc.e_spare[0]))) {
> 	...
> 
> And lose the extra space before the double-quote char.  If nothing
> else, just your added code will then remain self-consistent throughout
> the file. :)

I tried hard to conform to the existing coding standards in the file.
Normally, if this were new code, I would have used:


 		if( dflag) {
 			for( dkp = ep->dkp; dkp != NULL;
				dkp = *( (struct kinfo_proc **)
					  (&dkp->kp_eproc.e_spare[ 0]))) {

to clean the line break.  So you are lucky I controlled myself into
"standard unreadability" as much as I did.  If the address protion
were an expression, it would have gotten a space too:

	( ptr + val)

But it was just a precedence clarification.  8-).

Feel free to make the "corrections"... I know that beauty is in the
eyes of the beholder.

FWIW, a lot if V7 code was written using my style... many old (bad) C
compilers used stuff like

		...
	} else if( !strcmp( token, "if(")) {
		paren++;
		...
	} else if( !strcmp( token, "for(")) {
		paren++;
		...

So the keyword and the paren were treated as single syntactic elements.

Style evolves from your tools... I don't know if I really like all
these new "EMACS'y" style changes... ;-).  Mine evolved from porting
code to 140+ platforms using borrowed machines where I had to live
with the tools that were there.  You'll notice I avoid using bit
fields, or assuming an enumerated type starts with an option base of 0,
etc., too.

I also type 'sync' semi-regularly.  8-).


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704301814.LAA02356>