* mdocml: no need to skip content before first section header
@ 2014-07-07 15:03 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2014-07-07 15:03 UTC (permalink / raw)
To: source
Log Message:
-----------
no need to skip content before first section header
Modified Files:
--------------
mdocml:
mandoc.h
mdoc.c
mdoc_term.c
read.c
Revision Data
-------------
Index: mdoc_term.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v
retrieving revision 1.270
retrieving revision 1.271
diff -Lmdoc_term.c -Lmdoc_term.c -u -p -r1.270 -r1.271
--- mdoc_term.c
+++ mdoc_term.c
@@ -275,8 +275,11 @@ terminal_mdoc(void *arg, const struct md
term_begin(p, print_mdoc_head, print_mdoc_foot, meta);
- if (n->child)
+ if (n->child) {
+ if (MDOC_Sh != n->child->tok)
+ term_vspace(p);
print_mdoc_nodelist(p, NULL, meta, n->child);
+ }
term_end(p);
}
Index: mdoc.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc.c,v
retrieving revision 1.218
retrieving revision 1.219
diff -Lmdoc.c -Lmdoc.c -u -p -r1.218 -r1.219
--- mdoc.c
+++ mdoc.c
@@ -227,13 +227,6 @@ mdoc_addeqn(struct mdoc *mdoc, const str
assert( ! (MDOC_HALT & mdoc->flags));
- /* No text before an initial macro. */
-
- if (SEC_NONE == mdoc->lastnamed) {
- mdoc_pmsg(mdoc, ep->ln, ep->pos, MANDOCERR_NOTEXT);
- return(1);
- }
-
n = node_alloc(mdoc, ep->ln, ep->pos, MDOC_MAX, MDOC_EQN);
n->eqn = ep;
@@ -251,13 +244,6 @@ mdoc_addspan(struct mdoc *mdoc, const st
assert( ! (MDOC_HALT & mdoc->flags));
- /* No text before an initial macro. */
-
- if (SEC_NONE == mdoc->lastnamed) {
- mdoc_pmsg(mdoc, sp->line, 0, MANDOCERR_NOTEXT);
- return(1);
- }
-
n = node_alloc(mdoc, sp->line, 0, MDOC_MAX, MDOC_TBL);
n->span = sp;
@@ -721,13 +707,6 @@ mdoc_ptext(struct mdoc *mdoc, int line,
{
char *c, *ws, *end;
struct mdoc_node *n;
-
- /* No text before an initial macro. */
-
- if (SEC_NONE == mdoc->lastnamed) {
- mdoc_pmsg(mdoc, line, offs, MANDOCERR_NOTEXT);
- return(1);
- }
assert(mdoc->last);
n = mdoc->last;
Index: mandoc.h
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.h,v
retrieving revision 1.138
retrieving revision 1.139
diff -Lmandoc.h -Lmandoc.h -u -p -r1.138 -r1.139
--- mandoc.h
+++ mandoc.h
@@ -139,7 +139,6 @@ enum mandocerr {
MANDOCERR_BADCHAR, /* skipping bad character */
MANDOCERR_NAMESC, /* escaped character not allowed in a name */
MANDOCERR_NONAME, /* manual name not yet set */
- MANDOCERR_NOTEXT, /* skipping text before first section header */
MANDOCERR_MACRO, /* skipping unknown macro */
MANDOCERR_ARGCOUNT, /* argument count wrong */
MANDOCERR_RS_SKIP, /* skipping invalid content in .Rs block: macro */
Index: read.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/read.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -Lread.c -Lread.c -u -p -r1.65 -r1.66
--- read.c
+++ read.c
@@ -183,7 +183,6 @@ static const char * const mandocerrs[MAN
"skipping bad character",
"escaped character not allowed in a name",
"manual name not yet set",
- "skipping text before first section header",
"skipping unknown macro",
"argument count wrong",
"skipping invalid content in .Rs block",
--
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:[~2014-07-07 15:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 15:03 mdocml: no need to skip content before first section header schwarze
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).