1 /* $NetBSD: ntpq-opts.c,v 1.1.1.3 2013/12/27 23:31:05 christos Exp $ */ 2 3 /* 4 * EDIT THIS FILE WITH CAUTION (ntpq-opts.c) 5 * 6 * It has been AutoGen-ed December 24, 2013 at 11:38:50 AM by AutoGen 5.18.3pre5 7 * From the definitions ntpq-opts.def 8 * and the template file options 9 * 10 * Generated from AutoOpts 40:1:15 templates. 11 * 12 * AutoOpts is a copyrighted work. This source file is not encumbered 13 * by AutoOpts licensing, but is provided under the licensing terms chosen 14 * by the ntpq author or copyright holder. AutoOpts is 15 * licensed under the terms of the LGPL. The redistributable library 16 * (``libopts'') is licensed under the terms of either the LGPL or, at the 17 * users discretion, the BSD license. See the AutoOpts and/or libopts sources 18 * for details. 19 * 20 * The ntpq program is copyrighted and licensed 21 * under the following terms: 22 * 23 * Copyright (C) 1970-2013 The University of Delaware, all rights reserved. 24 * This is free software. It is licensed for use, modification and 25 * redistribution under the terms of the NTP License, copies of which 26 * can be seen at: 27 * <http://ntp.org/license> 28 * <http://opensource.org/licenses/ntp-license.php> 29 * 30 * Permission to use, copy, modify, and distribute this software and its 31 * documentation for any purpose with or without fee is hereby granted, 32 * provided that the above copyright notice appears in all copies and that 33 * both the copyright notice and this permission notice appear in 34 * supporting documentation, and that the name The University of Delaware not be used in 35 * advertising or publicity pertaining to distribution of the software 36 * without specific, written prior permission. The University of Delaware makes no 37 * representations about the suitability this software for any purpose. It 38 * is provided "as is" without express or implied warranty. 39 */ 40 41 #ifndef __doxygen__ 42 #define OPTION_CODE_COMPILE 1 43 #include "ntpq-opts.h" 44 #include <sys/types.h> 45 46 #include <limits.h> 47 #include <stdio.h> 48 #include <stdlib.h> 49 50 #ifdef __cplusplus 51 extern "C" { 52 #endif 53 extern FILE * option_usage_fp; 54 #define zCopyright (ntpq_opt_strs+0) 55 #define zLicenseDescrip (ntpq_opt_strs+314) 56 57 /* 58 * global included definitions 59 */ 60 #ifdef __windows 61 extern int atoi(const char*); 62 #else 63 # include <stdlib.h> 64 #endif 65 66 #ifndef NULL 67 # define NULL 0 68 #endif 69 70 /** 71 * static const strings for ntpq options 72 */ 73 static char const ntpq_opt_strs[1833] = 74 /* 0 */ "ntpq 4.2.7p404\n" 75 "Copyright (C) 1970-2013 The University of Delaware, all rights reserved.\n" 76 "This is free software. It is licensed for use, modification and\n" 77 "redistribution under the terms of the NTP License, copies of which\n" 78 "can be seen at:\n" 79 " <http://ntp.org/license>\n" 80 " <http://opensource.org/licenses/ntp-license.php>\n\0" 81 /* 314 */ "Permission to use, copy, modify, and distribute this software and its\n" 82 "documentation for any purpose with or without fee is hereby granted,\n" 83 "provided that the above copyright notice appears in all copies and that\n" 84 "both the copyright notice and this permission notice appear in supporting\n" 85 "documentation, and that the name The University of Delaware not be used in\n" 86 "advertising or publicity pertaining to distribution of the software without\n" 87 "specific, written prior permission. The University of Delaware makes no\n" 88 "representations about the suitability this software for any purpose. It is\n" 89 "provided \"as is\" without express or implied warranty.\n\0" 90 /* 954 */ "Force IPv4 DNS name resolution\0" 91 /* 985 */ "IPV4\0" 92 /* 990 */ "ipv4\0" 93 /* 995 */ "Force IPv6 DNS name resolution\0" 94 /* 1026 */ "IPV6\0" 95 /* 1031 */ "ipv6\0" 96 /* 1036 */ "run a command and exit\0" 97 /* 1059 */ "COMMAND\0" 98 /* 1067 */ "command\0" 99 /* 1075 */ "Increase debug verbosity level\0" 100 /* 1106 */ "DEBUG_LEVEL\0" 101 /* 1118 */ "debug-level\0" 102 /* 1130 */ "Set the debug verbosity level\0" 103 /* 1160 */ "SET_DEBUG_LEVEL\0" 104 /* 1176 */ "set-debug-level\0" 105 /* 1192 */ "Print a list of the peers\0" 106 /* 1218 */ "PEERS\0" 107 /* 1224 */ "peers\0" 108 /* 1230 */ "Force ntpq to operate in interactive mode\0" 109 /* 1272 */ "INTERACTIVE\0" 110 /* 1284 */ "interactive\0" 111 /* 1296 */ "numeric host addresses\0" 112 /* 1319 */ "NUMERIC\0" 113 /* 1327 */ "numeric\0" 114 /* 1335 */ "Always output status line with readvar\0" 115 /* 1374 */ "OLD_RV\0" 116 /* 1381 */ "old-rv\0" 117 /* 1388 */ "display extended usage information and exit\0" 118 /* 1432 */ "help\0" 119 /* 1437 */ "extended usage information passed thru pager\0" 120 /* 1482 */ "more-help\0" 121 /* 1492 */ "output version information and exit\0" 122 /* 1528 */ "version\0" 123 /* 1536 */ "save the option state to a config file\0" 124 /* 1575 */ "save-opts\0" 125 /* 1585 */ "load options from a config file\0" 126 /* 1617 */ "LOAD_OPTS\0" 127 /* 1627 */ "no-load-opts\0" 128 /* 1640 */ "no\0" 129 /* 1643 */ "NTPQ\0" 130 /* 1648 */ "ntpq - standard NTP query program - Ver. 4.2.7p404\n" 131 "Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n\0" 132 /* 1769 */ "$HOME\0" 133 /* 1775 */ ".\0" 134 /* 1777 */ ".ntprc\0" 135 /* 1784 */ "http://bugs.ntp.org, bugs@ntp.org\0" 136 /* 1818 */ "ntpq 4.2.7p404"; 137 138 /** 139 * ipv4 option description with 140 * "Must also have options" and "Incompatible options": 141 */ 142 /** Descriptive text for the ipv4 option */ 143 #define IPV4_DESC (ntpq_opt_strs+954) 144 /** Upper-cased name for the ipv4 option */ 145 #define IPV4_NAME (ntpq_opt_strs+985) 146 /** Name string for the ipv4 option */ 147 #define IPV4_name (ntpq_opt_strs+990) 148 /** Other options that appear in conjunction with the ipv4 option */ 149 static int const aIpv4CantList[] = { 150 INDEX_OPT_IPV6, NO_EQUIVALENT }; 151 /** Compiled in flag settings for the ipv4 option */ 152 #define IPV4_FLAGS (OPTST_DISABLED) 153 154 /** 155 * ipv6 option description with 156 * "Must also have options" and "Incompatible options": 157 */ 158 /** Descriptive text for the ipv6 option */ 159 #define IPV6_DESC (ntpq_opt_strs+995) 160 /** Upper-cased name for the ipv6 option */ 161 #define IPV6_NAME (ntpq_opt_strs+1026) 162 /** Name string for the ipv6 option */ 163 #define IPV6_name (ntpq_opt_strs+1031) 164 /** Other options that appear in conjunction with the ipv6 option */ 165 static int const aIpv6CantList[] = { 166 INDEX_OPT_IPV4, NO_EQUIVALENT }; 167 /** Compiled in flag settings for the ipv6 option */ 168 #define IPV6_FLAGS (OPTST_DISABLED) 169 170 /** 171 * command option description: 172 */ 173 /** Descriptive text for the command option */ 174 #define COMMAND_DESC (ntpq_opt_strs+1036) 175 /** Upper-cased name for the command option */ 176 #define COMMAND_NAME (ntpq_opt_strs+1059) 177 /** Name string for the command option */ 178 #define COMMAND_name (ntpq_opt_strs+1067) 179 /** Compiled in flag settings for the command option */ 180 #define COMMAND_FLAGS (OPTST_DISABLED \ 181 | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)) 182 183 /** 184 * debug-level option description: 185 */ 186 /** Descriptive text for the debug-level option */ 187 #define DEBUG_LEVEL_DESC (ntpq_opt_strs+1075) 188 /** Upper-cased name for the debug-level option */ 189 #define DEBUG_LEVEL_NAME (ntpq_opt_strs+1106) 190 /** Name string for the debug-level option */ 191 #define DEBUG_LEVEL_name (ntpq_opt_strs+1118) 192 /** Compiled in flag settings for the debug-level option */ 193 #define DEBUG_LEVEL_FLAGS (OPTST_DISABLED) 194 195 /** 196 * set-debug-level option description: 197 */ 198 /** Descriptive text for the set-debug-level option */ 199 #define SET_DEBUG_LEVEL_DESC (ntpq_opt_strs+1130) 200 /** Upper-cased name for the set-debug-level option */ 201 #define SET_DEBUG_LEVEL_NAME (ntpq_opt_strs+1160) 202 /** Name string for the set-debug-level option */ 203 #define SET_DEBUG_LEVEL_name (ntpq_opt_strs+1176) 204 /** Compiled in flag settings for the set-debug-level option */ 205 #define SET_DEBUG_LEVEL_FLAGS (OPTST_DISABLED \ 206 | OPTST_SET_ARGTYPE(OPARG_TYPE_NUMERIC)) 207 208 /** 209 * peers option description with 210 * "Must also have options" and "Incompatible options": 211 */ 212 /** Descriptive text for the peers option */ 213 #define PEERS_DESC (ntpq_opt_strs+1192) 214 /** Upper-cased name for the peers option */ 215 #define PEERS_NAME (ntpq_opt_strs+1218) 216 /** Name string for the peers option */ 217 #define PEERS_name (ntpq_opt_strs+1224) 218 /** Other options that appear in conjunction with the peers option */ 219 static int const aPeersCantList[] = { 220 INDEX_OPT_INTERACTIVE, NO_EQUIVALENT }; 221 /** Compiled in flag settings for the peers option */ 222 #define PEERS_FLAGS (OPTST_DISABLED) 223 224 /** 225 * interactive option description with 226 * "Must also have options" and "Incompatible options": 227 */ 228 /** Descriptive text for the interactive option */ 229 #define INTERACTIVE_DESC (ntpq_opt_strs+1230) 230 /** Upper-cased name for the interactive option */ 231 #define INTERACTIVE_NAME (ntpq_opt_strs+1272) 232 /** Name string for the interactive option */ 233 #define INTERACTIVE_name (ntpq_opt_strs+1284) 234 /** Other options that appear in conjunction with the interactive option */ 235 static int const aInteractiveCantList[] = { 236 INDEX_OPT_COMMAND, 237 INDEX_OPT_PEERS, NO_EQUIVALENT }; 238 /** Compiled in flag settings for the interactive option */ 239 #define INTERACTIVE_FLAGS (OPTST_DISABLED) 240 241 /** 242 * numeric option description: 243 */ 244 /** Descriptive text for the numeric option */ 245 #define NUMERIC_DESC (ntpq_opt_strs+1296) 246 /** Upper-cased name for the numeric option */ 247 #define NUMERIC_NAME (ntpq_opt_strs+1319) 248 /** Name string for the numeric option */ 249 #define NUMERIC_name (ntpq_opt_strs+1327) 250 /** Compiled in flag settings for the numeric option */ 251 #define NUMERIC_FLAGS (OPTST_DISABLED) 252 253 /** 254 * old-rv option description: 255 */ 256 /** Descriptive text for the old-rv option */ 257 #define OLD_RV_DESC (ntpq_opt_strs+1335) 258 /** Upper-cased name for the old-rv option */ 259 #define OLD_RV_NAME (ntpq_opt_strs+1374) 260 /** Name string for the old-rv option */ 261 #define OLD_RV_name (ntpq_opt_strs+1381) 262 /** Compiled in flag settings for the old-rv option */ 263 #define OLD_RV_FLAGS (OPTST_DISABLED) 264 265 /* 266 * Help/More_Help/Version option descriptions: 267 */ 268 #define HELP_DESC (ntpq_opt_strs+1388) 269 #define HELP_name (ntpq_opt_strs+1432) 270 #ifdef HAVE_WORKING_FORK 271 #define MORE_HELP_DESC (ntpq_opt_strs+1437) 272 #define MORE_HELP_name (ntpq_opt_strs+1482) 273 #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT) 274 #else 275 #define MORE_HELP_DESC HELP_DESC 276 #define MORE_HELP_name HELP_name 277 #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT) 278 #endif 279 #ifdef NO_OPTIONAL_OPT_ARGS 280 # define VER_FLAGS (OPTST_IMM | OPTST_NO_INIT) 281 #else 282 # define VER_FLAGS (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \ 283 OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT) 284 #endif 285 #define VER_DESC (ntpq_opt_strs+1492) 286 #define VER_name (ntpq_opt_strs+1528) 287 #define SAVE_OPTS_DESC (ntpq_opt_strs+1536) 288 #define SAVE_OPTS_name (ntpq_opt_strs+1575) 289 #define LOAD_OPTS_DESC (ntpq_opt_strs+1585) 290 #define LOAD_OPTS_NAME (ntpq_opt_strs+1617) 291 #define NO_LOAD_OPTS_name (ntpq_opt_strs+1627) 292 #define LOAD_OPTS_pfx (ntpq_opt_strs+1640) 293 #define LOAD_OPTS_name (NO_LOAD_OPTS_name + 3) 294 /** 295 * Declare option callback procedures 296 */ 297 /* extracted from optmain.tlib near line 723 */ 298 299 #if defined(TEST_NTPQ_OPTS) 300 /* 301 * Under test, omit argument processing, or call optionStackArg, 302 * if multiple copies are allowed. 303 */ 304 extern tOptProc 305 optionStackArg; 306 static tOptProc 307 doUsageOpt; 308 309 /* 310 * #define map the "normal" callout procs to the test ones... 311 */ 312 #define COMMAND_OPT_PROC optionStackArg 313 #define DEBUG_LEVEL_OPT_PROC optionStackArg 314 #define PEERS_OPT_PROC optionStackArg 315 316 317 #else /* NOT defined TEST_NTPQ_OPTS */ 318 /* 319 * When not under test, there are different procs to use 320 */ 321 extern tOptProc 322 ntpOptionPrintVersion, ntpq_custom_opt_handler, optionBooleanVal, 323 optionNestedVal, optionNumericVal, optionPagedUsage, 324 optionResetOpt, optionStackArg, optionTimeDate, 325 optionTimeVal, optionUnstackArg, optionVendorOption, 326 optionVersionStderr; 327 static tOptProc 328 doOptDebug_Level, doUsageOpt; 329 330 /** 331 * #define map the "normal" callout procs 332 */ 333 #define COMMAND_OPT_PROC ntpq_custom_opt_handler 334 #define DEBUG_LEVEL_OPT_PROC doOptDebug_Level 335 #define PEERS_OPT_PROC ntpq_custom_opt_handler 336 337 #endif /* TEST_NTPQ_OPTS */ 338 #define VER_PROC ntpOptionPrintVersion 339 340 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 341 /** 342 * Define the ntpq Option Descriptions. 343 * This is an array of OPTION_CT entries, one for each 344 * option that the ntpq program responds to. 345 */ 346 static tOptDesc optDesc[OPTION_CT] = { 347 { /* entry idx, value */ 0, VALUE_OPT_IPV4, 348 /* equiv idx, value */ 0, VALUE_OPT_IPV4, 349 /* equivalenced to */ NO_EQUIVALENT, 350 /* min, max, act ct */ 0, 1, 0, 351 /* opt state flags */ IPV4_FLAGS, 0, 352 /* last opt argumnt */ { NULL }, /* --ipv4 */ 353 /* arg list/cookie */ NULL, 354 /* must/cannot opts */ NULL, aIpv4CantList, 355 /* option proc */ NULL, 356 /* desc, NAME, name */ IPV4_DESC, IPV4_NAME, IPV4_name, 357 /* disablement strs */ NULL, NULL }, 358 359 { /* entry idx, value */ 1, VALUE_OPT_IPV6, 360 /* equiv idx, value */ 1, VALUE_OPT_IPV6, 361 /* equivalenced to */ NO_EQUIVALENT, 362 /* min, max, act ct */ 0, 1, 0, 363 /* opt state flags */ IPV6_FLAGS, 0, 364 /* last opt argumnt */ { NULL }, /* --ipv6 */ 365 /* arg list/cookie */ NULL, 366 /* must/cannot opts */ NULL, aIpv6CantList, 367 /* option proc */ NULL, 368 /* desc, NAME, name */ IPV6_DESC, IPV6_NAME, IPV6_name, 369 /* disablement strs */ NULL, NULL }, 370 371 { /* entry idx, value */ 2, VALUE_OPT_COMMAND, 372 /* equiv idx, value */ 2, VALUE_OPT_COMMAND, 373 /* equivalenced to */ NO_EQUIVALENT, 374 /* min, max, act ct */ 0, NOLIMIT, 0, 375 /* opt state flags */ COMMAND_FLAGS, 0, 376 /* last opt argumnt */ { NULL }, /* --command */ 377 /* arg list/cookie */ NULL, 378 /* must/cannot opts */ NULL, NULL, 379 /* option proc */ COMMAND_OPT_PROC, 380 /* desc, NAME, name */ COMMAND_DESC, COMMAND_NAME, COMMAND_name, 381 /* disablement strs */ NULL, NULL }, 382 383 { /* entry idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 384 /* equiv idx, value */ 3, VALUE_OPT_DEBUG_LEVEL, 385 /* equivalenced to */ NO_EQUIVALENT, 386 /* min, max, act ct */ 0, NOLIMIT, 0, 387 /* opt state flags */ DEBUG_LEVEL_FLAGS, 0, 388 /* last opt argumnt */ { NULL }, /* --debug-level */ 389 /* arg list/cookie */ NULL, 390 /* must/cannot opts */ NULL, NULL, 391 /* option proc */ DEBUG_LEVEL_OPT_PROC, 392 /* desc, NAME, name */ DEBUG_LEVEL_DESC, DEBUG_LEVEL_NAME, DEBUG_LEVEL_name, 393 /* disablement strs */ NULL, NULL }, 394 395 { /* entry idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 396 /* equiv idx, value */ 4, VALUE_OPT_SET_DEBUG_LEVEL, 397 /* equivalenced to */ NO_EQUIVALENT, 398 /* min, max, act ct */ 0, NOLIMIT, 0, 399 /* opt state flags */ SET_DEBUG_LEVEL_FLAGS, 0, 400 /* last opt argumnt */ { NULL }, /* --set-debug-level */ 401 /* arg list/cookie */ NULL, 402 /* must/cannot opts */ NULL, NULL, 403 /* option proc */ optionNumericVal, 404 /* desc, NAME, name */ SET_DEBUG_LEVEL_DESC, SET_DEBUG_LEVEL_NAME, SET_DEBUG_LEVEL_name, 405 /* disablement strs */ NULL, NULL }, 406 407 { /* entry idx, value */ 5, VALUE_OPT_PEERS, 408 /* equiv idx, value */ 5, VALUE_OPT_PEERS, 409 /* equivalenced to */ NO_EQUIVALENT, 410 /* min, max, act ct */ 0, 1, 0, 411 /* opt state flags */ PEERS_FLAGS, 0, 412 /* last opt argumnt */ { NULL }, /* --peers */ 413 /* arg list/cookie */ NULL, 414 /* must/cannot opts */ NULL, aPeersCantList, 415 /* option proc */ PEERS_OPT_PROC, 416 /* desc, NAME, name */ PEERS_DESC, PEERS_NAME, PEERS_name, 417 /* disablement strs */ NULL, NULL }, 418 419 { /* entry idx, value */ 6, VALUE_OPT_INTERACTIVE, 420 /* equiv idx, value */ 6, VALUE_OPT_INTERACTIVE, 421 /* equivalenced to */ NO_EQUIVALENT, 422 /* min, max, act ct */ 0, 1, 0, 423 /* opt state flags */ INTERACTIVE_FLAGS, 0, 424 /* last opt argumnt */ { NULL }, /* --interactive */ 425 /* arg list/cookie */ NULL, 426 /* must/cannot opts */ NULL, aInteractiveCantList, 427 /* option proc */ NULL, 428 /* desc, NAME, name */ INTERACTIVE_DESC, INTERACTIVE_NAME, INTERACTIVE_name, 429 /* disablement strs */ NULL, NULL }, 430 431 { /* entry idx, value */ 7, VALUE_OPT_NUMERIC, 432 /* equiv idx, value */ 7, VALUE_OPT_NUMERIC, 433 /* equivalenced to */ NO_EQUIVALENT, 434 /* min, max, act ct */ 0, 1, 0, 435 /* opt state flags */ NUMERIC_FLAGS, 0, 436 /* last opt argumnt */ { NULL }, /* --numeric */ 437 /* arg list/cookie */ NULL, 438 /* must/cannot opts */ NULL, NULL, 439 /* option proc */ NULL, 440 /* desc, NAME, name */ NUMERIC_DESC, NUMERIC_NAME, NUMERIC_name, 441 /* disablement strs */ NULL, NULL }, 442 443 { /* entry idx, value */ 8, VALUE_OPT_OLD_RV, 444 /* equiv idx, value */ 8, VALUE_OPT_OLD_RV, 445 /* equivalenced to */ NO_EQUIVALENT, 446 /* min, max, act ct */ 0, 1, 0, 447 /* opt state flags */ OLD_RV_FLAGS, 0, 448 /* last opt argumnt */ { NULL }, /* --old-rv */ 449 /* arg list/cookie */ NULL, 450 /* must/cannot opts */ NULL, NULL, 451 /* option proc */ NULL, 452 /* desc, NAME, name */ OLD_RV_DESC, OLD_RV_NAME, OLD_RV_name, 453 /* disablement strs */ NULL, NULL }, 454 455 { /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION, 456 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_VERSION, 457 /* equivalenced to */ NO_EQUIVALENT, 458 /* min, max, act ct */ 0, 1, 0, 459 /* opt state flags */ VER_FLAGS, AOUSE_VERSION, 460 /* last opt argumnt */ { NULL }, 461 /* arg list/cookie */ NULL, 462 /* must/cannot opts */ NULL, NULL, 463 /* option proc */ VER_PROC, 464 /* desc, NAME, name */ VER_DESC, NULL, VER_name, 465 /* disablement strs */ NULL, NULL }, 466 467 468 469 { /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP, 470 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_HELP, 471 /* equivalenced to */ NO_EQUIVALENT, 472 /* min, max, act ct */ 0, 1, 0, 473 /* opt state flags */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP, 474 /* last opt argumnt */ { NULL }, 475 /* arg list/cookie */ NULL, 476 /* must/cannot opts */ NULL, NULL, 477 /* option proc */ doUsageOpt, 478 /* desc, NAME, name */ HELP_DESC, NULL, HELP_name, 479 /* disablement strs */ NULL, NULL }, 480 481 { /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP, 482 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP, 483 /* equivalenced to */ NO_EQUIVALENT, 484 /* min, max, act ct */ 0, 1, 0, 485 /* opt state flags */ MORE_HELP_FLAGS, AOUSE_MORE_HELP, 486 /* last opt argumnt */ { NULL }, 487 /* arg list/cookie */ NULL, 488 /* must/cannot opts */ NULL, NULL, 489 /* option proc */ optionPagedUsage, 490 /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name, 491 /* disablement strs */ NULL, NULL }, 492 493 { /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS, 494 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS, 495 /* equivalenced to */ NO_EQUIVALENT, 496 /* min, max, act ct */ 0, 1, 0, 497 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 498 | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS, 499 /* last opt argumnt */ { NULL }, 500 /* arg list/cookie */ NULL, 501 /* must/cannot opts */ NULL, NULL, 502 /* option proc */ NULL, 503 /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name, 504 /* disablement strs */ NULL, NULL }, 505 506 { /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS, 507 /* equiv idx value */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS, 508 /* equivalenced to */ NO_EQUIVALENT, 509 /* min, max, act ct */ 0, NOLIMIT, 0, 510 /* opt state flags */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) 511 | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS, 512 /* last opt argumnt */ { NULL }, 513 /* arg list/cookie */ NULL, 514 /* must/cannot opts */ NULL, NULL, 515 /* option proc */ optionLoadOpt, 516 /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name, 517 /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx } 518 }; 519 520 521 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 522 /** Reference to the upper cased version of ntpq. */ 523 #define zPROGNAME (ntpq_opt_strs+1643) 524 /** Reference to the title line for ntpq usage. */ 525 #define zUsageTitle (ntpq_opt_strs+1648) 526 /** ntpq configuration file name. */ 527 #define zRcName (ntpq_opt_strs+1777) 528 /** Directories to search for ntpq config files. */ 529 static char const * const apzHomeList[3] = { 530 ntpq_opt_strs+1769, 531 ntpq_opt_strs+1775, 532 NULL }; 533 /** The ntpq program bug email address. */ 534 #define zBugsAddr (ntpq_opt_strs+1784) 535 /** Clarification/explanation of what ntpq does. */ 536 #define zExplain (NULL) 537 /** Extra detail explaining what ntpq does. */ 538 #define zDetail (NULL) 539 /** The full version string for ntpq. */ 540 #define zFullVersion (ntpq_opt_strs+1818) 541 /* extracted from optcode.tlib near line 364 */ 542 543 #if defined(ENABLE_NLS) 544 # define OPTPROC_BASE OPTPROC_TRANSLATE 545 static tOptionXlateProc translate_option_strings; 546 #else 547 # define OPTPROC_BASE OPTPROC_NONE 548 # define translate_option_strings NULL 549 #endif /* ENABLE_NLS */ 550 551 #define ntpq_full_usage (NULL) 552 #define ntpq_short_usage (NULL) 553 554 #endif /* not defined __doxygen__ */ 555 556 /* 557 * Create the static procedure(s) declared above. 558 */ 559 /** 560 * The callout function that invokes the optionUsage function. 561 * 562 * @param[in] opts the AutoOpts option description structure 563 * @param[in] od the descriptor for the "help" (usage) option. 564 * @noreturn 565 */ 566 static void 567 doUsageOpt(tOptions * opts, tOptDesc * od) 568 { 569 int ex_code; 570 ex_code = NTPQ_EXIT_SUCCESS; 571 optionUsage(&ntpqOptions, ex_code); 572 /* NOTREACHED */ 573 exit(1); 574 (void)opts; 575 (void)od; 576 } 577 578 #if ! defined(TEST_NTPQ_OPTS) 579 580 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 581 /** 582 * Code to handle the debug-level option. 583 * 584 * @param[in] pOptions the ntpq options data structure 585 * @param[in,out] pOptDesc the option descriptor for this option. 586 */ 587 static void 588 doOptDebug_Level(tOptions* pOptions, tOptDesc* pOptDesc) 589 { 590 /* 591 * Be sure the flag-code[0] handles special values for the options pointer 592 * viz. (poptions <= OPTPROC_EMIT_LIMIT) *and also* the special flag bit 593 * ((poptdesc->fOptState & OPTST_RESET) != 0) telling the option to 594 * reset its state. 595 */ 596 /* extracted from debug-opt.def, line 15 */ 597 OPT_VALUE_SET_DEBUG_LEVEL++; 598 (void)pOptDesc; 599 (void)pOptions; 600 } 601 #endif /* defined(TEST_NTPQ_OPTS) */ 602 /* extracted from optmain.tlib near line 46 */ 603 604 #if defined(TEST_NTPQ_OPTS) /* TEST-MAIN-PROCEDURE: */ 605 606 extern void optionPutShell(tOptions*); 607 608 /** 609 * Generated main procedure. This will emit text that a Bourne shell can 610 * process to handle its command line arguments. 611 * 612 * @param[in] argc argument count 613 * @param[in] argv argument vector 614 * @returns program exit code 615 */ 616 int 617 main(int argc, char ** argv) 618 { 619 int res = NTPQ_EXIT_SUCCESS; 620 (void)optionProcess(&ntpqOptions, argc, argv); 621 optionPutShell(&ntpqOptions); 622 res = ferror(stdout); 623 if (res != 0) 624 fputs("output error writing to stdout\n", stderr); 625 return res; 626 } 627 #endif /* TEST_NTPQ_OPTS END-TEST-MAIN-PROCEDURE */ 628 /* extracted from optmain.tlib near line 1245 */ 629 630 /** 631 * The directory containing the data associated with ntpq. 632 */ 633 #ifndef PKGDATADIR 634 # define PKGDATADIR "" 635 #endif 636 637 /** 638 * Information about the person or institution that packaged ntpq 639 * for the current distribution. 640 */ 641 #ifndef WITH_PACKAGER 642 # define ntpq_packager_info NULL 643 #else 644 /** Packager information for ntpq. */ 645 static char const ntpq_packager_info[] = 646 "Packaged by " WITH_PACKAGER 647 648 # ifdef WITH_PACKAGER_VERSION 649 " ("WITH_PACKAGER_VERSION")" 650 # endif 651 652 # ifdef WITH_PACKAGER_BUG_REPORTS 653 "\nReport ntpq bugs to " WITH_PACKAGER_BUG_REPORTS 654 # endif 655 "\n"; 656 #endif 657 #ifndef __doxygen__ 658 659 #endif /* __doxygen__ */ 660 /** 661 * The option definitions for ntpq. The one structure that 662 * binds them all. 663 */ 664 tOptions ntpqOptions = { 665 OPTIONS_STRUCT_VERSION, 666 0, NULL, /* original argc + argv */ 667 ( OPTPROC_BASE 668 + OPTPROC_ERRSTOP 669 + OPTPROC_SHORTOPT 670 + OPTPROC_LONGOPT 671 + OPTPROC_NO_REQ_OPT 672 + OPTPROC_ENVIRON 673 + OPTPROC_MISUSE 674 + OPTPROC_SHELL_OUTPUT ), 675 0, NULL, /* current option index, current option */ 676 NULL, NULL, zPROGNAME, 677 zRcName, zCopyright, zLicenseDescrip, 678 zFullVersion, apzHomeList, zUsageTitle, 679 zExplain, zDetail, optDesc, 680 zBugsAddr, /* address to send bugs to */ 681 NULL, NULL, /* extensions/saved state */ 682 optionUsage, /* usage procedure */ 683 translate_option_strings, /* translation procedure */ 684 /* 685 * Indexes to special options 686 */ 687 { INDEX_OPT_MORE_HELP, /* more-help option index */ 688 INDEX_OPT_SAVE_OPTS, /* save option index */ 689 NO_EQUIVALENT, /* '-#' option index */ 690 NO_EQUIVALENT /* index of default opt */ 691 }, 692 14 /* full option count */, 9 /* user option count */, 693 ntpq_full_usage, ntpq_short_usage, 694 NULL, NULL, 695 PKGDATADIR, ntpq_packager_info 696 }; 697 698 #if ENABLE_NLS 699 /** 700 * This code is designed to translate translatable option text for the 701 * ntpq program. These translations happen upon entry 702 * to optionProcess(). 703 */ 704 #include <stdio.h> 705 #include <stdlib.h> 706 #include <string.h> 707 #include <unistd.h> 708 #ifdef HAVE_DCGETTEXT 709 # include <gettext.h> 710 #endif 711 #include <autoopts/usage-txt.h> 712 713 static char * AO_gettext(char const * pz); 714 static void coerce_it(void ** s); 715 716 /** 717 * AutoGen specific wrapper function for gettext. It relies on the macro _() 718 * to convert from English to the target language, then strdup-duplicates the 719 * result string. It tries the "libopts" domain first, then whatever has been 720 * set via the \a textdomain(3) call. 721 * 722 * @param[in] pz the input text used as a lookup key. 723 * @returns the translated text (if there is one), 724 * or the original text (if not). 725 */ 726 static char * 727 AO_gettext(char const * pz) 728 { 729 char * res; 730 if (pz == NULL) 731 return NULL; 732 #ifdef HAVE_DCGETTEXT 733 /* 734 * While processing the option_xlateable_txt data, try to use the 735 * "libopts" domain. Once we switch to the option descriptor data, 736 * do *not* use that domain. 737 */ 738 if (option_xlateable_txt.field_ct != 0) { 739 res = dgettext("libopts", pz); 740 if (res == pz) 741 res = (char *)(void *)_(pz); 742 } else 743 res = (char *)(void *)_(pz); 744 #else 745 res = (char *)(void *)_(pz); 746 #endif 747 if (res == pz) 748 return res; 749 res = strdup(res); 750 if (res == NULL) { 751 fputs(_("No memory for duping translated strings\n"), stderr); 752 exit(NTPQ_EXIT_FAILURE); 753 } 754 return res; 755 } 756 757 /** 758 * All the pointers we use are marked "* const", but they are stored in 759 * writable memory. Coerce the mutability and set the pointer. 760 */ 761 static void coerce_it(void ** s) { *s = AO_gettext(*s); 762 } 763 764 /** 765 * Translate all the translatable strings in the ntpqOptions 766 * structure defined above. This is done only once. 767 */ 768 static void 769 translate_option_strings(void) 770 { 771 tOptions * const opts = &ntpqOptions; 772 773 /* 774 * Guard against re-translation. It won't work. The strings will have 775 * been changed by the first pass through this code. One shot only. 776 */ 777 if (option_xlateable_txt.field_ct != 0) { 778 /* 779 * Do the translations. The first pointer follows the field count 780 * field. The field count field is the size of a pointer. 781 */ 782 char ** ppz = (char**)(void*)&(option_xlateable_txt); 783 int ix = option_xlateable_txt.field_ct; 784 785 do { 786 ppz++; /* skip over field_ct */ 787 *ppz = AO_gettext(*ppz); 788 } while (--ix > 0); 789 /* prevent re-translation and disable "libopts" domain lookup */ 790 option_xlateable_txt.field_ct = 0; 791 792 coerce_it((void*)&(opts->pzCopyright)); 793 coerce_it((void*)&(opts->pzCopyNotice)); 794 coerce_it((void*)&(opts->pzFullVersion)); 795 coerce_it((void*)&(opts->pzUsageTitle)); 796 coerce_it((void*)&(opts->pzExplain)); 797 coerce_it((void*)&(opts->pzDetail)); 798 { 799 tOptDesc * od = opts->pOptDesc; 800 for (ix = opts->optCt; ix > 0; ix--, od++) 801 coerce_it((void*)&(od->pzText)); 802 } 803 } 804 } 805 #endif /* ENABLE_NLS */ 806 807 #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT 808 /** I18N function strictly for xgettext. Do not compile. */ 809 static void bogus_function(void) { 810 /* TRANSLATORS: 811 812 The following dummy function was crated solely so that xgettext can 813 extract the correct strings. These strings are actually referenced 814 by a field name in the ntpqOptions structure noted in the 815 comments below. The literal text is defined in ntpq_opt_strs. 816 817 NOTE: the strings below are segmented with respect to the source string 818 ntpq_opt_strs. The strings above are handed off for translation 819 at run time a paragraph at a time. Consequently, they are presented here 820 for translation a paragraph at a time. 821 822 ALSO: often the description for an option will reference another option 823 by name. These are set off with apostrophe quotes (I hope). Do not 824 translate option names. 825 */ 826 /* referenced via ntpqOptions.pzCopyright */ 827 puts(_("ntpq 4.2.7p404\n\ 828 Copyright (C) 1970-2013 The University of Delaware, all rights reserved.\n\ 829 This is free software. It is licensed for use, modification and\n\ 830 redistribution under the terms of the NTP License, copies of which\n\ 831 can be seen at:\n")); 832 puts(_(" <http://ntp.org/license>\n\ 833 <http://opensource.org/licenses/ntp-license.php>\n")); 834 835 /* referenced via ntpqOptions.pzCopyNotice */ 836 puts(_("Permission to use, copy, modify, and distribute this software and its\n\ 837 documentation for any purpose with or without fee is hereby granted,\n\ 838 provided that the above copyright notice appears in all copies and that\n\ 839 both the copyright notice and this permission notice appear in supporting\n\ 840 documentation, and that the name The University of Delaware not be used in\n\ 841 advertising or publicity pertaining to distribution of the software without\n\ 842 specific, written prior permission. The University of Delaware makes no\n\ 843 representations about the suitability this software for any purpose. It is\n\ 844 provided \"as is\" without express or implied warranty.\n")); 845 846 /* referenced via ntpqOptions.pOptDesc->pzText */ 847 puts(_("Force IPv4 DNS name resolution")); 848 849 /* referenced via ntpqOptions.pOptDesc->pzText */ 850 puts(_("Force IPv6 DNS name resolution")); 851 852 /* referenced via ntpqOptions.pOptDesc->pzText */ 853 puts(_("run a command and exit")); 854 855 /* referenced via ntpqOptions.pOptDesc->pzText */ 856 puts(_("Increase debug verbosity level")); 857 858 /* referenced via ntpqOptions.pOptDesc->pzText */ 859 puts(_("Set the debug verbosity level")); 860 861 /* referenced via ntpqOptions.pOptDesc->pzText */ 862 puts(_("Print a list of the peers")); 863 864 /* referenced via ntpqOptions.pOptDesc->pzText */ 865 puts(_("Force ntpq to operate in interactive mode")); 866 867 /* referenced via ntpqOptions.pOptDesc->pzText */ 868 puts(_("numeric host addresses")); 869 870 /* referenced via ntpqOptions.pOptDesc->pzText */ 871 puts(_("Always output status line with readvar")); 872 873 /* referenced via ntpqOptions.pOptDesc->pzText */ 874 puts(_("display extended usage information and exit")); 875 876 /* referenced via ntpqOptions.pOptDesc->pzText */ 877 puts(_("extended usage information passed thru pager")); 878 879 /* referenced via ntpqOptions.pOptDesc->pzText */ 880 puts(_("output version information and exit")); 881 882 /* referenced via ntpqOptions.pOptDesc->pzText */ 883 puts(_("save the option state to a config file")); 884 885 /* referenced via ntpqOptions.pOptDesc->pzText */ 886 puts(_("load options from a config file")); 887 888 /* referenced via ntpqOptions.pzUsageTitle */ 889 puts(_("ntpq - standard NTP query program - Ver. 4.2.7p404\n\ 890 Usage: %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]... [ host ...]\n")); 891 892 /* referenced via ntpqOptions.pzFullVersion */ 893 puts(_("ntpq 4.2.7p404")); 894 895 /* referenced via ntpqOptions.pzFullUsage */ 896 puts(_("<<<NOT-FOUND>>>")); 897 898 /* referenced via ntpqOptions.pzShortUsage */ 899 puts(_("<<<NOT-FOUND>>>")); 900 /* LIBOPTS-MESSAGES: */ 901 #line 67 "../autoopts.c" 902 puts(_("allocation of %d bytes failed\n")); 903 #line 93 "../autoopts.c" 904 puts(_("allocation of %d bytes failed\n")); 905 #line 53 "../init.c" 906 puts(_("AutoOpts function called without option descriptor\n")); 907 #line 90 "../init.c" 908 puts(_("\tThis exceeds the compiled library version: ")); 909 #line 88 "../init.c" 910 puts(_("Automated Options Processing Error!\n" 911 "\t%s called AutoOpts function with structure version %d:%d:%d.\n")); 912 #line 80 "../autoopts.c" 913 puts(_("realloc of %d bytes at 0x%p failed\n")); 914 #line 92 "../init.c" 915 puts(_("\tThis is less than the minimum library version: ")); 916 #line 121 "../version.c" 917 puts(_("Automated Options version %s\n" 918 "\tCopyright (C) 1999-2013 by Bruce Korb - all rights reserved\n")); 919 #line 82 "../makeshell.c" 920 puts(_("(AutoOpts bug): %s.\n")); 921 #line 90 "../reset.c" 922 puts(_("optionResetOpt() called, but reset-option not configured")); 923 #line 292 "../usage.c" 924 puts(_("could not locate the 'help' option")); 925 #line 336 "../autoopts.c" 926 puts(_("optionProcess() was called with invalid data")); 927 #line 748 "../usage.c" 928 puts(_("invalid argument type specified")); 929 #line 598 "../find.c" 930 puts(_("defaulted to option with optional arg")); 931 #line 76 "../alias.c" 932 puts(_("aliasing option is out of range.")); 933 #line 234 "../enum.c" 934 puts(_("%s error: the keyword '%s' is ambiguous for %s\n")); 935 #line 108 "../find.c" 936 puts(_(" The following options match:\n")); 937 #line 293 "../find.c" 938 puts(_("%s: ambiguous option name: %s (matches %d options)\n")); 939 #line 161 "../check.c" 940 puts(_("%s: Command line arguments required\n")); 941 #line 43 "../alias.c" 942 puts(_("%d %s%s options allowed\n")); 943 #line 89 "../makeshell.c" 944 puts(_("%s error %d (%s) calling %s for '%s'\n")); 945 #line 301 "../makeshell.c" 946 puts(_("interprocess pipe")); 947 #line 168 "../version.c" 948 puts(_("error: version option argument '%c' invalid. Use:\n" 949 "\t'v' - version only\n" 950 "\t'c' - version and copyright\n" 951 "\t'n' - version and full copyright notice\n")); 952 #line 58 "../check.c" 953 puts(_("%s error: the '%s' and '%s' options conflict\n")); 954 #line 217 "../find.c" 955 puts(_("%s: The '%s' option has been disabled.")); 956 #line 430 "../find.c" 957 puts(_("%s: The '%s' option has been disabled.")); 958 #line 38 "../alias.c" 959 puts(_("-equivalence")); 960 #line 469 "../find.c" 961 puts(_("%s: illegal option -- %c\n")); 962 #line 110 "../reset.c" 963 puts(_("%s: illegal option -- %c\n")); 964 #line 271 "../find.c" 965 puts(_("%s: illegal option -- %s\n")); 966 #line 755 "../find.c" 967 puts(_("%s: illegal option -- %s\n")); 968 #line 118 "../reset.c" 969 puts(_("%s: illegal option -- %s\n")); 970 #line 335 "../find.c" 971 puts(_("%s: unknown vendor extension option -- %s\n")); 972 #line 159 "../enum.c" 973 puts(_(" or an integer from %d through %d\n")); 974 #line 169 "../enum.c" 975 puts(_(" or an integer from %d through %d\n")); 976 #line 747 "../usage.c" 977 puts(_("%s error: invalid option descriptor for %s\n")); 978 #line 1081 "../usage.c" 979 puts(_("%s error: invalid option descriptor for %s\n")); 980 #line 385 "../find.c" 981 puts(_("%s: invalid option name: %s\n")); 982 #line 527 "../find.c" 983 puts(_("%s: The '%s' option requires an argument.\n")); 984 #line 156 "../autoopts.c" 985 puts(_("(AutoOpts bug): Equivalenced option '%s' was equivalenced to both\n" 986 "\t'%s' and '%s'.")); 987 #line 94 "../check.c" 988 puts(_("%s error: The %s option is required\n")); 989 #line 632 "../find.c" 990 puts(_("%s: The '%s' option cannot have an argument.\n")); 991 #line 151 "../check.c" 992 puts(_("%s: Command line arguments are not allowed.\n")); 993 #line 535 "../save.c" 994 puts(_("error %d (%s) creating %s\n")); 995 #line 234 "../enum.c" 996 puts(_("%s error: '%s' does not match any %s keywords.\n")); 997 #line 93 "../reset.c" 998 puts(_("%s error: The '%s' option requires an argument.\n")); 999 #line 184 "../save.c" 1000 puts(_("error %d (%s) stat-ing %s\n")); 1001 #line 238 "../save.c" 1002 puts(_("error %d (%s) stat-ing %s\n")); 1003 #line 143 "../restore.c" 1004 puts(_("%s error: no saved option state\n")); 1005 #line 231 "../autoopts.c" 1006 puts(_("'%s' is not a command line option.\n")); 1007 #line 114 "../time.c" 1008 puts(_("%s error: '%s' is not a recognizable date/time.\n")); 1009 #line 132 "../save.c" 1010 puts(_("'%s' not defined\n")); 1011 #line 53 "../time.c" 1012 puts(_("%s error: '%s' is not a recognizable time duration.\n")); 1013 #line 92 "../check.c" 1014 puts(_("%s error: The %s option must appear %d times.\n")); 1015 #line 157 "../numeric.c" 1016 puts(_("%s error: '%s' is not a recognizable number.\n")); 1017 #line 200 "../enum.c" 1018 puts(_("%s error: %s exceeds %s keyword count\n")); 1019 #line 330 "../usage.c" 1020 puts(_("Try '%s %s' for more information.\n")); 1021 #line 45 "../alias.c" 1022 puts(_("one %s%s option allowed\n")); 1023 #line 203 "../makeshell.c" 1024 puts(_("standard output")); 1025 #line 938 "../makeshell.c" 1026 puts(_("standard output")); 1027 #line 274 "../usage.c" 1028 puts(_("standard output")); 1029 #line 415 "../usage.c" 1030 puts(_("standard output")); 1031 #line 625 "../usage.c" 1032 puts(_("standard output")); 1033 #line 175 "../version.c" 1034 puts(_("standard output")); 1035 #line 274 "../usage.c" 1036 puts(_("standard error")); 1037 #line 415 "../usage.c" 1038 puts(_("standard error")); 1039 #line 625 "../usage.c" 1040 puts(_("standard error")); 1041 #line 175 "../version.c" 1042 puts(_("standard error")); 1043 #line 203 "../makeshell.c" 1044 puts(_("write")); 1045 #line 938 "../makeshell.c" 1046 puts(_("write")); 1047 #line 273 "../usage.c" 1048 puts(_("write")); 1049 #line 414 "../usage.c" 1050 puts(_("write")); 1051 #line 624 "../usage.c" 1052 puts(_("write")); 1053 #line 174 "../version.c" 1054 puts(_("write")); 1055 #line 60 "../numeric.c" 1056 puts(_("%s error: %s option value %ld is out of range.\n")); 1057 #line 44 "../check.c" 1058 puts(_("%s error: %s option requires the %s option\n")); 1059 #line 131 "../save.c" 1060 puts(_("%s warning: cannot save options - %s not regular file\n")); 1061 #line 183 "../save.c" 1062 puts(_("%s warning: cannot save options - %s not regular file\n")); 1063 #line 237 "../save.c" 1064 puts(_("%s warning: cannot save options - %s not regular file\n")); 1065 #line 256 "../save.c" 1066 puts(_("%s warning: cannot save options - %s not regular file\n")); 1067 #line 534 "../save.c" 1068 puts(_("%s warning: cannot save options - %s not regular file\n")); 1069 /* END-LIBOPTS-MESSAGES */ 1070 1071 /* USAGE-TEXT: */ 1072 #line 873 "../usage.c" 1073 puts(_("\t\t\t\t- an alternate for '%s'\n")); 1074 #line 1148 "../usage.c" 1075 puts(_("Version, usage and configuration options:")); 1076 #line 924 "../usage.c" 1077 puts(_("\t\t\t\t- default option for unnamed options\n")); 1078 #line 837 "../usage.c" 1079 puts(_("\t\t\t\t- disabled as '--%s'\n")); 1080 #line 1117 "../usage.c" 1081 puts(_(" --- %-14s %s\n")); 1082 #line 1115 "../usage.c" 1083 puts(_("This option has been disabled")); 1084 #line 864 "../usage.c" 1085 puts(_("\t\t\t\t- enabled by default\n")); 1086 #line 40 "../alias.c" 1087 puts(_("%s error: only ")); 1088 #line 1194 "../usage.c" 1089 puts(_(" - examining environment variables named %s_*\n")); 1090 #line 168 "../file.c" 1091 puts(_("\t\t\t\t- file must not pre-exist\n")); 1092 #line 172 "../file.c" 1093 puts(_("\t\t\t\t- file must pre-exist\n")); 1094 #line 380 "../usage.c" 1095 puts(_("Options are specified by doubled hyphens and their name or by a single\n" 1096 "hyphen and the flag character.\n")); 1097 #line 916 "../makeshell.c" 1098 puts(_("\n" 1099 "= = = = = = = =\n\n" 1100 "This incarnation of genshell will produce\n" 1101 "a shell script to parse the options for %s:\n\n")); 1102 #line 166 "../enum.c" 1103 puts(_(" or an integer mask with any of the lower %d bits set\n")); 1104 #line 897 "../usage.c" 1105 puts(_("\t\t\t\t- is a set membership option\n")); 1106 #line 918 "../usage.c" 1107 puts(_("\t\t\t\t- must appear between %d and %d times\n")); 1108 #line 382 "../usage.c" 1109 puts(_("Options are specified by single or double hyphens and their name.\n")); 1110 #line 904 "../usage.c" 1111 puts(_("\t\t\t\t- may appear multiple times\n")); 1112 #line 891 "../usage.c" 1113 puts(_("\t\t\t\t- may not be preset\n")); 1114 #line 1309 "../usage.c" 1115 puts(_(" Arg Option-Name Description\n")); 1116 #line 1245 "../usage.c" 1117 puts(_(" Flg Arg Option-Name Description\n")); 1118 #line 1303 "../usage.c" 1119 puts(_(" Flg Arg Option-Name Description\n")); 1120 #line 1304 "../usage.c" 1121 puts(_(" %3s %s")); 1122 #line 1310 "../usage.c" 1123 puts(_(" %3s %s")); 1124 #line 387 "../usage.c" 1125 puts(_("The '-#<number>' option may omit the hash char\n")); 1126 #line 383 "../usage.c" 1127 puts(_("All arguments are named options.\n")); 1128 #line 971 "../usage.c" 1129 puts(_(" - reading file %s")); 1130 #line 409 "../usage.c" 1131 puts(_("\n" 1132 "Please send bug reports to: <%s>\n")); 1133 #line 100 "../version.c" 1134 puts(_("\n" 1135 "Please send bug reports to: <%s>\n")); 1136 #line 129 "../version.c" 1137 puts(_("\n" 1138 "Please send bug reports to: <%s>\n")); 1139 #line 903 "../usage.c" 1140 puts(_("\t\t\t\t- may NOT appear - preset only\n")); 1141 #line 944 "../usage.c" 1142 puts(_("\n" 1143 "The following option preset mechanisms are supported:\n")); 1144 #line 1192 "../usage.c" 1145 puts(_("\n" 1146 "The following option preset mechanisms are supported:\n")); 1147 #line 682 "../usage.c" 1148 puts(_("prohibits these options:\n")); 1149 #line 677 "../usage.c" 1150 puts(_("prohibits the option '%s'\n")); 1151 #line 81 "../numeric.c" 1152 puts(_("%s%ld to %ld")); 1153 #line 79 "../numeric.c" 1154 puts(_("%sgreater than or equal to %ld")); 1155 #line 75 "../numeric.c" 1156 puts(_("%s%ld exactly")); 1157 #line 68 "../numeric.c" 1158 puts(_("%sit must lie in one of the ranges:\n")); 1159 #line 68 "../numeric.c" 1160 puts(_("%sit must be in the range:\n")); 1161 #line 88 "../numeric.c" 1162 puts(_(", or\n")); 1163 #line 66 "../numeric.c" 1164 puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n")); 1165 #line 77 "../numeric.c" 1166 puts(_("%sless than or equal to %ld")); 1167 #line 390 "../usage.c" 1168 puts(_("Operands and options may be intermixed. They will be reordered.\n")); 1169 #line 652 "../usage.c" 1170 puts(_("requires the option '%s'\n")); 1171 #line 655 "../usage.c" 1172 puts(_("requires these options:\n")); 1173 #line 1321 "../usage.c" 1174 puts(_(" Arg Option-Name Req? Description\n")); 1175 #line 1315 "../usage.c" 1176 puts(_(" Flg Arg Option-Name Req? Description\n")); 1177 #line 167 "../enum.c" 1178 puts(_("or you may use a numeric representation. Preceding these with a '!'\n" 1179 "will clear the bits, specifying 'none' will clear all bits, and 'all'\n" 1180 "will set them all. Multiple entries may be passed as an option\n" 1181 "argument list.\n")); 1182 #line 910 "../usage.c" 1183 puts(_("\t\t\t\t- may appear up to %d times\n")); 1184 #line 77 "../enum.c" 1185 puts(_("The valid \"%s\" option keywords are:\n")); 1186 #line 1152 "../usage.c" 1187 puts(_("The next option supports vendor supported extra options:")); 1188 #line 773 "../usage.c" 1189 puts(_("These additional options are:")); 1190 /* END-USAGE-TEXT */ 1191 } 1192 #endif /* uncompilable code */ 1193 #ifdef __cplusplus 1194 } 1195 #endif 1196 /* ntpq-opts.c ends here */ 1197