tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Kristaps Dzonsons <kristaps@bsd.lv>
To: tech@mdocml.bsd.lv, Jason McIntyre <jmc@cava.myzen.co.uk>
Subject: "Default" statement coming first in manuals.
Date: Sun, 25 Dec 2011 20:08:46 +0200	[thread overview]
Message-ID: <4EF766AE.8080807@bsd.lv> (raw)

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

Hi,

Some time ago, schwarze@ modified mandocdb(8) to put default usage 
before command-line options.  I liked this, and in this patch do the 
same with all other utilities.

Look ok?

Kristaps

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 5798 bytes --]

Index: apropos.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/apropos.1,v
retrieving revision 1.15
diff -u -r1.15 apropos.1
--- apropos.1	25 Dec 2011 16:53:51 -0000	1.15
+++ apropos.1	25 Dec 2011 18:08:15 -0000
@@ -36,6 +36,20 @@
 evaluating on
 .Ar expression
 for each file in each database.
+.Pp
+By default,
+.Nm
+searches for
+.Xr mandocdb 8
+databases in the default paths stipulated by
+.Xr man 1 ,
+parses terms as case-sensitive regular expressions
+.Pq the Li \&~ operator
+over manual names and descriptions
+.Pq the Li \&Nm No and Li \&Nd No macro keys .
+Multiple terms imply pairwise
+.Fl o .
+.Pp
 Its arguments are as follows:
 .Bl -tag -width Ds
 .It Fl C Ar file
@@ -126,18 +140,6 @@
 Has no effect on substring terms.
 .El
 .Pp
-By default,
-.Nm
-searches for
-.Xr mandocdb 8
-databases in the default paths stipulated by
-.Xr man 1 ,
-parses terms as case-sensitive regular expressions
-.Pq the Li \&~ operator
-over manual names and descriptions
-.Pq the Li \&Nm No and Li \&Nd No macro keys .
-Multiple terms imply pairwise
-.Fl o .
 Results are sorted by manual title, with output formatted as
 .Pp
 .D1 title(sec) \- description
Index: catman.8
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/catman.8,v
retrieving revision 1.4
diff -u -r1.4 catman.8
--- catman.8	24 Dec 2011 22:37:16 -0000	1.4
+++ catman.8	25 Dec 2011 18:08:15 -0000
@@ -32,6 +32,16 @@
 .Nm
 utility updates cached manpages for a jailed
 .Xr man.cgi 7 .
+.Pp
+By default,
+.Nm
+searches for
+.Xr mandocdb 8
+databases in the default paths stipulated by
+.Xr man 1
+and updates the cache in
+.Pa /var/www/cache/man.cgi .
+.Pp
 Its arguments are as follows:
 .Bl -tag -width Ds
 .It Fl f
@@ -61,22 +71,12 @@
 .Ar path .
 .El
 .Pp
-By default,
-.Nm
-searches for
-.Xr mandocdb 8
-databases in the default paths stipulated by
-.Xr man 1
-and updates the cache in
-.Pa /var/www/cache/man.cgi .
-.Pp
-An update occurs when a
+Cache updates occur when a
 .Xr mandocdb 8
-database is older than the cached copy.
-Cached manual pages are only updated if older than the master copy.
-If
+database is older than the cached copy unless
 .Fl f
-is specified, all files are updated.
+is specified, in which case files are always considered out of date.
+Cached manual pages are only updated if older than the master copy.
 .Sh ENVIRONMENT
 .Bl -tag -width Ds
 .It Ev MANPATH
Index: demandoc.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/demandoc.1,v
retrieving revision 1.5
diff -u -r1.5 demandoc.1
--- demandoc.1	2 Sep 2011 13:04:05 -0000	1.5
+++ demandoc.1	25 Dec 2011 18:08:15 -0000
@@ -33,6 +33,13 @@
 .Xr man 7
 .Ux
 manual files.
+.Pp
+By default,
+.Nm
+parses standard input and outputs only text nodes, preserving line
+and column position.
+Escape sequences are omitted from the output.
+.Pp
 Its arguments are as follows:
 .Bl -tag -width Ds
 .It Fl w
@@ -49,18 +56,7 @@
 The input files.
 .El
 .Pp
-If
-.Ar file
-is not provided,
-.Nm
-accepts standard input.
 If a document is not well-formed, it is skipped.
-.Pp
-By default,
-.Nm
-parses its input and outputs only text nodes, preserving line column
-position.
-Escape sequences are omitted from the output.
 .Pp
 The
 .Fl i ,
Index: mandoc.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.1,v
retrieving revision 1.99
diff -u -r1.99 mandoc.1
--- mandoc.1	13 Nov 2011 14:50:54 -0000	1.99
+++ mandoc.1	25 Dec 2011 18:08:16 -0000
@@ -34,6 +34,19 @@
 utility formats
 .Ux
 manual pages for display.
+.Pp
+By default,
+.Nm
+reads
+.Xr mdoc 7
+or
+.Xr man 7
+text from stdin, implying
+.Fl m Ns Cm andoc ,
+and produces
+.Fl T Ns Cm ascii
+output.
+.Pp
 The arguments are as follows:
 .Bl -tag -width Ds
 .It Fl m Ns Ar format
@@ -96,18 +109,6 @@
 .Nm
 will halt with the first failed parse.
 .El
-.Pp
-By default,
-.Nm
-reads
-.Xr mdoc 7
-or
-.Xr man 7
-text from stdin, implying
-.Fl m Ns Cm andoc ,
-and produces
-.Fl T Ns Cm ascii
-output.
 .Ss Input Formats
 The
 .Nm
Index: preconv.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/preconv.1,v
retrieving revision 1.5
diff -u -r1.5 preconv.1
--- preconv.1	18 Aug 2011 08:58:44 -0000	1.5
+++ preconv.1	25 Dec 2011 18:08:16 -0000
@@ -38,6 +38,11 @@
 escape sequence
 .Pc
 input.
+.Pp
+By default, it parses from standard output, determining encoding as
+described in
+.Sx Algorithm .
+.Pp
 Its arguments are as follows:
 .Bl -tag -width Ds
 .It Fl D Ar enc
@@ -47,15 +52,6 @@
 .It Ar file
 The input file.
 .El
-.Pp
-If
-.Ar file
-is not provided,
-.Nm
-accepts standard input.
-See
-.Sx Algorithm
-for encoding choice.
 .Pp
 The recoded input is written to standard output: Unicode characters in
 the ASCII range are printed as regular ASCII characters, while those
Index: whatis.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/whatis.1,v
retrieving revision 1.6
diff -u -r1.6 whatis.1
--- whatis.1	25 Dec 2011 16:53:51 -0000	1.6
+++ whatis.1	25 Dec 2011 18:08:16 -0000
@@ -41,6 +41,13 @@
 .Xr man 1
 command to get more information.
 .Pp
+By default,
+.Nm
+searches for
+.Xr mandocdb 8
+databases in the default paths stipulated by
+.Xr man 1 .
+.Pp
 The options are as follows:
 .Bl -tag -width Ds
 .It Fl C Ar file
@@ -72,12 +79,6 @@
 for a listing of manual sections.
 .El
 .Pp
-By default,
-.Nm
-searches for
-.Xr mandocdb 8
-databases in the default paths stipulated by
-.Xr man 1 .
 Results are sorted by manual title, with output formatted as
 .Pp
 .D1 title(sec) \- description

                 reply	other threads:[~2011-12-25 18:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4EF766AE.8080807@bsd.lv \
    --to=kristaps@bsd.lv \
    --cc=jmc@cava.myzen.co.uk \
    --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).