From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from acme.spoerlein.net (acme.spoerlein.net [188.72.220.29]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o59GYm3b027962 for ; Wed, 9 Jun 2010 12:34:49 -0400 (EDT) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o59GYm3q064245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 9 Jun 2010 18:34:48 +0200 (CEST) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1276101288; bh=we5Avs+PB8dDlBjpifP5iHIocF5DIUWz221eVzDpiHE=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Transfer-Encoding; b=gOFXS8S3anWUP0dfn7ahGQ1HCCOgBzQKTElNgGgPIiGooD4oNwjsO9ZQPvscEs2J/ yMHdbzpshSxYZ/kOfIrQ2TJeu7WHtnjVMb8ol+BDpILJz4D8SYZcB9VaT8TGSwhTZW +cfW9vQF/tBK4fxPyPGVn9hwZT8hq+6UEKIVRQu0= Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o59GYmWv064244 for tech@mdocml.bsd.lv; Wed, 9 Jun 2010 18:34:48 +0200 (CEST) (envelope-from uqs@spoerlein.net) Date: Wed, 9 Jun 2010 18:34:47 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: tech@mdocml.bsd.lv Subject: Reducing uname footer string on FreeBSD Message-ID: <20100609163447.GA39829@acme.spoerlein.net> X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="65ImJOski3p8EhYV" Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.20 (2009-06-14) --65ImJOski3p8EhYV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --65ImJOski3p8EhYV Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="uname.diff" Content-Transfer-Encoding: 8bit commit 7b6298d198c875c7d5036f0a8ad81c4a0ea194f9 Author: Ulrich Spörlein 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); --65ImJOski3p8EhYV Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="lib.diff" Content-Transfer-Encoding: 8bit commit 72c92d22c4c7f5aace5b58a1ced761e32c48eee8 Author: Ulrich Spörlein 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)") --65ImJOski3p8EhYV-- -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv