]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Upgrade local autoopts templates to 5.11.10pre5
authorHarlan Stenn <stenn@ntp.org>
Fri, 3 Jun 2011 06:55:13 +0000 (02:55 -0400)
committerHarlan Stenn <stenn@ntp.org>
Fri, 3 Jun 2011 06:55:13 +0000 (02:55 -0400)
bk: 4de88551Z9uJow_rYyN6tKuRzbaQSg

ChangeLog
sntp/ag-tpl/agmdoc-cmd.tpl
sntp/ag-tpl/mdoc2man

index d3e79cbe0e248a6f0faea64d3d51914577d0649f..f9630ea3b62924c04385bfe2e3cd4a606986879b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 * Update cmd-doc.tlib to autogen-5.11.10pre5.
+* Upgrade local autoopts templates to 5.11.10pre5.
 (4.2.7p178) 2011/06/02 Released by Harlan Stenn <stenn@ntp.org>
 * Update the std_def_list to include the ntp.lic file.
 * Distribute the ntp.lic file.
index a67c3da81b04afb1ce13d55667358262a48a8d20..5c12e92268795732321c56bc3ef1425577be37a8 100644 (file)
@@ -4,7 +4,7 @@
 
 ## agman-cmd.tpl -- Template for command line mdoc pages
 ##
-## Time-stamp:      "2011-03-04 10:05:17 bkorb"
+## Time-stamp:      "2011-05-24 17:59:40 bkorb"
 ##
 ##  This file is part of AutoOpts, a companion to AutoGen.
 ##  AutoOpts is free software.
@@ -45,9 +45,7 @@ INCLUDE "cmd-doc.tlib"
 .Sh NAME
 .Nm [+: prog-name         :+]
 .Nd [+: prog-title        :+]
-[+:
-
-INVOKE build-doc          :+][+:
+[+: INVOKE build-doc      :+][+:
 
 (out-move (string-append (get "prog-name") "."
           man-sect))      :+][+:#
@@ -60,32 +58,34 @@ DEFINE synopsis
 
 :+]
 .Sh SYNOPSIS
-.Nm [+:
+.Nm
+[+:
 
   IF (define use-flags  (exist? "flag.value"))
      (define named-mode (not (or use-flags (exist? "long-opts") )))
      use-flags
                                             :+][+:
-    IF (exist? "long-opts")                 :+]
+    IF (exist? "long-opts")                \:+]
 .\" Mixture of short (flag) options and long options
 .Op Fl flags
 .Op Fl flag Ar value
-.Op Fl \-option-name Ar value[+:
-
-    ELSE no long options:                   :+]
+.Op Fl \-option-name Ar value
+[+: ELSE no long options:                  \:+]
 .Op Fl flags
-.Op Fl flag Ar value[+:
-    ENDIF                                               
+.Op Fl flag Ar value
+[+: ENDIF                                               
                                             :+][+:
   ELIF (exist? "long-opts")                             
-                                            :+]
+                                           \:+]
 .Op Fl \-option-name
-.Op Fl \-option-name Ar value[+:
+.Op Fl \-option-name Ar value
+[+:
 
-  ELIF  (not (exist? "argument"))           :+]
+  ELIF  (not (exist? "argument"))          \:+]
 .Op Ar option\-name Ar value
 .Pp
-All arguments are named options.[+:
+All arguments are named options.
+[+:
   ENDIF                                     :+][+:
 
   IF (exist? "argument")                    :+][+:
@@ -98,11 +98,12 @@ Operands and options may be intermixed.  They will be reordered.
 
   ELIF (or (exist? "long-opts") use-flags) 
 
-:+]
+\:+]
 .Pp
-All arguments must be options.[+:
+All arguments must be options.
+[+:
 
-  ENDIF                                     :+]
+  ENDIF                                    \:+]
 .Pp
 [+:
 
index 061a4d2ef0df468e8cd6874afa731869d610eb3c..978b70da66aa15bfa46c19b7eb6423f59a7dd62d 100755 (executable)
@@ -2,7 +2,7 @@
 
 ## mdoc2mdoc.sh -- script to convert mdoc-isms to mdoc-isms
 ##
-## Time-stamp:      "2011-05-03 09:39:49 bkorb"
+## Time-stamp:      "2011-05-30 14:17:42 bkorb"
 ##
 ##  This file is part of AutoOpts, a companion to AutoGen.
 ##  AutoOpts is free software.
@@ -231,19 +231,22 @@ do_arg() {
 
 do_NmName() {
     # do we want to downcase the line first?  Yes...
-    set -- `echo $line | sed -e 's/-/\\-/g' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
-    shift
-    case "$#" in
-    0 ) ;;
-    * ) case "$1" in
+    set -- `echo ${line#.Nm} | \
+        sed -e 's/-/\\-/g' \
+            -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+    NmNameSfx=
+
+    if test $# -gt 0
+    then case "$1" in
        [A-Za-z]* )
-          NmName=$1
-          shift
-          ;;
+           NmName=$1
+           shift
+           ;;
        esac
-       ;;
-    esac
-    echo ".B $NmName $*"
+
+        test $# -gt 0 && NmNameSfx=" $*"
+    fi
+    echo ".B $NmName$NmNameSfx"
 }
 
 do_line() {