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