[Top][All Lists]

[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

  .de print-and-reset
  .if \n[space-mode] \
  .nop \)

> 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:


The file says:

        $(MKDIR_P) $(top_builddir)/tmac
        for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
                sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u > \
                    $(top_builddir)/$$f; \

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]