Issue with man -M

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with man -M

Andreas Kusalananda Kähäri-4
I have man-pages-posix-2013ap0 installed on my up-to-date
OpenBSD/amd64-current machines and have the alias

        alias pman='man -M /usr/local/share/doc/posix/man'

in my shell.

This currently does not work as expected (and unfortunately I don't
quite know when it stopped working):

$ pman ls
assertion "tag_files->tfs == NULL" failed: file "/usr/src/usr.bin/mandoc/main.c", line 1254, function "spawn_pager"

$ man -M /usr/local/share/doc/posix/man ls
assertion "tag_files->tfs == NULL" failed: file "/usr/src/usr.bin/mandoc/main.c", line 1254, function "spawn_pager"

Viewing ordinary manuals works as expected.  My pager is less.

The manuals in the man-pages-posix-2013ap0 package are installed as
pre-formatted text documents in the various cat* sudirectories of
/usr/local/share/doc/posix/man.

It's not that I'm actually using the POSIX manuals very often (they are
quite out of date), but since man -M started failing for them I thought
I'd mention it.

--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.

Reply | Threaded
Open this post in threaded view
|

Re: Issue with man -M

Ingo Schwarze
Hi Andreas,

Andreas Kusalananda Kahari wrote on Thu, Mar 19, 2020 at 11:00:12AM +0100:

> $ man -M /usr/local/share/doc/posix/man ls
> assertion "tag_files->tfs == NULL" failed:
> file "/usr/src/usr.bin/mandoc/main.c", line 1254, function "spawn_pager"

Ouch.
Fixed with the following commit.

> It's not that I'm actually using the POSIX manuals very often (they are
> quite out of date),

How so?  2008 was the latest release.  After that, there were only
Technical Corrigenda, which usually change very little in how
commands and functions are supposed to work, if anything at all.

> but since man -M started failing for them I thought
> I'd mention it.

Absolutely.
Sorry for the oversight, and thanks for pointing it out.

Yours,
  Ingo


Log Message:
-----------
The tag file always needs to be closed before starting the pager,
even when no output formatter was allocated because all pages
shown were preformatted.  Regression in previous reported
by <Andreas dot Kahari at abc dot se> on bugs@.

Modified Files:
--------------
    mandoc:
        main.c

Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/main.c,v
retrieving revision 1.345
retrieving revision 1.346
diff -Lmain.c -Lmain.c -u -p -r1.345 -r1.346
--- main.c
+++ main.c
@@ -609,6 +609,8 @@ main(int argc, char *argv[])
  (void)fchdir(startdir);
  close(startdir);
  }
+ if (outst.outtype <= OUTT_UTF8)
+ term_tag_finish();
  if (outst.outdata != NULL) {
  switch (outst.outtype) {
  case OUTT_HTML:
@@ -617,7 +619,6 @@ main(int argc, char *argv[])
  case OUTT_UTF8:
  case OUTT_LOCALE:
  case OUTT_ASCII:
- term_tag_finish();
  ascii_free(outst.outdata);
  break;
  case OUTT_PDF:

Reply | Threaded
Open this post in threaded view
|

Re: Issue with man -M

Andreas Kusalananda Kähäri-4
This is just to confirm that using man -M for pre-formatted "cat"
manuals now works as expected in later snapshots.  Thanks!


On Thu, Mar 19, 2020 at 01:29:14PM +0100, Ingo Schwarze wrote:

> Hi Andreas,
>
> Andreas Kusalananda Kahari wrote on Thu, Mar 19, 2020 at 11:00:12AM +0100:
>
> > $ man -M /usr/local/share/doc/posix/man ls
> > assertion "tag_files->tfs == NULL" failed:
> > file "/usr/src/usr.bin/mandoc/main.c", line 1254, function "spawn_pager"
>
> Ouch.
> Fixed with the following commit.
>
> > It's not that I'm actually using the POSIX manuals very often (they are
> > quite out of date),
>
> How so?  2008 was the latest release.  After that, there were only
> Technical Corrigenda, which usually change very little in how
> commands and functions are supposed to work, if anything at all.
>
> > but since man -M started failing for them I thought
> > I'd mention it.
>
> Absolutely.
> Sorry for the oversight, and thanks for pointing it out.
>
> Yours,
>   Ingo
>
>
> Log Message:
> -----------
> The tag file always needs to be closed before starting the pager,
> even when no output formatter was allocated because all pages
> shown were preformatted.  Regression in previous reported
> by <Andreas dot Kahari at abc dot se> on bugs@.
>
> Modified Files:
> --------------
>     mandoc:
>         main.c
>
> Revision Data
> -------------
> Index: main.c
> ===================================================================
> RCS file: /home/cvs/mandoc/mandoc/main.c,v
> retrieving revision 1.345
> retrieving revision 1.346
> diff -Lmain.c -Lmain.c -u -p -r1.345 -r1.346
> --- main.c
> +++ main.c
> @@ -609,6 +609,8 @@ main(int argc, char *argv[])
>   (void)fchdir(startdir);
>   close(startdir);
>   }
> + if (outst.outtype <= OUTT_UTF8)
> + term_tag_finish();
>   if (outst.outdata != NULL) {
>   switch (outst.outtype) {
>   case OUTT_HTML:
> @@ -617,7 +619,6 @@ main(int argc, char *argv[])
>   case OUTT_UTF8:
>   case OUTT_LOCALE:
>   case OUTT_ASCII:
> - term_tag_finish();
>   ascii_free(outst.outdata);
>   break;
>   case OUTT_PDF:

--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden

.