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