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