[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug or feature?
From: |
Deri James |
Subject: |
Bug or feature? |
Date: |
Wed, 15 Feb 2012 19:51:29 +0000 |
User-agent: |
KMail/1.13.7 (Linux/2.6.38.8-desktop-10.mga; KDE/4.6.5; x86_64; ; ) |
I am unsure whether this is a bug. After you use .asciify the string register
may be truncated if passed as a parameter to a macro. Truncation occurs if the
original string contains either a glyph name '\[...]' or a glyph number
\N'nn'. This code snippet illustrates it:-
.nf
.de show
Pass \\$*
..
.
.de clean
.show Uncleaned = This is \\$* shown
.ev cln
.nf
.box a
\\$*
.fl
.box
.chop a \" remove newline
.asciify a
.show Cleaned = This is \\*[a] shown
Cleaned = This is \\*[a] shown
.tm This is \\*[a] shown
.ev
..
.
.clean Deri \N'76' James
Which should produce:-
Pass Uncleaned = This is Deri L James shown
Pass Cleaned = This is Deri
Cleaned = This is Deri L James shown
The line 'Pass Cleaned" has been truncated where the \N'76' glyph should be,
note that it is not just \\*[a] truncated but the following literal 'shown'
which is missing as well.
The .tm displays "This is Deri James shown".
So it seems it is the parameter passing mechanism which chokes on the glyph in
the string register.
Feature or bug?
Cheers
Deri