From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Fix: was checking HEAD for arguments.
Date: Fri, 2 Jul 2010 09:12:47 -0400 (EDT) [thread overview]
Message-ID: <201007021312.o62DClhd014360@krisdoz.my.domain> (raw)
Log Message:
-----------
Fix: was checking HEAD for arguments.
Modified Files:
--------------
mdocml:
mdoc_validate.c
Revision Data
-------------
Index: mdoc_validate.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_validate.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -Lmdoc_validate.c -Lmdoc_validate.c -u -p -r1.105 -r1.106
--- mdoc_validate.c
+++ mdoc_validate.c
@@ -957,6 +957,8 @@ post_bf(POST_ARGS)
}
np = mdoc->last;
+ assert(MDOC_BLOCK == np->parent->type);
+ assert(MDOC_Bf == np->parent->tok);
np->data.Bf = mandoc_calloc(1, sizeof(struct mdoc_bf));
/*
@@ -964,16 +966,16 @@ post_bf(POST_ARGS)
* If neither is specified, let it through with a warning.
*/
- if (np->args && np->child) {
+ if (np->parent->args && np->child) {
mdoc_nmsg(mdoc, np, MANDOCERR_SYNTARGVCOUNT);
return(0);
- } else if (NULL == np->args && NULL == np->child)
+ } else if (NULL == np->parent->args && NULL == np->child)
return(mdoc_nmsg(mdoc, np, MANDOCERR_FONTTYPE));
/* Extract argument into data. */
- if (np->args) {
- arg = np->args->argv[0].arg;
+ if (np->parent->args) {
+ arg = np->parent->args->argv[0].arg;
if (MDOC_Emphasis == arg)
np->data.Bf->font = FONT_Em;
else if (MDOC_Literal == arg)
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2010-07-02 13:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201007021312.o62DClhd014360@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@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).