Ethereal-dev: RE: [Ethereal-dev] coding guidelines (what's the tabstop/shiftwid th?)
Title: RE: [Ethereal-dev] coding guidelines (what's the tabstop/shiftwidth?)
RE: Rule #1: So what's to be in the source code, tabs or spaces? If it's spaces, then I'll put eight of them in, but it won't matter how wide tabs are then. If it's tabs, then the width of a tab is client implementation dependent, and can't be represented in the code. BTW: I don't see where Unix mandates 8 spaces per tab. Maybe that's a general default, but it's almost always configurable.
I agree with rule #2.
One extra proposal: Don't waste vertical space with a lot of blank lines, next-line opening braces, and pretty comment blocks. I'd rather be able to get a large amount of code in the frame where I can see it without a lot of paging around. Screen real-estate is expensive.
Perhaps choosing a pretty printer and putting a configuration for it into CVS would help. Then we can run it as part of make, and the code comes into CVS formatted in a standard way.
-----Original Message-----
From: Guy Harris [mailto:gharris@xxxxxxxxx]
Sent: Monday, August 26, 2002 3:05 PM
To: Khachaturov Vassilii
Cc: 'ethereal-dev@xxxxxxxxxxxx'
Subject: Re: [Ethereal-dev] coding guidelines (what's the
tabstop/shiftwidth?)
On Mon, Aug 26, 2002 at 03:35:35PM -0400, Khachaturov Vassilii wrote:
> (From the most places I've looked at, it seems like hard tabs are at 8, and
> shiftwidth/soft tab stop
> (or whatever your favourite name for the structural level indent is) is 2.
> This is countrary
> to the README.developer, which seems to use shiftwidth=hard tab
> width=whatever one prefers,
> much more appealing to my taste, but I am willing to submit in whatever
> format is preferred.)
The only firm rules I'd insist on are
1) tab characters in files move to tab stops set every 8 spaces
(1, 9, 17, etc.), as there are, I think, editors where that's
wired in and unchangeable, and text isn't always viewed with
an editor and, at least on UNIX, tabs are every 8 spaces;
2) all lines at the same bracketing level should be indented the
same, at least to the extent that they appear to be indented
at the same level when you read the code.
_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev