source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Add MAN_TAIL, which will be used by `UE' (forthcoming) and needs
Date: Wed, 23 Mar 2011 08:33:01 -0400 (EDT)	[thread overview]
Message-ID: <201103231233.p2NCX10T021772@krisdoz.my.domain> (raw)

Log Message:
-----------
Add MAN_TAIL, which will be used by `UE' (forthcoming) and needs to be
used for `RE'.

Modified Files:
--------------
    mdocml:
        libman.h
        man.c
        man.h
        tree.c

Revision Data
-------------
Index: man.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.h,v
retrieving revision 1.57
retrieving revision 1.58
diff -Lman.h -Lman.h -u -p -r1.57 -r1.58
--- man.h
+++ man.h
@@ -61,6 +61,7 @@ enum	man_type {
 	MAN_BLOCK,
 	MAN_HEAD,
 	MAN_BODY,
+	MAN_TAIL,
 	MAN_TBL,
 	MAN_EQN
 };
@@ -89,6 +90,7 @@ struct	man_node {
 	enum man_type	 type; /* AST node type */
 	char		*string; /* TEXT node argument */
 	struct man_node	*head; /* BLOCK node HEAD ptr */
+	struct man_node *tail; /* BLOCK node TAIL ptr */
 	struct man_node	*body; /* BLOCK node BODY ptr */
 	const struct tbl_span *span; /* TBL */
 	const struct eqn *eqn; /* EQN */
Index: man.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -Lman.c -Lman.c -u -p -r1.105 -r1.106
--- man.c
+++ man.c
@@ -203,6 +203,10 @@ man_node_append(struct man *man, struct 
 		assert(MAN_BLOCK == p->parent->type);
 		p->parent->head = p;
 		break;
+	case (MAN_TAIL):
+		assert(MAN_BLOCK == p->parent->type);
+		p->parent->tail = p;
+		break;
 	case (MAN_BODY):
 		assert(MAN_BLOCK == p->parent->type);
 		p->parent->body = p;
@@ -253,6 +257,19 @@ man_elem_alloc(struct man *m, int line, 
 	struct man_node *p;
 
 	p = man_node_alloc(m, line, pos, MAN_ELEM, tok);
+	if ( ! man_node_append(m, p))
+		return(0);
+	m->next = MAN_NEXT_CHILD;
+	return(1);
+}
+
+
+int
+man_tail_alloc(struct man *m, int line, int pos, enum mant tok)
+{
+	struct man_node *p;
+
+	p = man_node_alloc(m, line, pos, MAN_TAIL, tok);
 	if ( ! man_node_append(m, p))
 		return(0);
 	m->next = MAN_NEXT_CHILD;
Index: libman.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/libman.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -Llibman.h -Llibman.h -u -p -r1.48 -r1.49
--- libman.h
+++ libman.h
@@ -67,6 +67,7 @@ __BEGIN_DECLS
 int		  man_word_alloc(struct man *, int, int, const char *);
 int		  man_block_alloc(struct man *, int, int, enum mant);
 int		  man_head_alloc(struct man *, int, int, enum mant);
+int		  man_tail_alloc(struct man *, int, int, enum mant);
 int		  man_body_alloc(struct man *, int, int, enum mant);
 int		  man_elem_alloc(struct man *, int, int, enum mant);
 void		  man_node_delete(struct man *, struct man_node *);
Index: tree.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/tree.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -Ltree.c -Ltree.c -u -p -r1.36 -r1.37
--- tree.c
+++ tree.c
@@ -201,6 +201,9 @@ print_man(const struct man_node *n, int 
 	case (MAN_BODY):
 		t = "block-body";
 		break;
+	case (MAN_TAIL):
+		t = "block-tail";
+		break;
 	case (MAN_TBL):
 		t = "tbl";
 		break;
@@ -223,6 +226,8 @@ print_man(const struct man_node *n, int 
 	case (MAN_BLOCK):
 		/* FALLTHROUGH */
 	case (MAN_HEAD):
+		/* FALLTHROUGH */
+	case (MAN_TAIL):
 		/* FALLTHROUGH */
 	case (MAN_BODY):
 		p = man_macronames[n->tok];
--
 To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv

                 reply	other threads:[~2011-03-23 12:33 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=201103231233.p2NCX10T021772@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).