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