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