source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: texi2mdoc: If "@node Top" is missing, assume the document starts at
Date: Tue, 13 Nov 2018 05:19:46 -0500 (EST)	[thread overview]
Message-ID: <381d10c9a17ef8ad@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2018-11-13 10:19 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=381d10c9a17ef8ad@fantadrom.bsd.lv \
    --to=schwarze@mandoc.bsd.lv \
    --cc=source@mandoc.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).