* mdocml: let \l use the right fill character
@ 2017-06-14 18:23 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-06-14 18:23 UTC (permalink / raw)
To: source
Log Message:
-----------
let \l use the right fill character
Modified Files:
--------------
mdocml:
out.c
term.c
mdocml/regress/roff/esc:
Makefile
Added Files:
-----------
mdocml/regress/roff/esc:
l.in
l.out_ascii
l.out_lint
Revision Data
-------------
Index: term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/term.c,v
retrieving revision 1.271
retrieving revision 1.272
diff -Lterm.c -Lterm.c -u -p -r1.271 -r1.272
--- term.c
+++ term.c
@@ -547,7 +547,7 @@ term_word(struct termp *p, const char *w
}
continue;
case ESCAPE_HLINE:
- if ((seq = a2roffsu(seq, &su, SCALE_EM)) == NULL)
+ if ((cp = a2roffsu(seq, &su, SCALE_EM)) == NULL)
continue;
uc = term_hen(p, &su);
if (uc <= 0) {
@@ -556,10 +556,10 @@ term_word(struct termp *p, const char *w
lsz = p->tcol->rmargin - p->tcol->offset;
} else
lsz = uc;
- if (*seq == '\0')
+ if (*cp == seq[-1])
uc = -1;
- else if (*seq == '\\') {
- seq++;
+ else if (*cp == '\\') {
+ seq = cp + 1;
esc = mandoc_escape(&seq, &cp, &sz);
switch (esc) {
case ESCAPE_UNICODE:
@@ -576,7 +576,7 @@ term_word(struct termp *p, const char *w
break;
}
} else
- uc = *seq;
+ uc = *cp;
if (uc < 0x20 || (uc > 0x7E && uc < 0xA0))
uc = '_';
if (p->enc == TERMENC_ASCII) {
Index: out.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/out.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -Lout.c -Lout.c -u -p -r1.67 -r1.68
--- out.c
+++ out.c
@@ -85,10 +85,8 @@ a2roffsu(const char *src, struct roffsu
case 'v':
dst->unit = SCALE_VS;
break;
- case '\0':
- endptr--;
- /* FALLTHROUGH */
default:
+ endptr--;
if (SCALE_MAX == def)
return NULL;
dst->unit = def;
--- /dev/null
+++ regress/roff/esc/l.in
@@ -0,0 +1,22 @@
+.Dd June 14, 2017
+.Dt ESC-L 1
+.Os OpenBSD
+.Sh NAME
+.Nm esc-l
+.Nd the roff escape l sequence: horizontal line
+.Sh DESCRIPTION
+explicit scaling unit and fill char: >\l'2nf'<
+.br
+explicit scaling unit and default char: >\l'3n'<
+.br
+default unit and explicit fill char: >\l'4x'<
+.br
+default unit and char: >\l'5'<
+.br
+explicit scaling unit and escape sequence: >\l'6n\(+-'<
+.br
+default unit and escape char: >\l'7n\(at'<
+.br
+rounding: >\l'0.26ix'<
+.br
+invalid delimiter: >\h-<
Index: Makefile
===================================================================
RCS file: /home/cvs/mdocml/mdocml/regress/roff/esc/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -Lregress/roff/esc/Makefile -Lregress/roff/esc/Makefile -u -p -r1.2 -r1.3
--- regress/roff/esc/Makefile
+++ regress/roff/esc/Makefile
@@ -1,6 +1,6 @@
# $OpenBSD: Makefile,v 1.11 2015/04/29 18:32:57 schwarze Exp $
-REGRESS_TARGETS = one two multi B c c_man e f h o p w z ignore
-LINT_TARGETS = B h w ignore
+REGRESS_TARGETS = one two multi B c c_man e f h l o p w z ignore
+LINT_TARGETS = B h l w ignore
.include <bsd.regress.mk>
--- /dev/null
+++ regress/roff/esc/l.out_lint
@@ -0,0 +1,2 @@
+mandoc: l.in:22:21: WARNING: invalid escape sequence: \h-
+mandoc: l.in:1:5: STYLE: Mdocdate missing: Dd June
--- /dev/null
+++ regress/roff/esc/l.out_ascii
@@ -0,0 +1,16 @@
+ESC-L(1) General Commands Manual ESC-L(1)
+
+N\bNA\bAM\bME\bE
+ e\bes\bsc\bc-\b-l\bl - the roff escape l sequence: horizontal line
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+ explicit scaling unit and fill char: >ff<
+ explicit scaling unit and default char: >___<
+ default unit and explicit fill char: >xxxx<
+ default unit and char: >_____<
+ explicit scaling unit and escape sequence: >+-+-+-<
+ default unit and escape char: >@@@@@@@<
+ rounding: >xxx<
+ invalid delimiter: ><
+
+OpenBSD June 14, 2017 OpenBSD
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-14 18:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-14 18:23 mdocml: let \l use the right fill character 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).