4 * EDIT THIS FILE WITH CAUTION (ntpdsim-opts.c)
6 * It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:13 AM EST
7 * From the definitions ntpdsim-opts.def
8 * and the template file options
10 * Generated from AutoOpts 29:0:4 templates.
14 * This file was produced by an AutoOpts template. AutoOpts is a
15 * copyrighted work. This source file is not encumbered by AutoOpts
16 * licensing, but is provided under the licensing terms chosen by the
17 * ntpdsim author or copyright holder. AutoOpts is licensed under
18 * the terms of the LGPL. The redistributable library (``libopts'') is
19 * licensed under the terms of either the LGPL or, at the users discretion,
20 * the BSD license. See the AutoOpts and/or libopts sources for details.
22 * This source file is copyrighted and licensed under the following terms:
24 * ntpdsim copyright 1970-2009 David L. Mills and/or others - all rights reserved
26 * see html/copyright.html
32 #define OPTION_CODE_COMPILE 1
33 #include "ntpdsim-opts.h"
39 "ntpdsim copyright (c) 1970-2009 David L. Mills and/or others, all rights reserved";
40 tSCC zCopyrightNotice
[] =
42 /* extracted from ../include/copyright.def near line 8 */
43 "see html/copyright.html";
44 extern tUsageProc optionUsage
;
47 * global included definitions
50 extern int atoi(const char*);
59 # define EXIT_SUCCESS 0
62 # define EXIT_FAILURE 1
65 * Ipv4 option description:
68 "Force IPv4 DNS name resolution";
69 tSCC zIpv4_NAME
[] = "IPV4";
70 tSCC zIpv4_Name
[] = "ipv4";
71 #define IPV4_FLAGS (OPTST_DISABLED)
74 * Ipv6 option description:
77 "Force IPv6 DNS name resolution";
78 tSCC zIpv6_NAME
[] = "IPV6";
79 tSCC zIpv6_Name
[] = "ipv6";
80 #define IPV6_FLAGS (OPTST_DISABLED)
83 * Authreq option description with
84 * "Must also have options" and "Incompatible options":
87 "Require crypto authentication";
88 tSCC zAuthreq_NAME
[] = "AUTHREQ";
89 tSCC zAuthreq_Name
[] = "authreq";
91 aAuthreqCantList
[] = {
92 INDEX_OPT_AUTHNOREQ
, NO_EQUIVALENT
};
93 #define AUTHREQ_FLAGS (OPTST_DISABLED)
96 * Authnoreq option description with
97 * "Must also have options" and "Incompatible options":
99 tSCC zAuthnoreqText
[] =
100 "Do not require crypto authentication";
101 tSCC zAuthnoreq_NAME
[] = "AUTHNOREQ";
102 tSCC zAuthnoreq_Name
[] = "authnoreq";
104 aAuthnoreqCantList
[] = {
105 INDEX_OPT_AUTHREQ
, NO_EQUIVALENT
};
106 #define AUTHNOREQ_FLAGS (OPTST_DISABLED)
109 * Bcastsync option description:
111 tSCC zBcastsyncText
[] =
112 "Allow us to sync to broadcast servers";
113 tSCC zBcastsync_NAME
[] = "BCASTSYNC";
114 tSCC zBcastsync_Name
[] = "bcastsync";
115 #define BCASTSYNC_FLAGS (OPTST_DISABLED)
118 * Simbroadcastdelay option description:
120 tSCC zSimbroadcastdelayText
[] =
121 "Simulator broadcast delay";
122 tSCC zSimbroadcastdelay_NAME
[] = "SIMBROADCASTDELAY";
123 tSCC zSimbroadcastdelay_Name
[] = "simbroadcastdelay";
124 #define SIMBROADCASTDELAY_FLAGS (OPTST_DISABLED \
125 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
128 * Configfile option description:
130 tSCC zConfigfileText
[] =
131 "configuration file name";
132 tSCC zConfigfile_NAME
[] = "CONFIGFILE";
133 tSCC zConfigfile_Name
[] = "configfile";
134 #define CONFIGFILE_FLAGS (OPTST_DISABLED \
135 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
138 * Phasenoise option description:
140 tSCC zPhasenoiseText
[] =
142 tSCC zPhasenoise_NAME
[] = "PHASENOISE";
143 tSCC zPhasenoise_Name
[] = "phasenoise";
144 #define PHASENOISE_FLAGS (OPTST_DISABLED \
145 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
148 * Debug_Level option description:
151 tSCC zDebug_LevelText
[] =
152 "Increase output debug message level";
153 tSCC zDebug_Level_NAME
[] = "DEBUG_LEVEL";
154 tSCC zDebug_Level_Name
[] = "debug-level";
155 #define DEBUG_LEVEL_FLAGS (OPTST_DISABLED)
157 #else /* disable Debug_Level */
158 #define VALUE_OPT_DEBUG_LEVEL NO_EQUIVALENT
159 #define DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
160 #define zDebug_LevelText NULL
161 #define zDebug_Level_NAME NULL
162 #define zDebug_Level_Name NULL
166 * Set_Debug_Level option description:
169 tSCC zSet_Debug_LevelText
[] =
170 "Set the output debug message level";
171 tSCC zSet_Debug_Level_NAME
[] = "SET_DEBUG_LEVEL";
172 tSCC zSet_Debug_Level_Name
[] = "set-debug-level";
173 #define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \
174 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
176 #else /* disable Set_Debug_Level */
177 #define VALUE_OPT_SET_DEBUG_LEVEL NO_EQUIVALENT
178 #define SET_DEBUG_LEVEL_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
179 #define zSet_Debug_LevelText NULL
180 #define zSet_Debug_Level_NAME NULL
181 #define zSet_Debug_Level_Name NULL
185 * Driftfile option description:
187 tSCC zDriftfileText
[] =
188 "frequency drift file name";
189 tSCC zDriftfile_NAME
[] = "DRIFTFILE";
190 tSCC zDriftfile_Name
[] = "driftfile";
191 #define DRIFTFILE_FLAGS (OPTST_DISABLED \
192 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
195 * Panicgate option description:
197 tSCC zPanicgateText
[] =
198 "Allow the first adjustment to be Big";
199 tSCC zPanicgate_NAME
[] = "PANICGATE";
200 tSCC zPanicgate_Name
[] = "panicgate";
201 #define PANICGATE_FLAGS (OPTST_DISABLED)
204 * Simslew option description:
206 tSCC zSimslewText
[] =
208 tSCC zSimslew_NAME
[] = "SIMSLEW";
209 tSCC zSimslew_Name
[] = "simslew";
210 #define SIMSLEW_FLAGS (OPTST_DISABLED \
211 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
214 * Jaildir option description:
216 tSCC zJaildirText
[] =
218 tSCC zJaildir_NAME
[] = "JAILDIR";
219 tSCC zJaildir_Name
[] = "jaildir";
220 #define JAILDIR_FLAGS (OPTST_DISABLED \
221 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
224 * Interface option description:
226 tSCC zInterfaceText
[] =
227 "Listen on interface";
228 tSCC zInterface_NAME
[] = "INTERFACE";
229 tSCC zInterface_Name
[] = "interface";
230 #define INTERFACE_FLAGS (OPTST_DISABLED | OPTST_STACKED \
231 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
234 * Keyfile option description:
236 tSCC zKeyfileText
[] =
237 "path to symmetric keys";
238 tSCC zKeyfile_NAME
[] = "KEYFILE";
239 tSCC zKeyfile_Name
[] = "keyfile";
240 #define KEYFILE_FLAGS (OPTST_DISABLED \
241 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
244 * Logfile option description:
246 tSCC zLogfileText
[] =
247 "path to the log file";
248 tSCC zLogfile_NAME
[] = "LOGFILE";
249 tSCC zLogfile_Name
[] = "logfile";
250 #define LOGFILE_FLAGS (OPTST_DISABLED \
251 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
254 * Novirtualips option description:
256 tSCC zNovirtualipsText
[] =
257 "Do not listen to virtual IPs";
258 tSCC zNovirtualips_NAME
[] = "NOVIRTUALIPS";
259 tSCC zNovirtualips_Name
[] = "novirtualips";
260 #define NOVIRTUALIPS_FLAGS (OPTST_DISABLED)
263 * Modifymmtimer option description:
266 tSCC zModifymmtimerText
[] =
267 "Modify Multimedia Timer (Windows only)";
268 tSCC zModifymmtimer_NAME
[] = "MODIFYMMTIMER";
269 tSCC zModifymmtimer_Name
[] = "modifymmtimer";
270 #define MODIFYMMTIMER_FLAGS (OPTST_DISABLED)
272 #else /* disable Modifymmtimer */
273 #define VALUE_OPT_MODIFYMMTIMER NO_EQUIVALENT
274 #define MODIFYMMTIMER_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
275 #define zModifymmtimerText NULL
276 #define zModifymmtimer_NAME NULL
277 #define zModifymmtimer_Name NULL
278 #endif /* SYS_WINNT */
281 * Nofork option description:
285 tSCC zNofork_NAME
[] = "NOFORK";
286 tSCC zNofork_Name
[] = "nofork";
287 #define NOFORK_FLAGS (OPTST_DISABLED)
290 * Nice option description:
293 "Run at high priority";
294 tSCC zNice_NAME
[] = "NICE";
295 tSCC zNice_Name
[] = "nice";
296 #define NICE_FLAGS (OPTST_DISABLED)
299 * Servertime option description:
301 tSCC zServertimeText
[] =
303 tSCC zServertime_NAME
[] = "SERVERTIME";
304 tSCC zServertime_Name
[] = "servertime";
305 #define SERVERTIME_FLAGS (OPTST_DISABLED \
306 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
309 * Pidfile option description:
311 tSCC zPidfileText
[] =
312 "path to the PID file";
313 tSCC zPidfile_NAME
[] = "PIDFILE";
314 tSCC zPidfile_Name
[] = "pidfile";
315 #define PIDFILE_FLAGS (OPTST_DISABLED \
316 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
319 * Priority option description:
321 tSCC zPriorityText
[] =
323 tSCC zPriority_NAME
[] = "PRIORITY";
324 tSCC zPriority_Name
[] = "priority";
325 #define PRIORITY_FLAGS (OPTST_DISABLED \
326 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
329 * Quit option description:
332 "Set the time and quit";
333 tSCC zQuit_NAME
[] = "QUIT";
334 tSCC zQuit_Name
[] = "quit";
335 #define QUIT_FLAGS (OPTST_DISABLED)
338 * Propagationdelay option description:
340 tSCC zPropagationdelayText
[] =
341 "Broadcast/propagation delay";
342 tSCC zPropagationdelay_NAME
[] = "PROPAGATIONDELAY";
343 tSCC zPropagationdelay_Name
[] = "propagationdelay";
344 #define PROPAGATIONDELAY_FLAGS (OPTST_DISABLED \
345 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
348 * Updateinterval option description:
350 tSCC zUpdateintervalText
[] =
351 "interval in seconds between scans for new or dropped interfaces";
352 tSCC zUpdateinterval_NAME
[] = "UPDATEINTERVAL";
353 tSCC zUpdateinterval_Name
[] = "updateinterval";
354 #define UPDATEINTERVAL_FLAGS (OPTST_DISABLED \
355 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC))
358 * Statsdir option description:
360 tSCC zStatsdirText
[] =
361 "Statistics file location";
362 tSCC zStatsdir_NAME
[] = "STATSDIR";
363 tSCC zStatsdir_Name
[] = "statsdir";
364 #define STATSDIR_FLAGS (OPTST_DISABLED \
365 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
368 * Endsimtime option description:
370 tSCC zEndsimtimeText
[] =
371 "Simulation end time";
372 tSCC zEndsimtime_NAME
[] = "ENDSIMTIME";
373 tSCC zEndsimtime_Name
[] = "endsimtime";
374 #define ENDSIMTIME_FLAGS (OPTST_DISABLED \
375 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
378 * Trustedkey option description:
380 tSCC zTrustedkeyText
[] =
381 "Trusted key number";
382 tSCC zTrustedkey_NAME
[] = "TRUSTEDKEY";
383 tSCC zTrustedkey_Name
[] = "trustedkey";
384 #define TRUSTEDKEY_FLAGS (OPTST_DISABLED | OPTST_STACKED \
385 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
388 * Freqerr option description:
390 tSCC zFreqerrText
[] =
391 "Simulation frequency error";
392 tSCC zFreqerr_NAME
[] = "FREQERR";
393 tSCC zFreqerr_Name
[] = "freqerr";
394 #define FREQERR_FLAGS (OPTST_DISABLED \
395 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
398 * Walknoise option description:
400 tSCC zWalknoiseText
[] =
401 "Simulation random walk noise";
402 tSCC zWalknoise_NAME
[] = "WALKNOISE";
403 tSCC zWalknoise_Name
[] = "walknoise";
404 #define WALKNOISE_FLAGS (OPTST_DISABLED \
405 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
408 * User option description:
411 "Run as userid (or userid:groupid)";
412 tSCC zUser_NAME
[] = "USER";
413 tSCC zUser_Name
[] = "user";
414 #define USER_FLAGS (OPTST_DISABLED \
415 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
418 * Var option description:
421 "make ARG an ntp variable (RW)";
422 tSCC zVar_NAME
[] = "VAR";
423 tSCC zVar_Name
[] = "var";
424 #define VAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
425 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
428 * Dvar option description:
431 "make ARG an ntp variable (RW|DEF)";
432 tSCC zDvar_NAME
[] = "DVAR";
433 tSCC zDvar_Name
[] = "dvar";
434 #define DVAR_FLAGS (OPTST_DISABLED | OPTST_STACKED \
435 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
438 * Slew option description:
441 "Slew up to 600 seconds";
442 tSCC zSlew_NAME
[] = "SLEW";
443 tSCC zSlew_Name
[] = "slew";
444 #define SLEW_FLAGS (OPTST_DISABLED)
447 * Ndelay option description:
450 "Simulation network delay";
451 tSCC zNdelay_NAME
[] = "NDELAY";
452 tSCC zNdelay_Name
[] = "ndelay";
453 #define NDELAY_FLAGS (OPTST_DISABLED \
454 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
457 * Pdelay option description:
460 "Simulation processing delay";
461 tSCC zPdelay_NAME
[] = "PDELAY";
462 tSCC zPdelay_Name
[] = "pdelay";
463 #define PDELAY_FLAGS (OPTST_DISABLED \
464 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
467 * Help/More_Help/Version option descriptions:
469 tSCC zHelpText
[] = "Display usage information and exit";
470 tSCC zHelp_Name
[] = "help";
472 tSCC zMore_HelpText
[] = "Extended usage information passed thru pager";
473 tSCC zMore_Help_Name
[] = "more-help";
475 tSCC zVersionText
[] = "Output version information and exit";
476 tSCC zVersion_Name
[] = "version";
479 * Save/Load_Opts option description:
481 tSCC zSave_OptsText
[] = "Save the option state to a config file";
482 tSCC zSave_Opts_Name
[] = "save-opts";
484 tSCC zLoad_OptsText
[] = "Load options from a config file";
485 tSCC zLoad_Opts_NAME
[] = "LOAD_OPTS";
487 tSCC zNotLoad_Opts_Name
[] = "no-load-opts";
488 tSCC zNotLoad_Opts_Pfx
[] = "no";
489 #define zLoad_Opts_Name (zNotLoad_Opts_Name + 3)
491 * Declare option callback procedures
494 static tOptProc doOptSet_Debug_Level
;
495 #else /* not DEBUG */
496 # define doOptSet_Debug_Level NULL
497 #endif /* def/not DEBUG */
498 #if defined(TEST_NTPDSIM_OPTS)
500 * Under test, omit argument processing, or call optionStackArg,
501 * if multiple copies are allowed.
504 optionNumericVal
, optionPagedUsage
, optionStackArg
,
510 * #define map the "normal" callout procs to the test ones...
512 #define SET_DEBUG_LEVEL_OPT_PROC optionStackArg
515 #else /* NOT defined TEST_NTPDSIM_OPTS */
517 * When not under test, there are different procs to use
520 optionNumericVal
, optionPagedUsage
, optionPrintVersion
, optionStackArg
;
525 * #define map the "normal" callout procs
527 #define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
529 #define SET_DEBUG_LEVEL_OPT_PROC doOptSet_Debug_Level
530 #endif /* defined(TEST_NTPDSIM_OPTS) */
531 #ifdef TEST_NTPDSIM_OPTS
532 # define DOVERPROC optionVersionStderr
534 # define DOVERPROC optionPrintVersion
535 #endif /* TEST_NTPDSIM_OPTS */
537 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
539 * Define the Ntpdsim Option Descriptions.
541 static tOptDesc optDesc
[ OPTION_CT
] = {
542 { /* entry idx, value */ 0, VALUE_OPT_IPV4
,
543 /* equiv idx, value */ NO_EQUIVALENT
, 0,
544 /* equivalenced to */ NO_EQUIVALENT
,
545 /* min, max, act ct */ 0, 1, 0,
546 /* opt state flags */ IPV4_FLAGS
, 0,
547 /* last opt argumnt */ { NULL
},
548 /* arg list/cookie */ NULL
,
549 /* must/cannot opts */ NULL
, NULL
,
550 /* option proc */ NULL
,
551 /* desc, NAME, name */ zIpv4Text
, zIpv4_NAME
, zIpv4_Name
,
552 /* disablement strs */ NULL
, NULL
},
554 { /* entry idx, value */ 1, VALUE_OPT_IPV6
,
555 /* equiv idx, value */ NOLIMIT
, NOLIMIT
,
556 /* equivalenced to */ INDEX_OPT_IPV4
,
557 /* min, max, act ct */ 0, 1, 0,
558 /* opt state flags */ IPV6_FLAGS
, 0,
559 /* last opt argumnt */ { NULL
},
560 /* arg list/cookie */ NULL
,
561 /* must/cannot opts */ NULL
, NULL
,
562 /* option proc */ NULL
,
563 /* desc, NAME, name */ zIpv6Text
, zIpv6_NAME
, zIpv6_Name
,
564 /* disablement strs */ NULL
, NULL
},
566 { /* entry idx, value */ 2, VALUE_OPT_AUTHREQ
,
567 /* equiv idx, value */ 2, VALUE_OPT_AUTHREQ
,
568 /* equivalenced to */ NO_EQUIVALENT
,
569 /* min, max, act ct */ 0, 1, 0,
570 /* opt state flags */ AUTHREQ_FLAGS
, 0,
571 /* last opt argumnt */ { NULL
},
572 /* arg list/cookie */ NULL
,
573 /* must/cannot opts */ NULL
, aAuthreqCantList
,
574 /* option proc */ NULL
,
575 /* desc, NAME, name */ zAuthreqText
, zAuthreq_NAME
, zAuthreq_Name
,
576 /* disablement strs */ NULL
, NULL
},
578 { /* entry idx, value */ 3, VALUE_OPT_AUTHNOREQ
,
579 /* equiv idx, value */ 3, VALUE_OPT_AUTHNOREQ
,
580 /* equivalenced to */ NO_EQUIVALENT
,
581 /* min, max, act ct */ 0, 1, 0,
582 /* opt state flags */ AUTHNOREQ_FLAGS
, 0,
583 /* last opt argumnt */ { NULL
},
584 /* arg list/cookie */ NULL
,
585 /* must/cannot opts */ NULL
, aAuthnoreqCantList
,
586 /* option proc */ NULL
,
587 /* desc, NAME, name */ zAuthnoreqText
, zAuthnoreq_NAME
, zAuthnoreq_Name
,
588 /* disablement strs */ NULL
, NULL
},
590 { /* entry idx, value */ 4, VALUE_OPT_BCASTSYNC
,
591 /* equiv idx, value */ 4, VALUE_OPT_BCASTSYNC
,
592 /* equivalenced to */ NO_EQUIVALENT
,
593 /* min, max, act ct */ 0, 1, 0,
594 /* opt state flags */ BCASTSYNC_FLAGS
, 0,
595 /* last opt argumnt */ { NULL
},
596 /* arg list/cookie */ NULL
,
597 /* must/cannot opts */ NULL
, NULL
,
598 /* option proc */ NULL
,
599 /* desc, NAME, name */ zBcastsyncText
, zBcastsync_NAME
, zBcastsync_Name
,
600 /* disablement strs */ NULL
, NULL
},
602 { /* entry idx, value */ 5, VALUE_OPT_SIMBROADCASTDELAY
,
603 /* equiv idx, value */ 5, VALUE_OPT_SIMBROADCASTDELAY
,
604 /* equivalenced to */ NO_EQUIVALENT
,
605 /* min, max, act ct */ 0, 1, 0,
606 /* opt state flags */ SIMBROADCASTDELAY_FLAGS
, 0,
607 /* last opt argumnt */ { NULL
},
608 /* arg list/cookie */ NULL
,
609 /* must/cannot opts */ NULL
, NULL
,
610 /* option proc */ NULL
,
611 /* desc, NAME, name */ zSimbroadcastdelayText
, zSimbroadcastdelay_NAME
, zSimbroadcastdelay_Name
,
612 /* disablement strs */ NULL
, NULL
},
614 { /* entry idx, value */ 6, VALUE_OPT_CONFIGFILE
,
615 /* equiv idx, value */ 6, VALUE_OPT_CONFIGFILE
,
616 /* equivalenced to */ NO_EQUIVALENT
,
617 /* min, max, act ct */ 0, 1, 0,
618 /* opt state flags */ CONFIGFILE_FLAGS
, 0,
619 /* last opt argumnt */ { NULL
},
620 /* arg list/cookie */ NULL
,
621 /* must/cannot opts */ NULL
, NULL
,
622 /* option proc */ NULL
,
623 /* desc, NAME, name */ zConfigfileText
, zConfigfile_NAME
, zConfigfile_Name
,
624 /* disablement strs */ NULL
, NULL
},
626 { /* entry idx, value */ 7, VALUE_OPT_PHASENOISE
,
627 /* equiv idx, value */ 7, VALUE_OPT_PHASENOISE
,
628 /* equivalenced to */ NO_EQUIVALENT
,
629 /* min, max, act ct */ 0, 1, 0,
630 /* opt state flags */ PHASENOISE_FLAGS
, 0,
631 /* last opt argumnt */ { NULL
},
632 /* arg list/cookie */ NULL
,
633 /* must/cannot opts */ NULL
, NULL
,
634 /* option proc */ NULL
,
635 /* desc, NAME, name */ zPhasenoiseText
, zPhasenoise_NAME
, zPhasenoise_Name
,
636 /* disablement strs */ NULL
, NULL
},
638 { /* entry idx, value */ 8, VALUE_OPT_DEBUG_LEVEL
,
639 /* equiv idx, value */ 8, VALUE_OPT_DEBUG_LEVEL
,
640 /* equivalenced to */ NO_EQUIVALENT
,
641 /* min, max, act ct */ 0, NOLIMIT
, 0,
642 /* opt state flags */ DEBUG_LEVEL_FLAGS
, 0,
643 /* last opt argumnt */ { NULL
},
644 /* arg list/cookie */ NULL
,
645 /* must/cannot opts */ NULL
, NULL
,
646 /* option proc */ NULL
,
647 /* desc, NAME, name */ zDebug_LevelText
, zDebug_Level_NAME
, zDebug_Level_Name
,
648 /* disablement strs */ NULL
, NULL
},
650 { /* entry idx, value */ 9, VALUE_OPT_SET_DEBUG_LEVEL
,
651 /* equiv idx, value */ 9, VALUE_OPT_SET_DEBUG_LEVEL
,
652 /* equivalenced to */ NO_EQUIVALENT
,
653 /* min, max, act ct */ 0, NOLIMIT
, 0,
654 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS
, 0,
655 /* last opt argumnt */ { NULL
},
656 /* arg list/cookie */ NULL
,
657 /* must/cannot opts */ NULL
, NULL
,
658 /* option proc */ SET_DEBUG_LEVEL_OPT_PROC
,
659 /* desc, NAME, name */ zSet_Debug_LevelText
, zSet_Debug_Level_NAME
, zSet_Debug_Level_Name
,
660 /* disablement strs */ NULL
, NULL
},
662 { /* entry idx, value */ 10, VALUE_OPT_DRIFTFILE
,
663 /* equiv idx, value */ 10, VALUE_OPT_DRIFTFILE
,
664 /* equivalenced to */ NO_EQUIVALENT
,
665 /* min, max, act ct */ 0, 1, 0,
666 /* opt state flags */ DRIFTFILE_FLAGS
, 0,
667 /* last opt argumnt */ { NULL
},
668 /* arg list/cookie */ NULL
,
669 /* must/cannot opts */ NULL
, NULL
,
670 /* option proc */ NULL
,
671 /* desc, NAME, name */ zDriftfileText
, zDriftfile_NAME
, zDriftfile_Name
,
672 /* disablement strs */ NULL
, NULL
},
674 { /* entry idx, value */ 11, VALUE_OPT_PANICGATE
,
675 /* equiv idx, value */ 11, VALUE_OPT_PANICGATE
,
676 /* equivalenced to */ NO_EQUIVALENT
,
677 /* min, max, act ct */ 0, 1, 0,
678 /* opt state flags */ PANICGATE_FLAGS
, 0,
679 /* last opt argumnt */ { NULL
},
680 /* arg list/cookie */ NULL
,
681 /* must/cannot opts */ NULL
, NULL
,
682 /* option proc */ NULL
,
683 /* desc, NAME, name */ zPanicgateText
, zPanicgate_NAME
, zPanicgate_Name
,
684 /* disablement strs */ NULL
, NULL
},
686 { /* entry idx, value */ 12, VALUE_OPT_SIMSLEW
,
687 /* equiv idx, value */ 12, VALUE_OPT_SIMSLEW
,
688 /* equivalenced to */ NO_EQUIVALENT
,
689 /* min, max, act ct */ 0, 1, 0,
690 /* opt state flags */ SIMSLEW_FLAGS
, 0,
691 /* last opt argumnt */ { NULL
},
692 /* arg list/cookie */ NULL
,
693 /* must/cannot opts */ NULL
, NULL
,
694 /* option proc */ NULL
,
695 /* desc, NAME, name */ zSimslewText
, zSimslew_NAME
, zSimslew_Name
,
696 /* disablement strs */ NULL
, NULL
},
698 { /* entry idx, value */ 13, VALUE_OPT_JAILDIR
,
699 /* equiv idx, value */ 13, VALUE_OPT_JAILDIR
,
700 /* equivalenced to */ NO_EQUIVALENT
,
701 /* min, max, act ct */ 0, 1, 0,
702 /* opt state flags */ JAILDIR_FLAGS
, 0,
703 /* last opt argumnt */ { NULL
},
704 /* arg list/cookie */ NULL
,
705 /* must/cannot opts */ NULL
, NULL
,
706 /* option proc */ NULL
,
707 /* desc, NAME, name */ zJaildirText
, zJaildir_NAME
, zJaildir_Name
,
708 /* disablement strs */ NULL
, NULL
},
710 { /* entry idx, value */ 14, VALUE_OPT_INTERFACE
,
711 /* equiv idx, value */ 14, VALUE_OPT_INTERFACE
,
712 /* equivalenced to */ NO_EQUIVALENT
,
713 /* min, max, act ct */ 0, NOLIMIT
, 0,
714 /* opt state flags */ INTERFACE_FLAGS
, 0,
715 /* last opt argumnt */ { NULL
},
716 /* arg list/cookie */ NULL
,
717 /* must/cannot opts */ NULL
, NULL
,
718 /* option proc */ optionStackArg
,
719 /* desc, NAME, name */ zInterfaceText
, zInterface_NAME
, zInterface_Name
,
720 /* disablement strs */ NULL
, NULL
},
722 { /* entry idx, value */ 15, VALUE_OPT_KEYFILE
,
723 /* equiv idx, value */ 15, VALUE_OPT_KEYFILE
,
724 /* equivalenced to */ NO_EQUIVALENT
,
725 /* min, max, act ct */ 0, 1, 0,
726 /* opt state flags */ KEYFILE_FLAGS
, 0,
727 /* last opt argumnt */ { NULL
},
728 /* arg list/cookie */ NULL
,
729 /* must/cannot opts */ NULL
, NULL
,
730 /* option proc */ NULL
,
731 /* desc, NAME, name */ zKeyfileText
, zKeyfile_NAME
, zKeyfile_Name
,
732 /* disablement strs */ NULL
, NULL
},
734 { /* entry idx, value */ 16, VALUE_OPT_LOGFILE
,
735 /* equiv idx, value */ 16, VALUE_OPT_LOGFILE
,
736 /* equivalenced to */ NO_EQUIVALENT
,
737 /* min, max, act ct */ 0, 1, 0,
738 /* opt state flags */ LOGFILE_FLAGS
, 0,
739 /* last opt argumnt */ { NULL
},
740 /* arg list/cookie */ NULL
,
741 /* must/cannot opts */ NULL
, NULL
,
742 /* option proc */ NULL
,
743 /* desc, NAME, name */ zLogfileText
, zLogfile_NAME
, zLogfile_Name
,
744 /* disablement strs */ NULL
, NULL
},
746 { /* entry idx, value */ 17, VALUE_OPT_NOVIRTUALIPS
,
747 /* equiv idx, value */ 17, VALUE_OPT_NOVIRTUALIPS
,
748 /* equivalenced to */ NO_EQUIVALENT
,
749 /* min, max, act ct */ 0, 1, 0,
750 /* opt state flags */ NOVIRTUALIPS_FLAGS
, 0,
751 /* last opt argumnt */ { NULL
},
752 /* arg list/cookie */ NULL
,
753 /* must/cannot opts */ NULL
, NULL
,
754 /* option proc */ NULL
,
755 /* desc, NAME, name */ zNovirtualipsText
, zNovirtualips_NAME
, zNovirtualips_Name
,
756 /* disablement strs */ NULL
, NULL
},
758 { /* entry idx, value */ 18, VALUE_OPT_MODIFYMMTIMER
,
759 /* equiv idx, value */ 18, VALUE_OPT_MODIFYMMTIMER
,
760 /* equivalenced to */ NO_EQUIVALENT
,
761 /* min, max, act ct */ 0, 1, 0,
762 /* opt state flags */ MODIFYMMTIMER_FLAGS
, 0,
763 /* last opt argumnt */ { NULL
},
764 /* arg list/cookie */ NULL
,
765 /* must/cannot opts */ NULL
, NULL
,
766 /* option proc */ NULL
,
767 /* desc, NAME, name */ zModifymmtimerText
, zModifymmtimer_NAME
, zModifymmtimer_Name
,
768 /* disablement strs */ NULL
, NULL
},
770 { /* entry idx, value */ 19, VALUE_OPT_NOFORK
,
771 /* equiv idx, value */ 19, VALUE_OPT_NOFORK
,
772 /* equivalenced to */ NO_EQUIVALENT
,
773 /* min, max, act ct */ 0, 1, 0,
774 /* opt state flags */ NOFORK_FLAGS
, 0,
775 /* last opt argumnt */ { NULL
},
776 /* arg list/cookie */ NULL
,
777 /* must/cannot opts */ NULL
, NULL
,
778 /* option proc */ NULL
,
779 /* desc, NAME, name */ zNoforkText
, zNofork_NAME
, zNofork_Name
,
780 /* disablement strs */ NULL
, NULL
},
782 { /* entry idx, value */ 20, VALUE_OPT_NICE
,
783 /* equiv idx, value */ 20, VALUE_OPT_NICE
,
784 /* equivalenced to */ NO_EQUIVALENT
,
785 /* min, max, act ct */ 0, 1, 0,
786 /* opt state flags */ NICE_FLAGS
, 0,
787 /* last opt argumnt */ { NULL
},
788 /* arg list/cookie */ NULL
,
789 /* must/cannot opts */ NULL
, NULL
,
790 /* option proc */ NULL
,
791 /* desc, NAME, name */ zNiceText
, zNice_NAME
, zNice_Name
,
792 /* disablement strs */ NULL
, NULL
},
794 { /* entry idx, value */ 21, VALUE_OPT_SERVERTIME
,
795 /* equiv idx, value */ 21, VALUE_OPT_SERVERTIME
,
796 /* equivalenced to */ NO_EQUIVALENT
,
797 /* min, max, act ct */ 0, 1, 0,
798 /* opt state flags */ SERVERTIME_FLAGS
, 0,
799 /* last opt argumnt */ { NULL
},
800 /* arg list/cookie */ NULL
,
801 /* must/cannot opts */ NULL
, NULL
,
802 /* option proc */ NULL
,
803 /* desc, NAME, name */ zServertimeText
, zServertime_NAME
, zServertime_Name
,
804 /* disablement strs */ NULL
, NULL
},
806 { /* entry idx, value */ 22, VALUE_OPT_PIDFILE
,
807 /* equiv idx, value */ 22, VALUE_OPT_PIDFILE
,
808 /* equivalenced to */ NO_EQUIVALENT
,
809 /* min, max, act ct */ 0, 1, 0,
810 /* opt state flags */ PIDFILE_FLAGS
, 0,
811 /* last opt argumnt */ { NULL
},
812 /* arg list/cookie */ NULL
,
813 /* must/cannot opts */ NULL
, NULL
,
814 /* option proc */ NULL
,
815 /* desc, NAME, name */ zPidfileText
, zPidfile_NAME
, zPidfile_Name
,
816 /* disablement strs */ NULL
, NULL
},
818 { /* entry idx, value */ 23, VALUE_OPT_PRIORITY
,
819 /* equiv idx, value */ 23, VALUE_OPT_PRIORITY
,
820 /* equivalenced to */ NO_EQUIVALENT
,
821 /* min, max, act ct */ 0, 1, 0,
822 /* opt state flags */ PRIORITY_FLAGS
, 0,
823 /* last opt argumnt */ { NULL
},
824 /* arg list/cookie */ NULL
,
825 /* must/cannot opts */ NULL
, NULL
,
826 /* option proc */ optionNumericVal
,
827 /* desc, NAME, name */ zPriorityText
, zPriority_NAME
, zPriority_Name
,
828 /* disablement strs */ NULL
, NULL
},
830 { /* entry idx, value */ 24, VALUE_OPT_QUIT
,
831 /* equiv idx, value */ 24, VALUE_OPT_QUIT
,
832 /* equivalenced to */ NO_EQUIVALENT
,
833 /* min, max, act ct */ 0, 1, 0,
834 /* opt state flags */ QUIT_FLAGS
, 0,
835 /* last opt argumnt */ { NULL
},
836 /* arg list/cookie */ NULL
,
837 /* must/cannot opts */ NULL
, NULL
,
838 /* option proc */ NULL
,
839 /* desc, NAME, name */ zQuitText
, zQuit_NAME
, zQuit_Name
,
840 /* disablement strs */ NULL
, NULL
},
842 { /* entry idx, value */ 25, VALUE_OPT_PROPAGATIONDELAY
,
843 /* equiv idx, value */ 25, VALUE_OPT_PROPAGATIONDELAY
,
844 /* equivalenced to */ NO_EQUIVALENT
,
845 /* min, max, act ct */ 0, 1, 0,
846 /* opt state flags */ PROPAGATIONDELAY_FLAGS
, 0,
847 /* last opt argumnt */ { NULL
},
848 /* arg list/cookie */ NULL
,
849 /* must/cannot opts */ NULL
, NULL
,
850 /* option proc */ NULL
,
851 /* desc, NAME, name */ zPropagationdelayText
, zPropagationdelay_NAME
, zPropagationdelay_Name
,
852 /* disablement strs */ NULL
, NULL
},
854 { /* entry idx, value */ 26, VALUE_OPT_UPDATEINTERVAL
,
855 /* equiv idx, value */ 26, VALUE_OPT_UPDATEINTERVAL
,
856 /* equivalenced to */ NO_EQUIVALENT
,
857 /* min, max, act ct */ 0, 1, 0,
858 /* opt state flags */ UPDATEINTERVAL_FLAGS
, 0,
859 /* last opt argumnt */ { NULL
},
860 /* arg list/cookie */ NULL
,
861 /* must/cannot opts */ NULL
, NULL
,
862 /* option proc */ optionNumericVal
,
863 /* desc, NAME, name */ zUpdateintervalText
, zUpdateinterval_NAME
, zUpdateinterval_Name
,
864 /* disablement strs */ NULL
, NULL
},
866 { /* entry idx, value */ 27, VALUE_OPT_STATSDIR
,
867 /* equiv idx, value */ 27, VALUE_OPT_STATSDIR
,
868 /* equivalenced to */ NO_EQUIVALENT
,
869 /* min, max, act ct */ 0, 1, 0,
870 /* opt state flags */ STATSDIR_FLAGS
, 0,
871 /* last opt argumnt */ { NULL
},
872 /* arg list/cookie */ NULL
,
873 /* must/cannot opts */ NULL
, NULL
,
874 /* option proc */ NULL
,
875 /* desc, NAME, name */ zStatsdirText
, zStatsdir_NAME
, zStatsdir_Name
,
876 /* disablement strs */ NULL
, NULL
},
878 { /* entry idx, value */ 28, VALUE_OPT_ENDSIMTIME
,
879 /* equiv idx, value */ 28, VALUE_OPT_ENDSIMTIME
,
880 /* equivalenced to */ NO_EQUIVALENT
,
881 /* min, max, act ct */ 0, 1, 0,
882 /* opt state flags */ ENDSIMTIME_FLAGS
, 0,
883 /* last opt argumnt */ { NULL
},
884 /* arg list/cookie */ NULL
,
885 /* must/cannot opts */ NULL
, NULL
,
886 /* option proc */ NULL
,
887 /* desc, NAME, name */ zEndsimtimeText
, zEndsimtime_NAME
, zEndsimtime_Name
,
888 /* disablement strs */ NULL
, NULL
},
890 { /* entry idx, value */ 29, VALUE_OPT_TRUSTEDKEY
,
891 /* equiv idx, value */ 29, VALUE_OPT_TRUSTEDKEY
,
892 /* equivalenced to */ NO_EQUIVALENT
,
893 /* min, max, act ct */ 0, NOLIMIT
, 0,
894 /* opt state flags */ TRUSTEDKEY_FLAGS
, 0,
895 /* last opt argumnt */ { NULL
},
896 /* arg list/cookie */ NULL
,
897 /* must/cannot opts */ NULL
, NULL
,
898 /* option proc */ optionStackArg
,
899 /* desc, NAME, name */ zTrustedkeyText
, zTrustedkey_NAME
, zTrustedkey_Name
,
900 /* disablement strs */ NULL
, NULL
},
902 { /* entry idx, value */ 30, VALUE_OPT_FREQERR
,
903 /* equiv idx, value */ 30, VALUE_OPT_FREQERR
,
904 /* equivalenced to */ NO_EQUIVALENT
,
905 /* min, max, act ct */ 0, 1, 0,
906 /* opt state flags */ FREQERR_FLAGS
, 0,
907 /* last opt argumnt */ { NULL
},
908 /* arg list/cookie */ NULL
,
909 /* must/cannot opts */ NULL
, NULL
,
910 /* option proc */ NULL
,
911 /* desc, NAME, name */ zFreqerrText
, zFreqerr_NAME
, zFreqerr_Name
,
912 /* disablement strs */ NULL
, NULL
},
914 { /* entry idx, value */ 31, VALUE_OPT_WALKNOISE
,
915 /* equiv idx, value */ 31, VALUE_OPT_WALKNOISE
,
916 /* equivalenced to */ NO_EQUIVALENT
,
917 /* min, max, act ct */ 0, 1, 0,
918 /* opt state flags */ WALKNOISE_FLAGS
, 0,
919 /* last opt argumnt */ { NULL
},
920 /* arg list/cookie */ NULL
,
921 /* must/cannot opts */ NULL
, NULL
,
922 /* option proc */ NULL
,
923 /* desc, NAME, name */ zWalknoiseText
, zWalknoise_NAME
, zWalknoise_Name
,
924 /* disablement strs */ NULL
, NULL
},
926 { /* entry idx, value */ 32, VALUE_OPT_USER
,
927 /* equiv idx, value */ 32, VALUE_OPT_USER
,
928 /* equivalenced to */ NO_EQUIVALENT
,
929 /* min, max, act ct */ 0, 1, 0,
930 /* opt state flags */ USER_FLAGS
, 0,
931 /* last opt argumnt */ { NULL
},
932 /* arg list/cookie */ NULL
,
933 /* must/cannot opts */ NULL
, NULL
,
934 /* option proc */ NULL
,
935 /* desc, NAME, name */ zUserText
, zUser_NAME
, zUser_Name
,
936 /* disablement strs */ NULL
, NULL
},
938 { /* entry idx, value */ 33, VALUE_OPT_VAR
,
939 /* equiv idx, value */ 33, VALUE_OPT_VAR
,
940 /* equivalenced to */ NO_EQUIVALENT
,
941 /* min, max, act ct */ 0, NOLIMIT
, 0,
942 /* opt state flags */ VAR_FLAGS
, 0,
943 /* last opt argumnt */ { NULL
},
944 /* arg list/cookie */ NULL
,
945 /* must/cannot opts */ NULL
, NULL
,
946 /* option proc */ optionStackArg
,
947 /* desc, NAME, name */ zVarText
, zVar_NAME
, zVar_Name
,
948 /* disablement strs */ NULL
, NULL
},
950 { /* entry idx, value */ 34, VALUE_OPT_DVAR
,
951 /* equiv idx, value */ 34, VALUE_OPT_DVAR
,
952 /* equivalenced to */ NO_EQUIVALENT
,
953 /* min, max, act ct */ 0, NOLIMIT
, 0,
954 /* opt state flags */ DVAR_FLAGS
, 0,
955 /* last opt argumnt */ { NULL
},
956 /* arg list/cookie */ NULL
,
957 /* must/cannot opts */ NULL
, NULL
,
958 /* option proc */ optionStackArg
,
959 /* desc, NAME, name */ zDvarText
, zDvar_NAME
, zDvar_Name
,
960 /* disablement strs */ NULL
, NULL
},
962 { /* entry idx, value */ 35, VALUE_OPT_SLEW
,
963 /* equiv idx, value */ 35, VALUE_OPT_SLEW
,
964 /* equivalenced to */ NO_EQUIVALENT
,
965 /* min, max, act ct */ 0, 1, 0,
966 /* opt state flags */ SLEW_FLAGS
, 0,
967 /* last opt argumnt */ { NULL
},
968 /* arg list/cookie */ NULL
,
969 /* must/cannot opts */ NULL
, NULL
,
970 /* option proc */ NULL
,
971 /* desc, NAME, name */ zSlewText
, zSlew_NAME
, zSlew_Name
,
972 /* disablement strs */ NULL
, NULL
},
974 { /* entry idx, value */ 36, VALUE_OPT_NDELAY
,
975 /* equiv idx, value */ 36, VALUE_OPT_NDELAY
,
976 /* equivalenced to */ NO_EQUIVALENT
,
977 /* min, max, act ct */ 0, 1, 0,
978 /* opt state flags */ NDELAY_FLAGS
, 0,
979 /* last opt argumnt */ { NULL
},
980 /* arg list/cookie */ NULL
,
981 /* must/cannot opts */ NULL
, NULL
,
982 /* option proc */ NULL
,
983 /* desc, NAME, name */ zNdelayText
, zNdelay_NAME
, zNdelay_Name
,
984 /* disablement strs */ NULL
, NULL
},
986 { /* entry idx, value */ 37, VALUE_OPT_PDELAY
,
987 /* equiv idx, value */ 37, VALUE_OPT_PDELAY
,
988 /* equivalenced to */ NO_EQUIVALENT
,
989 /* min, max, act ct */ 0, 1, 0,
990 /* opt state flags */ PDELAY_FLAGS
, 0,
991 /* last opt argumnt */ { NULL
},
992 /* arg list/cookie */ NULL
,
993 /* must/cannot opts */ NULL
, NULL
,
994 /* option proc */ NULL
,
995 /* desc, NAME, name */ zPdelayText
, zPdelay_NAME
, zPdelay_Name
,
996 /* disablement strs */ NULL
, NULL
},
998 #ifdef NO_OPTIONAL_OPT_ARGS
999 # define VERSION_OPT_FLAGS OPTST_IMM | OPTST_NO_INIT
1001 # define VERSION_OPT_FLAGS OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
1002 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT
1005 { /* entry idx, value */ INDEX_OPT_VERSION
, VALUE_OPT_VERSION
,
1006 /* equiv idx value */ NO_EQUIVALENT
, 0,
1007 /* equivalenced to */ NO_EQUIVALENT
,
1008 /* min, max, act ct */ 0, 1, 0,
1009 /* opt state flags */ VERSION_OPT_FLAGS
, 0,
1010 /* last opt argumnt */ { NULL
},
1011 /* arg list/cookie */ NULL
,
1012 /* must/cannot opts */ NULL
, NULL
,
1013 /* option proc */ DOVERPROC
,
1014 /* desc, NAME, name */ zVersionText
, NULL
, zVersion_Name
,
1015 /* disablement strs */ NULL
, NULL
},
1017 #undef VERSION_OPT_FLAGS
1020 { /* entry idx, value */ INDEX_OPT_HELP
, VALUE_OPT_HELP
,
1021 /* equiv idx value */ NO_EQUIVALENT
, 0,
1022 /* equivalenced to */ NO_EQUIVALENT
,
1023 /* min, max, act ct */ 0, 1, 0,
1024 /* opt state flags */ OPTST_IMM
| OPTST_NO_INIT
, 0,
1025 /* last opt argumnt */ { NULL
},
1026 /* arg list/cookie */ NULL
,
1027 /* must/cannot opts */ NULL
, NULL
,
1028 /* option proc */ doUsageOpt
,
1029 /* desc, NAME, name */ zHelpText
, NULL
, zHelp_Name
,
1030 /* disablement strs */ NULL
, NULL
},
1032 { /* entry idx, value */ INDEX_OPT_MORE_HELP
, VALUE_OPT_MORE_HELP
,
1033 /* equiv idx value */ NO_EQUIVALENT
, 0,
1034 /* equivalenced to */ NO_EQUIVALENT
,
1035 /* min, max, act ct */ 0, 1, 0,
1036 /* opt state flags */ OPTST_IMM
| OPTST_NO_INIT
, 0,
1037 /* last opt argumnt */ { NULL
},
1038 /* arg list/cookie */ NULL
,
1039 /* must/cannot opts */ NULL
, NULL
,
1040 /* option proc */ optionPagedUsage
,
1041 /* desc, NAME, name */ zMore_HelpText
, NULL
, zMore_Help_Name
,
1042 /* disablement strs */ NULL
, NULL
},
1044 { /* entry idx, value */ INDEX_OPT_SAVE_OPTS
, VALUE_OPT_SAVE_OPTS
,
1045 /* equiv idx value */ NO_EQUIVALENT
, 0,
1046 /* equivalenced to */ NO_EQUIVALENT
,
1047 /* min, max, act ct */ 0, 1, 0,
1048 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING
)
1049 | OPTST_ARG_OPTIONAL
| OPTST_NO_INIT
, 0,
1050 /* last opt argumnt */ { NULL
},
1051 /* arg list/cookie */ NULL
,
1052 /* must/cannot opts */ NULL
, NULL
,
1053 /* option proc */ NULL
,
1054 /* desc, NAME, name */ zSave_OptsText
, NULL
, zSave_Opts_Name
,
1055 /* disablement strs */ NULL
, NULL
},
1057 { /* entry idx, value */ INDEX_OPT_LOAD_OPTS
, VALUE_OPT_LOAD_OPTS
,
1058 /* equiv idx value */ NO_EQUIVALENT
, 0,
1059 /* equivalenced to */ NO_EQUIVALENT
,
1060 /* min, max, act ct */ 0, NOLIMIT
, 0,
1061 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING
) \
1062 | OPTST_DISABLE_IMM
, 0,
1063 /* last opt argumnt */ { NULL
},
1064 /* arg list/cookie */ NULL
,
1065 /* must/cannot opts */ NULL
, NULL
,
1066 /* option proc */ optionLoadOpt
,
1067 /* desc, NAME, name */ zLoad_OptsText
, zLoad_Opts_NAME
, zLoad_Opts_Name
,
1068 /* disablement strs */ zNotLoad_Opts_Name
, zNotLoad_Opts_Pfx
}
1071 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
1073 * Define the Ntpdsim Option Environment
1075 tSCC zPROGNAME
[] = "NTPDSIM";
1076 tSCC zUsageTitle
[] =
1077 "ntpdsim - NTP daemon simulation program - Ver. 4.2.4p8\n\
1078 USAGE: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n";
1079 tSCC zRcName
[] = ".ntprc";
1080 tSCC
* apzHomeList
[] = {
1085 tSCC zBugsAddr
[] = "http://bugs.ntp.org, bugs@ntp.org";
1086 #define zExplain NULL
1087 tSCC zDetail
[] = "\n\n";
1088 tSCC zFullVersion
[] = NTPDSIM_FULL_VERSION
;
1089 /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 408 */
1091 #if defined(ENABLE_NLS)
1092 # define OPTPROC_BASE OPTPROC_TRANSLATE
1093 static tOptionXlateProc translate_option_strings
;
1095 # define OPTPROC_BASE OPTPROC_NONE
1096 # define translate_option_strings NULL
1097 #endif /* ENABLE_NLS */
1099 tOptions ntpdsimOptions
= {
1100 OPTIONS_STRUCT_VERSION
,
1101 0, NULL
, /* original argc + argv */
1106 + OPTPROC_NO_REQ_OPT
1109 + OPTPROC_HAS_IMMED
),
1110 0, NULL
, /* current option index, current option */
1111 NULL
, NULL
, zPROGNAME
,
1112 zRcName
, zCopyright
, zCopyrightNotice
,
1113 zFullVersion
, apzHomeList
, zUsageTitle
,
1114 zExplain
, zDetail
, optDesc
,
1115 zBugsAddr
, /* address to send bugs to */
1116 NULL
, NULL
, /* extensions/saved state */
1117 optionUsage
, /* usage procedure */
1118 translate_option_strings
, /* translation procedure */
1120 * Indexes to special options
1122 { INDEX_OPT_MORE_HELP
,
1123 INDEX_OPT_SAVE_OPTS
,
1124 NO_EQUIVALENT
/* index of '-#' option */,
1125 NO_EQUIVALENT
/* index of default opt */
1127 43 /* full option count */, 38 /* user option count */
1131 * Create the static procedure(s) declared above.
1136 tOptDesc
* pOptDesc
)
1138 USAGE( EXIT_SUCCESS
);
1141 #if ! defined(TEST_NTPDSIM_OPTS)
1145 * For the set-debug-level option, when DEBUG is #define-d.
1149 doOptSet_Debug_Level(
1151 tOptDesc
* pOptDesc
)
1153 /* extracted from ../include/debug-opt.def, line 29 */
1154 DESC(DEBUG_LEVEL
).optOccCt
= atoi( pOptDesc
->pzLastArg
);
1156 #endif /* defined DEBUG */
1158 #endif /* defined(TEST_NTPDSIM_OPTS) */
1160 /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optmain.tpl near line 92 */
1162 #if defined(TEST_NTPDSIM_OPTS) /* TEST MAIN PROCEDURE: */
1165 main( int argc
, char** argv
)
1167 int res
= EXIT_SUCCESS
;
1168 (void)optionProcess( &ntpdsimOptions
, argc
, argv
);
1170 void optionPutShell( tOptions
* );
1171 optionPutShell( &ntpdsimOptions
);
1175 #endif /* defined TEST_NTPDSIM_OPTS */
1176 /* extracted from /usr/local/gnu/autogen-5.9.1/share/autogen/optcode.tpl near line 514 */
1183 #include <autoopts/usage-txt.h>
1185 static char* AO_gettext( char const* pz
);
1186 static void coerce_it(void** s
);
1189 AO_gettext( char const* pz
)
1197 pzRes
= strdup( pzRes
);
1198 if (pzRes
== NULL
) {
1199 fputs( _("No memory for duping translated strings\n"), stderr
);
1200 exit( EXIT_FAILURE
);
1205 static void coerce_it(void** s
) { *s
= AO_gettext(*s
); }
1206 #define COERSION(_f) \
1207 coerce_it((void*)&(ntpdsimOptions._f))
1210 * This invokes the translation code (e.g. gettext(3)).
1213 translate_option_strings( void )
1216 * Guard against re-translation. It won't work. The strings will have
1217 * been changed by the first pass through this code. One shot only.
1219 if (option_usage_text
.field_ct
== 0)
1222 * Do the translations. The first pointer follows the field count field.
1223 * The field count field is the size of a pointer.
1226 char** ppz
= (char**)(void*)&(option_usage_text
);
1227 int ix
= option_usage_text
.field_ct
;
1231 *ppz
= AO_gettext(*ppz
);
1234 option_usage_text
.field_ct
= 0;
1237 tOptDesc
* pOD
= ntpdsimOptions
.pOptDesc
;
1238 int ix
= ntpdsimOptions
.optCt
;
1241 pOD
->pzText
= AO_gettext(pOD
->pzText
);
1242 pOD
->pz_NAME
= AO_gettext(pOD
->pz_NAME
);
1243 pOD
->pz_Name
= AO_gettext(pOD
->pz_Name
);
1244 pOD
->pz_DisableName
= AO_gettext(pOD
->pz_DisableName
);
1245 pOD
->pz_DisablePfx
= AO_gettext(pOD
->pz_DisablePfx
);
1251 COERSION(pzCopyright
);
1252 COERSION(pzCopyNotice
);
1253 COERSION(pzFullVersion
);
1254 COERSION(pzUsageTitle
);
1255 COERSION(pzExplain
);
1259 #endif /* ENABLE_NLS */
1264 /* ntpdsim-opts.c ends here */