[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] What does the "-u" in ".tmac-u" mean?
From: |
Ingo Schwarze |
Subject: |
Re: [Groff] What does the "-u" in ".tmac-u" mean? |
Date: |
Thu, 2 Nov 2017 15:24:58 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
Hi Branden,
Werner LEMBERG wrote on Thu, Nov 02, 2017 at 08:09:48AM +0100:
> Branden Robinson wrote:
>> Does anyone know the reason for the following convention?
>>
>> $ find -name "*.tmac-*"
>> ./contrib/hdtbl/hdmisc.tmac-u
>> ./contrib/hdtbl/hdtbl.tmac-u
>> ./contrib/mom/om.tmac-u
>> ./tmac/e.tmac-u
>> ./tmac/doc.tmac-u
>> ./tmac/doc-old.tmac-u
> If my memory serves me well, the `u' stands for `uncompressed', i.e.,
> without comments and indentation removed.
Exactly the other way round: uncompressed = *with* comments and
with blank lines and with indentation.
> Bertrand removed the functionality to install stripped tmac files,
> IIRC -
I don't see any evidence for that, i think he did not.
For example, the file tmac/doc.tmac-u in git contains:
..
.
.
.\" NS doc-print-and-reset macro
.\" NS finish input line and clean up argument vectors
.
.de doc-print-and-reset
. if \n[doc-space-mode] \
. nop \)
. doc-reset-args
..
.
.
By contrast, the installed file /usr/local/share/groff/1.22.3/tmac/doc.tmac
contains:
..
.de print-and-reset
.if \n[space-mode] \
.nop \)
.reset-args
..
> computers are much faster today, so this is (probably?) no longer
> needed.
While that may be true (i never measured performance), be careful
if you want to clean it up. The script tmac/strip.sed also manipulates
mdoc(7) internal macro names:
s/\([^/]\)doc-/\1/g
The file tmac.am says:
$(TMACMDOCFILES) $(TMACSTRIPFILES):
$(MKDIR_P) $(top_builddir)/tmac
for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u > \
$(top_builddir)/$$f; \
done
All that said, i do consider such munging quite ugly. It harms
maintainability, reduces readability of installed macros, hinders
debugging, and provokes mistakes of various kinds.
Yours,
Ingo
- Re: [Groff] What does the "-u" in ".tmac-u" mean?, (continued)
- Re: [groff] [Groff] What does the "-u" in ".tmac-u" mean?, Larry Kollar, 2017/11/11
- Re: [groff] [Groff] What does the "-u" in ".tmac-u" mean?, Ted Harding, 2017/11/12
- Re: [groff] What does the "-u" in ".tmac-u" mean?, Ralph Corderoy, 2017/11/12
- Re: [groff] What does the "-u" in ".tmac-u" mean?, G. Branden Robinson, 2017/11/12
- Re: [groff] What does the "-u" in ".tmac-u" mean?, Ingo Schwarze, 2017/11/13
- Re: [groff] What does the "-u" in ".tmac-u" mean?, Ralph Corderoy, 2017/11/13
- Re: [Groff] What does the "-u" in ".tmac-u" mean?, Bjarni Ingi Gislason, 2017/11/05
Re: [Groff] What does the "-u" in ".tmac-u" mean?,
Ingo Schwarze <=
Re: [Groff] What does the "-u" in ".tmac-u" mean?, hj.oertel, 2017/11/05