]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cmd-doc.tlib cleanup from Bruce Korb
authorHarlan Stenn <stenn@ntp.org>
Mon, 30 May 2011 01:36:04 +0000 (21:36 -0400)
committerHarlan Stenn <stenn@ntp.org>
Mon, 30 May 2011 01:36:04 +0000 (21:36 -0400)
bk: 4de2f484V9apkaS-TtOgG5mT_neSGw

ChangeLog
sntp/ag-tpl/cmd-doc.tlib

index de978fb27689a9033d94e4f8c77b3439dcbd7002..8962576f05496e72a848c519e4e26014de84690d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 * [Bug 1936] Correctly set IPV6_MULTICAST_LOOP.
+* cmd-doc.tlib cleanup from Bruce Korb.
 (4.2.7p174) 2011/05/28 Released by Harlan Stenn <stenn@ntp.org>
 * ntpdc documentation cleanup.
 * sntp documentation cleanup.
index 65588a301876b107a43bb96b87baae72f5dd7e14..71986e6add188f14330a28b1fa910ae536862bbc 100644 (file)
@@ -4,7 +4,7 @@
 
 ## cmd-doc.tlib -- Template for command line man/mdoc pages
 ##
-## Time-stamp:      "2011-03-04 11:08:00 bkorb"
+## Time-stamp:      "2011-05-27 17:51:16 bkorb"
 ##
 ##  This file is part of AutoOpts, a companion to AutoGen.
 ##  AutoOpts is free software.
@@ -38,6 +38,8 @@
 
 (define tmp-val        (getenv "MAN_SECTION"))
 (define man-sect       (if (exist? "cmd-section") (get "cmd-section") "1"))
+(define file-name      "")
+(define tmp-str        "")
 
 (if (defined? 'tmp-val)
     (if (string? tmp-val)
@@ -101,7 +103,7 @@ for f in synopsis description options option-presets
 do cat_n_rm $f ; done
 test -f ${tmp_dir}/name && rm -f ${tmp_dir}/name
 
-for f in implementation-notes environment files examples exit-status \
+for f in implementation-notes environment files examples exit-status errors \
        compatibility notes see-also conforming-to history authors bugs
 do cat_n_rm $f ; done > ${tmp_dir}/.fini
 
@@ -224,6 +226,7 @@ ENDIF - "main" exists                   :+][+:
 INVOKE options                          :+][+:
 INVOKE exit-status                      :+][+:
 INVOKE authors                          :+][+:
+INVOKE bugs                             :+][+:
 
 IF (or home-rc-files environ-init)      :+][+:
 
@@ -527,31 +530,57 @@ ENDDEF exit-status
 .\"  A U T H O R S
 .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
 
-DEFINE authors :+][+:
+DEFINE authors                        :+][+:
 
-IF (not (access? (string-append tmp-dir "/authors") R_OK)) :+][+: 
-    (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) 
-    (if (> (string-length tmp-val) 1)
-      (shellf 
-       "printf '%s\\n' > ${tmp_dir}/authors" 
-       tmp-val    ) )                :+][+: 
-ENDIF                                :+][+: 
+IF (set! file-name (string-append tmp-dir "/authors"))
+   (not (access? file-name R_OK))     :+][+:
+
+   (out-push-new file-name)
+   (define remove-authors #t)
+
+   (set! tmp-val
+         (get "copyright.author" (get "copyright.owner")) )
+
+  (if (> (string-length tmp-val) 1)
+      (ag-fprintf 0 ".Sh AUTHORS\n%s\n" tmp-val))
+
+  (out-pop)                           :+][+:
+ENDIF copyright author/owner          :+][+:
+
+ENDDEF authors
 
-(set! tmp-val (string-append tmp-dir "/authors"))
-(out-push-new tmp-val)                :+][+:
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
+.\"  B U G S
+.\"
+.\"  This section is guaranteed to be the last section in the man page
+.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
+
+DEFINE bugs                           :+][+:
 
-CASE copyright.type :+][+:
+IF  (set! file-name (string-append tmp-dir "/bugs"))
+    (access? file-name R_OK)          :+][+:
+    (out-push-add file-name)          :+][+:
+ELSE                                  :+][+:
+    (out-push-new file-name)
+    (set! tmp-val (get "copyright.eaddr" (get "eaddr")))
+    (if (> (string-length tmp-val) 1)
+        (ag-fprintf 0 ".Sh BUGS\nPlease send bug reports to: %s\n" tmp-val))
+:+][+:
+ENDIF                                 :+][+:
+
+  CASE copyright.type :+][+:
    =  gpl  :+]
 .Pp
-Released under the GNU General Public License.[+:
+This program is released under the GNU General Public License.[+:
    = lgpl  :+]
 .Pp
-Released under the GNU General Public License with Library Extensions.[+:
+This program is released under the GNU General Public License
+with Library Extensions.[+:
    =  bsd  :+]
 .Pp
-Released under the Free BSD License.[+:
+This program is released under the Free BSD License.[+:
    *       :+][+:
-  IF (exist? "copyright.text")
+    IF (exist? "copyright.text")
            :+]
 .Pp
 .nf
@@ -559,31 +588,17 @@ Released under the Free BSD License.[+:
 [+: copyright.text :+]
 .fi
 .ad[+:
-  ELIF (exist? "copyright.date")      :+]
+    ELIF (exist? "copyright.date")    :+]
 .Pp
 Released under an unspecified copyright license.[+:
-  ENDIF                               :+][+:
-ESAC                                  :+]
+    ENDIF                             :+][+:
+  ESAC                                :+]
 .Pp
-This manual page was \fIAutoGen\fP-erated from the
-.Nm
+This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP
 option definitions.[+:
 
 (out-pop) :+][+:
 
-ENDDEF authors
-
-.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
-.\"  B U G S
-.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+:
-
-DEFINE bugs                           :+][+:
-IF (not (access? (string-append tmp-dir "/bugs") R_OK)) :+][+: 
-    (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) 
-    (if (> (string-length tmp-val) 1)       (shellf 
-      "printf 'Please send bug reports to: %s\\n' > ${tmp_dir}/bugs" 
-      tmp-val    ) )                 :+][+: 
-ENDIF                                :+][+: 
 ENDDEF bugs
 
 .\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =