source@mandoc.bsd.lv
 help / color / mirror / Atom feed
* mandoc: Bugfix: When after a \\, \t, or \a, another \t or \a had to be
@ 2018-12-20  3:41 schwarze
  0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-12-20  3:41 UTC (permalink / raw)
  To: source

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

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

only message in thread, other threads:[~2018-12-20  3:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-20  3:41 mandoc: Bugfix: When after a \\, \t, or \a, another \t or \a had to be 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).