* mdocml: Fix two TODOs with one check-in.
@ 2011-06-18 17:58 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2011-06-18 17:58 UTC (permalink / raw)
To: source
Log Message:
-----------
Fix two TODOs with one check-in. Both of these relate to vertical space
before paragraphs and/or within `RS' blocks.
Modified Files:
--------------
mdocml:
TODO
man_html.c
man_term.c
Revision Data
-------------
Index: man_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_term.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -Lman_term.c -Lman_term.c -u -p -r1.110 -r1.111
--- man_term.c
+++ man_term.c
@@ -198,26 +198,30 @@ a2width(const struct termp *p, const cha
return((int)term_hspan(p, &su));
}
-
+/*
+ * Printing leading vertical space before a block.
+ * This is used for the paragraph macros.
+ * The rules are pretty simple, since there's very little nesting going
+ * on here. Basically, if we're the first within another block (SS/SH),
+ * then don't emit vertical space. If we are (RS), then do. If not the
+ * first, print it.
+ */
static void
print_bvspace(struct termp *p, const struct man_node *n)
{
- term_newln(p);
-
- if (n->body && n->body->child && MAN_TBL == n->body->child->type)
- return;
- if (NULL == n->prev)
- return;
+ term_newln(p);
- if (MAN_SS == n->prev->tok)
- return;
- if (MAN_SH == n->prev->tok)
- return;
+ if (n->body && n->body->child)
+ if (MAN_TBL == n->body->child->type)
+ return;
+
+ if (MAN_ROOT == n->parent->type || MAN_RS != n->parent->tok)
+ if (NULL == n->prev)
+ return;
term_vspace(p);
}
-
/* ARGSUSED */
static int
Index: man_html.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_html.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -Lman_html.c -Lman_html.c -u -p -r1.72 -r1.73
--- man_html.c
+++ man_html.c
@@ -135,7 +135,6 @@ html_man(void *arg, const struct man *m)
printf("\n");
}
-
static void
print_man(MAN_ARGS)
{
Index: TODO
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/TODO,v
retrieving revision 1.112
retrieving revision 1.113
diff -LTODO -LTODO -u -p -r1.112 -r1.113
--- TODO
+++ TODO
@@ -278,33 +278,12 @@
see for example named-checkconf(8).
- In man(7), the sequence
- regular text
- .RS
- .IP
- should have a blank line between the text and the beginning of the
- indented paragraph, see for example sudo(1).
-
-- In man(7), the sequence
.SH HEADER
<blank line>
.PP
regular text
should not produce any blank lines between the header and the text,
see for example rsync(1).
- Reported by naddy@ Mon, 28 Mar 2011 20:45:42 +0200
-
-- In man(7), the sequence
- regular text
- .PP
- .RS
- indented text
- should produce one blank line between the regular and indented texts,
- see for example rsync(1), and
- .RE
- <blank line>
- .PP
- .RS
- should produce two,not one blank lines.
Reported by naddy@ Mon, 28 Mar 2011 20:45:42 +0200
- In man(7), the sequence
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-18 17:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-18 17:58 mdocml: Fix two TODOs with one check-in kristaps
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).