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