Using bidirectional authentication in pkgng
freebsd at grem.de
Thu Jan 24 16:00:24 UTC 2013
On Thu, 24 Jan 2013 16:23:54 +0100
Dag-Erling Smørgrav <des at des.no> wrote:
> but Emacs will still misindent continuation lines in some cases,
> e.g. when a line break occurs within nested parentheses; AFAICT from
> the documentation, there is no way to tune that.
Hm, so this will probably get me again, but thanks for the mode, it
will certainly help.
> I wrap comments at 74, and *try* to keep code closer to 74 than 80.
> Some of the code in http.c is so deeply nested that it is almost
> impossible to stay within 80 characters. This is a clear sign that
> the code needs to be rewritten.
Ok, is that only for libfetch or for all of kernel (just for future
> BTW, you'd have an easier time avoiding long lines if you used shorter
> function and variable names and assigned commonly used expressions to
> temporary variables, e.g. (matcheslen - (firstmatchdot - matches) in
That's true, I'm just used to really long identifiers from work and
wanted to make sure it's relatively easy to read the algorithm (well,
the lack of temporaries makes it harder to read again I admit).
> > > - You declare variables inside blocks, and declarations in
> > > general are not properly sorted.
> > I wasn't aware that this is not allowed (it's such an incredibly
> > useful feature to me).
> s/not allowed/strongly discouraged/
Ah ok. I don't have many of those though.
> > Could you point me to the section in style(9) that specifies this
> > (couldn't find it)?
> Parts of a for loop may be left empty. Do not put declarations
> inside blocks unless the routine is unusually complicated.
> > The closest we have is mdoc(7). I'm not sure where / whether the
> requirement to start sentences on a new line is documented, but this
> is actually a feature of *roff rather than a style issue; it has to
> be able to tell the difference between the period that follows an
> abbreviation and the period at the end of a sentence. For the same
> reason, Emacs will never insert a line break after a period followed
> by a single space when wrapping text.
Thanks for the detailed explanation. So do you think you could fix these
style issues yourself, or should I give it a shot (I'm certain I will
miss *some* of those issues but it will definitely get better).
More information about the freebsd-ports