From: Mike Small <smallm@panix.com>
To: discuss@mdocml.bsd.lv
Subject: mandoc -Tps aborts on <sp>\^h\n\n
Date: Wed, 29 May 2013 21:55:59 -0400 [thread overview]
Message-ID: <li6a9ndp6xc.fsf@panix5.panix.com> (raw)
Hi,
Not sure if this is covered under "clean up escape sequence handling" or
another TODO I missed, but I see an abort in mandoc 1.12.1 from
OpenBSD current from around May 3rd if I do the following:
$ mandoc -Tps `man -w roff`
...
509.608 441.221 moveto
(ASCII) show
490.358 425.832 moveto
(characters) show
490.358 410.443 moveto
(with) show
assertion "8 != c" failed: file "/usr/src/usr.bin/mandoc/term_ps.c", line 997, function "ps_letter"
Abort trap (core dumped)
$ man -w roff
/usr/local/man/cat7/roff.0
/usr/share/man/man7/roff.7
So you also get it like this...
$ mandoc -Tps /usr/local/man/cat7/roff.0
The line it had trouble on was this one (line 296 of roff.0):
ASCII characters with \\b\(\b(, font changes with \\b\f\bf, in-line comments with
A minimal test file causing the same assertion...
$ od -cb small_test_file.1
0000000 \ \b x \n \n
040 134 010 170 012 012
0000006
$ mandoc -Tps small_test_file.1
%!PS-Adobe-3.0
%%CreationDate: Wed May 29 21:42:29 2013
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%Pages: (atend)
%%PageOrder: Ascend
%%DocumentMedia: Default 612 790 0 () ()
%%DocumentNeededResources: font Times-Roman Times-Bold Times-Italic
%%EndComments
assertion "8 != c" failed: file "/usr/src/usr.bin/mandoc/term_ps.c", line 997, function "ps_letter"
Abort trap (core dumped)
Or to get a different assertion...
$ od -bc smaller_test_file.1
0000000 134 010 012 012
\ \b \n \n
0000004
$ mandoc -Tps smaller_test_file.1
%!PS-Adobe-3.0
%%CreationDate: Wed May 29 21:41:35 2013
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%Pages: (atend)
%%PageOrder: Ascend
%%DocumentMedia: Default 612 790 0 () ()
%%DocumentNeededResources: font Times-Roman Times-Bold Times-Italic
%%EndComments
assertion "j" failed: file "/usr/src/usr.bin/mandoc/term.c", line 166, function "term_flushln"
Abort trap (core dumped)
I updated mandoc from OpenBSD cvs today (Wed May 29) and see the same symptoms.
--
Mike Small
smallm@panix.com
--
To unsubscribe send an email to discuss+unsubscribe@mdocml.bsd.lv
next reply other threads:[~2013-05-30 1:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 1:55 Mike Small [this message]
2013-05-30 4:13 ` Ingo Schwarze
2013-05-30 12:25 ` Mike Small
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=li6a9ndp6xc.fsf@panix5.panix.com \
--to=smallm@panix.com \
--cc=discuss@mdocml.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).