Skip to contentSkip to conversation

drop spurious t comment header

PATCH In review Mike Frysinger 6 participants 11 messages Jul 23, 2020 – Nov 6, 2022 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drop spurious t comment header

From: Mike Frysinger <[email protected]>

A bunch of pages have this random comment at the start of its header, but most do not. Just trim it everywhere.

---
 man2/fcntl.2          | 1 -
 man2/lseek.2          | 1 -
 man2/mq_getsetattr.2  | 1 -
 man2/sgetmask.2       | 1 -
 man2/sigaction.2      | 1 -
 man2/sigaltstack.2    | 1 -
 man2/socket.2         | 1 -
 man2/stat.2           | 1 -
 man2/statx.2          | 1 -
 man2/syslog.2         | 1 -
 man3/aio_init.3       | 1 -
 man3/dladdr.3         | 1 -
 man3/dlinfo.3         | 1 -
 man3/duplocale.3      | 1 -
 man3/inet_net_pton.3  | 1 -
 man3/isfdtype.3       | 1 -
 man3/mallinfo.3       | 1 -
 man3/malloc_stats.3   | 1 -
 man3/malloc_trim.3    | 1 -
 man3/mallopt.3        | 1 -
 man3/matherr.3        | 1 -
 man3/mq_close.3       | 1 -
 man3/mq_getattr.3     | 1 -
 man3/mq_notify.3      | 1 -
 man3/mq_open.3        | 1 -
 man3/mq_receive.3     | 1 -
 man3/mq_send.3        | 1 -
 man3/mq_unlink.3      | 1 -
 man3/pthread_atfork.3 | 1 -
 man3/sem_close.3      | 1 -
 man3/sem_destroy.3    | 1 -
 man3/sem_getvalue.3   | 1 -
 man3/sem_init.3       | 1 -
 man3/sem_open.3       | 1 -
 man3/sem_post.3       | 1 -
 man3/sem_unlink.3     | 1 -
 man3/sem_wait.3       | 1 -
 man3/sigset.3         | 1 -
 man3/sigvec.3         | 1 -
 man3/uselocale.3      | 1 -
 man4/console_codes.4  | 1 -
 man4/dsp56k.4         | 1 -
 man4/fd.4             | 1 -
 man4/lp.4             | 1 -
 man4/mouse.4          | 1 -
 man7/aio.7            | 1 -
 man7/arp.7            | 1 -
 man7/ascii.7          | 1 -
 man7/inode.7          | 1 -
 man7/inotify.7        | 1 -
 man7/ip.7             | 1 -
 man7/mq_overview.7    | 1 -
 man7/netdevice.7      | 1 -
 man7/netlink.7        | 1 -
 man7/pthreads.7       | 1 -
 man7/raw.7            | 1 -
 man7/rtnetlink.7      | 1 -
 man7/sem_overview.7   | 1 -
 man7/shm_overview.7   | 1 -
 man7/signal.7         | 1 -
 man7/socket.7         | 1 -
 man7/units.7          | 1 -
 62 files changed, 62 deletions(-)
man2/fcntl.2 +0 -1
index 8a7e189b2e57..e2765dc1bca8 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This manpage is Copyright (C) 1992 Drew Eckhardt;
 .\" and Copyright (C) 1993 Michael Haardt, Ian Jackson;
 .\" and Copyright (C) 1998 Jamie Lokier;
man2/lseek.2 +0 -1
index 22de446fc231..adef7be82f36 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1980, 1991 Regents of the University of California.
 .\" and Copyright (c) 2011, Michael Kerrisk <[email protected]>
 .\" All rights reserved.
man2/mq_getsetattr.2 +0 -1
index d3ad25bf3e43..cc595d6de82b 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man2/sgetmask.2 +0 -1
index dc69454cf05c..20944d82201f 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2007 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man2/sigaction.2 +0 -1
index 21d8b15b394e..c10421835bcf 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1994,1995 Mike Battersby <[email protected]>
 .\" and Copyright 2004, 2005 Michael Kerrisk <[email protected]>
 .\" based on work by [email protected]
man2/sigaltstack.2 +0 -1
index b01f55864392..72e1c071ecbd 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2001, 2017 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man2/socket.2 +0 -1
index 7908f4fc8fee..d3df14a28154 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1983, 1991 The Regents of the University of California.
 .\" All rights reserved.
 .\"
man2/stat.2 +0 -1
index 395b60845837..b67bc7023b67 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1992 Drew Eckhardt ([email protected]), March 28, 1992
 .\" Parts Copyright (c) 1995 Nicolai Langfeldt ([email protected]), 1/1/95
 .\" and Copyright (c) 2006, 2007, 2014 Michael Kerrisk <[email protected]>
man2/statx.2 +0 -1
index fc4cd6761906..57607f6d81c6 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2017 David Howells <[email protected]>
 .\"
 .\" Derived from the stat.2 manual page:
man2/syslog.2 +0 -1
index c6479e6decf2..bca93c56037e 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 1995 Andries Brouwer ([email protected])
 .\" and Copyright (C) 2012, 2014 Michael Kerrisk <[email protected]>
 .\"
man3/aio_init.3 +0 -1
index 8d176b4b20d7..9c0af4e72793 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2010 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/dladdr.3 +0 -1
index e5c96d231a6a..7dd27c76ef2f 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2015 Michael Kerrisk <[email protected]>
 .\" and Copyright (C) 2008 Petr Baudis <[email protected]> (dladdr caveat)
 .\"
man3/dlinfo.3 +0 -1
index 4c3c8aa79de0..91dedba86cf6 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2015 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/duplocale.3 +0 -1
index 68df7c185786..ebedbc95acc0 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2014 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/inet_net_pton.3 +0 -1
index f30bc5e9065d..00f94b9d47a3 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2014 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/isfdtype.3 +0 -1
index 746c9839f7cb..6d9059b61fd6 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2014 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mallinfo.3 +0 -1
index f29b7fb14251..ceb62d365a3a 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2012 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/malloc_stats.3 +0 -1
index c7954c3ba2a3..0feaf8edb51f 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2012 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/malloc_trim.3 +0 -1
index 62b7a980bef5..5d1691474232 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2012 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mallopt.3 +0 -1
index 28d6e6f774ea..ccf5ac363d47 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2012 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/matherr.3 +0 -1
index 931499c2c78c..d9778aaefbed 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
 .\"     <[email protected]>
 .\"
man3/mq_close.3 +0 -1
index 27da985aaf08..6692c47aec49 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_getattr.3 +0 -1
index 7713164722d6..04bd1d9af8a0 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_notify.3 +0 -1
index debad2184c87..85cff527d029 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_open.3 +0 -1
index b6ba4cd48faa..852653b6ca17 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_receive.3 +0 -1
index d78ed5dcfe3b..cba72cbad4fe 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_send.3 +0 -1
index 2650f7974b03..7dc90493556e 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/mq_unlink.3 +0 -1
index 77756dd5ad98..d6588bcf42a7 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/pthread_atfork.3 +0 -1
index ac517d0f3958..76a261724258 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2017 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_close.3 +0 -1
index c1c36bdea5ca..671a082a58f0 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_destroy.3 +0 -1
index 650a3c88a2e5..eefc37a48b6a 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_getvalue.3 +0 -1
index d7962033a38d..bde0c9764c8d 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_init.3 +0 -1
index 723e572a1044..7334ce0239e0 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_open.3 +0 -1
index 62e004919e2c..ceb4493f69fa 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_post.3 +0 -1
index 69b970b7c522..adbffd516af3 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_unlink.3 +0 -1
index 63705495e2b4..419a6c422e39 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sem_wait.3 +0 -1
index ccd63141956d..335fb675659b 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sigset.3 +0 -1
index afe3747cb2d3..4e57d3b97134 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2005 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/sigvec.3 +0 -1
index 0b8021d5ecaa..583ebae6a3b5 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2005 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man3/uselocale.3 +0 -1
index 8f39125802ca..36f76888b81d 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2014 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man4/console_codes.4 +0 -1
index be34a0d91132..2958d6221f96 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1996 Andries Brouwer <[email protected]>, Mon Oct 31 22:13:04 1996
 .\"
 .\" %%%LICENSE_START(GPLv2+_DOC_ONEPARA)
man4/dsp56k.4 +0 -1
index 68a4b925ff96..a87e0d2c5be5 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2000 lars brinkhoff <[email protected]>
 .\"
 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
man4/fd.4 +0 -1
index f882aae75f9a..1c3f99a2a192 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1993 Michael Haardt ([email protected])
 .\" and 1994,1995 Alain Knaff ([email protected])
 .\"
man4/lp.4 +0 -1
index 9460feebb5e2..06b211994f21 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) Michael Haardt ([email protected]),
 .\"     Sun Jan 15 19:16:33 1995
 .\"
man4/mouse.4 +0 -1
index 1805c2935397..38de9c139abb 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This manpage is Copyright (C) 1996 Michael Haardt.
 .\" Updates Nov 1998, Andries Brouwer
 .\"
man7/aio.7 +0 -1
index f44ea7197f41..a23b4f74cd8b 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2010 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man7/arp.7 +0 -1
index e21dd5a4ec04..f8b0d11c0c73 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Matthew Wilcox <[email protected]>.
 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
 .\" Permission is granted to distribute possibly modified copies
man7/ascii.7 +0 -1
index 11b311f9d42c..2f66e17e53cb 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1993 Michael Haardt ([email protected])
 .\"
 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
man7/inode.7 +0 -1
index 86d35af5a84f..e0a619569670 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2017 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man7/inotify.7 +0 -1
index 90a46bb0e93c..e60d9c82b6f8 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006, 2014 Michael Kerrisk <[email protected]>
 .\" Copyright (C) 2014 Heinrich Schuchardt <[email protected]>
 .\"
man7/ip.7 +0 -1
index 7757a6b4e3c4..c522b219c988 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Andi Kleen <[email protected]>.
 .\"
 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
man7/mq_overview.7 +0 -1
index 6fa63f41bae4..fc229fbde215 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man7/netdevice.7 +0 -1
index 2100ca68e1a9..947167a849af 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Andi Kleen <[email protected]>.
 .\"
 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
man7/netlink.7 +0 -1
index 3c1eacf1d49e..8b6b01b4d0be 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (c) 1998 by Andi Kleen.
 .\"
 .\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
man7/pthreads.7 +0 -1
index c91106d8cbd2..e470d8a59c94 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 2005 by Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man7/raw.7 +0 -1
index 779437b668d6..e11b4c0614a3 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Andi Kleen <[email protected]>.
 .\"
 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
man7/rtnetlink.7 +0 -1
index 7d6e6563ba9a..8671d360ee64 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Andi Kleen <[email protected]>.
 .\"
 .\" %%%LICENSE_START(VERBATIM_ONE_PARA)
man7/sem_overview.7 +0 -1
index fa90d160eb0a..97ccf144c9b1 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2006 Michael Kerrisk <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
man7/shm_overview.7 +0 -1
index 3afdeb41aff2..49bef6da382b 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2008, Linux Foundation, written by Michael Kerrisk
 .\" <[email protected]>
 .\"
man7/signal.7 +0 -1
index 6973a238459a..97af1d33e11c 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (c) 1993 by Thomas Koenig ([email protected])
 .\" and Copyright (c) 2002, 2006 by Michael Kerrisk <[email protected]>
 .\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
man7/socket.7 +0 -1
index 5c28120c7d35..ab364784f3d1 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" This man page is Copyright (C) 1999 Andi Kleen <[email protected]>.
 .\" and copyright (c) 1999 Matthew Wilcox.
 .\"
man7/units.7 +0 -1
index e2191a310a9a..705d15b748ba 100644
@@ -1,4 +1,3 @@
-'\" t
 .\" Copyright (C) 2001 Andries Brouwer <[email protected]>
 .\"
 .\" %%%LICENSE_START(VERBATIM)
Signature · 1 line
2.26.2
#1 lore raw
Quoted 4 lines · Mike Frysinger

From: Mike Frysinger <[email protected]>

A bunch of pages have this random comment at the start of its header, but most do not. Just trim it everywhere.

It's pretty misleading to call it "random"; it is a hint to the man program to preprocess the man page text through tbl.

This is documented in subsection "Interaction with preprocessors" of groff_man(5).

The patch itself might be fine; the first couple of pages it alters indeed use no tables, according to the check I ran:

	grep -l '^\.\s*TS' man[1-8]/*

...but the comment is certainly not meaningless noise, which is what "random" suggests, and I would not characterize the change this in a commit message.

Regards,
Branden

#2 lore raw

Hi Branden, Mike,

Quoted 8 lines · G. Branden Robinson
Quoted 4 lines · Mike Frysinger

From: Mike Frysinger <[email protected]>

A bunch of pages have this random comment at the start of its header, but most do not. Just trim it everywhere.

It's pretty misleading to call it "random";

(True.)

Quoted 2 lines

it is a hint to the man
program to preprocess the man page text through tbl.

Yes, that's my understanding. But I believe that these days it's no longer needed(?). tbl(1) just gets used as needed, regardless of the presence of the 't' comment, right?

Quoted 10 lines

This is documented in subsection "Interaction with preprocessors" of groff_man(5).

The patch itself might be fine; the first couple of pages it alters indeed use no tables, according to the check I ran:

        grep -l '^\.\s*TS' man[1-8]/*

...but the comment is certainly not meaningless noise, which is what "random" suggests, and I would not characterize the change this in a commit message.

See my comments above. For 15 years or at least, I've not paid any attention to adding the 't' comments when I added tables to pages, and I do recall anyone reporting ill effects. So, I'm inclined to apply Mike's patch, but will hold off a moment, in case there's other feedback.

Cheers,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#3 lore raw
Quoted 8 lines · Michael Kerrisk (man-pages)
Quoted 2 lines · G. Branden Robinson

it is a hint to the man
program to preprocess the man page text through tbl.

Yes, that's my understanding. But I believe that these days it's no longer needed(?). tbl(1) just gets used as needed, regardless of the presence of the 't' comment, right?

[A few "strace -f -e execve"s later...]

Hmm, for the man-db man(1) in Debian bullseye (testing), at least, this is true! And checking its own man page, it looks like it was true as far back as April 2001 (the horizon of its Git history).

I guess there are so many man pages that embed tables without including the hint that the man-db maintainers decided not to leave the comment to chance. The only other man-like program I know if in anything like wide use on Linux systems is mandoc, which does all its own parsing and doesn't depend on a *roff at all.

Retaining an accurate comment would be a kindness to other man implementations I'm not aware of and to weirdos like me who run groff directly because we develop it (though admittedly, even for us, there is the crutch of grog(1)). But I'll grant--these populations may be small.

Quoted 5 lines

See my comments above. For 15 years or at least, I've not paid any attention to adding the 't' comments when I added tables to pages, and I do recall anyone reporting ill effects. So, I'm inclined to apply Mike's patch, but will hold off a moment, in case there's other feedback.

Sounds fair.

Regards,
Branden

#4 lore raw

Hi Branden, Mike,

Quoted 12 lines · G. Branden Robinson
Quoted 8 lines · Michael Kerrisk (man-pages)
Quoted 2 lines · G. Branden Robinson

it is a hint to the man
program to preprocess the man page text through tbl.

Yes, that's my understanding. But I believe that these days it's no longer needed(?). tbl(1) just gets used as needed, regardless of the presence of the 't' comment, right?

[A few "strace -f -e execve"s later...]

Quoted 7 lines

Hmm, for the man-db man(1) in Debian bullseye (testing), at least, this is true! And checking its own man page, it looks like it was true as far back as April 2001 (the horizon of its Git history).

I guess there are so many man pages that embed tables without including the hint that the man-db maintainers decided not to leave the comment to chance.

That would be my guess.

Quoted 8 lines

The only other man-like program I know if in anything like wide use on Linux systems is mandoc, which does all its own parsing and doesn't depend on a *roff at all.

Retaining an accurate comment would be a kindness to other man implementations I'm not aware of and to weirdos like me who run groff directly because we develop it (though admittedly, even for us, there is the crutch of grog(1)). But I'll grant--these populations may be small.

Yes, and in any case, the man-pages pages are already widely omitting this comment.

Quoted 7 lines
Quoted 5 lines

See my comments above. For 15 years or at least, I've not paid any attention to adding the 't' comments when I added tables to pages, and I do recall anyone reporting ill effects. So, I'm inclined to apply Mike's patch, but will hold off a moment, in case there's other feedback.

Sounds fair.

Branden, thanks for your detailed analysis.

Mike, I've applied the patch, but completely rewrote the commit message, as below.

Cheers,

Michael

==

Various pages: Drop t comment header

Historically, a comment of the following form at the top of a manual page was used to indicate too man(1) that the use of tbl(1) was required in order to process tables:

    '\" t

However, at least as far back as 2001 (according to Branden), man-db's man(1) automatically uses tbl(1) as needed, rendering this comment unnecessary. And indeed many existing pages in man-pages that have tables don't have this comment at the top of the file. So, drop the comment from those files where it is present.

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#5 lore raw

Hi Michael,

I think I noticed one typo in your description text (and I also see it in git):

Quoted 2 lines · Michael Kerrisk (man-pages)

Historically, a comment of the following form at the top of a manual page was used to indicate too man(1) that the use of tbl(1)

s/too man/to man?

Quoted 8 lines

was required in order to process tables:

    '\" t

--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

#6 lore raw

Hi Stefan,

Quoted 11 lines · Stefan Puiu

Hi Michael,

I think I noticed one typo in your description text (and I also see it in git):

Quoted 2 lines · Michael Kerrisk (man-pages)

Historically, a comment of the following form at the top of a manual page was used to indicate too man(1) that the use of tbl(1)

s/too man/to man?

Yes, I spotted it too, but too late...

Thanks,

Michael

Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
#7 lore raw
In reply to Michael Kerrisk (man-pages)

* Michael Kerrisk <[email protected]>, 2020-07-24 12:13:

Quoted 1 line

For 15 years or at least, I've not paid any attention to adding the 't' comments when I added tables to pages, and I do recall anyone reporting ill effects. So, I'm inclined to apply Mike's patch, but will hold off a moment, in case there's other feedback.

I'm a bit late, but...

Lintian, the Debian package checker, sets the MANROFFSEQ environment variable to empty string as a speed optimization. This turns off loading preprocessors that weren't explicitly declared in the source. The lack of '\" comments can cause false positives (and maybe also false negatives?) in Lintian.

The use of $MANROFFSEQ for Lintian was proposed here: https://bugs.debian.org/677874

Beware that the man(1) man page does not correctly explain what $MANROFFSEQ does: https://bugs.debian.org/971009

Signature · 1 line
Jakub Wilk
#8 lore raw

Hi Jakub,

Quoted 10 lines · Jakub Wilk

* Michael Kerrisk <[email protected]>, 2020-07-24 12:13:

Quoted 1 line

For 15 years or at least, I've not paid any attention to adding the 't' comments when I added tables to pages, and I do recall anyone reporting ill effects. So, I'm inclined to apply Mike's patch, but will hold off a moment, in case there's other feedback.

I'm a bit late, but...

Lintian, the Debian package checker, sets the MANROFFSEQ environment variable to empty string as a speed optimization. This turns off loading preprocessors that weren't explicitly declared in the source. The lack of '\" comments can cause false positives (and maybe also false negatives?) in Lintian.

The use of $MANROFFSEQ for Lintian was proposed here: https://bugs.debian.org/677874

Beware that the man(1) man page does not correctly explain what $MANROFFSEQ does: https://bugs.debian.org/971009

If we can have a test that makes sure the comment is accurate, I wouldn't mind reintroducing it. If you would like to add a lint-* target that tests pages to check that they have the comment iff they need it, I'll accept it.

I guess that may be asking too much work. Maybe showing how to reliably test it for a page would be enough (I could transform it into a Makefile test). I can think of a small sh(1) script that could do it, but is there any tool that already does it?

Cheers,

Alex

Signature · 2 lines
Alejandro Colomar
<http://www.alejandro-colomar.es/>
#9 lore raw

* Alejandro Colomar <[email protected]>, 2022-08-20 01:50:

Quoted 9 lines
Quoted 5 lines

Lintian, the Debian package checker, sets the MANROFFSEQ environment variable to empty string as a speed optimization. This turns off loading preprocessors that weren't explicitly declared in the source. The lack of '\" comments can cause false positives (and maybe also false negatives?) in Lintian.

The use of $MANROFFSEQ for Lintian was proposed here: https://bugs.debian.org/677874

Beware that the man(1) man page does not correctly explain what $MANROFFSEQ does: https://bugs.debian.org/971009

If we can have a test that makes sure the comment is accurate, I wouldn't mind reintroducing it. If you would like to add a lint-* target that tests pages to check that they have the comment iff they need it, I'll accept it.

I guess that may be asking too much work. Maybe showing how to reliably test it for a page would be enough (I could transform it into a Makefile test). I can think of a small sh(1) script that could do it, but is there any tool that already does it?

I'm not aware of anything like that, so I hacked up a script that runs man twice, with and without empty MANROFFSEQ, and compares the results. See the attachment.

It looks like in our case all the missing preprocessor declarations can be added with this:

    grep -l -x '^[.]TS$' man*/* | sort -u | xargs sed -i -e "1i'\\\\\" t"
Signature · 1 line
Jakub Wilk

#!/bin/sh
set -e -u
if [ $# -eq 0 ]
then

	printf 'Usage: %s FILE [FILE...]\n' "$0" >&2
	exit 1
fi
for file
do
	m1=$(sed -e 's/^[.]so .*//' "$file" | env -u MANROFFSEQ man -l -)
	m2=$(sed -e 's/^[.]so .*//' "$file" | env MANROFFSEQ='' man -l -)
	if [ "$m1" != "$m2" ]
	then
		printf '%s\n' "$file"
	fi

done

#10 lore raw

Hi Jakub!

Quoted 9 lines · Jakub Wilk

* Alejandro Colomar <[email protected]>, 2022-08-20 01:50:

Quoted 8 lines
Quoted 5 lines

Lintian, the Debian package checker, sets the MANROFFSEQ environment variable to empty string as a speed optimization. This turns off loading preprocessors that weren't explicitly declared in the source. The lack of '\" comments can cause false positives (and maybe also false negatives?) in Lintian.

The use of $MANROFFSEQ for Lintian was proposed here: https://bugs.debian.org/677874

Beware that the man(1) man page does not correctly explain what $MANROFFSEQ does: https://bugs.debian.org/971009

If we can have a test that makes sure the comment is accurate, I wouldn't mind reintroducing it.  If you would like to add a lint-* target that tests pages to check that they have the comment iff they need it, I'll accept it.

Quoted 7 lines
Quoted 1 line

I guess that may be asking too much work.  Maybe showing how to reliably test it for a page would be enough (I could transform it into a Makefile test).  I can think of a small sh(1) script that could do it, but is there any tool that already does it?

I'm not aware of anything like that, so I hacked up a script that runs man twice, with and without empty MANROFFSEQ, and compares the results. See the attachment.

It looks like in our case all the missing preprocessor declarations can be added with this:

    grep -l -x '^[.]TS$' man*/* | sort -u | xargs sed -i -e "1i'\\\\\" t"

Hmm, great!

For adding it to the makefiles so it can lint future pages if they add or remove some tables, I'll add something like:

foo: bar

	! grep '^\.TS$$' $< >/dev/null || head -n1 $< | grep '\\" t$$'>/dev/null
	! head -n1 $< | grep '\\" t$$' >/dev/null || grep '^\.TS$$' $<>/dev/null

I.e., if we find .TS, we better find \" t, and if we find \" t, we better find .TS.

Does it look good to you?

Thanks,

Alex

Signature · 1 line
<http://www.alejandro-colomar.es/>