tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: Re: tweak message "scope open on exit"
Date: Sun, 26 Sep 2010 15:14:33 +0200	[thread overview]
Message-ID: <20100926131433.GA3502@iris.usta.de> (raw)
In-Reply-To: <4C9F0EA1.3080302@bsd.lv>

Hi Kristaps,

Kristaps Dzonsons wrote on Sun, Sep 26, 2010 at 11:13:05AM +0200:
> Ingo Schwarze wrote:

>> in mdoc(7), if an explicit scope is still open at the end of an input
>> file, that's FATAL.  I really don't see why, it's trivial to just
>> close out the block and proceed to rendering the file.
>>
>> On the other hand, in man(7), if an explicit scope is still open at
>> the end of an input file, that's merely a WARNING.  I regard that
>> as dangerous, because an unclosed block probably means that either:
[...]
>>
>> As i see it, that's a typical case of a non-fatal ERROR:
>> We can render, but probably infomation is missing or the
>> structure is seriously mangled.
>>
>> Besides, why not use the same error type for mdoc(7) and man(7)?
>>
>> And finally, since we do know that the error is non-fatal,
>> there is no need to check the return value of the msg function.

> Ingo, this looks good.  At first I dithered for a while about
> returning 0 to mdoc_endparse(), but because the error is non-fatal,
> your reasoning is sound and I agree.

Right, that is the good news about mdoc_nmsg() and friends,
basically about all messaging functions based on main.c, function
mmsg():  These functions now cannot fail any more, and we know
the return value beforehand, so in the long run, we can drop
all the return value tests and finally make mmsg() void.
That will shorten much of the code and make it easier on the eye.

I don't see the pressing need for big churn right now and rather
plan to simplify what needs to be touched anyway, as we go.

> Can you fix up the WARNING->ERROR logic in libman, too?

I don't think anything more needs to be done, in particular
i can't think of anything to change in man*.c.
As far as i understand, just moving the entry in the lists
in mandoc.h and main.c does the trick for man.

Or am i missing anything?

Yours,
  Ingo
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

      reply	other threads:[~2010-09-26 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 22:54 Ingo Schwarze
2010-09-26  9:13 ` Kristaps Dzonsons
2010-09-26 13:14   ` Ingo Schwarze [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=20100926131433.GA3502@iris.usta.de \
    --to=schwarze@usta.de \
    --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).