tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv
Subject: Re: [PATCH] rudimentary .ds support
Date: Sat, 03 Jul 2010 14:00:18 +0200	[thread overview]
Message-ID: <4C2F2652.2090403@bsd.lv> (raw)
In-Reply-To: <20100703063933.GE6026@iris.usta.de>

> a couple of manuals use the roff .ds instruction and the roff \s
> escape function.  Here is a rudimentary implementation, just to
> get the contents of the manuals right for now.
> 
> I'm aware of the following deficiencies:
> 
>  * mandoc is just taking the string manually, while groff
>    is still interpreting it in some way.
>    For strings without special characters, this makes no difference.
>  * Quoted string parsing in roff_ds() is not correct,
>    but a quick hack.
>  * Using a singly linked list for the string table is fine for
>    small numbers of user-defined strings, which is currently our
>    typical use case.  In the long run, we probably want some
>    hash table or tree structure.
>  * String inclusion comes too late in term.c, function res().
>    This will use the last string defined in the file, not the one
>    defined at the right point of the file.
>  * I deliberately use the user user-defined strings only when no
>    predefined strings are available, while groff allows to override
>    predefined strings.  As long as this feature is still rather
>    sloppily implemented, this limits the potential breakage.
>  * HTML rendering is missing (but trivial).
> 
> These aspects can be improved later.
> For now, it is important to move on as quickly as possible
> and fix as many bugs relevant for the system build as possible.
> Not much time is left until the 4.8 release lock.
> 
> For examples of manuals fixed by this patch, see terminfo(3),
> in particular the .Xr to terminfo(5) below SEE ALSO, and
> mdoc.samples(7), using the included patch.
> 
> OK to commit?
> (Of course, i would then remove the debugging print statements
> in roff_freestr.)

Ingo,

I see the utility of this, but would like the functions accessed through 
regs.h, either within struct regset itself or as its own structure with 
setters and getters.  This is just a mechanical change, of course.  In 
general, roff.h should not propogate into libmdoc or libman; they are 
distinct namespaces.  regs.h is poorly-named, in this regard, but that 
can be switched later.

Other than that, it looks fine.  Needs bits in html.c (I can do this, if 
you don't want to muck around in there) and roff.3 (including the 
current short-comings).

Thanks,

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

  reply	other threads:[~2010-07-03 12:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-03  6:39 Ingo Schwarze
2010-07-03 12:00 ` Kristaps Dzonsons [this message]
2010-07-03 15:55   ` 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=4C2F2652.2090403@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).