From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: basic support for -Tman .In; OpenBSD rev.
Date: Sat, 7 Jul 2012 16:36:18 -0400 (EDT) [thread overview]
Message-ID: <201207072036.q67KaIZD004948@krisdoz.my.domain> (raw)
Log Message:
-----------
basic support for -Tman .In; OpenBSD rev. 1.12
Modified Files:
--------------
mdocml:
mdoc_man.c
Revision Data
-------------
Index: mdoc_man.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_man.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lmdoc_man.c -Lmdoc_man.c -u -p -r1.14 -r1.15
--- mdoc_man.c
+++ mdoc_man.c
@@ -53,6 +53,7 @@ static void post_bd(DECL_ARGS);
static void post_bk(DECL_ARGS);
static void post_dl(DECL_ARGS);
static void post_enc(DECL_ARGS);
+static void post_in(DECL_ARGS);
static void post_lb(DECL_ARGS);
static void post_nm(DECL_ARGS);
static void post_percent(DECL_ARGS);
@@ -66,6 +67,7 @@ static int pre_br(DECL_ARGS);
static int pre_bx(DECL_ARGS);
static int pre_dl(DECL_ARGS);
static int pre_enc(DECL_ARGS);
+static int pre_in(DECL_ARGS);
static int pre_it(DECL_ARGS);
static int pre_nm(DECL_ARGS);
static int pre_ns(DECL_ARGS);
@@ -111,7 +113,7 @@ static const struct manact manacts[MDOC_
{ NULL, NULL, NULL, NULL, NULL }, /* _Fn */
{ NULL, NULL, NULL, NULL, NULL }, /* _Ft */
{ NULL, pre_enc, post_enc, "\\fB", "\\fP" }, /* Ic */
- { NULL, NULL, NULL, NULL, NULL }, /* _In */
+ { NULL, pre_in, post_in, NULL, NULL }, /* In */
{ NULL, pre_enc, post_enc, "\\fR", "\\fP" }, /* Li */
{ cond_head, pre_enc, NULL, "\\- ", NULL }, /* Nd */
{ NULL, pre_nm, post_nm, NULL, NULL }, /* Nm */
@@ -583,6 +585,35 @@ post_dl(DECL_ARGS)
mm->need_nl = 1;
print_word(mm, ".RE");
mm->need_nl = 1;
+}
+
+static int
+pre_in(DECL_ARGS)
+{
+
+ if (MDOC_SYNPRETTY & n->flags) {
+ mm->need_nl = 1;
+ print_word(mm, ".br");
+ mm->need_nl = 1;
+ print_word(mm, "\\fB#include <");
+ } else
+ print_word(mm, "<\\fI");
+ mm->need_space = 0;
+ return(1);
+}
+
+static void
+post_in(DECL_ARGS)
+{
+
+ mm->need_space = 0;
+ if (MDOC_SYNPRETTY & n->flags) {
+ print_word(mm, ">\\fP");
+ mm->need_nl = 1;
+ print_word(mm, ".br");
+ mm->need_nl = 1;
+ } else
+ print_word(mm, "\\fP>");
}
static int
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2012-07-07 20:36 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=201207072036.q67KaIZD004948@krisdoz.my.domain \
--to=schwarze@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).