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