source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: Bugfix: When after a \\, \t, or \a, another \t or \a had to be
Date: Wed, 19 Dec 2018 22:41:57 -0500 (EST)	[thread overview]
Message-ID: <05f63f07768f8195@fantadrom.bsd.lv> (raw)

Log Message:
-----------
Bugfix:
When after a \\, \t, or \a, another \t or \a had to be resolved 
in copy mode within the same argument, the argument got corrupted.
Found while working on a loosely related bug report
from Fabio Scotoni <fabio at esse dot ch>.

Modified Files:
--------------
    mandoc:
        roff.c
    mandoc/regress/char/space:
        esct-man.in
        esct-man.out_ascii
        esct-man.out_lint

Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/roff.c,v
retrieving revision 1.353
retrieving revision 1.354
diff -Lroff.c -Lroff.c -u -p -r1.353 -r1.354
--- roff.c
+++ roff.c
@@ -1588,7 +1588,7 @@ mandoc_getarg(char **cpp, int ln, int *p
 			switch (cp[1]) {
 			case 'a':
 			case 't':
-				cp[0] = '\t';
+				cp[-pairs] = '\t';
 				/* FALLTHROUGH */
 			case '\\':
 				pairs++;
Index: esct-man.out_lint
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/char/space/esct-man.out_lint,v
retrieving revision 1.5
retrieving revision 1.6
diff -Lregress/char/space/esct-man.out_lint -Lregress/char/space/esct-man.out_lint -u -p -r1.5 -r1.6
--- regress/char/space/esct-man.out_lint
+++ regress/char/space/esct-man.out_lint
@@ -4,3 +4,5 @@ mandoc: esct-man.in:14:8: WARNING: tab i
 mandoc: esct-man.in:34:11: WARNING: tab in filled text
 mandoc: esct-man.in:36:11: WARNING: tab in filled text
 mandoc: esct-man.in:44:10: WARNING: tab in filled text
+mandoc: esct-man.in:49:10: WARNING: tab in filled text
+mandoc: esct-man.in:49:11: WARNING: tab in filled text
Index: esct-man.in
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/char/space/esct-man.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -Lregress/char/space/esct-man.in -Lregress/char/space/esct-man.in -u -p -r1.3 -r1.4
--- regress/char/space/esct-man.in
+++ regress/char/space/esct-man.in
@@ -1,5 +1,5 @@
-.\" $OpenBSD: esct-man.in,v 1.2 2017/07/04 14:53:23 schwarze Exp $
-.TH SPACE-ESCT-MAN 1 "December 15, 2018"
+.\" $OpenBSD: esct-man.in,v 1.4 2018/12/20 03:38:10 schwarze Exp $
+.TH SPACE-ESCT-MAN 1 "December 20, 2018"
 .SH NAME
 SPACE-T-MAN \- the t escape sequence in pages with man macros
 .SH DESCRIPTION
@@ -45,3 +45,5 @@ After font macros:
 .\" XXX not implemented
 .\" .br
 .\" .B single\aleader
+.br
+.B double\t\ttab
Index: esct-man.out_ascii
===================================================================
RCS file: /home/cvs/mandoc/mandoc/regress/char/space/esct-man.out_ascii,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/char/space/esct-man.out_ascii -Lregress/char/space/esct-man.out_ascii -u -p -r1.2 -r1.3
--- regress/char/space/esct-man.out_ascii
+++ regress/char/space/esct-man.out_ascii
@@ -34,7 +34,8 @@ D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
 
        After font macros:
        s\bsi\bin\bng\bgl\ble\be    t\bta\bab\bb
+       d\bdo\bou\bub\bbl\ble\be         t\bta\bab\bb
 
 
 
-OpenBSD                        December 15, 2018             SPACE-ESCT-MAN(1)
+OpenBSD                        December 20, 2018             SPACE-ESCT-MAN(1)
--
 To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv

                 reply	other threads:[~2018-12-20  3:41 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=05f63f07768f8195@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).