tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: mdocml: Churn-ish check-in getting mdoc_parseln() and man_parseln() to
Date: Sun, 27 Jun 2010 18:00:43 +0200	[thread overview]
Message-ID: <4C2775AB.5050909@bsd.lv> (raw)
In-Reply-To: <20100626200900.GC23805@iris.usta.de>

Ingo,

> This must not be const.

Registers should be written only by libroff (they're roff constructs).
It's up to libmdoc and libman if they want to cue the front-ends by
looking at both their internal state and the registers.  This will be
apparent by the next commit that implements the cue for SYNOPSIS formatting.

> .Sh SYNOPSIS implies .nr nS 1,
> any other .Sh implies .nr nS 0.
> 
> Apart from that, it might be possible to get your approach working.
> The decisive point will be implementing the frontend cues.

That'll be in the next patch.  I'm committing a big fat clean-up right
now that stuffs regset into struct mdoc/man/roff, because it must reach
deep into the system and I'm tired of changing function prototypes.

> The nice thing about my patch is that the backend and the frontend
> can use identical roff_reg_(get|set)* functions, so some functions
> can be shared between mdoc_validate and mdoc_term.

True, but I don't want the front-ends looking at raw registers.

In general, the compilers should tell the front-ends exactly what to do
with flags and cached data: I want dumb front-ends in terms of semantics.

> With your approach, you must be careful to not implement the same
> thing twice, once in the backend using the roff register data
> structure, then the same logic in the frontend using a different
> cues data structure.
> 
> So, i shall not merge this yet, but wait how it goes.  :)

Thanks for the comments!  Keep an eye peeled.

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

  reply	other threads:[~2010-06-27 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201006261536.o5QFacau021968@krisdoz.my.domain>
2010-06-26 20:09 ` Ingo Schwarze
2010-06-27 16:00   ` Kristaps Dzonsons [this message]
2010-06-27 16:07     ` Ingo Schwarze
2010-06-27 16:27       ` Kristaps Dzonsons
2010-06-27 16:15     ` Kristaps Dzonsons

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=4C2775AB.5050909@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).