Re: [PATCH] lint-man.mk: Use a pipeline instead of the groff(1) wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ralph,

On 8/28/22 10:36, Ralph Corderoy wrote:
Hi Alejandro,

+DEFAULT_EQNFLAGS := -Tutf8
...
+DEFAULT_TROFFFLAGS   += -Tutf8

I'd have a variable set to ‘utf8’ to ease changing to another output
device.

Done; thanks! And as I said in another thread, I changed it back to ascii, since I noticed a problem with boxed tables (actually several).

I noticed another issue: for some reason, the boxed tables are being generated wider than the terminal, exactly by one char. If I specify -rLL=80, the right edge of the box is placed at column 81; if I specify LL to be 72, the right edge of the box is at col 73.

See the example below (I tweaked it to use 64 chars to overcome Thunderbird issues):


$ tbl man3/err.3 \
  | eqn -Tascii \
  | troff -man -t -M ./etc/groff/tmac -m checkstyle -rCHECKSTYLE=3 \
          -ww -Tascii -rLL=64n \
  | grotty -c \
  | col -b -x \
  | (! grep -n '.\{64\}.')
21:       noreturn void verr(int eval, const char *fmt, va_list args);
22:       noreturn void verrx(int eval, const char *fmt, va_list args);
51:       +-----------------------+---------------+----------------+
52:       |Interface              | Attribute     | Value          |
53:       +-----------------------+---------------+----------------+
54:       |err(), errx(), warn(), | Thread safety | MT-Safe locale |
55:       |warnx(), verr(),       |               |                |
56:       |verrx(), vwarn(),      |               |                |
57:       |vwarnx()               |               |                |
58:       +-----------------------+---------------+----------------+


Do you know how I can fix that?



-	$(GROFF) $(GROFFFLAGS) $< \
+	$(TBL) <$< \

You've ditched passing the filename, instead using standard input.
This prevents the filename being passed through the pipeline which will
presumably result in poorer messages.

     $ tbl /etc/passwd | grep '^\.'
     .if !\n(.g .ab GNU tbl requires GNU troff.
     .if !dTS .ds TS
     .if !dTE .ds TE
  →  .lf 1 /etc/passwd
     $


Fixed too.

Cheers,

Alex
--
Alejandro Colomar
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux