From: "Ulrich Spörlein" <uqs@spoerlein.net>
To: tech@mdocml.bsd.lv
Subject: Reducing uname footer string on FreeBSD
Date: Wed, 9 Jun 2010 18:34:47 +0200 [thread overview]
Message-ID: <20100609163447.GA39829@acme.spoerlein.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
Hi again,
the FreeBSD groff will only print the following information in the
footer:
% man ls|tail -1
FreeBSD 8.1 April 4, 2008 FreeBSD 8.1
While stock mandoc uses `uname -sr` output which is currently:
% uname -sr
FreeBSD 8.1-PRERELEASE
The attached patch clamps the string after the dash, iff uname reports
we are running on FreeBSD. I don't think such special casing should be
applied in the general source tree, but wanted to put it up for
discussion anyway.
Also, who decides what goes into lib.in and what the official library
string is going to be? Attached you'll also find the current diff I'm
using in my FreeBSD tree. Discuss! :)
Uli
[-- Attachment #2: uname.diff --]
[-- Type: text/x-diff, Size: 766 bytes --]
commit 7b6298d198c875c7d5036f0a8ad81c4a0ea194f9
Author: Ulrich Spörlein <uqs@spoerlein.net>
Date: Mon May 24 16:50:14 2010 +0200
mandoc: cut trailing OS string after first dash
This is to mimick groff behaviour, where only "FreeBSD 8.0" is
displayed in the footer.
diff --git a/contrib/mdocml/mdoc_action.c b/contrib/mdocml/mdoc_action.c
index f27ef13..ddd7cab 100644
--- a/contrib/mdocml/mdoc_action.c
+++ b/contrib/mdocml/mdoc_action.c
@@ -611,6 +611,8 @@ post_os(POST_ARGS)
mdoc_nmsg(m, n, MANDOCERR_MEM);
return(0);
}
+ if (strncmp(utsname.sysname, "FreeBSD", sizeof("FreeBSD")) == 0)
+ strtok(utsname.release, "-");
if (strlcat(buf, utsname.release, BUFSIZ) >= BUFSIZ) {
mdoc_nmsg(m, n, MANDOCERR_MEM);
return(0);
[-- Attachment #3: lib.diff --]
[-- Type: text/x-diff, Size: 5719 bytes --]
commit 72c92d22c4c7f5aace5b58a1ced761e32c48eee8
Author: Ulrich Spörlein <uqs@spoerlein.net>
Date: Tue May 25 11:11:06 2010 +0200
mandoc: add/update library strings from mdoc.local
diff --git a/contrib/mdocml/lib.in b/contrib/mdocml/lib.in
index 86fa55a..10fc05e 100644
--- a/contrib/mdocml/lib.in
+++ b/contrib/mdocml/lib.in
@@ -23,46 +23,72 @@
* Be sure to escape strings.
*/
-LINE("libarchive", "Reading and Writing Streaming Archives Library (libarchive, \\-larchive)")
+LINE("libarchive", "Streaming Archive Library (libarchive, \\-larchive)")
LINE("libarm", "ARM Architecture Library (libarm, \\-larm)")
LINE("libarm32", "ARM32 Architecture Library (libarm32, \\-larm32)")
-LINE("libbluetooth", "Bluetooth Library (libbluetooth, \\-lbluetooth)")
+LINE("libbluetooth", "Bluetooth User Library (libbluetooth, \\-lbluetooth)")
+LINE("libbsm", "Basic Security Module User Library (libbsm, \\-lbsm)")
LINE("libc", "Standard C Library (libc, \\-lc)")
+LINE("libc_r", "Reentrant C\\~Library (libc_r, \\-lc_r)")
+LINE("libcalendar", "Calendar Arithmetic Library (libcalendar, \\-lcalendar)")
+LINE("libcam", "Common Access Method User Library (libcam, \\-lcam)")
LINE("libcdk", "Curses Development Kit Library (libcdk, \\-lcdk)")
+LINE("libcipher", "FreeSec Crypt Library (libcipher, \\-lcipher)")
LINE("libcompat", "Compatibility Library (libcompat, \\-lcompat)")
LINE("libcrypt", "Crypt Library (libcrypt, \\-lcrypt)")
LINE("libcurses", "Curses Library (libcurses, \\-lcurses)")
-LINE("libedit", "Command Line Editor Library (libedit, \\-ledit)")
+LINE("libdevinfo", "Device and Resource Information Utility Library (libdevinfo, \\-ldevinfo)")
+LINE("libdevstat", "Device Statistics Library (libdevstat, \\-ldevstat)")
+LINE("libdisk", "Interface to Slice and Partition Labels Library (libdisk, \\-ldisk)")
+LINE("libedit", "Line Editor and History Library (libedit, \\-ledit)")
+LINE("libefi", "EFI Runtime Services Library (libefi, \\-lefi)")
LINE("libelf", "ELF Parsing Library (libelf, \\-lelf)")
LINE("libevent", "Event Notification Library (libevent, \\-levent)")
-LINE("libfetch", "File Transfer Library for URLs (libfetch, \\-lfetch)")
+LINE("libfetch", "File Transfer Library (libfetch, \\-lfetch)")
LINE("libform", "Curses Form Library (libform, \\-lform)")
+LINE("libgeom", "Userland API Library for kernel GEOM subsystem (libgeom, \\-lgeom)")
+LINE("libgpib", "General-Purpose Instrument Bus (GPIB) library (libgpib, \\-lgpib)")
LINE("libi386", "i386 Architecture Library (libi386, \\-li386)")
LINE("libintl", "Internationalized Message Handling Library (libintl, \\-lintl)")
LINE("libipsec", "IPsec Policy Control Library (libipsec, \\-lipsec)")
+LINE("libipx", "IPX Address Conversion Support Library (libipx, \\-lipx)")
LINE("libiscsi", "iSCSI protocol library (libiscsi, \\-liscsi)")
+LINE("libjail", "Jail Library (libjail, \\-ljail)")
+LINE("libkiconv", "Kernel side iconv library (libkiconv, \\-lkiconv)")
+LINE("libkse", "N:M Threading Library (libkse, \\-lkse)")
LINE("libkvm", "Kernel Data Access Library (libkvm, \\-lkvm)")
LINE("libm", "Math Library (libm, \\-lm)")
LINE("libm68k", "m68k Architecture Library (libm68k, \\-lm68k)")
LINE("libmagic", "Magic Number Recognition Library (libmagic, \\-lmagic)")
+LINE("libmd", "Message Digest (MD4, MD5, etc.) Support Library (libmd, \\-lmd)")
+LINE("libmemstat", "Kernel Memory Allocator Statistics Library (libmemstat, \\-lmemstat)")
LINE("libmenu", "Curses Menu Library (libmenu, \\-lmenu)")
+LINE("libnetgraph", "Netgraph User Library (libnetgraph, \\-lnetgraph)")
LINE("libnetpgp", "Netpgp signing, verification, encryption and decryption (libnetpgp, \\-lnetpgp)")
LINE("libossaudio", "OSS Audio Emulation Library (libossaudio, \\-lossaudio)")
LINE("libpam", "Pluggable Authentication Module Library (libpam, \\-lpam)")
LINE("libpcap", "Capture Library (libpcap, \\-lpcap)")
LINE("libpci", "PCI Bus Access Library (libpci, \\-lpci)")
-LINE("libpmc", "Performance Counters Library (libpmc, \\-lpmc)")
+LINE("libpmc", "Performance Monitoring Counters Interface Library (libpmc, \\-lpmc)")
LINE("libposix", "POSIX Compatibility Library (libposix, \\-lposix)")
LINE("libprop", "Property Container Object Library (libprop, \\-lprop)")
LINE("libpthread", "POSIX Threads Library (libpthread, \\-lpthread)")
LINE("libpuffs", "puffs Convenience Library (libpuffs, \\-lpuffs)")
LINE("librefuse", "File System in Userspace Convenience Library (librefuse, \\-lrefuse)")
LINE("libresolv", "DNS Resolver Library (libresolv, \\-lresolv)")
+LINE("librpcsec_gss", "RPC GSS-API Authentication Library (librpcsec_gss, \\-lrpcsec_gss)")
+LINE("librpcsvc", "RPC Service Library (librpcsvc, \\-lrpcsvc)")
LINE("librt", "POSIX Real\\-time Library (librt, -lrt)")
+LINE("libsdp", "Bluetooth Service Discovery Protocol User Library (libsdp, \\-lsdp)")
LINE("libssp", "Buffer Overflow Protection Library (libssp, \\-lssp)")
LINE("libtermcap", "Termcap Access Library (libtermcap, \\-ltermcap)")
LINE("libterminfo", "Terminal Information Library (libterminfo, \\-lterminfo)")
+LINE("libthr", "1:1 Threading Library (libthr, \\-lthr)")
+LINE("libufs", "UFS File System Access Library (libufs, \\-lufs)")
+LINE("libugidfw", "File System Firewall Interface Library (libugidfw, \\-lugidfw)")
+LINE("libulog", "User Login Record Library (libulog, \\-lulog)")
LINE("libusbhid", "USB Human Interface Devices Library (libusbhid, \\-lusbhid)")
LINE("libutil", "System Utilities Library (libutil, \\-lutil)")
+LINE("libvgl", "Video Graphics Library (libvgl, \\-lvgl)")
LINE("libx86_64", "x86_64 Architecture Library (libx86_64, \\-lx86_64)")
LINE("libz", "Compression Library (libz, \\-lz)")
next reply other threads:[~2010-06-09 16:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-09 16:34 Ulrich Spörlein [this message]
2010-06-12 17:18 ` Ingo Schwarze
2010-06-13 19:32 ` Kristaps Dzonsons
2010-06-14 17:36 ` Ulrich Spörlein
2010-06-13 21:13 ` Joerg Sonnenberger
2010-06-14 17:32 ` Ulrich Spörlein
2010-06-14 19:34 ` Joerg Sonnenberger
2010-06-14 20:22 ` Ulrich Spörlein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100609163447.GA39829@acme.spoerlein.net \
--to=uqs@spoerlein.net \
--cc=tech@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).