From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: [PATCH] implement .Bk
Date: Sat, 26 Jun 2010 15:54:44 +0200 [thread overview]
Message-ID: <4C2606A4.8050203@bsd.lv> (raw)
In-Reply-To: <20100626133824.GB22002@iris.usta.de>
> yesterday night, i arrived at Edmonton for the c2k10, the OpenBSD
> yearly general hackathon. I plan to spend this week on mandoc.
>
> Here is the first patch i hacked up on the plane,
> implementing proper .Bk support.
> It is based on OpenBSD-current and can probably go in more or less
> as it is after merging bsd.lv HEAD into OpenBSD.
I like it with one nit noted in-line. Also, can you document this in
mdoc.7?
Other than that, ok kristaps.
> if ( ! (TERMP_NOSPACE & p->flags)) {
> - bufferc(p, ' ');
> - if (TERMP_SENTENCE & p->flags)
> + if (TERMP_KEEP & p->flags)
> + bufferc(p, ASCII_NBRSP);
> + else {
> + if (TERMP_PREKEEP & p->flags)
> + p->flags |= TERMP_KEEP;
> bufferc(p, ' ');
> + if (TERMP_SENTENCE & p->flags)
> + bufferc(p, ' ');
> + }
In general, I try to have the "else" not have braces---most of the code
is structured as such. Can you flip this to
if ( ! (TERMP_KEEP & p->flags)) {
multi-line
} else
buffer(p, ASCII_NBRSP);
I'm pretty dumb in this regard: seeing the else-brace without the
if-brace just plain confuses me.
Good work!
Kristaps
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
next prev parent reply other threads:[~2010-06-26 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-26 13:38 Ingo Schwarze
2010-06-26 13:54 ` Kristaps Dzonsons [this message]
2010-06-26 13:53 ` Ingo Schwarze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C2606A4.8050203@bsd.lv \
--to=kristaps@bsd.lv \
--cc=tech@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).