tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: mandocdb: use more macros
Date: Wed, 07 Dec 2011 02:00:24 +0100	[thread overview]
Message-ID: <4EDEBAA8.703@bsd.lv> (raw)
In-Reply-To: <20111205230243.GA1383@iris.usta.de>

On 06/12/2011 00:02, Ingo Schwarze wrote:
> Hi,
>
> here is a complete patch replacing the ones sent in late November
> in the same thread:
>
>   * use the content of 24 new macros (Ar, At, Bsx, Bx, Cm, Dv, Dx, Em,
>     Fa, Fl, Ft, Fx, Ic, Lb, Lk, Li, Ms, Mt, Nx, Ox, Sh, Ss, Sy, Tn)
>   * by removing 4 handler functions
>   * and handling 7 macros generically (An, Cd, Er, Ev, Pa, Va, Vt)
>   * introduce MDOCF_CHILD for automatic buf_appendmdoc
>   * handlers return 1 for automatic hash_put or 0 to skip it
>
> Extract more information:
>   * extract Ft and Fa from Fn
>   * Save Va and Vt completely, do not strip them
>
> Lift restrictions:
>   * use Cd, Fn, Fo, In, Va, and Vt anywhere, not only in SYNOPSIS
>   * use Ev anywhere, not only in ENVIRONMENT
>   * use Pa anywhere, not only in FILES
>   * use Er anywhere, not only in ERRORS
>   * use St anywhere, not only in STANDARDS
>   * use An anywhere, not only in AUTHORS
>
> Keep restrictions:
>   * use Nm only in NAME and SYNOPSIS
>   * use Fd only in SYNOPSIS; not touched that one for now
>
> While it's easy to split .Fn into .Ft, .Fn, and multiple .Fa's -
> the last word of the first argument is the .Fn - something similar
> will be quite tricky for .Va and .Vt.  I guess the following
> algorithm would work, but i don't want to put such complicated
> stuff into this reorg diff, so i'm going to do that later,
> in another diff:
>
>   * When .Vt is a block, treat the last word as .Vt, the rest as .Va.
>   * When .Vt is an element, treat it as just .Vt.
>   * Treat the last word of .Va as .Va, the rest as .Vt.
>
> Alternatively, maybe a bit safer:
>
>   * Always save all of .Vt as .Vt.
>   * When .Vt is a block, additionally save the last word as .Va.
>   * Always save all of .Va as .Va.
>   * When .Va has more than one word, additionally save all but the
>     last word as .Vt.
>
> Anyway, as i said, that's for a later diff.
>
> OK for this one?

Hi Ingo,

I like this, and the code has my ok.  I haven't looked it over 
carefully, but am alright with the direction.

On a different note, I'm beginning to worry a little about overloading 
the DB with dupes (int, const, char, etc.).  In short, the btree is 
growing and growing.  An option is to stuff a vector of each type/recno 
into the btree value instead of having a single pair and use R_DUP. 
I'll run some tests and see if this makes a difference: it'll reduce the 
size of the tree for sure, but popular keys might overrun the internal 
page sizes and hit performance.  I just don't know without measurements, 
but it's something to think about.

Regarding this patch... you know what I'm going to say... More docs!

Thanks,

Kristaps
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2011-12-07  1:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 15:52 Ingo Schwarze
2011-11-20 17:10 ` Ingo Schwarze
2011-12-05 23:02   ` Ingo Schwarze
2011-12-07  1:00     ` Kristaps Dzonsons [this message]

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=4EDEBAA8.703@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).