From: Harlan Stenn Date: Wed, 13 Aug 2014 10:36:39 +0000 (+0000) Subject: More autogen-5.18.4pre14 cleanup X-Git-Tag: NTP_4_2_7P460~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6987d27fd3d1fe0cbf3bee0f4b2e964b73ea6e0c;p=thirdparty%2Fntp.git More autogen-5.18.4pre14 cleanup bk: 53eb3fb70w_OgXbPnU42718BAoXR2A --- diff --git a/ChangeLog b/ChangeLog index f115f4711..6ee99687b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* More autogen-5.18.4pre14 cleanup. (4.2.7p459) 2014/08/12 Released by Harlan Stenn * [Bug 2630] Limit the ntpq command buffer to 512 bytes. * FlexeLint cleanups. diff --git a/ntpd/ntpdsim-opts.c b/ntpd/ntpdsim-opts.c index 047078ebf..6be63e57a 100644 --- a/ntpd/ntpdsim-opts.c +++ b/ntpd/ntpdsim-opts.c @@ -75,7 +75,7 @@ extern FILE * option_usage_fp; * static const strings for ntpdsim options */ static char const ntpdsim_opt_strs[3124] = -/* 0 */ "ntpdsim 4.2.7p456\n" +/* 0 */ "ntpdsim 4.2.7p459\n" "Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n" "This is free software. It is licensed for use, modification and\n" "redistribution under the terms of the NTP License, copies of which\n" @@ -207,14 +207,14 @@ static char const ntpdsim_opt_strs[3124] = /* 2916 */ "no-load-opts\0" /* 2929 */ "no\0" /* 2932 */ "NTPDSIM\0" -/* 2940 */ "ntpdsim - NTP daemon simulation program - Ver. 4.2.7p456\n" +/* 2940 */ "ntpdsim - NTP daemon simulation program - Ver. 4.2.7p459\n" "Usage: %s [ - [] | --[{=| }] ]...\n\0" /* 3055 */ "$HOME\0" /* 3061 */ ".\0" /* 3063 */ ".ntprc\0" /* 3070 */ "http://bugs.ntp.org, bugs@ntp.org\0" /* 3104 */ "\n\0" -/* 3106 */ "ntpdsim 4.2.7p456"; +/* 3106 */ "ntpdsim 4.2.7p459"; /** * ipv4 option description with @@ -1603,7 +1603,7 @@ static void bogus_function(void) { translate option names. */ /* referenced via ntpdsimOptions.pzCopyright */ - puts(_("ntpdsim 4.2.7p456\n\ + puts(_("ntpdsim 4.2.7p459\n\ Copyright (C) 1970-2014 The University of Delaware, all rights reserved.\n\ This is free software. It is licensed for use, modification and\n\ redistribution under the terms of the NTP License, copies of which\n\ @@ -1746,14 +1746,14 @@ provided \"as is\" without express or implied warranty.\n")); puts(_("load options from a config file")); /* referenced via ntpdsimOptions.pzUsageTitle */ - puts(_("ntpdsim - NTP daemon simulation program - Ver. 4.2.7p456\n\ + puts(_("ntpdsim - NTP daemon simulation program - Ver. 4.2.7p459\n\ Usage: %s [ - [] | --[{=| }] ]...\n")); /* referenced via ntpdsimOptions.pzDetail */ puts(_("\n")); /* referenced via ntpdsimOptions.pzFullVersion */ - puts(_("ntpdsim 4.2.7p456")); + puts(_("ntpdsim 4.2.7p459")); /* referenced via ntpdsimOptions.pzFullUsage */ puts(_("<<>>")); diff --git a/ntpd/ntpdsim-opts.h b/ntpd/ntpdsim-opts.h index e692cc445..31546f349 100644 --- a/ntpd/ntpdsim-opts.h +++ b/ntpd/ntpdsim-opts.h @@ -107,9 +107,9 @@ typedef enum { /** count of all options for ntpdsim */ #define OPTION_CT 39 /** ntpdsim version */ -#define NTPDSIM_VERSION "4.2.7p456" +#define NTPDSIM_VERSION "4.2.7p459" /** Full ntpdsim version text */ -#define NTPDSIM_FULL_VERSION "ntpdsim 4.2.7p456" +#define NTPDSIM_FULL_VERSION "ntpdsim 4.2.7p459" /** * Interface defines for all options. Replace "n" with the UPPER_CASED diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 7525e5f8b..6c266e362 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -78,7 +78,7 @@ noinst_DATA = \ summary.html \ $(NULL) -OPTTPL = ../sntp/ag-tpl/perlopt.tpl +#OPTTPL = ../sntp/ag-tpl/perlopt.tpl ## diff --git a/scripts/calc_tickadj/Makefile.am b/scripts/calc_tickadj/Makefile.am index e0abdd7d2..45fe0753e 100644 --- a/scripts/calc_tickadj/Makefile.am +++ b/scripts/calc_tickadj/Makefile.am @@ -62,7 +62,7 @@ noinst_DATA = \ calc_tickadj: $(srcdir)/calc_tickadj-opts -$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def $(srcdir)/../../sntp/ag-tpl/perlopt.tpl +$(srcdir)/calc_tickadj-opts: $(srcdir)/calc_tickadj-opts.def $(run_ag) calc_tickadj-opts.def ### Nroff diff --git a/scripts/calc_tickadj/calc_tickadj-opts b/scripts/calc_tickadj/calc_tickadj-opts index 8cfa0fd21..46108b3e1 100644 --- a/scripts/calc_tickadj/calc_tickadj-opts +++ b/scripts/calc_tickadj/calc_tickadj-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (calc_tickadj-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions calc_tickadj-opts.def # and the template file perlopt @@ -39,13 +39,13 @@ sub processOptions { 'help|?', 'more-help')); $usage = <<'USAGE'; -calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p456 +calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459 USAGE: calc_tickadj [ - [] | --[{=| }] ]... -d, --drift-file=str Ntp drift file to use -t, --tick=num Tick value of this host -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/calc_tickadj/calc_tickadj.html b/scripts/calc_tickadj/calc_tickadj.html index a68d7837c..8eae0b62b 100644 --- a/scripts/calc_tickadj/calc_tickadj.html +++ b/scripts/calc_tickadj/calc_tickadj.html @@ -3,7 +3,7 @@ calc_tickadj User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

calc_tickadj User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

calc_tickadj User's Manual

@@ -46,10 +48,12 @@ This document applies to version 4.2.7p459 of calc_tickadj.
+ +


-Previous: calc_tickadj Description, +Previous: calc_tickadj Description, Up: Top -
+

Invoking calc_tickadj

@@ -82,49 +86,53 @@ current tick manually on command line. using the agtexi-cmd template and the option descriptions for the calc_tickadj program. -

calc_tickadj help/usage (--help)

+

calc_tickadj help/usage (--help)

This is the automatically generated usage text for calc_tickadj.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0. -

calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p456
+
calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459
 USAGE: calc_tickadj [ -<flag> [<val>] | --<name>[{=| }<val>] ]...
 
     -d, --drift-file=str         Ntp drift file to use
     -t, --tick=num               Tick value of this host
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 

drift-file option (-d)

@@ -134,11 +142,13 @@ This is the “ntp drift file to use” option. This option takes a string argument. Use the specified drift file for calculations

tick option (-t)

@@ -148,18 +158,20 @@ This is the “tick value of this host” option. This option takes a number argument. The current tick which to adjustment will be calculated
+ +


-Previous: calc_tickadj tick, +Previous: calc_tickadj tick, Up: calc_tickadj Invocation -
+

calc_tickadj exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/calc_tickadj/invoke-calc_tickadj.texi b/scripts/calc_tickadj/invoke-calc_tickadj.texi index 2f4ea4a71..57318453e 100644 --- a/scripts/calc_tickadj/invoke-calc_tickadj.texi +++ b/scripts/calc_tickadj/invoke-calc_tickadj.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-calc_tickadj.texi) # -# It has been AutoGen-ed August 12, 2014 at 09:26:16 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:21:30 AM by AutoGen 5.18.4pre14 # From the definitions calc_tickadj-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -63,13 +63,13 @@ with a status code of 0. @exampleindent 0 @example -calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p456 +calc_tickadj - Calculates "optimal" value for tick given ntp drift file. - Ver. 4.2.7p459 USAGE: calc_tickadj [ - [] | --[@{=| @}] ]... -d, --drift-file=str Ntp drift file to use -t, --tick=num Tick value of this host -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/invoke-plot_summary.texi b/scripts/invoke-plot_summary.texi index a24036c35..118ea4ad3 100644 --- a/scripts/invoke-plot_summary.texi +++ b/scripts/invoke-plot_summary.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-plot_summary.texi) # -# It has been AutoGen-ed August 13, 2014 at 04:37:18 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:27:40 AM by AutoGen 5.18.4pre14 # From the definitions plot_summary-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -53,7 +53,7 @@ USAGE: plot_summary [ - [] | --[@{=| @}] ]... --output-file=str Output file --dont-wait Don't wait for keystroke between plots -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/invoke-summary.texi b/scripts/invoke-summary.texi index 806984d5a..c82704d9a 100644 --- a/scripts/invoke-summary.texi +++ b/scripts/invoke-summary.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-summary.texi) # -# It has been AutoGen-ed August 13, 2014 at 04:37:20 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:27:41 AM by AutoGen 5.18.4pre14 # From the definitions summary-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -52,7 +52,7 @@ USAGE: summary [ - [] | --[@{=| @}] ]... --skip-time-steps=float Ignore time offsets larger that this --start-date=num Start date -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntp-wait/Makefile.am b/scripts/ntp-wait/Makefile.am index 07920b0d2..9e974df54 100644 --- a/scripts/ntp-wait/Makefile.am +++ b/scripts/ntp-wait/Makefile.am @@ -54,7 +54,7 @@ noinst_DATA = \ ntp-wait: $(srcdir)/ntp-wait-opts -$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def ../../sntp/ag-tpl/perlopt.tpl +$(srcdir)/ntp-wait-opts: $(srcdir)/ntp-wait-opts.def $(run_ag) ntp-wait-opts.def ### Nroff diff --git a/scripts/ntp-wait/invoke-ntp-wait.texi b/scripts/ntp-wait/invoke-ntp-wait.texi index 276507afd..0e875bdae 100644 --- a/scripts/ntp-wait/invoke-ntp-wait.texi +++ b/scripts/ntp-wait/invoke-ntp-wait.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntp-wait.texi) # -# It has been AutoGen-ed August 13, 2014 at 04:37:01 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:23:18 AM by AutoGen 5.18.4pre14 # From the definitions ntp-wait-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -68,7 +68,7 @@ USAGE: ntp-wait [ - [] | --[@{=| @}] ]... -s, --sleep=num How long to sleep between tries -v, --verbose Be verbose -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntp-wait/ntp-wait-opts b/scripts/ntp-wait/ntp-wait-opts index 65cfff9f1..935994799 100644 --- a/scripts/ntp-wait/ntp-wait-opts +++ b/scripts/ntp-wait/ntp-wait-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntp-wait-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions ntp-wait-opts.def # and the template file perlopt @@ -47,7 +47,7 @@ USAGE: ntp-wait [ - [] | --[{=| }] ]... -s, --sleep=num How long to sleep between tries -v, --verbose Be verbose -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntp-wait/ntp-wait.html b/scripts/ntp-wait/ntp-wait.html index 29b6979d5..4a6e2128a 100644 --- a/scripts/ntp-wait/ntp-wait.html +++ b/scripts/ntp-wait/ntp-wait.html @@ -3,7 +3,7 @@ Ntp-wait User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Ntp-wait User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

This document describes the use of the NTP Project's ntp-wait program. @@ -53,9 +55,11 @@ accurate and stable time.

-


+ -
+


+ +

0.1 Invoking ntp-wait

@@ -85,7 +89,7 @@ has set the time. using the agtexi-cmd template and the option descriptions for the ntp-wait program.
+ +


-Next: , +Next: , Up: ntp-wait Invocation -
+
-

0.1.1 ntp-wait help/usage (--help)

+

0.1.1 ntp-wait help/usage (--help)

This is the automatically generated usage text for ntp-wait.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntp-wait - Wait for ntpd to stabilize the system clock - Ver. 4.2.7p459
@@ -121,17 +127,19 @@ USAGE: ntp-wait [ -<flag> [<val>] | --<name>[{=| }<val>]
     -s, --sleep=num              How long to sleep between tries
     -v, --verbose                Be verbose
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+ +


-Next: , +Next: , Previous: ntp-wait usage, Up: ntp-wait Invocation -
+

0.1.2 tries option (-n)

@@ -142,26 +150,30 @@ This option takes a number argument. The maximum number of times we will check ntpd to see if it has been able to synchronize and stabilize the system clock.
+ +


-Next: , +Next: , Previous: ntp-wait tries, Up: ntp-wait Invocation -
+

0.1.3 sleep option (-s)

This is the “how long to sleep between tries” option. -This option takes a number argument secs-between-tries. - We will sleep for secs-between-tries after each query +This option takes a number argument secs-between-tries. + We will sleep for secs-between-tries after each query of ntpd that returns "the time is not yet stable".

0.1.4 verbose option (-v)

@@ -171,35 +183,41 @@ This is the “be verbose” option. By default, ntp-wait is silent. With this option, ntp-wait will provide status information.
+ +


-Next: , +Next: , Previous: ntp-wait verbose, Up: ntp-wait Invocation -
+

0.1.5 ntp-wait exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
+ +


-Next: , +Next: , Previous: ntp-wait exit status, Up: ntp-wait Invocation -
+

0.1.6 ntp-wait Authors

+ +


-Previous: ntp-wait Authors, +Previous: ntp-wait Authors, Up: ntp-wait Invocation -
+

0.1.7 ntp-wait Notes

diff --git a/scripts/ntpsweep/Makefile.am b/scripts/ntpsweep/Makefile.am index 874100989..6a2fdd1bd 100644 --- a/scripts/ntpsweep/Makefile.am +++ b/scripts/ntpsweep/Makefile.am @@ -60,7 +60,7 @@ noinst_DATA = \ ntpsweep: $(srcdir)/ntpsweep-opts -$(srcdir)/ntpsweep-opts: ntpsweep-opts.def ../../sntp/ag-tpl/perlopt.tpl +$(srcdir)/ntpsweep-opts: ntpsweep-opts.def $(run_ag) ntpsweep-opts.def ### Nroff diff --git a/scripts/ntpsweep/invoke-ntpsweep.texi b/scripts/ntpsweep/invoke-ntpsweep.texi index ec920a87e..00ef8ad51 100644 --- a/scripts/ntpsweep/invoke-ntpsweep.texi +++ b/scripts/ntpsweep/invoke-ntpsweep.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntpsweep.texi) # -# It has been AutoGen-ed August 13, 2014 at 04:37:06 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:24:01 AM by AutoGen 5.18.4pre14 # From the definitions ntpsweep-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -54,7 +54,7 @@ USAGE: ntpsweep [ - [] | --[@{=| @}] ]... [hostfile] -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number) -s, --strip=str Strip this string from hostnames -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntpsweep/ntpsweep-opts b/scripts/ntpsweep/ntpsweep-opts index 84bb26f98..74e3f0d74 100644 --- a/scripts/ntpsweep/ntpsweep-opts +++ b/scripts/ntpsweep/ntpsweep-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntpsweep-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions ntpsweep-opts.def # and the template file perlopt @@ -52,7 +52,7 @@ USAGE: ntpsweep [ - [] | --[{=| }] ]... [hostfile] -m, --maxlevel=num Traverse peers up to this level (4 is a reasonable number) -s, --strip=str Strip this string from hostnames -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntpsweep/ntpsweep.html b/scripts/ntpsweep/ntpsweep.html index abe8e4a7e..5ca4536a0 100644 --- a/scripts/ntpsweep/ntpsweep.html +++ b/scripts/ntpsweep/ntpsweep.html @@ -3,7 +3,7 @@ ntpsweep User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

ntpsweep User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

This document describes the use of the NTP Project's ntpsweep program. @@ -44,9 +46,10 @@ Up: (dir)

-


-
+


+ +

0.1 Invoking ntpsweep

@@ -61,7 +64,7 @@ all peers. using the agtexi-cmd template and the option descriptions for the ntpsweep program. -

0.1.1 ntpsweep help/usage (--help)

+

0.1.1 ntpsweep help/usage (--help)

This is the automatically generated usage text for ntpsweep.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntpsweep - Print various informations about given ntp servers - Ver. 4.2.7p459
@@ -99,17 +103,19 @@ USAGE: ntpsweep [ -<flag> [<val>] | --<name>[{=| }<val>]
     -m, --maxlevel=num           Traverse peers up to this level (4 is a reasonable number)
     -s, --strip=str              Strip this string from hostnames
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+ +


-Next: , +Next: , Previous: ntpsweep usage, Up: ntpsweep Invocation -
+

0.1.2 host-list option (-l)

@@ -126,24 +132,26 @@ This option takes a string argument.

Use this option to specify the host on which this script operates. May appear multiple times.

0.1.3 peers option (-p)

This is the “recursively list all peers a host synchronizes to” option. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Next: , +Next: , Previous: ntpsweep peers, Up: ntpsweep Invocation -
+

0.1.4 maxlevel option (-m)

@@ -151,13 +159,14 @@ Up: ntpsweep Invocati

This is the “traverse peers up to this level (4 is a reasonable number)” option. This option takes a number argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Next: , +Next: , Previous: ntpsweep maxlevel, Up: ntpsweep Invocation -
+

0.1.5 strip option (-s)

@@ -165,13 +174,14 @@ Up: ntpsweep Invocati

This is the “strip this string from hostnames” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

0.1.6 host option (-h)

@@ -179,22 +189,23 @@ Up: ntpsweep Invocati

This is the “specify a single host” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

NOTE: THIS OPTION IS DEPRECATED

+


-Previous: ntpsweep host, +Previous: ntpsweep host, Up: ntpsweep Invocation -
+

0.1.7 ntpsweep exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/ntptrace/Makefile.am b/scripts/ntptrace/Makefile.am index 6a46768b2..006046caa 100644 --- a/scripts/ntptrace/Makefile.am +++ b/scripts/ntptrace/Makefile.am @@ -53,7 +53,7 @@ noinst_DATA = \ ntptrace: $(srcdir)/ntptrace-opts -$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def ../../sntp/ag-tpl/perlopt.tpl +$(srcdir)/ntptrace-opts: $(srcdir)/ntptrace-opts.def $(run_ag) ntptrace-opts.def ### Nroff diff --git a/scripts/ntptrace/invoke-ntptrace.texi b/scripts/ntptrace/invoke-ntptrace.texi index aa9755f25..9bae57c4f 100644 --- a/scripts/ntptrace/invoke-ntptrace.texi +++ b/scripts/ntptrace/invoke-ntptrace.texi @@ -6,7 +6,7 @@ # # EDIT THIS FILE WITH CAUTION (invoke-ntptrace.texi) # -# It has been AutoGen-ed August 13, 2014 at 04:37:11 AM by AutoGen 5.18.4pre14 +# It has been AutoGen-ed August 13, 2014 at 10:25:04 AM by AutoGen 5.18.4pre14 # From the definitions ntptrace-opts.def # and the template file agtexi-cmd.tpl @end ignore @@ -69,7 +69,7 @@ USAGE: ntptrace [ - [] | --[@{=| @}] ]... [host] -m, --max-hosts=num Maximum number of peers to trace -r, --host=str Single remote host -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntptrace/ntptrace-opts b/scripts/ntptrace/ntptrace-opts index ab7425767..317a5a1f6 100644 --- a/scripts/ntptrace/ntptrace-opts +++ b/scripts/ntptrace/ntptrace-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (ntptrace-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions ntptrace-opts.def # and the template file perlopt @@ -47,7 +47,7 @@ USAGE: ntptrace [ - [] | --[{=| }] ]... [host] -m, --max-hosts=num Maximum number of peers to trace -r, --host=str Single remote host -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/ntptrace/ntptrace.html b/scripts/ntptrace/ntptrace.html index 43fbbae34..47c683ad2 100644 --- a/scripts/ntptrace/ntptrace.html +++ b/scripts/ntptrace/ntptrace.html @@ -3,7 +3,7 @@ Ntptrace User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Ntptrace User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Simple Network Time Protocol User Manual

@@ -46,10 +48,11 @@ This document applies to version 4.2.7p459 of ntptrace.
+


-Previous: ntptrace Description, +Previous: ntptrace Description, Up: Top -
+

Invoking ntptrace

@@ -80,7 +83,7 @@ defined in RFC-1305. using the agtexi-cmd template and the option descriptions for the ntptrace program. -

ntptrace help/usage (--help)

+

ntptrace help/usage (--help)

This is the automatically generated usage text for ntptrace.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

ntptrace - Trace peers of an NTP server - Ver. 4.2.7p459
@@ -114,17 +118,18 @@ USAGE: ntptrace [ -<flag> [<val>] | --<name>[{=| }<val>]
     -m, --max-hosts=num          Maximum number of peers to trace
     -r, --host=str               Single remote host
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+


-Next: , +Next: , Previous: ntptrace usage, Up: ntptrace Invocation -
+

numeric option (-n)

@@ -134,11 +139,13 @@ This is the “print ip addresses instead of hostnames” option. Output hosts as dotted-quad numeric format rather than converting to the canonical host names.
+ +


-Next: , +Next: , Previous: ntptrace numeric, Up: ntptrace Invocation -
+

max-hosts option (-m)

@@ -146,13 +153,14 @@ Up: ntptrace Invocati

This is the “maximum number of peers to trace” option. This option takes a number argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

host option (-r)

@@ -160,20 +168,21 @@ Up: ntptrace Invocati

This is the “single remote host” option. This option takes a string argument. -This option has no doc documentation. +This option has no ‘doc’ documentation.

+


-Previous: ntptrace host, +Previous: ntptrace host, Up: ntptrace Invocation -
+

ntptrace exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/plot_summary-opts b/scripts/plot_summary-opts index b7d6d2783..0dabbabc8 100644 --- a/scripts/plot_summary-opts +++ b/scripts/plot_summary-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (plot_summary-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions plot_summary-opts.def # and the template file perlopt @@ -58,7 +58,7 @@ USAGE: plot_summary [ - [] | --[{=| }] ]... --output-file=str Output file --dont-wait Don't wait for keystroke between plots -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/plot_summary.html b/scripts/plot_summary.html index 325679b98..96056203f 100644 --- a/scripts/plot_summary.html +++ b/scripts/plot_summary.html @@ -3,7 +3,7 @@ Plot_summary User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Plot_summary User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Plot_summary User Manual

@@ -46,10 +48,12 @@ This document applies to version 4.2.7p459 of plot_summary.
+ +


-Previous: plot_summary Description, +Previous: plot_summary Description, Up: Top -
+

Invoking plot_summary

@@ -60,7 +64,7 @@ Up: Top using the agtexi-cmd template and the option descriptions for the plot_summary program. -

plot_summary help/usage (--help)

+

plot_summary help/usage (--help)

This is the automatically generated usage text for plot_summary.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

plot_summary - plot statistics generated by summary script - Ver. 4.2.7p459
@@ -101,17 +107,19 @@ USAGE: plot_summary [ -<flag> [<val>] | --<name>[{=| }<val&
         --output-file=str        Output file
         --dont-wait              Don't wait for keystroke between plots
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 

directory option

@@ -122,11 +130,13 @@ This option takes a string argument. The directory where the plot_summary will search for the *_summary files generated by summary script.

identifier option

@@ -137,11 +147,13 @@ This option takes a string argument. Where does the plotted data come from, default to string "host" plus current hostname

peer option

@@ -158,11 +170,13 @@ This option takes a string argument.

By default the peer_summary plots are not generated. Use this option to specify list of peers if you want to generate plots for them.

plot-term option

@@ -175,11 +189,13 @@ This option takes a string argument. dumb is it's not'. See output from -e "set terminal") for the list of avalaible options.

output-file option

@@ -189,18 +205,20 @@ This is the “output file” option. This option takes a str argument. Output file for gnuplot, default to stdout.

plot_summary exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/scripts/summary-opts b/scripts/summary-opts index 5c237a244..bf7f692d3 100644 --- a/scripts/summary-opts +++ b/scripts/summary-opts @@ -1,6 +1,6 @@ # EDIT THIS FILE WITH CAUTION (summary-opts) # -# It has been AutoGen-ed +# It has been AutoGen-ed August 13, 2014 at 10:09:13 AM by AutoGen 5.18.4pre14 # From the definitions summary-opts.def # and the template file perlopt @@ -54,7 +54,7 @@ USAGE: summary [ - [] | --[{=| }] ]... --skip-time-steps=float Ignore time offsets larger that this --start-date=num Start date -?, --help Display usage information and exit - --more-help Pass the extended usage information through a pager + --more-help Pass the extended usage text through a pager Options are specified by doubled hyphens and their name or by a single hyphen and the flag character. diff --git a/scripts/summary.html b/scripts/summary.html index 03393f91b..d45524fa0 100644 --- a/scripts/summary.html +++ b/scripts/summary.html @@ -3,7 +3,7 @@ Summary User's Manual - + @@ -14,18 +14,20 @@ pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } - span.sc { font-variant:small-caps } - span.roman { font-family: serif; font-weight: normal; } + span.sc { font-variant:small-caps } + span.roman { font-family:serif; font-weight:normal; } + span.sansserif { font-family:sans-serif; font-weight:normal; } -->

Summary User's Manual

+


-Next: , +Next: , Previous: (dir), Up: (dir) -
+

Summary User Manual

@@ -46,10 +48,11 @@ This document applies to version 4.2.7p459 of summary.
+


-Previous: summary Description, +Previous: summary Description, Up: Top -
+

Invoking summary

@@ -60,7 +63,7 @@ Up: Top using the agtexi-cmd template and the option descriptions for the summary program. -

summary help/usage (--help)

+

summary help/usage (--help)

This is the automatically generated usage text for summary.

The text printed is the same whether selected with the help option -(--help) or the more-help option (--more-help). more-help will print +(--help) or the more-help option (--more-help). more-help will print the usage text by passing it through a pager program. more-help is disabled on platforms without a working fork(2) function. The PAGER environment variable is -used to select the program, defaulting to more. Both will exit +used to select the program, defaulting to more. Both will exit with a status code of 0.

summary - compute various stastics from NTP stat files - Ver. 4.2.7p459
@@ -98,17 +102,18 @@ USAGE: summary [ -<flag> [<val>] | --<name>[{=| }<val>]
         --skip-time-steps=float  Ignore time offsets larger that this
         --start-date=num         Start date
     -?, --help                   Display usage information and exit
-        --more-help              Pass the extended usage information through a pager
+        --more-help              Pass the extended usage text through a pager
 
 Options are specified by doubled hyphens and their name or by a single
 hyphen and the flag character.
 
+


-Next: , +Next: , Previous: summary usage, Up: summary Invocation -
+

directory option

@@ -119,11 +124,13 @@ This option takes a string argument. The directory where ntpd will search for .stat files generated by ntpd.

end-date option

@@ -135,11 +142,13 @@ This option takes a number argument. option. Defaults to today minus one day (Use date -u +%Y%m%d) to get the timestamp.
+ +


-Next: , +Next: , Previous: summary end-date, Up: summary Invocation -
+

output-directory option

@@ -149,11 +158,13 @@ This is the “output directory” option. This option takes a str argument. The output directory summary will write all output files to.

start-date option

@@ -164,18 +175,19 @@ This option takes a num argument. Process all files with the date suffix more or equal to value of this option. Defaults to 197000101.
+


-Previous: summary start-date, +Previous: summary start-date, Up: summary Invocation -
+

summary exit status

One of the following exit values will be returned:

-
0 (EXIT_SUCCESS)
Successful program execution. -
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid. +
0 (EXIT_SUCCESS)
Successful program execution. +
1 (EXIT_FAILURE)
The operation failed or the command syntax was not valid.
diff --git a/sntp/ag-tpl/Mdoc.pm b/sntp/ag-tpl/:Old/Mdoc.pm similarity index 100% rename from sntp/ag-tpl/Mdoc.pm rename to sntp/ag-tpl/:Old/Mdoc.pm diff --git a/sntp/ag-tpl/agman-cmd.tpl b/sntp/ag-tpl/:Old/agman-cmd.tpl similarity index 100% rename from sntp/ag-tpl/agman-cmd.tpl rename to sntp/ag-tpl/:Old/agman-cmd.tpl diff --git a/sntp/ag-tpl/agmdoc-cmd.tpl b/sntp/ag-tpl/:Old/agmdoc-cmd.tpl similarity index 100% rename from sntp/ag-tpl/agmdoc-cmd.tpl rename to sntp/ag-tpl/:Old/agmdoc-cmd.tpl diff --git a/sntp/ag-tpl/cmd-doc.tlib b/sntp/ag-tpl/:Old/cmd-doc.tlib similarity index 100% rename from sntp/ag-tpl/cmd-doc.tlib rename to sntp/ag-tpl/:Old/cmd-doc.tlib diff --git a/sntp/ag-tpl/mdoc-synopsis.tlib b/sntp/ag-tpl/:Old/mdoc-synopsis.tlib similarity index 100% rename from sntp/ag-tpl/mdoc-synopsis.tlib rename to sntp/ag-tpl/:Old/mdoc-synopsis.tlib diff --git a/sntp/ag-tpl/mdoc2man b/sntp/ag-tpl/:Old/mdoc2man similarity index 100% rename from sntp/ag-tpl/mdoc2man rename to sntp/ag-tpl/:Old/mdoc2man diff --git a/sntp/ag-tpl/mdoc2texi b/sntp/ag-tpl/:Old/mdoc2texi similarity index 100% rename from sntp/ag-tpl/mdoc2texi rename to sntp/ag-tpl/:Old/mdoc2texi diff --git a/sntp/ag-tpl/perlopt.tpl b/sntp/ag-tpl/:Old/perlopt.tpl similarity index 100% rename from sntp/ag-tpl/perlopt.tpl rename to sntp/ag-tpl/:Old/perlopt.tpl diff --git a/sntp/ag-tpl/Old/agman-file.tpl b/sntp/ag-tpl/Old/agman-file.tpl deleted file mode 100644 index b2d15e1f1..000000000 --- a/sntp/ag-tpl/Old/agman-file.tpl +++ /dev/null @@ -1,86 +0,0 @@ -[+: -*- Mode: nroff -*- - - AutoGen5 template man - -## agman-file.tpl -- Template for file man pages -## -## Time-stamp: "2011-11-18 07:48:17 bkorb" -## -## This file is part of AutoOpts, a companion to AutoGen. -## AutoOpts is free software. -## Copyright (c) 1992-2012 Bruce Korb - all rights reserved -## -## AutoOpts is available under any one of two licenses. The license -## in use must be one of these two and the choice is under the control -## of the user of the license. -## -## The GNU Lesser General Public License, version 3 or later -## See the files "COPYING.lgplv3" and "COPYING.gplv3" -## -## The Modified Berkeley Software Distribution License -## See the file "COPYING.mbsd" -## -## These files have the following md5sums: -## -## 43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3 -## 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 -## 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd - -# Produce a man page for section 1, 5 or 8 commands. -# Which is selected via: -DMAN_SECTION=n -# passed to the autogen invocation. "n" may have a suffix, if desired. -# -:+][+: - -(define head-line (lambda() - (sprintf ".TH %s %s \"%s\" \"%s\" \"%s\"\n.\\\"\n" - (get "prog-name") man-sect - (shell "date '+%d %b %Y'") package-text section-name) )) - -(define man-page #t) - -:+][+: - -INCLUDE "cmd-doc.tlib" - -:+] -.\" -.SH NAME -[+: prog-name :+] \- [+: prog-title :+] -[+: - -(out-push-new) :+][+: - -INVOKE build-doc :+][+: - - (shell (string-append - "fn='" (find-file "mdoc2man") "'\n" - "test -f ${fn} || die mdoc2man not found from $PWD\n" - "${fn} <<\\_EndOfMdoc_ || die ${fn} failed in $PWD\n" - (out-pop #t) - "\n_EndOfMdoc_" )) - -:+][+: - -(out-move (string-append (get "prog-name") "." - man-sect)) :+][+: # - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" S Y N O P S I S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-synopsis :+][+: - (out-push-new file-name) \:+] -.SH SYNOPSIS -.B [+: file-path :+] -.PP [+: - -(if (exist? "explain") - (string-append "\n.PP\n" - (join "\n.PP\n" (stack "explain"))) ) :+][+: - -(out-pop) :+][+: - -ENDDEF mk-synopsis - -agman-file.tpl ends here :+] diff --git a/sntp/ag-tpl/Old/agmdoc-file.tpl b/sntp/ag-tpl/Old/agmdoc-file.tpl deleted file mode 100644 index 9e5fc0bf8..000000000 --- a/sntp/ag-tpl/Old/agmdoc-file.tpl +++ /dev/null @@ -1,73 +0,0 @@ -[+: -*- Mode: nroff -*- - - AutoGen5 template mdoc - -## agman-file.tpl -- Template for file mdoc pages -## -## Time-stamp: "2011-11-18 07:48:29 bkorb" -## -## This file is part of AutoOpts, a companion to AutoGen. -## AutoOpts is free software. -## AutoOpts is Copyright (c) 1992-2012 by Bruce Korb - all rights reserved -## -## AutoOpts is available under any one of two licenses. The license -## in use must be one of these two and the choice is under the control -## of the user of the license. -## -## The GNU Lesser General Public License, version 3 or later -## See the files "COPYING.lgplv3" and "COPYING.gplv3" -## -## The Modified Berkeley Software Distribution License -## See the file "COPYING.mbsd" -## -## These files have the following md5sums: -## -## 43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3 -## 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 -## 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd - -# Produce a man page for section 1, 5 or 8 commands. -# Which is selected via: -DMAN_SECTION=n -# passed to the autogen invocation. "n" may have a suffix, if desired. -# -:+][+: - -(define head-line (lambda() (string-append - ".Dd " (shell "date '+%B %e %Y' | sed 's/ */ /g'") - "\n.Dt " UP-PROG-NAME " " man-sect " " section-name - "\n.Os " (shell "uname -sr") "\n") )) - -(define man-page #f) - -:+][+: - -INCLUDE "cmd-doc.tlib" - -:+] -.Sh NAME -.Nm [+: prog-name :+] -.Nd [+: prog-title :+] -[+: INVOKE build-doc :+][+: - -(out-move (string-append (get "prog-name") "." - man-sect)) :+][+:# - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" S Y N O P S I S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-synopsis :+][+: - (out-push-new file-name) \:+] -.Sh SYNOPSIS -.Sy [+: file-path :+] -.Pp [+: - -FOR explain "\n.Pp\n" :+][+: - explain :+][+: -ENDFOR :+][+: - -(out-pop) :+][+: - -ENDDEF mk-synopsis - -agmdoc-file.tpl ends here :+] diff --git a/sntp/ag-tpl/Old/agtexi-cmd.tpl b/sntp/ag-tpl/Old/agtexi-cmd.tpl deleted file mode 100644 index 61c57027e..000000000 --- a/sntp/ag-tpl/Old/agtexi-cmd.tpl +++ /dev/null @@ -1,884 +0,0 @@ -[= AutoGen5 template -*- Mode: texinfo -*- - -texi - -# Documentation template -# -# Time-stamp: "2012-08-11 08:33:08 bkorb" -# Author: Bruce Korb -# -# This file is part of AutoOpts, a companion to AutoGen. -# AutoOpts is free software. -# AutoOpts is Copyright (c) 1992-2012 by Bruce Korb - all rights reserved -# -# AutoOpts is available under any one of two licenses. The license -# in use must be one of these two and the choice is under the control -# of the user of the license. -# -# The GNU Lesser General Public License, version 3 or later -# See the files "COPYING.lgplv3" and "COPYING.gplv3" -# -# The Modified Berkeley Software Distribution License -# See the file "COPYING.mbsd" -# -# These files have the following md5sums: -# -# 43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3 -# 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 -# 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd - -=][= - -INVOKE initialization =][= - -(out-push-new (string-substitute (out-name) ".texi" ".menu")) - -(ag-fprintf 0 "* %-32s Invoking %s\n" - (string-append program-name " Invocation::") - program-name ) - -(out-pop) -(if (exist? "explain") - (emit (string-append "\n" (get "explain") "\n")) ) -(set! tmp-str (get "option-doc-format" "texi")) -(divert-convert tmp-str) - -=][= - -IF (match-value? == "doc-section.ds-type" "DESCRIPTION") =][= - - FOR doc-section =][= - IF (== (get "ds-type") "DESCRIPTION") =][= - (define cvt-fn (get "ds-format" "texi")) - (if (not (== cvt-fn "texi")) - (divert-convert cvt-fn) ) =][= - (emit (string-append "\n" (get "ds-text") "\n")) - =][= - BREAK =][= - - ENDIF =][= - ENDFOR =][= - -ELSE =][= - -(join "\n\n" - (if (exist? "prog-info-descrip") - (stack "prog-info-descrip") - (if (exist? "prog-man-descrip") - (stack "prog-man-descrip") - (if (exist? "prog-descrip") - (stack "prog-descrip") - (stack "detail") -) ) ) ) =][= - -ENDIF =][= - -(convert-divert) =] - -This [=(string-downcase doc-level)=] was generated by @strong{AutoGen}, -using the @code{agtexi-cmd} template and the option descriptions for the [=(. -coded-prog-name)=] program.[= (name-copyright) =] - -@menu -[= - (out-push-new) (out-suspend "menu") - (out-push-new) =][= - -INVOKE emit-usage-opt =][= - -;; FOR all options, ... -;; -(define opt-name "") -(define extra-ct 0) -(define extra-text "") -(define optname-from "A-Z_^") -(define optname-to "a-z--") -(define invalid-doc "* INVALID *") -(if (exist? "preserve-case") (begin - (set! optname-from "_^") - (set! optname-to "--") )) -(if (and have-doc-options (not (exist? "flag[].documentation"))) (begin - (ag-fprintf "menu" menu-entry-fmt - "base-options:: " "Base options") - (print-node opt-name "Base options") -) ) - -=][=# - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -FOR flag =][= - - (set! opt-name (string-tr! (get "name") optname-from optname-to)) - (if (exist? "documentation") - (begin - (set! label-str (string-append opt-name " options")) - (ag-fprintf "menu" menu-entry-fmt - (string-append opt-name ":: ") label-str) - (print-node opt-name label-str) - (ag-fprintf 0 "\n%s." (get "descrip")) - (set! tmp-str (get "documentation")) - (if (> (string-length tmp-str) 1) - (ag-fprintf 0 "\n%s" tmp-str)) - ) - (begin - (set! tmp-str (get "doc" invalid-doc)) - (if (< 0 (string-length tmp-str)) (begin - (set! label-str (string-append opt-name " option" - (if (exist? "value") - (string-append " (-" (get "value") ")") - "" ) )) - (if have-doc-options - (ag-fprintf 0 opt-node-fmt opt-name label-str) - (begin - (ag-fprintf "menu" menu-entry-fmt - (string-append opt-name ":: ") label-str) - (print-node opt-name label-str) - ) - ) - (ag-fprintf 0 "\n@cindex %s-%s" down-prog-name opt-name) - ) ) - ) - ) =][= - - IF (and (not (exist? "documentation")) - (< 0 (string-length tmp-str)) ) - =][= - IF (exist? "aliases") =][= - INVOKE emit-aliases =][= - ELSE =][= - INVOKE emit-opt-text =][= - ENDIF =][= - ENDIF =][= - -ENDFOR flag =][= - -IF - (define home-rc-files (exist? "homerc")) - (define environ-init (exist? "environrc")) - (or home-rc-files environ-init) - =][= - - INVOKE emit-presets =][= - -ENDIF =][= - -INVOKE emit-exit-status =][= -INVOKE emit-doc-sections =][= - -(out-suspend "opt-desc") -(out-resume "menu") -(emit (out-pop #t)) -(emit "@end menu\n") -(out-resume "opt-desc") -(out-pop #t) =][=# - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-doc-sections =][= - -FOR doc-section =][= - - IF (define opt-name (string-capitalize! (get "ds-type"))) - (or (== opt-name "Exit Status") - (== opt-name "Description") - (exist? "omit-texi")) =][= - CONTINUE =][= - ENDIF =][= - - (ag-fprintf "menu" menu-entry-fmt (string-append opt-name "::") opt-name) - (set! label-str (string-append - down-prog-name " " (string-capitalize opt-name))) - (print-node opt-name label-str) - (define cvt-fn (get "ds-format" "texi")) - (if (not (== cvt-fn "texi")) - (divert-convert cvt-fn) ) =][= - (emit (string-append "\n" (get "ds-text") "\n")) - (convert-divert) =][= - -ENDFOR doc-section =][= - -ENDDEF emit-doc-sections - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-exit-status =][= - (ag-fprintf "menu" menu-entry-fmt "exit status::" "exit status") - (print-node "exit status" (string-append program-name " exit status")) =] - -One of the following exit values will be returned: -@table @samp -@item 0 (EXIT_[= - (set! tmp-str (get "exit-name[0]" "SUCCESS")) - (string-upcase (string->c-name! tmp-str)) - =]) -[= - (define need-ex-noinput (exist? "homerc")) - (define need-ex-software #t) - (get "exit-desc[0]" "Successful program execution.")=] -@item 1 (EXIT_[= - - (set! tmp-str (get "exit-name[1]" "FAILURE")) - (string-upcase (string->c-name! tmp-str))=]) -[= (get "exit-desc[1]" - "The operation failed or the command syntax was not valid.") =][= - -FOR exit-desc (for-from 2) =][= - (if (= (for-index) 66) - (set! need-ex-noinput #f) - (if (= (for-index) 70) - (set! need-ex-software #f) )) - (set! tmp-str (get (sprintf "exit-name[%d]" (for-index)) "* unnamed *")) - (sprintf "\n@item %d (EXIT_%s)\n%s" (for-index) - (string-upcase (string->c-name! tmp-str)) - (get (sprintf "exit-desc[%d]" (for-index)))) - =][= -ENDFOR exit-desc =][= - -(if need-ex-noinput - (emit "\n@item 66 (EX_NOINPUT) -A specified configuration file could not be loaded.")) - -(if need-ex-noinput - (emit "\n@item 70 (EX_SOFTWARE) -libopts had an internal operational error. Please report -it to autogen-users@@lists.sourceforge.net. Thank you.")) -=] -@end table[= - -ENDDEF emit-exit-status - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-aliases =] - -This is an alias for the [= aliases =] option, -[= (sprintf "@pxref{%1$s %2$s, the %2$s option documentation}.\n" - down-prog-name (get "aliases")) =][= - -ENDDEF emit-aliases - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-opt-text =] - -This is the ``[=(string-downcase! (get "descrip"))=]'' option.[= - IF (exist? "arg-type") =] -This option takes an [= (if (exist? "arg-optional") "optional " "") - =]argument [= arg-type =][= -(if (exist? "arg-name") (string-append " @file{" - (string-substitute (get "arg-name") "@" "@@") "}")) - =].[= - ENDIF =][= - - (set! extra-ct 0) - (out-push-new) =][= - - IF (exist? "min") =]@item -is required to appear on the command line. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "max") =]@item -may appear [= - IF % max (== "%s" "NOLIMIT") - =]an unlimited number of times[= - ELSE - =]up to [=max=] times[= - ENDIF=]. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "enabled") =]@item -is enabled by default. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "ifdef") =]@item -must be compiled in by defining @code{[=(get "ifdef") - =]} during the compilation. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF =][= - - IF (exist? "ifndef") =]@item -must be compiled in by @strong{un}-defining @code{[=(get "ifndef") - =]} during the compilation. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "no_preset") =]@item -may not be preset with environment variables or configuration (rc/ini) files. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "equivalence") =]@item -is a member of the [=equivalence=] class of options. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "flags_must") =]@item -must appear in combination with the following options: -[= FOR flags_must ", " =][=flags_must=][= - ENDFOR=]. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (exist? "flags_cant") =]@item -must not appear in combination with any of the following options: -[= FOR flags_cant ", " =][=flags_cant=][= - ENDFOR=]. -[= (set! extra-ct (+ extra-ct 1)) =][= - ENDIF=][= - - IF (~* (get "arg-type") "key|set") =]@item -This option takes a keyword as its argument[= - - CASE arg-type =][= - =* key =][= (set! extra-ct (+ extra-ct 1)) =]. -The argument sets an enumeration value that can be tested by comparing[= - - =* set =][= (set! extra-ct (+ extra-ct 1)) =] list. -Each entry turns on or off membership bits. These bits can be tested -with bit tests against[= - ESAC arg-type =] the option value macro ([= -(string-upcase (string-append -(if (exist? "prefix") (string-append (get "prefix") "_") "") -"OPT_VALUE_" (get "name") )) =]). -The available keywords are: -@example -[= (shell (string-append - "${CLexe:-columns} -I4 --spread=1 -W50 <<\\" heredoc-marker - (join "\n" (stack "keyword") "\n") - heredoc-marker - ) ) =] -@end example -[= - - IF (=* (get "arg-type") "key") =] -or their numeric equivalent.[= - ENDIF =][= - - ENDIF key/set arg =][= - - IF (> extra-ct 0) =][= - (set! extra-text (out-pop #t)) =] - -@noindent -This option has some usage constraints. It: -@itemize @bullet -[=(. extra-text) -=]@end itemize -[= ELSE =][= - (out-pop) =][= - ENDIF =][= - -?% doc "\n%s" "\nThis option has no @samp{doc} documentation." =][= - IF (exist? "deprecated") =] - -@strong{NOTE: THIS OPTION IS DEPRECATED}[= - - ENDIF =][= - -ENDDEF emit-opt-text - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE set-home-rc-vars =][= - CASE homerc =][= - ==* '$@' =][= - (set! explain-pkgdatadir #t) - (set! cfg-file-name (string-substitute (get "homerc") - "$@" "$(pkgdatadir)")) =][= - - == '.' =][= - (set! cfg-file-name "$PWD") - (set! env-var-list (string-append env-var-list "PWD, ")) - =][= - - ==* './' =][= - (set! explain-pkgdatadir #t) - (set! env-var-list (string-append env-var-list "PWD, ")) - (set! cfg-file-name (string-append "$PWD" (substring (get "homerc") 1))) - =][= - - ~~* '\$[A-Za-z]' =][= - (set! cfg-file-name (get "homerc")) - (set! env-var-list (string-append env-var-list - (shellf "echo '%s' | sed 's/^.//;s#/.*##'" cfg-file-name) - ", " )) - =][= - - == "" =][= (set! cfg-file-name "") =][= - - * =][= - (set! cfg-file-name (get "homerc")) =][= - ESAC =][= - -ENDDEF set-home-rc-vars - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-multiple-rc \=] -[= - (define explain-pkgdatadir #f) - (define env-var-list "") - rc-count =] places for configuration files: -@itemize @bullet[= -FOR homerc =][= - INVOKE set-home-rc-vars =][= - (if (> (string-length cfg-file-name) 0) - (sprintf "\n@item\n%s" cfg-file-name )) - =][= - -ENDFOR homerc =] -@end itemize[= - (if explain-pkgdatadir (ag-fprintf 0 -"\nThe value for @code{$(pkgdatadir)} is recorded at package configure time -and replaced by @file{libopts} when @file{%s} runs." program-name)) - -(if (> (string-length env-var-list) 1) - (shell (string-append -"list='@code{'`echo '" env-var-list "' | \ - sed -e 's#, $##' \ - -e 's#, #}, @code{#g' \ - -e 's#, \\([^ ][^ ]*\\)$#, and \\1#'`\\} -echo -echo 'The environment variables' ${list} -echo 'are expanded and replaced when @file{" program-name "} runs.'" -)) ) =] -For any of these that are plain files, they are simply processed. -For any that are directories, then a file named @file{[= - (if (exist? "rcfile") (get "rcfile") - (string-append "." program-name "rc"))=]} is searched for -within that directory and processed. -[= - -ENDDEF emit-multiple-rc - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-one-rc-dir =][= - (define env-var-list "") - (define explain-pkgdatadir #f) =][= - INVOKE set-home-rc-vars - -=]@file{[=(. cfg-file-name) =]} for configuration (option) data.[= - IF (. explain-pkgdatadir) =] -The value for @code{$(pkgdatadir)} is recorded at package configure time -and replaced by @file{libopts} when @file{[=prog-name=]} runs. -[=ENDIF=][= -(if (> (string-length env-var-list) 1) - (sprintf -"\nThe environment variable @code{%s} is expanded and replaced when -the program runs" env-var-list)) =] -If this is a plain file, it is simply processed. -If it is a directory, then a file named @file{[= -(if (exist? "rcfile") (get "rcfile") - (string-append "." program-name "rc")) -=]} is searched for within that directory.[= - -ENDDEF emit-one-rc-dir - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-rc-file-info =] - -@noindent -@code{libopts} will search in [= - - IF (define rc-count (count "homerc")) - (define cfg-file-name "") - (> rc-count 1) =][= - - INVOKE emit-multiple-rc =][= - - ELSE =][= - INVOKE emit-one-rc-dir =][= - ENDIF (> rc-count 1) - -=] - -Configuration files may be in a wide variety of formats. -The basic format is an option name followed by a value (argument) on the -same line. Values may be separated from the option name with a colon, -equal sign or simply white space. Values may be continued across multiple -lines by escaping the newline with a backslash. - -Multiple programs may also share the same initialization file. -Common options are collected at the top, followed by program specific -segments. The segments are separated by lines like: -@example -[[=(. UP-PROG-NAME)=]] -@end example -@noindent -or by -@example - -@end example -@noindent -Do not mix these styles within one configuration file. - -Compound values and carefully constructed string values may also be -specified using XML syntax: -@example - - ...<...>... - -@end example -@noindent -yielding an @code{option-name.sub-opt} string value of -@example -"...<...>..." -@end example -@code{AutoOpts} does not track suboptions. You simply note that it is a -hierarchicly valued option. @code{AutoOpts} does provide a means for searching -the associated name/value pair list (see: optionFindValue).[= - -ENDDEF emit-rc-file-info - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-presets =] - -[= - (ag-fprintf "menu" menu-entry-fmt "config::" - (string-append "presetting/configuring " down-prog-name) ) - - (print-node "config" - (string-append "presetting/configuring " program-name) ) =] - -Any option that is not marked as @i{not presettable} may be preset by -loading values from [= - -IF - - (if home-rc-files (emit - "configuration (\"rc\" or \"ini\") files")) - - environ-init - - =][= - (if home-rc-files (emit ", and values from ")) - =]environment variables named @code{[=(. UP-PROG-NAME)=]} and @code{[= -(. UP-PROG-NAME)=]_}. @code{} must be one of -the options listed above in upper case and segmented with underscores. -The @code{[=(. UP-PROG-NAME)=]} variable will be tokenized and parsed like -the command line. The remaining variables are tested for existence and their -values are treated like option arguments[= - ENDIF have environment inits =]. -[= - - IF (. home-rc-files) =][= - INVOKE emit-rc-file-info =][= - ENDIF home-rc-files =] - -The command line options relating to configuration and/or usage help are: -[= - -IF (exist? "version") =] -@[= (. head-level) =] version[= (flag-string "version-value" "v") =] - -Print the program version to standard out, optionally with licensing -information, then exit 0. The optional argument specifies how much licensing -detail to provide. The default is to print [= -(if (exist? "gnu-usage") "the license name with the version" "just the version") -=]. The licensing infomation may be selected with an option argument. Only the -first letter of the argument is examined: - -@table @samp -@item version -Only print the version.[= -(if (not (exist? "gnu-usage")) " This is the default.")=] -@item copyright -Name the copyright usage licensing terms.[= -(if (exist? "gnu-usage") " This is the default.")=] -@item verbose -Print the full copyright usage licensing terms. -@end table -[= -ENDIF version =][= - -IF (exist? "usage-opt") =] -@[= (. head-level) =] usage[= (flag-string "usage-value" "u") =] - -Print abbreviated usage to standard out, then exit 0. -[= -ENDIF usage-opt =][= - -IF (exist? "vendor-opt") =] -@[= (. head-level) =] vendor-option (-W) - -Options that do not have flag values specified must be specified with -@code{-W} and the long option name. That long name is the argument to -this option. Any options so named that require an argument must have -that argument attached to the option name either with quoting or an -equal sign. -[= -ENDIF vendor-opt =][= - -IF (exist? "resettable") =] -@[= (. head-level) =] reset-option[= (flag-string "reset-value" "R") =] - -Resets the specified option to the compiled-in initial state. -This will undo anything that may have been set by configuration files. -The option argument may be either the option flag character or its long name. -[= -ENDIF resettable =][= - -IF (exist? "home-rc") =][= - IF (exist? "disable-save") =] -@[= (. head-level) =] save-opts[= (flag-string "save-opts-value" ">") =] - -Saves the final, configured option state to the specified file (the optional -option argument). If no file is specified, then it will be saved to the -highest priority (last named) @file{rc-file} in the search list. -[= - ENDIF disable-save =][= - - IF (exist? "disable-load") =] -@[= (. head-level) =] load-opts[= (flag-string "load-opts-value" "<") =] - -Loads the named configuration file. -[= - ENDIF disable-load =][= -ENDIF home-rc =][= - -ENDDEF emit-presets - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE header \=] -\input texinfo -@c -*-texinfo-*- -@c %**start of header -@setfilename [= (string-append down-prog-name ".info") =] -@settitle [= (sprintf (if (exist? "package") "%2$s - %1$s" "%s") - (get "package") (get "prog-title")) =] -@c %**end of header -@setchapternewpage off -@titlepage -@sp 10 -@comment The title is printed in a large font. -@center @titlefont{Sample Title} - -@c The following two commands start the copyright page. -@page -@vskip 0pt plus 1filll -[= (name-copyright) =][= -IF (exist? "copyright.type") =] -[= (license-full (get "copyright.type") program-name "" - (get "copyright.owner" (get "copyright.author" "")) - (get "copyright.date") ) =][= -ENDIF =] -@end titlepage -@node Top, [= prog-name =] usage, , (dir) -@top [= prog-title =] -[= - -ENDDEF header - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE emit-usage-opt =][= - - (define label-str (string-append - program-name " help/usage (@option{" help-opt "})")) - (ag-fprintf "menu" menu-entry-fmt "usage::" label-str) - (sprintf node-fmt "usage" label-str) =] -@cindex [=(. down-prog-name)=] help - -This is the automatically generated usage text for [= prog-name =]. - -The text printed is the same whether selected with the @code{help} option -(@option{[= (. help-opt) =]}) or the @code{more-help} option (@option{[= -(. more-help-opt) =]}). @code{more-help} will print -the usage text by passing it through a pager program. -@code{more-help} is disabled on platforms without a working -@code{fork(2)} function. The @code{PAGER} environment variable is -used to select the program, defaulting to @file{more}. Both will exit -with a status code of 0. - -@exampleindent 0 -@example -[= (out-push-new) =] -prog_name=[= (. program-name) =] -PROG=./${prog_name} -test -f ${PROG} || { - PROG=`echo $PROG | tr '[A-Z]' '[a-z]'` - test -f ${PROG} || PROG=`echo $PROG | tr x_ x-` -} -if [ ! -f ${PROG} ] -then - if [= (string-append program-name " " help-opt) =] > /dev/null 2>&1 - then PROG=`command -v ${prog_name}` - else PROG="echo ${prog_name} is unavailable - no " - fi -fi -${PROG} [=(. help-opt)=] 2>&1 | \ - sed -e "s/USAGE: lt-${prog_name} /USAGE: ${prog_name} /" \ - -e 's/@/@@/g;s/{/@{/g;s/}/@}/g' \ - -e 's/ / /g' -[= (shell (out-pop #t)) =] -@end example -@exampleindent 4 -[= - -ENDDEF emit-usage-opt - -@c = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =][= - -DEFINE initialization =][= - - - (shell "CLexe=${AGexe%/autogen}/columns") - - - ;; divert-convert divert text for conversion to .texi format - ;; convert-divert convert the diversion done with divert-convert - ;; - (define divert-convert (lambda (diversion-type) (begin - (set! was-diverted - (not (or (== diversion-type "texi") (== diversion-type "")))) - (if was-diverted (begin - (set! cvt-script - (find-file (string-append diversion-type "2texi"))) - (if (not (defined? 'cvt-script)) - (error (sprintf "unknown source format type: %s" diversion-type)) ) - (out-push-new) )) ))) - - (define heredoc-marker "_Unlikely_Here_Doc_Marker_\n") - (define convert-divert (lambda () - (if was-diverted (shell (string-append - cvt-script "<<\\" heredoc-marker (out-pop #t) "\n" heredoc-marker - )) ))) - - (define was-diverted #f) - (define diversion-type "") - (define cvt-script "") - (define tmp-str "") - - (define name-copyright (lambda () - (if (exist? "copyright") - (string-append "\nThis software is released under " - (license-name (get "copyright.type" "an unknown copyright")) - "." ) ) )) - - (make-tmp-dir) - (define program-name (get "prog-name")) - (define down-prog-name (string-downcase program-name)) - (define UP-PROG-NAME (string-upcase program-name)) - (shellf "export AG_DEF_PROG_NAME=%s" program-name) - (define doc-level (getenv "LEVEL")) - (if (not (string? doc-level)) - (set! doc-level "section")) - (define file-name (string-append down-prog-name ".texi")) - (define coded-prog-name (string-append "@code{" down-prog-name "}")) - - (define replace-prog-name (lambda (nm) - (string-substitute (get nm) down-prog-name coded-prog-name ) )) - - (define have-doc-options (exist? "flag.documentation")) - (define print-menu #t) - (define do-doc-nodes #f) - (define menu-entry-fmt (string-append - "* " down-prog-name " %-24s %s\n")) - (define emit-menu-entry (lambda (is-doc) (not is-doc))) - (if have-doc-options - (set! emit-menu-entry (lambda (is-doc) is-doc)) ) - (define chk-flag-val (exist? "flag.value")) - (define flag-string (lambda (v-nm v-df) (if (not chk-flag-val) "" - (string-append " (-" - (if (exist? v-nm) (get v-nm) v-df) - ")") ))) - - (define help-opt "") - (if (exist? "long-opts") - (set! help-opt "--help") - (if (not (exist? "flag.value")) - (set! help-opt "help") - (if (not (exist? "help-value")) - (set! help-opt "-?") - (begin - (set! tmp-str (get "help-value")) - (if (> (string-length tmp-str) 0) - (set! help-opt (string-append "-" tmp-str)) - (set! help-opt "--help") - ) ) - ))) - - (define more-help-opt "") - (if (exist? "long-opts") - (set! more-help-opt "--more-help") - (if (not (exist? "flag.value")) - (set! more-help-opt "more-help") - (if (not (exist? "more-help-value")) - (set! more-help-opt "-!") - (begin - (set! tmp-str (get "more-help-value")) - (if (> (string-length tmp-str) 0) - (set! help-opt (string-append "-" tmp-str)) - (set! help-opt "--more-help") - ) ) - ))) - - =][= - - CASE (. doc-level) =][= - == document =][= INVOKE header =][= - (define sub-level "chapter") - (define head-level "heading") =][= - == chapter =][= - (define sub-level "section") - (define head-level "subheading") =][= - == section =][= - (define sub-level "subsection") - (define head-level "subsubheading") =][= - == subsection =][= - (define sub-level "subsubsection") - (define head-level "subsubheading") =][= - - * =][=(error (sprintf "invalid doc level: %s\n" doc-level)) =][= - - ESAC doc level =][= - - (define node-fmt (string-append - "\n@node " down-prog-name " %s\n@" sub-level " %s")) - (define print-node (lambda (a b) (ag-fprintf 0 node-fmt a b) )) - - (define opt-node-fmt (if have-doc-options - (string-append "\n@" head-level - " %2$s.\n@anchor{" down-prog-name " %1$s}") - node-fmt - )) - - (define exit-sts-fmt "\n\n@node %1$s %2$s\n@%3$s %1$s %2$s\n") - =][= - - IF (not (== doc-level "document")) =][= - (set! file-name (string-append "invoke-" file-name)) - \=] -@node [= prog-name =] Invocation -@[=(. doc-level) =] Invoking [= prog-name =] -@pindex [= prog-name =] -@cindex [= prog-title =][= - -FOR concept =] -@cindex [= concept =][= -ENDFOR =][= - - ENDIF document component - -=] -@ignore -[= - -(out-move file-name) -(dne "# " "# ") - -=] -@end ignore -[= - -ENDDEF initialization - -@c agtexi-cmd.tpl ends here =] diff --git a/sntp/ag-tpl/Old/cmd-doc.tlib b/sntp/ag-tpl/Old/cmd-doc.tlib deleted file mode 100644 index bcd858c37..000000000 --- a/sntp/ag-tpl/Old/cmd-doc.tlib +++ /dev/null @@ -1,1003 +0,0 @@ -[+: -*- Mode: nroff -*- - - AutoGen5 template man - -# cmd-doc.tlib -- Template for command line man/mdoc pages -# -# Time-stamp: "2012-05-12 20:52:33 bkorb" -# -# This file is part of AutoOpts, a companion to AutoGen. -# AutoOpts is free software. -# Copyright (c) 1992-2012 Bruce Korb - all rights reserved -# -# AutoOpts is available under any one of two licenses. The license -# in use must be one of these two and the choice is under the control -# of the user of the license. -# -# The GNU Lesser General Public License, version 3 or later -# See the files "COPYING.lgplv3" and "COPYING.gplv3" -# -# The Modified Berkeley Software Distribution License -# See the file "COPYING.mbsd" -# -# These files have the following md5sums: -# -# 43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3 -# 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 -# 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd - -# Produce a man page for section 1, 5, 6 or 8 commands. Which is -# selected via: -DMAN_SECTION=n. "n" may have a suffix, if desired. -# These sections have default section names that may be overridden -# with -DSECTIN_NAME=XX, also passed to the autogen invocation. -# -:+][+: - - - (shell "CLexe=${AGexe%/autogen}/columns") - - -(define down-prog-name (string-downcase! (get "prog-name"))) -(define UP-PROG-NAME (get-up-name "prog-name")) - -(define tmp-val (getenv "MAN_SECTION")) -(define man-sect (if (exist? "cmd-section") (get "cmd-section") "1")) -(define file-name "") -(define sect-name "") -(define macro-name "") -(define tmp-str "") -(define fname-line "") -(define use-flags (exist? "flag.value")) -(define named-mode (not (or use-flags (exist? "long-opts") ))) - -(if (defined? 'tmp-val) - (if (string? tmp-val) - (set! man-sect tmp-val))) - -(define section-name - (if (=* man-sect "1") "User Commands" - (if (=* man-sect "5") "File Formats" - (if (=* man-sect "6") "Games" - (if (=* man-sect "8") "System Management" - (error - "the agman-cmd template only produces section 1, 5, 6 and 8 man pages") -))))) -(set! tmp-val (getenv "SECTION_NAME")) -(if (defined? 'tmp-val) (if (string? tmp-val) - (set! section-name tmp-val) )) - -(define package-text "") -(define package+version (and (exist? "package") (exist? "version"))) - -(if (or (exist? "package") (exist? "version")) (begin - (set! package-text (string-append - (get "package") - (if package+version " (" "") - (get "version") - (if package+version ")" "") )) -) ) - -(define name-to-fname (lambda (nm) - (string-tr (string-downcase nm) " " "-") )) - -(define sect-line-fname (lambda () (begin - (out-push-new file-name) - (emit (string-append ".Sh \"" sect-name "\"\n")) - (string-append "mk-" macro-name) ))) - -(make-tmp-dir) - -(define home-rc-files (exist? "homerc")) -(define home-rc-text - "\nSee \\fBOPTION PRESETS\\fP for configuration files.") - -(if (=* man-sect "5") (set! home-rc-files #f)) -(if (=* man-sect "5") (set! home-rc-text "")) - -(define environ-init (exist? "environrc")) -(define environ-text - "\nSee \\fBOPTION PRESETS\\fP for configuration environment variables.") - -(set! tmp-str (find-file (if man-page "texi2man" "texi2mdoc"))) -(if (not (defined? 'tmp-str)) - (error (string-append "cannot locate " - (if man-page "texi2man" "texi2mdoc")))) -(shell (string-append "cvt_prog='" tmp-str - "'\ntest -x \"$cvt_prog\" || die 'no conversion program'" )) - -(define get-cvt (lambda (nm alt-txt) - (shell (string-append - "{\n${cvt_prog} || die ${cvt_prog} failed in $PWD\n" - "} <<\\_EndOfTexiSection_\n" - (get nm alt-txt) - "\n_EndOfTexiSection_" - )) -)) - -(emit (head-line)) -(dne ".\\\" ") :+][+: - -INCLUDE "tpl-config.tlib" :+][+:# - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" B U I L D D O C -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE build-doc :+][+: - -INVOKE doc-sections :+][+: -INVOKE ao-sections :+][+: - -(out-push-new (string-append tmp-dir "/.assemble")) \:+] - -cat_n_rm() { - test -f ${tmp_dir}/$1 || return 0 - [+:(. egrep-prog):+] -v '^[ ]*$' ${tmp_dir}/$1 - rm -f ${tmp_dir}/$1 -} - -#.\" Insert these sections first, in the prescribed order -# -for f in synopsis description options option-presets -do cat_n_rm $f ; done -test -f ${tmp_dir}/name && rm -f ${tmp_dir}/name - -#.\" These sections go last, in the prescribed order -# -for f in implementation-notes environment files examples exit-status errors \ - compatibility see-also conforming-to history authors copyright bugs notes -do cat_n_rm $f ; done > ${tmp_dir}/.fini - -#.\" Insert the contents of all remaining files in alphabetic order, -#.\" except remove any blank lines. -# -set XX ${tmp_dir}/* ; shift -test -f "$1" && cat $* | [+:(. egrep-prog):+] -v '^[ ]*$' - -#.\" Now insert the sections we squirreled away for the end. -# -cat ${tmp_dir}/.fini -[+: (out-pop) - (shell ". ${tmp_dir}/.assemble") :+][+: - -ENDDEF build-doc - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" D O C S E C T I O N S -.\" -.\" Emit the files for each section that was provided. -.\" -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE doc-sections :+][+: - -FOR doc-section :+][+: - - CASE - (define sec-type (string-upcase (get "ds-type"))) - (define sec-name (name-to-fname sec-type)) - (out-push-new (string-append tmp-dir "/" sec-name)) - (define cvt-fn (find-file (string-append - (get "ds-format" "man") "2mdoc"))) - (if (not (defined? 'cvt-fn)) - (error (sprintf "Cannot locate converter for %s" - (get "ds-format" "man")))) - sec-type :+][+: - == "" :+][+: (error "unnamed doc-section") :+][+: - *==* " " :+].Sh "[+: (. sec-type) :+]"[+: - * :+].Sh [+: (. sec-type) :+][+: - ESAC :+] -[+: - (shell (string-append - "fn='" cvt-fn "'\n" - "test -f ${fn} || die ${fn} not found from $PWD\n" - "${fn} <<\\_EndOfDocSection_ || die ${fn} failed in $PWD\n" - (get "ds-text") - "\n_EndOfDocSection_" - )) :+][+: - - CASE (. sec-type) :+][+: - == FILES :+][+: - (if home-rc-files (emit home-rc-text)) - (set! home-rc-files #f) :+][+: - - == ENVIRONMENT :+][+: - (if environ-init (emit environ-text)) - (set! environ-init #f) :+][+: - ESAC :+][+: - - (out-pop) - :+][+: - -ENDFOR doc-section :+][+: - -ENDDEF doc-sections - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" A O S E C T I O N S -.\" -.\" Emit the files for the sections that these templates augment, -.\" replace or conditionally replace -.\" -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE ao-sections :+][+: - -IF (=* man-sect "5") :+][+: -ELSE :+][+: - INVOKE cond-section sec = "OPTIONS" mode = "replace" :+][+: -ENDIF :+][+: -INVOKE cond-section sec = "SYNOPSIS" mode = "alt" :+][+: -INVOKE cond-section sec = "DESCRIPTION" mode = "append" :+][+: -IF (=* man-sect "5") :+][+: -ELSE :+][+: - INVOKE cond-section sec = "EXIT STATUS" mode = "insert" :+][+: -ENDIF :+][+: -INVOKE cond-section sec = "AUTHORS" mode = "alt" :+][+: -INVOKE cond-section sec = "BUGS" mode = "append" :+][+: -INVOKE cond-section sec = "NOTES" mode = "append" :+][+: - -IF (exist? "copyright") :+][+: - INVOKE cond-section sec = "COPYRIGHT" mode = "alt" :+][+: -ENDIF :+][+: - -IF (=* man-sect "5") :+][+: - INVOKE cond-section sec = "FILES" mode = "append" :+][+: -ELIF (or home-rc-files environ-init) :+][+: - INVOKE cond-section sec = "OPTION PRESETS" mode = "replace" :+][+: - - IF (. home-rc-files) :+][+: - INVOKE cond-section sec = "FILES" mode = "append" :+][+: - ENDIF :+][+: - - IF (. environ-init) :+][+: - INVOKE cond-section sec = "ENVIRONMENT" mode = "append" :+][+: - ENDIF :+][+: - -ENDIF :+][+: - -ENDDEF ao-sections - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" C O N D I T I O N A L S E C T I O N -.\" -.\" Figure out what to do for AutoOpts required sections, depending on "mode" -.\" In all cases, if the file does not exist, invoke the "mk" macro to create -.\" a new file. If it does exist, then: -.\" -.\" alt Alternate -- emit no text -.\" replace throw away any pre-existing file. -.\" append invoke the "append" macro to emit additional text -.\" insert save the current contents, replacing the .Sh line with .Pp. -.\" invoke the "mk" macro then emit the saved text -.\" -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE cond-section :+][+: - - IF - (set! sect-name (string-upcase! (string-substitute - (get "sec") "-" " " ))) - (set! macro-name (string-downcase! (string-substitute - sect-name " " "-" ))) - (set! file-name (string-append tmp-dir "/" macro-name)) - - (not (access? file-name R_OK)) :+][+: - - INVOKE (sect-line-fname) :+][+: - (out-pop) :+][+: - - ELSE file exists :+][+: - - CASE (get "mode") :+][+: - - == replace :+][+: - INVOKE (sect-line-fname) :+][+: - (out-pop) :+][+: - - == append :+][+: - (out-push-add file-name) :+][+: - INVOKE (string-append "append-" macro-name) :+][+: - (out-pop) :+][+: - - == insert :+][+: - (set! fname-line (shellf "sed '1s/.Sh .*/.Pp/' %s" file-name)) :+][+: - INVOKE (sect-line-fname) :+][+: - (emit fname-line) - (out-pop) :+][+: - - # * -- otherwise, do nothing :+][+: - - ESAC :+][+: - - ENDIF file existence/non-existence :+][+: -ENDDEF cond-section - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - D E S C R I P T I O N -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-description :+][+: - - (if (exist? "prog-man-descrip") - (stack-join "\n.Pp\n" "prog-man-descrip") - (if (exist? "detail") - (stack-join "\n.Pp\n" "detail") - "There is no description for this command." - ) ) :+] -[+: - INVOKE append-description :+][+: - -ENDDEF mk-description - -.\" = = = = = APPEND TO IT: :+][+: - -DEFINE append-description :+][+: - -IF (= (get "main.main-type") "for-each"):+][+: - - CASE main.handler-type :+][+: - ~* ^(name|file)|.*text \:+] -.Pp -This program will perform its function for every file named on the command -line or every file named in a list read from stdin. The arguments or input -names must be pre\-existing files. The input list may contain comments, -which[+: - - !E \:+] -.Pp -This program will perform its function for every command line argument -or every non\-comment line in a list read from stdin. -The input list comments[+: - - * :+][+: - (error "the 'for-each' main has in invalid handler-type.") :+][+: - ESAC \:+] - are blank lines or lines beginning with a '[+: - ?% comment-char "%s" "#" :+]' character. -[+: - -ENDIF - "main" exists :+][+: -ENDDEF append-description - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - O P T I O N S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-options - -:+][+: - -(define opt-arg "") -(define dis-name "") -(define opt-name "") -(define optname-from "A-Z_^") -(define optname-to "a-z--") -(define cvt-cmd "") -(define formatted-doc (exist? "option-doc-format")) - -(if formatted-doc (begin - (out-push-new) - (set! cvt-cmd (string-append (get "option-doc-format") "2mdoc")) -) ) - -(if (exist? "preserve-case") - (begin - (set! optname-from "_^") - (set! optname-to "--") -) ) - -(define fix-optname (lambda (o_nm) (begin - (set! o_nm (string-tr o_nm optname-from optname-to)) - (set! o_nm (string-substitute o_nm "-" "\\-" )) - o_nm ))) - -(if (exist? "option-info") - (string-append ".Pp\n" (get "option-info") "\n") ) -\:+] -.Bl -tag[+: - -FOR flag :+][+: - IF (not (exist? "documentation")) :+][+: - IF (exist? "aliases") :+][+: - INVOKE emit-alias-opt :+][+: - ELSE :+][+: - INVOKE emit-flag-text :+][+: - ENDIF :+][+: - - ELSE :+] -.Ss "[+: (get-cvt "descrip" "") :+]"[+: - - IF (set! tmp-str (get-cvt "documentation" "")) - (> (string-length tmp-str) 3) :+] -[+: (. tmp-str) :+] -[+: ENDIF :+][+: - - ENDIF :+][+: -ENDFOR flag - -.\" = = = = = = = = = = = = = = = = = -.\" help option -.\" = = = = = = = = = = = = = = = = = - -:+] -.It [+: - - IF (. use-flags) :+]\-[+: (get "help-value" "?") :+][+: - (if (exist? "long-opts") " , \" \\-\\-help\"") :+][+: - ELSE :+][+: - (if (exist? "long-opts") "\\-\\-") :+]help[+: - ENDIF :+] -Display usage information and exit.[+:# - -.\" = = = = = = = = = = = = = = = = = -.\" more-help option -.\" = = = = = = = = = = = = = = = = = :+][+: - - IF (not (exist? "no-libopts")) :+] -.It [+: - - IF (. use-flags) :+]\-[+: ?% more-help-value "%s" "!" :+][+: - IF (exist? "long-opts") :+] , " \-\-more-help"[+: ENDIF :+][+: - ELSE :+][+: - IF (exist? "long-opts") :+]\-\-[+: ENDIF :+]more-help[+: - ENDIF :+] -Pass the extended usage information through a pager.[+: - -ENDIF no no-libopts - -.\" = = = = = = = = = = = = = = = = = -.\" save and load configuration -.\" = = = = = = = = = = = = = = = = = :+][+: - -IF (exist? "homerc") :+] -.It [+: - - IF (. use-flags) :+]\-[+: ?% save-opts-value "%s" ">" - :+] " [\fIrcfile\fP][+: - IF (exist? "long-opts") :+]," " \-\-save-opts" "[=\fIrcfile\fP][+: - ENDIF :+]"[+: - ELSE :+][+: - IF (exist? "long-opts") :+]\-\-[+: - ENDIF :+]save-opts "[=\fIrcfile\fP]"[+: - ENDIF :+] -Save the option state to \fIrcfile\fP. The default is the \fIlast\fP -configuration file listed in the \fBOPTION PRESETS\fP section, below. -.It [+: - - IF (. use-flags) :+]\-[+: ?% load-opts-value "%s" "<" - :+] " \fIrcfile\fP[+: - IF (exist? "long-opts") - :+]," " \-\-load-opts" "=\fIrcfile\fP," " \-\-no-load-opts[+: - ENDIF :+]"[+: - ELSE :+][+: - IF (exist? "long-opts") :+]\-\-[+: - ENDIF :+]load-opts "=\fIrcfile\fP," " \-\-no-load-opts"[+: - ENDIF :+] -Load options from \fIrcfile\fP. -The \fIno-load-opts\fP form will disable the loading -of earlier RC/INI files. \fI\-\-no-load-opts\fP is handled early, -out of order.[+: -ENDIF (exist? "homerc") - -.\" = = = = = = = = = = = = = = = = = -.\" version -.\" = = = = = = = = = = = = = = = = = :+][+: - -IF (exist? "version") :+] -.It [+: - - IF (. use-flags) :+]\-[+: ?% version-value "%s" "v" - :+] " [{\fIv|c|n\fP}][+: - IF (exist? "long-opts") :+]," " \-\-version" "[=\fI{v|c|n}\fP][+: - ENDIF :+]"[+: - ELSE :+][+: - IF (exist? "long-opts") :+]\-\-[+: - ENDIF :+]version "[=\fI{v|c|n}\fP]"[+: - ENDIF :+] -Output version of program and exit. The default mode is `v', a simple -version. The `c' mode will print copyright information and `n' will -print the full copyright notice.[+: -ENDIF :+] -.El -[+: - -(if formatted-doc - (shell (string-append - "fn='" (find-file cvt-cmd) - "'\ntest -f ${fn} || die '" cvt-cmd " not found'\n" - "${fn} <<\\_EndOfMdoc_ || die ${fn} failed in $PWD\n" - (out-pop #t) - "\n_EndOfMdoc_" )) ) :+][+: - -ENDDEF mk-options - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - O P T I O N - P R E S E T S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-option-presets \:+] -Any option that is not marked as \fInot presettable\fP may be preset -by loading values from [+: - IF (. home-rc-files) - :+]configuration ("RC" or ".INI") file(s)[+: - IF (. environ-init) :+] and values from -[+: - ENDIF :+][+: - ENDIF :+][+: - IF (. environ-init) :+]environment variables named: -.nf - \fB[+: (. UP-PROG-NAME) :+]_\fP or \fB[+: (. UP-PROG-NAME) :+]\fP -.fi -.ad[+: - IF (. home-rc-files) :+] -The environmental presets take precedence (are processed later than) -the configuration files.[+: - ENDIF :+][+: - ELSE :+].[+: - ENDIF :+][+: - - CASE - (define rc-file - (get "rcfile" (string-append "." (get "prog-name") "rc")) ) - (count "homerc") :+][+: - - == "0" :+][+: - == "1" :+][+: - - CASE homerc :+][+: - ~~ '\.|\$HOME' :+] -The file "\fI[+: (string-append (get "homerc") "/" rc-file) -:+]\fP" will be used, if present.[+: - * :+] -The \fIhomerc\fP file is "\fI[+:homerc:+]\fP", unless that is a directory. -In that case, the file "\fI[+: (. rc-file) :+]\fP" -is searched for within that directory.[+: - ESAC :+][+: - - * :+] -The \fIhomerc\fP files are [+: - FOR homerc ", " :+][+: - IF (last-for?) :+]and [+: - ENDIF :+]"\fI[+: homerc :+]\fP"[+: ENDFOR :+]. -If any of these are directories, then the file \fI[+: (. rc-file) :+]\fP -is searched for within those directories.[+: - ESAC :+][+: - -ENDDEF mk-option-presets - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - E X I T - S T A T U S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-exit-status \:+] -One of the following exit values will be returned: -.Bl -tag -[+: -(ag-fprintf 0 ".It 0 \" (EXIT_%s)\"\n%s\n" - (string->c-name! (string-upcase (get "exit-name[0]" "SUCCESS"))) - (get-cvt "exit-desc[0]" "Successful program execution.") ) - -(define need-ex-noinput (exist? "homerc")) -(define need-ex-software #t) - -(ag-fprintf 0 ".It 1 \" (EXIT_%s)\"\n%s\n" - (string->c-name! (string-upcase (get "exit-name[1]" "FAILURE"))) - (get-cvt "exit-desc[1]" - "The operation failed or the command syntax was not valid.")) :+][+: - -FOR exit-desc (for-from 2) :+][+: - (if (= (for-index) 66) - (set! need-ex-noinput #f) - (if (= (for-index) 70) - (set! need-ex-software #f) )) - - (set! tmp-str (get (sprintf "exit-name[%d]" (for-index)) "* unnamed *")) - (sprintf ".It %d \" (EXIT_%s)\"\n%s\n" - (for-index) - (string-upcase (string->c-name! tmp-str)) - (get-cvt "exit-desc" "")) :+][+: -ENDFOR exit-desc :+][+: -(if need-ex-noinput - (emit ".It 66 \" (EX_NOINPUT)\" -A specified configuration file could not be loaded.\n")) - -(if need-ex-noinput - (emit ".It 70 \" (EX_SOFTWARE)\" -libopts had an internal operational error. Please report -it to autogen-users@lists.sourceforge.net. Thank you.\n")) - -(if (> (string-length fname-line) 1) - (emit fname-line)) :+] -.El -[+: - -ENDDEF exit-status - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - A U T H O R S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-authors :+][+: - - (define remove-authors #t) - - (set! tmp-val - (if (exist? "copyright.author") - (stack-join ",\n" "copyright.author") - (stack-join ",\n" "copyright.owner") )) - - (if (> (string-length tmp-val) 1) - (string-append tmp-val "\n") - (delete-file file-name)) - - :+][+: - -ENDDEF mk-authors - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - B U G S -.\" -.\" This section is guaranteed to be the last section in the man page -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-bugs :+][+: - - (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) - (if (> (string-length tmp-val) 1) - (string-append "Please send bug reports to: " tmp-val "\n") - (delete-file file-name) ) - :+][+: - -ENDDEF mk-bugs :+][+: - -DEFINE append-bugs :+][+: - - (set! tmp-val (get "copyright.eaddr" (get "eaddr"))) - (if (> (string-length tmp-val) 1) - (string-append "Please send bug reports to: " tmp-val "\n") ) - :+][+: - -ENDDEF append-bugs - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - C O P Y R I G H T (+ licensing) -.\" -.\" This section is guaranteed to be the last section in the man page -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-copyright \:+] -Copyright (C) [+: copyright.date :+] [+: - (get "copyright.owner" (get "copyright.author" (get "copyright.eaddr"))) - :+] all rights reserved. -[+: CASE (get "copyright.type") :+][+: - = note :+][+: (get "copyright.text") :+][+: - == '' :+]This program has an unspecified license.[+: - - * :+][+: - (string-append "This program is released under the terms of " - (license-name (get "copyright.type")) ".") :+][+: - - ESAC :+] -[+: -ENDDEF mk-copyright - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - N O T E S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-notes \:+] -This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP -option definitions. -[+: - -ENDDEF mk-notes - -.\" = = = = = APPEND TO IT: :+][+: - -DEFINE append-notes \:+] - -.Pp -This manual page was \fIAutoGen\fP-erated from the \fB[+: prog-name :+]\fP -option definitions.[+: - -ENDDEF append-notes - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - E N V I R O N M E N T -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-environment :+][+: - INVOKE append-environment :+][+: -ENDDEF mk-environment - -.\" = = = = = APPEND TO IT: :+][+: - -DEFINE append-environment :+][+: - (. environ-text) :+][+: -ENDDEF append-environment - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" M K - F I L E S -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE mk-files :+][+: - INVOKE append-files :+][+: -ENDDEF mk-files - -.\" = = = = = APPEND TO IT: :+][+: - -DEFINE append-files :+][+: - (. home-rc-text) :+][+: -ENDDEF append-files - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" E M I T A L I A S O P T -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE emit-alias-opt :+] -.It [+: - IF (exist? "value") :+][+: - IF (exist? "long-opts") \:+] - \-[+:value:+] ", " -\-[+: name :+][+: - ELSE \:+] - \-[+:value:+][+: - ENDIF (exist? "long-opts") :+][+: - - ELSE value does not exist -- named option only :+][+: - - IF (not (exist? "long-opts")) \:+] - [+: name :+][+: - ELSE \:+] - \-\-[+: (. opt-name) :+][+: - ENDIF :+][+: - ENDIF :+] -This is an alias for the [+: aliases :+] option.[+: -ENDDEF emit-alias-opt - -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = -.\" E M I T F L A G T E X T -.\" = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = :+][+: - -DEFINE emit-flag-text :+][+: - - (if (exist? "enable") - (set! opt-name (string-append (get "enable") "-" (get "name"))) - (set! opt-name (get "name")) ) - (if (exist? "disable") - (set! dis-name (string-append (get "disable") "-" (get "name"))) - (set! dis-name "") ) - - (set! opt-name (fix-optname opt-name)) - (if (> (string-length dis-name) 0) - (set! dis-name (fix-optname dis-name)) ) - - (if (not (exist? "arg-type")) - (set! opt-arg "") - (set! opt-arg (string-append "\\fI" - (fix-optname (if (exist? "arg-name") - (get "arg-name") - (string-downcase! (get "arg-type")) )) - "\\fP" )) - ) - -:+] -.It [+: - IF (exist? "value") :+][+: - IF (exist? "long-opts") :+][+: - - # * * * * * * * * * * * * * * * * * * * * - * - * The option has a flag value (character) AND - * the program uses long options - * - \:+] - \-[+:value:+][+: - IF (not (exist? "arg-type")) :+] ", " -\-[+: - ELSE :+] " [+:(. opt-arg):+], " \-\-[+: - ENDIF :+][+: (. opt-name) :+][+: - IF (exist? "arg-type") :+][+: - ? arg-optional " [ =" ' "=" ' - :+][+: (. opt-arg) :+][+: - arg-optional " ]" :+][+: - ENDIF :+][+: - IF (exist? "disable") :+], " \fB\-\-[+:(. dis-name):+]\fP"[+: - ENDIF :+][+: - - ELSE :+][+: - - # * * * * * * * * * * * * * * * * * * * * - * - * The option has a flag value (character) BUT - * the program does _NOT_ use long options - * - \:+] - \-[+:value:+][+: - IF (exist? "arg-type") :+][+: - arg-optional "[" :+] "[+:(. opt-arg):+][+: - arg-optional '"]"' :+][+: - ENDIF " :+][+: - ENDIF (exist? "long-opts") :+][+: - - - ELSE value does not exist -- named option only :+][+: - - IF (not (exist? "long-opts")) :+][+: - - # * * * * * * * * * * * * * * * * * * * * - * - * The option does not have a flag value (character). - * The program does _NOT_ use long options either. - * Special magic: All arguments are named options. - * - \:+] - [+: (. opt-name) :+][+: - IF (exist? "arg-type") :+] [+: - ? arg-optional " [ =" ' "=" ' - :+][+:(. opt-arg) :+][+: - arg-optional "]" :+][+: - ENDIF:+][+: - IF (exist? "disable") :+], " \fB[+:(. dis-name):+]\fP"[+: - ENDIF :+][+: - - - ELSE :+][+: - # * * * * * * * * * * * * * * * * * * * * - * - * The option does not have a flag value (character). - * The program, instead, only accepts long options. - * - \:+] - \-\-[+: (. opt-name) :+][+: - - IF (exist? "arg-type") :+] "[+: #" :+][+: - arg-optional "[" :+]=[+:(. opt-arg):+][+: - arg-optional "]" :+]"[+: #" :+][+: - ENDIF :+][+: - - IF (exist? "disable") - :+], " \fB\-\-[+:(. dis-name):+]\fP"[+: - ENDIF :+][+: - ENDIF :+][+: - ENDIF :+] -[+: (get-cvt "descrip" "") :+].[+: - - IF (exist? "min") :+] -This option is required to appear.[+: - ENDIF :+][+: - - IF (exist? "max") :+] -This option may appear [+: - IF % max (= "%s" "NOLIMIT") - :+]an unlimited number of times[+:ELSE - :+]up to [+: max :+] times[+: - ENDIF:+].[+: - ENDIF:+][+: - - IF (exist? "disable") :+] -The \fI[+:(. dis-name):+]\fP form will [+: - IF (exist? "stack-arg") - :+]clear the list of option arguments[+: - ELSE :+]disable the option[+: - ENDIF :+].[+: - ENDIF:+][+: - - IF (exist? "enabled") :+] -This option is enabled by default.[+: - ENDIF :+][+: - - IF (exist? "no-preset") :+] -This option may not be preset with environment variables -or in initialization (rc) files.[+: - ENDIF :+][+: - - IF (and (exist? "default") named-mode) :+] -This option is the default option.[+: - ENDIF :+][+: - - IF (exist? "equivalence") :+] -This option is a member of the [+:equivalence:+] class of options.[+: - ENDIF :+][+: - - IF (exist? "flags-must") :+] -This option must appear in combination with the following options: -[+: FOR flags-must ", " :+][+:flags-must:+][+:ENDFOR:+].[+: - ENDIF :+][+: - - IF (exist? "flags-cant") :+] -This option must not appear in combination with any of the following options: -[+: FOR flags-cant ", " :+][+:flags-cant:+][+:ENDFOR:+].[+: - ENDIF :+][+: - - - IF (~* (get "arg-type") "key|set") :+] -This option takes a keyword as its argument[+: - - IF (=* (get "arg-type") "set") - -:+] list. Each entry turns on or off -membership bits. The bits are set by name or numeric value and cleared -by preceding the name or number with an exclamation character ('!'). -They can all be cleared with the magic name \fInone\fR and they can all be set -with -.IR all . -A single option will process a list of these values.[+: - - ELSE - -:+]. The argument sets an enumeration value that can -be tested by comparing them against the option value macro.[+: - - ENDIF - -:+] -The available keywords are: -.in +4 -.nf -.na -[+: (shellf "${CLexe} --indent='' --spread=1 -W50 <<_EOF_\n%s\n_EOF_" - (join "\n" (stack "keyword")) ) :+] -.fi -or their numeric equivalent. -.in -4[+: (if (exist? "arg-default") "\n.sp" ) :+][+: - - ELIF (=* (get "arg-type") "num") :+] -This option takes an integer number as its argument.[+: - - IF (exist? "arg-range") :+] -The value of [+:(. opt-arg):+] is constrained to being: -.in +4 -.nf -.na[+:FOR arg_range ", or" :+] -[+: (shellf " -range='%s' - -case \"X${range}\" in -X'->'?* ) - echo \"less than or equal to\" ` - echo $range | sed 's/->//' ` ;; - -X?*'->' ) - echo \"greater than or equal to\" ` - echo $range | sed 's/->.*//' ` ;; - -X?*'->'?* ) - echo \"in the range \" ` - echo $range | sed 's/->/ through /' ` ;; - -X?* ) - echo exactly $range ;; - -X* ) echo $range is indeterminate -esac" - -(get "arg-range") ) -:+][+: - ENDFOR arg-range :+] -.fi -.in -4[+: - - ENDIF arg-range exists :+][+: - - ENDIF arg-type key/set/num :+][+: - - IF (exist? "arg-default") :+] -The default [+: (. opt-arg) :+] for this option is: -.ti +4 - [+: (join " + " (stack "arg-default" )) :+][+: - ENDIF :+] -.sp -[+: - (if (exist? "doc") - (get-cvt "doc" "") - "This option has not been fully documented." ) :+][+: - IF (exist? "deprecated") :+] -.sp -.B -NOTE: THIS OPTION IS DEPRECATED -.R[+: - ENDIF :+][+: - -ENDDEF emit-flag-text - -.\" cmd-doc.tlib ends here \:+] diff --git a/sntp/ag-tpl/Old/mdoc2man b/sntp/ag-tpl/Old/mdoc2man deleted file mode 100755 index 406cdd9ee..000000000 --- a/sntp/ag-tpl/Old/mdoc2man +++ /dev/null @@ -1,308 +0,0 @@ -#! /bin/bash - -## mdoc2man.sh -- script to convert mdoc-isms to man-isms -## -## Time-stamp: "2012-04-15 07:38:27 bkorb" -## -## This file is part of AutoOpts, a companion to AutoGen. -## AutoOpts is free software. -## AutoOpts is Copyright (c) 1992-2012 Bruce Korb - all rights reserved -## -## AutoOpts is available under any one of two licenses. The license -## in use must be one of these two and the choice is under the control -## of the user of the license. -## -## The GNU Lesser General Public License, version 3 or later -## See the files "COPYING.lgplv3" and "COPYING.gplv3" -## -## The Modified Berkeley Software Distribution License -## See the file "COPYING.mbsd" -## -## These files have the following md5sums: -## -## 43b91e8ca915626ed3818ffb1b71248b COPYING.gplv3 -## 06a1a2e4760c90ea5e1dad8dfaac4d39 COPYING.lgplv3 -## 66a5cedaf62c4b2637025f049f9b826f COPYING.mbsd - -## This "library" converts mdoc-isms into man-isms. It gets included -## by the man page template at the point where mdoc-isms might start appearing -## and then "emit-man-text" is invoked when all the text has been assembled. -## -## Display the command line prototype, -## based only on the argument processing type. -## -## And run the entire output through "sed" to convert mdoc-isms - -# /bin/sh on Solaris is too horrible for words -# -case "$0" in -/bin/sh ) test -x /usr/xpg4/bin/sh && exec /usr/xpg4/bin/sh ${1+"$@"} ;; -esac - -parent_pid=$$ -prog=`basename $0 .sh` -NmName= - -die() { - echo "$prog error: $*" >&2 - ps -p ${AG_pid:-999999999} >/dev/null 2>&1 && \ - kill -TERM ${AG_pid} - kill -TERM $parent_pid - sleep 1 - kill -9 $parent_pid - sleep 1 - exit 1 -} - -had_no_arg() { - die "'$1' command had no argument: <$line>" -} - -# One function for each mdoc structure. -# -do_nest_enum() { - do_enum -} - -do_enum() { - echo '.in +4' - local ix=1 - - while IFS='' read -r line - do - case "${line}" in - .It* ) printf '.ti -4\n%d\n\t' $ix - ix=`expr $ix + 1` - ;; - - .Bl' '*enum* ) do_nest_enum ;; - .Bl' '*tag* ) do_nest_tag ;; - .Bl' '*bullet* ) do_nest_bullet ;; - .Bd' '* ) do_nest_block ;; - .Op' '* ) do_nest_optional ;; - .Fl' '* ) do_nest_flag ;; - .Ar' '* ) do_nest_arg ;; - - .El* ) echo '.in -4' - return 0 ;; - - * ) echo "$line" ;; - esac - done - die "EOF reached processing '.Bl -enum'" -} - -do_nest_tag() { - echo '.in +4' - while IFS='' read -r line - do - case "${line}" in - .It* ) printf '.ti -4\n.IR ' - echo ${line#.It} ;; - - .Bl' '*enum* ) do_nest_enum ;; - .Bl' '*tag* ) do_nest_tag ;; - .Bl' '*bullet* ) do_nest_bullet ;; - .Bd' '* ) do_nest_block ;; - .Op' '* ) do_nest_optional ;; - .Fl' '* ) do_nest_flag ;; - .Ar' '* ) do_nest_arg ;; - - .El* ) echo '.in -4' - return 0 ;; - - * ) echo "$line" ;; - esac - done - die "EOF reached processing '.Bl -tag'" -} - -do_tag() { - while IFS='' read -r line - do - case "${line}" in - .It* ) printf '.TP\n.BR ' - echo ${line#.It} ;; - - .Bl' '*enum* ) do_nest_enum ;; - .Bl' '*tag* ) do_nest_tag ;; - .Bl' '*bullet* ) do_nest_bullet ;; - .Bd' '* ) do_nest_block ;; - .Op' '* ) do_nest_optional ;; - .Fl' '* ) do_nest_flag ;; - .Ar' '* ) do_nest_arg ;; - .El* ) return 0 ;; - * ) echo "$line" ;; - esac - done - die "EOF reached processing '.Bl -tag'" -} - -do_nest_bullet() { - do_bullet -} - -do_bullet() { - echo '.in +4' - while IFS='' read -r line - do - case "${line}" in - .It* ) printf '.ti -4\n\\fB*\\fP\n' - echo ${line#.It} - ;; - - .Bl' '*enum* ) do_nest_enum ;; - .Bl' '*tag* ) do_nest_tag ;; - .Bl' '*bullet* ) do_nest_bullet ;; - .Bd' '* ) do_nest_block ;; - .Op' '* ) do_nest_optional ;; - .Fl' '* ) do_nest_flag ;; - .Ar' '* ) do_nest_arg ;; - - .El* ) echo '.in -4' - return 0 ;; - - * ) echo "$line" ;; - esac - done - die "EOF reached processing '.Bl -bullet'" -} - -do_nest_block() { - do_block -} - -do_block() { - printf '.br\n.in +4\n.nf\n' - while IFS='' read -r line - do - case "${line}" in - .B* ) die ".Bx command nested within .Bd" ;; - - .Ed* ) echo .in -4 - echo .fi - return 0 ;; - - * ) echo "$line" ;; - esac - done - die "EOF reached processing '.Bd'" -} - -do_nest_optional() { - do_optional -} - -do_optional() { - set -- $line - shift - local text='[' - while test $# -gt 0 - do - # Ns may be fun... - m1="$1" - case "X$1" in - # The general escape sequence is: \& - X\\\& ) - text="${text} ${1}" - shift - ;; - # This one should be a generic punctuation check - # Punctuation is any of the 10 chars: .,:;()[]?! - # (but more are actually used and accepted) - # and is output in the default font. - X[!0-9a-zA-Z]* ) - text="${text} ${1}" - shift - ;; - XAr | XCm ) - text=${text}' "\fI'${2}'\fR"' - shift 2 || had_no_arg "$m1" - ;; - XFl ) - text=${text}' \fB-'${2}'\fR' - shift 2 || had_no_arg "$m1" - ;; - * ) # Grab subsequent non-keywords and punctuation, too - text="${text} $1" - shift - ;; - esac - done - echo "${text} ]" -} - -do_nest_flag() { - do_flag -} - -do_flag() { - echo ${line#.Fl} -} - -do_nest_arg() { - do_arg -} - -do_arg() { - line=`echo ${line#.Ar}` - echo "\\fI${line}\\fR" -} - -do_NmName() { - # do we want to downcase the line first? Yes... - 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 - ;; - esac - - test $# -gt 0 && NmNameSfx=" $*" - fi - echo ".B $NmName$NmNameSfx" -} - -do_line() { - case "${line}" in - .Bl' '*enum* ) do_enum ;; - .Bl' '*tag* ) do_tag ;; - .Bl' '*bullet* ) do_bullet ;; - .Bd' '* ) do_block ;; - .Op' '* ) do_optional ;; - .Fl' '* ) do_flag ;; - .Ar' '* ) do_arg ;; - .Nm' '* ) do_NmName ;; - .Nm ) do_NmName ;; - * ) echo "$line" ;; - esac - return 0 -} - - - -easy_fixes=' -s/^\.Sh/.SH/ -s/^\.Ss/.SS/ -s/^\.Em/.I/ -s/^\.Pp/.PP/ -s/^.in *\\-/.in -/ -' - -readonly easy_fixes -set -f - -{ - while IFS='' read -r line - do - do_line - done -} | sed "${easy_fixes}" - -exit 0