[ Cc'ed to wget list because it might be useful to other patch
submitters. ]
"Christian Fraenkel" <[EMAIL PROTECTED]> writes:
> Well, this is essentially the same patch. It just fixes a few bugs
> (some cosmetical, some realy stupid) and adds more detailed ssl
> debuging in the debug output.
Christian, speaking of cosmetics, it seems that your editor has great
problems with Wget sources. After your patch to http.c, the
indentation is all wrong in completely obvious and jarring ways.
For this patch I'll simply reindent the code using Emacs. But for the
future let's please review the GNU indentation. (You already know
about the space before parentheses so I won't repeat that.) I'm not
saying everyone has to like the GNU coding standards -- many people
don't -- but it's essential that we adhere to the same conventions,
otherwise the resulting code mesh will become unreadable.
0. The TAB width is 8 characters. This is not really relevant to
indentation, except that Emacs often inserts TABs instead of 8
spaces when creating indentation. To be compatible, it is crucial
that your editor reads TAB as 8-spaces wide, and that it writes
TABs only when 8-spaces TABs are meant.
1. The basic indentation is 2 characters. For example:
if (foo)
bar ();
2. When braces are present, they are indented by two characters, and
the stuff within braces is indented by two more characters:
if (foo)
{
bar ();
if (baz)
qux ();
}
2a. This makes it easier to distinguish braces that follow an if or
while from the braces that introduce a new lexical block for the
sake of local variables;
if (foo)
{
bar ();
baz ();
}
frob = qux ();
{
int froblen = strlen (frob);
if (froblen < 3 || froblen > 42)
error ("Frob must be a reasonably small string.");
}
3. The indentation of switch is the following:
switch (c)
{
case 'x':
foo ();
break;
case 'y':
bar ();
break;
default:
baz ();
}
That is, two spaces for the braces and two more spaces for the
items inside cases. case statement themselves are indented on the
same level as the braces.