source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* texi2mdoc: If "@node Top" is missing, assume the document starts at
@ 2018-11-13 10:19 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-11-13 10:19 UTC (permalink / raw)
  To: source

Log Message:
-----------
If "@node Top" is missing, assume the document starts at "@top".
For example, this occurs in ffmpeg(1).
Issue reported and workaround proposed
by Michael Forney <mforney at mforney dot org>.

Modified Files:
--------------
    texi2mdoc:
        main.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/texi2mdoc/main.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -Lmain.c -Lmain.c -u -p -r1.72 -r1.73
--- main.c
+++ main.c
@@ -1988,6 +1988,13 @@ dosection(struct texi *p, enum texicmd c
 	switch (cmd) {
 	case (TEXICMD_TOP):
 		sec = 0;
+		if (p->nodesz)
+			break;
+		texiwarn(p, "@node Top is missing, assuming it implicitly");
+		p->nodesz++;
+		p->ign--;
+		p->nodecur = texicache(p, "Top", 3);
+		teximdocopen(p, pos);
 		break;
 	case (TEXICMD_APPENDIX):
 	case (TEXICMD_CHAPTER):
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-13 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-13 10:19 texi2mdoc: If "@node Top" is missing, assume the document starts at 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).