LCOV - code coverage report
Current view: top level - src - rsstats-opts.c (source / functions) Hit Total Coverage
Test: mkernel.info Lines: 40 47 85.1 %
Date: 2024-12-05 21:00:54 Functions: 7 7 100.0 %

          Line data    Source code
       1             : /*   -*- buffer-read-only: t -*- vi: set ro:
       2             :  *
       3             :  *  DO NOT EDIT THIS FILE   (rsstats-opts.c)
       4             :  *
       5             :  *  It has been AutoGen-ed
       6             :  *  From the definitions    rsstats-opts.def
       7             :  *  and the template file   options
       8             :  *
       9             :  * Generated from AutoOpts 42:1:17 templates.
      10             :  *
      11             :  *  AutoOpts is a copyrighted work.  This source file is not encumbered
      12             :  *  by AutoOpts licensing, but is provided under the licensing terms chosen
      13             :  *  by the rsstats author or copyright holder.  AutoOpts is
      14             :  *  licensed under the terms of the LGPL.  The redistributable library
      15             :  *  (``libopts'') is licensed under the terms of either the LGPL or, at the
      16             :  *  users discretion, the BSD license.  See the AutoOpts and/or libopts sources
      17             :  *  for details.
      18             :  *
      19             :  * The rsstats program is copyrighted and licensed
      20             :  * under the following terms:
      21             :  *
      22             :  *  Copyright (C) 2024 Francois Cerbelle, all rights reserved.
      23             :  *  This is free software. It is licensed for use, modification and
      24             :  *  redistribution under the terms of the GNU General Public License,
      25             :  *  version 3 or later <http://gnu.org/licenses/gpl.html>
      26             :  *
      27             :  *  rsstats is free software: you can redistribute it and/or modify it
      28             :  *  under the terms of the GNU General Public License as published by the
      29             :  *  Free Software Foundation, either version 3 of the License, or
      30             :  *  (at your option) any later version.
      31             :  *
      32             :  *  rsstats is distributed in the hope that it will be useful, but
      33             :  *  WITHOUT ANY WARRANTY; without even the implied warranty of
      34             :  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      35             :  *  See the GNU General Public License for more details.
      36             :  *
      37             :  *  You should have received a copy of the GNU General Public License along
      38             :  *  with this program.  If not, see <http://www.gnu.org/licenses/>.
      39             :  */
      40             : 
      41             : #ifndef __doxygen__
      42             : #define OPTION_CODE_COMPILE 1
      43             : #include "rsstats-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      (rsstats_opt_strs+0)
      60             : #define zLicenseDescrip (rsstats_opt_strs+258)
      61             : 
      62             : 
      63             : #ifndef NULL
      64             : #  define NULL 0
      65             : #endif
      66             : 
      67             : /**
      68             :  *  static const strings for rsstats options
      69             :  */
      70             : static char const rsstats_opt_strs[3375] =
      71             : /*     0 */ "rsstats 0.0.1\n"
      72             :             "Copyright (C) 2024 Francois Cerbelle, all rights reserved.\n"
      73             :             "This is free software. It is licensed for use, modification and\n"
      74             :             "redistribution under the terms of the GNU General Public License,\n"
      75             :             "version 3 or later <http://gnu.org/licenses/gpl.html>\n\0"
      76             : /*   258 */ "rsstats is free software: you can redistribute it and/or modify it under\n"
      77             :             "the terms of the GNU General Public License as published by the Free\n"
      78             :             "Software Foundation, either version 3 of the License, or (at your option)\n"
      79             :             "any later version.\n\n"
      80             :             "rsstats is distributed in the hope that it will be useful, but WITHOUT ANY\n"
      81             :             "WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n"
      82             :             "FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n"
      83             :             "details.\n\n"
      84             :             "You should have received a copy of the GNU General Public License along\n"
      85             :             "with this program.  If not, see <http://www.gnu.org/licenses/>.\n\0"
      86             : /*   861 */ "input CSV file (default: clusterdef.csv)\0"
      87             : /*   902 */ "INPUT\0"
      88             : /*   908 */ "input\0"
      89             : /*   914 */ "clusterdef.csv\0"
      90             : /*   929 */ "output CVS filename for nodes information (default: rsstats.csv)\0"
      91             : /*   994 */ "OUTPUT\0"
      92             : /*  1001 */ "output\0"
      93             : /*  1008 */ "rsstats.csv\0"
      94             : /*  1020 */ "comma separated list of clusternames to query (default: all)\0"
      95             : /*  1081 */ "CLUSTERS\0"
      96             : /*  1090 */ "clusters\0"
      97             : /*  1099 */ "all\0"
      98             : /*  1103 */ "Comma separated list of reports to generate (default: all)\0"
      99             : /*  1162 */ "REPORTS\0"
     100             : /*  1170 */ "reports\0"
     101             : /*  1178 */ "display extended usage information and exit\0"
     102             : /*  1222 */ "help\0"
     103             : /*  1227 */ "extended usage information passed thru pager\0"
     104             : /*  1272 */ "more-help\0"
     105             : /*  1282 */ "output version information and exit\0"
     106             : /*  1318 */ "version\0"
     107             : /*  1326 */ "save the option state to a config file\0"
     108             : /*  1365 */ "save-opts\0"
     109             : /*  1375 */ "load options from a config file\0"
     110             : /*  1407 */ "LOAD_OPTS\0"
     111             : /*  1417 */ "no-load-opts\0"
     112             : /*  1430 */ "no\0"
     113             : /*  1433 */ "RSSTATS\0"
     114             : /*  1441 */ "rsstats - Redis Enterprise Software cluster statistic extraction\n"
     115             :             "Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n\0"
     116             : /*  1564 */ "$HOME\0"
     117             : /*  1570 */ ".rsstatsrc\0"
     118             : /*  1581 */ "francois@cerbelle.net\0"
     119             : /*  1603 */ "rsstats execute all the reports on each of the defined clusters.  The\n"
     120             :             "cluster definition list is read from the clusterdef.csv file, which can be\n"
     121             :             "specified with the --input (-i) option, and the reports are written to the\n"
     122             :             "rsstats.csv file, which can be specified with the --output (-o) option.\n"
     123             :             "additional information given whenever the usage routine is invoked or with\n"
     124             :             "the --help (-h) option.\n\0"
     125             : /*  1995 */ "rsstats executes all reports on the clusters specified in the cluster\n"
     126             :             "definition list and writes the reports to the output file.  The cluster\n"
     127             :             "list can be filtered by a comma separated list of cluster names with the\n"
     128             :             "--cluster (-c) option and the reports to be executed can be specified as a\n"
     129             :             "comma separated list with the --reports (-r) option.\n\n"
     130             :             "clusterdef.csv mandatory columns :\n"
     131             :             "clustername_or_ip,adminname,adminpass,allow_selfsigned_certs,cacert_file\n\n"
     132             :             "The CSV input format should conform to the RFC4180: - Records (lines) are\n"
     133             :             "separated with CR+LF (Windows) with LF-only (Unix) tolerance - Fields are\n"
     134             :             "separated by a comma - Fields can optionnaly be double-quoted, with a\n"
     135             :             "starting (very first char) and ending (very last char) double-quote -\n"
     136             :             "Spaces chars are part of the field values - If a field contains a either a\n"
     137             :             "comma, a CRLF or a doublequote it needs to be quoted - a double-quote\n"
     138             :             "inside a double-quoted value needs to be doubled (a \"sample\" value => \"a\n"
     139             :             "\"\"sample\"\" value\") - A line can not end with a comma as the very last\n"
     140             :             "character.  - Empty lines are not supported.\n\n"
     141             :             "Example:\n\n"
     142             :             "192.168.0.1,admin@demo.com,\n"
     143             :             "192.168.0.2,admin@demo.com,\"\",false,\"/etc/ssl/cert.pem\"\n"
     144             :             "127.0.0.1,admin@demo.com,password 192.168.0.3,admin@demo.com,password\n"
     145             :             "192.168.0.4,admin@demo.com,\"passw,ord\"\n"
     146             :             "192.168.1.50,admin@demo.com,password,true,\"\"\n"
     147             :             "127.0.0.1,admin@demo.com,password,true,\"\"\n\0"
     148             : /*  3361 */ "rsstats 0.0.1";
     149             : 
     150             : /**
     151             :  *  input option description:
     152             :  */
     153             : /** Descriptive text for the input option */
     154             : #define INPUT_DESC      (rsstats_opt_strs+861)
     155             : /** Upper-cased name for the input option */
     156             : #define INPUT_NAME      (rsstats_opt_strs+902)
     157             : /** Name string for the input option */
     158             : #define INPUT_name      (rsstats_opt_strs+908)
     159             : /** The compiled in default value for the input option argument */
     160             : #define INPUT_DFT_ARG   (rsstats_opt_strs+914)
     161             : /** Compiled in flag settings for the input option */
     162             : #define INPUT_FLAGS     (OPTST_DISABLED \
     163             :         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
     164             : 
     165             : /**
     166             :  *  output option description:
     167             :  */
     168             : /** Descriptive text for the output option */
     169             : #define OUTPUT_DESC      (rsstats_opt_strs+929)
     170             : /** Upper-cased name for the output option */
     171             : #define OUTPUT_NAME      (rsstats_opt_strs+994)
     172             : /** Name string for the output option */
     173             : #define OUTPUT_name      (rsstats_opt_strs+1001)
     174             : /** The compiled in default value for the output option argument */
     175             : #define OUTPUT_DFT_ARG   (rsstats_opt_strs+1008)
     176             : /** Compiled in flag settings for the output option */
     177             : #define OUTPUT_FLAGS     (OPTST_DISABLED \
     178             :         | OPTST_SET_ARGTYPE(OPARG_TYPE_FILE))
     179             : 
     180             : /**
     181             :  *  clusters option description:
     182             :  */
     183             : /** Descriptive text for the clusters option */
     184             : #define CLUSTERS_DESC      (rsstats_opt_strs+1020)
     185             : /** Upper-cased name for the clusters option */
     186             : #define CLUSTERS_NAME      (rsstats_opt_strs+1081)
     187             : /** Name string for the clusters option */
     188             : #define CLUSTERS_name      (rsstats_opt_strs+1090)
     189             : /** The compiled in default value for the clusters option argument */
     190             : #define CLUSTERS_DFT_ARG   (rsstats_opt_strs+1099)
     191             : /** Compiled in flag settings for the clusters option */
     192             : #define CLUSTERS_FLAGS     (OPTST_DISABLED \
     193             :         | OPTST_SET_ARGTYPE(OPARG_TYPE_STRING))
     194             : 
     195             : /**
     196             :  *  reports option description:
     197             :  */
     198             : /** Descriptive text for the reports option */
     199             : #define REPORTS_DESC      (rsstats_opt_strs+1103)
     200             : /** Upper-cased name for the reports option */
     201             : #define REPORTS_NAME      (rsstats_opt_strs+1162)
     202             : /** Name string for the reports option */
     203             : #define REPORTS_name      (rsstats_opt_strs+1170)
     204             : /** The compiled in default value for the reports option argument */
     205             : #define REPORTS_DFT_ARG   (NULL)
     206             : #define ReportsCookieBits            VOIDP(REPORTS_BDBS|REPORTS_CLUSTER)
     207             : /** Compiled in flag settings for the reports option */
     208             : #define REPORTS_FLAGS     (OPTST_DISABLED \
     209             :         | OPTST_SET_ARGTYPE(OPARG_TYPE_MEMBERSHIP))
     210             : 
     211             : /*
     212             :  *  Help/More_Help/Version option descriptions:
     213             :  */
     214             : #define HELP_DESC       (rsstats_opt_strs+1178)
     215             : #define HELP_name       (rsstats_opt_strs+1222)
     216             : #ifdef HAVE_WORKING_FORK
     217             : #define MORE_HELP_DESC  (rsstats_opt_strs+1227)
     218             : #define MORE_HELP_name  (rsstats_opt_strs+1272)
     219             : #define MORE_HELP_FLAGS (OPTST_IMM | OPTST_NO_INIT)
     220             : #else
     221             : #define MORE_HELP_DESC  HELP_DESC
     222             : #define MORE_HELP_name  HELP_name
     223             : #define MORE_HELP_FLAGS (OPTST_OMITTED | OPTST_NO_INIT)
     224             : #endif
     225             : #ifdef NO_OPTIONAL_OPT_ARGS
     226             : #  define VER_FLAGS     (OPTST_IMM | OPTST_NO_INIT)
     227             : #else
     228             : #  define VER_FLAGS     (OPTST_SET_ARGTYPE(OPARG_TYPE_STRING) | \
     229             :                          OPTST_ARG_OPTIONAL | OPTST_IMM | OPTST_NO_INIT)
     230             : #endif
     231             : #define VER_DESC        (rsstats_opt_strs+1282)
     232             : #define VER_name        (rsstats_opt_strs+1318)
     233             : #define SAVE_OPTS_DESC  (rsstats_opt_strs+1326)
     234             : #define SAVE_OPTS_name  (rsstats_opt_strs+1365)
     235             : #define LOAD_OPTS_DESC     (rsstats_opt_strs+1375)
     236             : #define LOAD_OPTS_NAME     (rsstats_opt_strs+1407)
     237             : #define NO_LOAD_OPTS_name  (rsstats_opt_strs+1417)
     238             : #define LOAD_OPTS_pfx      (rsstats_opt_strs+1430)
     239             : #define LOAD_OPTS_name     (NO_LOAD_OPTS_name + 3)
     240             : /**
     241             :  *  Declare option callback procedures
     242             :  */
     243             : extern tOptProc
     244             :     optionBooleanVal,   optionNestedVal,    optionNumericVal,
     245             :     optionPagedUsage,   optionPrintVersion, optionResetOpt,
     246             :     optionStackArg,     optionTimeDate,     optionTimeVal,
     247             :     optionUnstackArg,   optionVendorOption;
     248             : static tOptProc
     249             :     doOptInput, doOptOutput, doOptReports, doUsageOpt;
     250             : #define VER_PROC        optionPrintVersion
     251             : 
     252             : /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     253             : /**
     254             :  *  Define the rsstats Option Descriptions.
     255             :  * This is an array of OPTION_CT entries, one for each
     256             :  * option that the rsstats program responds to.
     257             :  */
     258             : static tOptDesc optDesc[OPTION_CT] = {
     259             :   {  /* entry idx, value */ 0, VALUE_OPT_INPUT,
     260             :      /* equiv idx, value */ 0, VALUE_OPT_INPUT,
     261             :      /* equivalenced to  */ NO_EQUIVALENT,
     262             :      /* min, max, act ct */ 0, 1, 0,
     263             :      /* opt state flags  */ INPUT_FLAGS, 0,
     264             :      /* last opt argumnt */ { INPUT_DFT_ARG },
     265             :      /* arg list/cookie  */ NULL,
     266             :      /* must/cannot opts */ NULL, NULL,
     267             :      /* option proc      */ doOptInput,
     268             :      /* desc, NAME, name */ INPUT_DESC, INPUT_NAME, INPUT_name,
     269             :      /* disablement strs */ NULL, NULL },
     270             : 
     271             :   {  /* entry idx, value */ 1, VALUE_OPT_OUTPUT,
     272             :      /* equiv idx, value */ 1, VALUE_OPT_OUTPUT,
     273             :      /* equivalenced to  */ NO_EQUIVALENT,
     274             :      /* min, max, act ct */ 0, 1, 0,
     275             :      /* opt state flags  */ OUTPUT_FLAGS, 0,
     276             :      /* last opt argumnt */ { OUTPUT_DFT_ARG },
     277             :      /* arg list/cookie  */ NULL,
     278             :      /* must/cannot opts */ NULL, NULL,
     279             :      /* option proc      */ doOptOutput,
     280             :      /* desc, NAME, name */ OUTPUT_DESC, OUTPUT_NAME, OUTPUT_name,
     281             :      /* disablement strs */ NULL, NULL },
     282             : 
     283             :   {  /* entry idx, value */ 2, VALUE_OPT_CLUSTERS,
     284             :      /* equiv idx, value */ 2, VALUE_OPT_CLUSTERS,
     285             :      /* equivalenced to  */ NO_EQUIVALENT,
     286             :      /* min, max, act ct */ 0, 1, 0,
     287             :      /* opt state flags  */ CLUSTERS_FLAGS, 0,
     288             :      /* last opt argumnt */ { CLUSTERS_DFT_ARG },
     289             :      /* arg list/cookie  */ NULL,
     290             :      /* must/cannot opts */ NULL, NULL,
     291             :      /* option proc      */ NULL,
     292             :      /* desc, NAME, name */ CLUSTERS_DESC, CLUSTERS_NAME, CLUSTERS_name,
     293             :      /* disablement strs */ NULL, NULL },
     294             : 
     295             :   {  /* entry idx, value */ 3, VALUE_OPT_REPORTS,
     296             :      /* equiv idx, value */ 3, VALUE_OPT_REPORTS,
     297             :      /* equivalenced to  */ NO_EQUIVALENT,
     298             :      /* min, max, act ct */ 0, NOLIMIT, 0,
     299             :      /* opt state flags  */ REPORTS_FLAGS, 0,
     300             :      /* last opt argumnt */ { REPORTS_DFT_ARG },
     301             :      /* arg list/cookie  */ ReportsCookieBits,
     302             :      /* must/cannot opts */ NULL, NULL,
     303             :      /* option proc      */ doOptReports,
     304             :      /* desc, NAME, name */ REPORTS_DESC, REPORTS_NAME, REPORTS_name,
     305             :      /* disablement strs */ NULL, NULL },
     306             : 
     307             :   {  /* entry idx, value */ INDEX_OPT_VERSION, VALUE_OPT_VERSION,
     308             :      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_VERSION,
     309             :      /* equivalenced to  */ NO_EQUIVALENT,
     310             :      /* min, max, act ct */ 0, 1, 0,
     311             :      /* opt state flags  */ VER_FLAGS, AOUSE_VERSION,
     312             :      /* last opt argumnt */ { NULL },
     313             :      /* arg list/cookie  */ NULL,
     314             :      /* must/cannot opts */ NULL, NULL,
     315             :      /* option proc      */ VER_PROC,
     316             :      /* desc, NAME, name */ VER_DESC, NULL, VER_name,
     317             :      /* disablement strs */ NULL, NULL },
     318             : 
     319             : 
     320             : 
     321             :   {  /* entry idx, value */ INDEX_OPT_HELP, VALUE_OPT_HELP,
     322             :      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_HELP,
     323             :      /* equivalenced to  */ NO_EQUIVALENT,
     324             :      /* min, max, act ct */ 0, 1, 0,
     325             :      /* opt state flags  */ OPTST_IMM | OPTST_NO_INIT, AOUSE_HELP,
     326             :      /* last opt argumnt */ { NULL },
     327             :      /* arg list/cookie  */ NULL,
     328             :      /* must/cannot opts */ NULL, NULL,
     329             :      /* option proc      */ doUsageOpt,
     330             :      /* desc, NAME, name */ HELP_DESC, NULL, HELP_name,
     331             :      /* disablement strs */ NULL, NULL },
     332             : 
     333             :   {  /* entry idx, value */ INDEX_OPT_MORE_HELP, VALUE_OPT_MORE_HELP,
     334             :      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_MORE_HELP,
     335             :      /* equivalenced to  */ NO_EQUIVALENT,
     336             :      /* min, max, act ct */ 0, 1, 0,
     337             :      /* opt state flags  */ MORE_HELP_FLAGS, AOUSE_MORE_HELP,
     338             :      /* last opt argumnt */ { NULL },
     339             :      /* arg list/cookie  */ NULL,
     340             :      /* must/cannot opts */ NULL,  NULL,
     341             :      /* option proc      */ optionPagedUsage,
     342             :      /* desc, NAME, name */ MORE_HELP_DESC, NULL, MORE_HELP_name,
     343             :      /* disablement strs */ NULL, NULL },
     344             : 
     345             :   {  /* entry idx, value */ INDEX_OPT_SAVE_OPTS, VALUE_OPT_SAVE_OPTS,
     346             :      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_SAVE_OPTS,
     347             :      /* equivalenced to  */ NO_EQUIVALENT,
     348             :      /* min, max, act ct */ 0, 1, 0,
     349             :      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
     350             :                        | OPTST_ARG_OPTIONAL | OPTST_NO_INIT, AOUSE_SAVE_OPTS,
     351             :      /* last opt argumnt */ { NULL },
     352             :      /* arg list/cookie  */ NULL,
     353             :      /* must/cannot opts */ NULL,  NULL,
     354             :      /* option proc      */ NULL,
     355             :      /* desc, NAME, name */ SAVE_OPTS_DESC, NULL, SAVE_OPTS_name,
     356             :      /* disablement strs */ NULL, NULL },
     357             : 
     358             :   {  /* entry idx, value */ INDEX_OPT_LOAD_OPTS, VALUE_OPT_LOAD_OPTS,
     359             :      /* equiv idx value  */ NO_EQUIVALENT, VALUE_OPT_LOAD_OPTS,
     360             :      /* equivalenced to  */ NO_EQUIVALENT,
     361             :      /* min, max, act ct */ 0, NOLIMIT, 0,
     362             :      /* opt state flags  */ OPTST_SET_ARGTYPE(OPARG_TYPE_STRING)
     363             :                           | OPTST_DISABLE_IMM, AOUSE_LOAD_OPTS,
     364             :      /* last opt argumnt */ { NULL },
     365             :      /* arg list/cookie  */ NULL,
     366             :      /* must/cannot opts */ NULL, NULL,
     367             :      /* option proc      */ optionLoadOpt,
     368             :      /* desc, NAME, name */ LOAD_OPTS_DESC, LOAD_OPTS_NAME, LOAD_OPTS_name,
     369             :      /* disablement strs */ NO_LOAD_OPTS_name, LOAD_OPTS_pfx }
     370             : };
     371             : 
     372             : 
     373             : /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     374             : /** Reference to the upper cased version of rsstats. */
     375             : #define zPROGNAME       (rsstats_opt_strs+1433)
     376             : /** Reference to the title line for rsstats usage. */
     377             : #define zUsageTitle     (rsstats_opt_strs+1441)
     378             : /** rsstats configuration file name. */
     379             : #define zRcName         (rsstats_opt_strs+1570)
     380             : /** Directories to search for rsstats config files. */
     381             : static char const * const apzHomeList[2] = {
     382             :     rsstats_opt_strs+1564,
     383             :     NULL };
     384             : /** The rsstats program bug email address. */
     385             : #define zBugsAddr       (rsstats_opt_strs+1581)
     386             : /** Clarification/explanation of what rsstats does. */
     387             : #define zExplain        (rsstats_opt_strs+1603)
     388             : /** Extra detail explaining what rsstats does. */
     389             : #define zDetail         (rsstats_opt_strs+1995)
     390             : /** The full version string for rsstats. */
     391             : #define zFullVersion    (rsstats_opt_strs+3361)
     392             : /* extracted from optcode.tlib near line 342 */
     393             : 
     394             : #if defined(ENABLE_NLS)
     395             : # define OPTPROC_BASE OPTPROC_TRANSLATE
     396             :   static tOptionXlateProc translate_option_strings;
     397             : #else
     398             : # define OPTPROC_BASE OPTPROC_NONE
     399             : # define translate_option_strings NULL
     400             : #endif /* ENABLE_NLS */
     401             : 
     402             : #define rsstats_full_usage (NULL)
     403             : #define rsstats_short_usage (NULL)
     404             : 
     405             : #endif /* not defined __doxygen__ */
     406             : 
     407             : /*
     408             :  *  Create the static procedure(s) declared above.
     409             :  */
     410             : /**
     411             :  * The callout function that invokes the optionUsage function.
     412             :  *
     413             :  * @param[in] opts the AutoOpts option description structure
     414             :  * @param[in] od   the descriptor for the "help" (usage) option.
     415             :  * @noreturn
     416             :  */
     417             : static void
     418           2 : doUsageOpt(tOptions * opts, tOptDesc * od)
     419             : {
     420             :     int ex_code;
     421           2 :     ex_code = RSSTATS_EXIT_SUCCESS;
     422           2 :     optionUsage(&rsstatsOptions, ex_code);
     423             :     /* NOTREACHED */
     424           0 :     exit(RSSTATS_EXIT_FAILURE);
     425             :     (void)opts;
     426             :     (void)od;
     427             : }
     428             : 
     429             : /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     430             : /**
     431             :  * Code to handle the input option.
     432             :  *
     433             :  * @param[in] pOptions the rsstats options data structure
     434             :  * @param[in,out] pOptDesc the option descriptor for this option.
     435             :  */
     436             : static void
     437           5 : doOptInput(tOptions* pOptions, tOptDesc* pOptDesc)
     438             : {
     439             :     static teOptFileType const  type =
     440             :         FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
     441             :     static tuFileMode           mode;
     442             : #ifndef O_CLOEXEC
     443             : #  define O_CLOEXEC 0
     444             : #endif
     445           5 :     mode.file_flags = O_CLOEXEC;
     446             : 
     447             :     /*
     448             :      * This function handles special invalid values for "pOptions"
     449             :      */
     450           5 :     optionFileCheck(pOptions, pOptDesc, type, mode);
     451           5 : }
     452             : 
     453             : /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     454             : /**
     455             :  * Code to handle the output option.
     456             :  *
     457             :  * @param[in] pOptions the rsstats options data structure
     458             :  * @param[in,out] pOptDesc the option descriptor for this option.
     459             :  */
     460             : static void
     461           6 : doOptOutput(tOptions* pOptions, tOptDesc* pOptDesc)
     462             : {
     463             :     static teOptFileType const  type =
     464             :         FTYPE_MODE_MAY_EXIST + FTYPE_MODE_NO_OPEN;
     465             :     static tuFileMode           mode;
     466             : #ifndef O_CLOEXEC
     467             : #  define O_CLOEXEC 0
     468             : #endif
     469           6 :     mode.file_flags = O_CLOEXEC;
     470             : 
     471             :     /*
     472             :      * This function handles special invalid values for "pOptions"
     473             :      */
     474           6 :     optionFileCheck(pOptions, pOptDesc, type, mode);
     475           6 : }
     476             : 
     477             : /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     478             : /**
     479             :  * Code to handle the reports option.
     480             :  *
     481             :  * @param[in] pOptions the rsstats options data structure
     482             :  * @param[in,out] pOptDesc the option descriptor for this option.
     483             :  */
     484             : static void
     485          14 : doOptReports(tOptions* pOptions, tOptDesc* pOptDesc)
     486             : {
     487             : 
     488             : /* extracted from optmain.tlib near line 1007 */
     489             :     static char const * const names[3] = {
     490             :         "sample",   "bdbs",     "cluster"
     491             :     };
     492             :     /*
     493             :      * This function handles special invalid values for "pOptions"
     494             :      */
     495          14 :     optionSetMembers(pOptions, pOptDesc, names, 3);
     496          14 : }
     497             : /* extracted from optmain.tlib near line 1250 */
     498             : 
     499             : /**
     500             :  * The directory containing the data associated with rsstats.
     501             :  */
     502             : #ifndef  PKGDATADIR
     503             : # define PKGDATADIR ""
     504             : #endif
     505             : 
     506             : /**
     507             :  * Information about the person or institution that packaged rsstats
     508             :  * for the current distribution.
     509             :  */
     510             : #ifndef  WITH_PACKAGER
     511             : # define rsstats_packager_info NULL
     512             : #else
     513             : /** Packager information for rsstats. */
     514             : static char const rsstats_packager_info[] =
     515             :     "Packaged by " WITH_PACKAGER
     516             : 
     517             : # ifdef WITH_PACKAGER_VERSION
     518             :         " ("WITH_PACKAGER_VERSION")"
     519             : # endif
     520             : 
     521             : # ifdef WITH_PACKAGER_BUG_REPORTS
     522             :     "\nReport rsstats bugs to " WITH_PACKAGER_BUG_REPORTS
     523             : # endif
     524             :     "\n";
     525             : #endif
     526             : #ifndef __doxygen__
     527             : 
     528             : #endif /* __doxygen__ */
     529             : /**
     530             :  * The option definitions for rsstats.  The one structure that
     531             :  * binds them all.
     532             :  */
     533             : tOptions rsstatsOptions = {
     534             :     OPTIONS_STRUCT_VERSION,
     535             :     0, NULL,                    /* original argc + argv    */
     536             :     ( OPTPROC_BASE
     537             :     + OPTPROC_ERRSTOP
     538             :     + OPTPROC_SHORTOPT
     539             :     + OPTPROC_LONGOPT
     540             :     + OPTPROC_NO_REQ_OPT
     541             :     + OPTPROC_ENVIRON
     542             :     + OPTPROC_NO_ARGS
     543             :     + OPTPROC_GNUUSAGE ),
     544             :     0, NULL,                    /* current option index, current option */
     545             :     NULL,         NULL,         zPROGNAME,
     546             :     zRcName,      zCopyright,   zLicenseDescrip,
     547             :     zFullVersion, apzHomeList,  zUsageTitle,
     548             :     zExplain,     zDetail,      optDesc,
     549             :     zBugsAddr,                  /* address to send bugs to */
     550             :     NULL, NULL,                 /* extensions/saved state  */
     551             :     optionUsage, /* usage procedure */
     552             :     translate_option_strings,   /* translation procedure */
     553             :     /*
     554             :      *  Indexes to special options
     555             :      */
     556             :     { INDEX_OPT_MORE_HELP, /* more-help option index */
     557             :       INDEX_OPT_SAVE_OPTS, /* save option index */
     558             :       NO_EQUIVALENT, /* '-#' option index */
     559             :       NO_EQUIVALENT /* index of default opt */
     560             :     },
     561             :     9 /* full option count */, 4 /* user option count */,
     562             :     rsstats_full_usage, rsstats_short_usage,
     563             :     NULL, NULL,
     564             :     PKGDATADIR, rsstats_packager_info
     565             : };
     566             : 
     567             : #if ENABLE_NLS
     568             : /**
     569             :  * This code is designed to translate translatable option text for the
     570             :  * rsstats program.  These translations happen upon entry
     571             :  * to optionProcess().
     572             :  */
     573             : #include <stdio.h>
     574             : #include <stdlib.h>
     575             : #include <string.h>
     576             : #include <unistd.h>
     577             : #ifdef HAVE_DCGETTEXT
     578             : # include <gettext.h>
     579             : #endif
     580             : #include <autoopts/usage-txt.h>
     581             : 
     582             : static char * AO_gettext(char const * pz);
     583             : static void   coerce_it(void ** s);
     584             : 
     585             : /**
     586             :  * AutoGen specific wrapper function for gettext.  It relies on the macro _()
     587             :  * to convert from English to the target language, then strdup-duplicates the
     588             :  * result string.  It tries the "libopts" domain first, then whatever has been
     589             :  * set via the \a textdomain(3) call.
     590             :  *
     591             :  * @param[in] pz the input text used as a lookup key.
     592             :  * @returns the translated text (if there is one),
     593             :  *   or the original text (if not).
     594             :  */
     595             : static char *
     596        3172 : AO_gettext(char const * pz)
     597             : {
     598             :     char * res;
     599        3172 :     if (pz == NULL)
     600           0 :         return NULL;
     601             : #ifdef HAVE_DCGETTEXT
     602             :     /*
     603             :      * While processing the option_xlateable_txt data, try to use the
     604             :      * "libopts" domain.  Once we switch to the option descriptor data,
     605             :      * do *not* use that domain.
     606             :      */
     607             :     if (option_xlateable_txt.field_ct != 0) {
     608             :         res = dgettext("libopts", pz);
     609             :         if (res == pz)
     610             :             res = (char *)VOIDP(_(pz));
     611             :     } else
     612             :         res = (char *)VOIDP(_(pz));
     613             : #else
     614        3172 :     res = (char *)VOIDP(_(pz));
     615             : #endif
     616        3172 :     if (res == pz)
     617        3172 :         return res;
     618           0 :     res = strdup(res);
     619           0 :     if (res == NULL) {
     620           0 :         fputs(_("No memory for duping translated strings\n"), stderr);
     621           0 :         exit(RSSTATS_EXIT_FAILURE);
     622             :     }
     623           0 :     return res;
     624             : }
     625             : 
     626             : /**
     627             :  * All the pointers we use are marked "* const", but they are stored in
     628             :  * writable memory.  Coerce the mutability and set the pointer.
     629             :  */
     630         390 : static void coerce_it(void ** s) { *s = AO_gettext(*s);
     631         390 : }
     632             : 
     633             : /**
     634             :  * Translate all the translatable strings in the rsstatsOptions
     635             :  * structure defined above.  This is done only once.
     636             :  */
     637             : static void
     638          26 : translate_option_strings(void)
     639             : {
     640          26 :     tOptions * const opts = &rsstatsOptions;
     641             : 
     642             :     /*
     643             :      *  Guard against re-translation.  It won't work.  The strings will have
     644             :      *  been changed by the first pass through this code.  One shot only.
     645             :      */
     646          26 :     if (option_xlateable_txt.field_ct != 0) {
     647             :         /*
     648             :          *  Do the translations.  The first pointer follows the field count
     649             :          *  field.  The field count field is the size of a pointer.
     650             :          */
     651          26 :         char ** ppz = (char**)VOIDP(&(option_xlateable_txt));
     652          26 :         int     ix  = option_xlateable_txt.field_ct;
     653             : 
     654             :         do {
     655        2782 :             ppz++; /* skip over field_ct */
     656        2782 :             *ppz = AO_gettext(*ppz);
     657        2782 :         } while (--ix > 0);
     658             :         /* prevent re-translation and disable "libopts" domain lookup */
     659          26 :         option_xlateable_txt.field_ct = 0;
     660             : 
     661          26 :         coerce_it(VOIDP(&(opts->pzCopyright)));
     662          26 :         coerce_it(VOIDP(&(opts->pzCopyNotice)));
     663          26 :         coerce_it(VOIDP(&(opts->pzFullVersion)));
     664          26 :         coerce_it(VOIDP(&(opts->pzUsageTitle)));
     665          26 :         coerce_it(VOIDP(&(opts->pzExplain)));
     666          26 :         coerce_it(VOIDP(&(opts->pzDetail)));
     667             :         {
     668          26 :             tOptDesc * od = opts->pOptDesc;
     669         260 :             for (ix = opts->optCt; ix > 0; ix--, od++)
     670         234 :                 coerce_it(VOIDP(&(od->pzText)));
     671             :         }
     672             :     }
     673          26 : }
     674             : #endif /* ENABLE_NLS */
     675             : 
     676             : #ifdef DO_NOT_COMPILE_THIS_CODE_IT_IS_FOR_GETTEXT
     677             : /** I18N function strictly for xgettext.  Do not compile. */
     678             : static void bogus_function(void) {
     679             :   /* TRANSLATORS:
     680             : 
     681             :      The following dummy function was crated solely so that xgettext can
     682             :      extract the correct strings.  These strings are actually referenced
     683             :      by a field name in the rsstatsOptions structure noted in the
     684             :      comments below.  The literal text is defined in rsstats_opt_strs.
     685             : 
     686             :      NOTE: the strings below are segmented with respect to the source string
     687             :      rsstats_opt_strs.  The strings above are handed off for translation
     688             :      at run time a paragraph at a time.  Consequently, they are presented here
     689             :      for translation a paragraph at a time.
     690             : 
     691             :      ALSO: often the description for an option will reference another option
     692             :      by name.  These are set off with apostrophe quotes (I hope).  Do not
     693             :      translate option names.
     694             :    */
     695             :   /* referenced via rsstatsOptions.pzCopyright */
     696             :   puts(_("rsstats 0.0.1\n\
     697             : Copyright (C) 2024 Francois Cerbelle, all rights reserved.\n\
     698             : This is free software. It is licensed for use, modification and\n\
     699             : redistribution under the terms of the GNU General Public License,\n\
     700             : version 3 or later <http://gnu.org/licenses/gpl.html>\n"));
     701             : 
     702             :   /* referenced via rsstatsOptions.pzCopyNotice */
     703             :   puts(_("rsstats is free software: you can redistribute it and/or modify it under\n\
     704             : the terms of the GNU General Public License as published by the Free\n\
     705             : Software Foundation, either version 3 of the License, or (at your option)\n\
     706             : any later version.\n\n"));
     707             :   puts(_("rsstats is distributed in the hope that it will be useful, but WITHOUT ANY\n\
     708             : WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n\
     709             : FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\n\
     710             : details.\n\n"));
     711             :   puts(_("You should have received a copy of the GNU General Public License along\n\
     712             : with this program.  If not, see <http://www.gnu.org/licenses/>.\n"));
     713             : 
     714             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     715             :   puts(_("input CSV file (default: clusterdef.csv)"));
     716             : 
     717             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     718             :   puts(_("output CVS filename for nodes information (default: rsstats.csv)"));
     719             : 
     720             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     721             :   puts(_("comma separated list of clusternames to query (default: all)"));
     722             : 
     723             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     724             :   puts(_("Comma separated list of reports to generate (default: all)"));
     725             : 
     726             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     727             :   puts(_("display extended usage information and exit"));
     728             : 
     729             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     730             :   puts(_("extended usage information passed thru pager"));
     731             : 
     732             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     733             :   puts(_("output version information and exit"));
     734             : 
     735             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     736             :   puts(_("save the option state to a config file"));
     737             : 
     738             :   /* referenced via rsstatsOptions.pOptDesc->pzText */
     739             :   puts(_("load options from a config file"));
     740             : 
     741             :   /* referenced via rsstatsOptions.pzUsageTitle */
     742             :   puts(_("rsstats - Redis Enterprise Software cluster statistic extraction\n\
     743             : Usage:  %s [ -<flag> [<val>] | --<name>[{=| }<val>] ]...\n"));
     744             : 
     745             :   /* referenced via rsstatsOptions.pzExplain */
     746             :   puts(_("rsstats execute all the reports on each of the defined clusters.  The\n\
     747             : cluster definition list is read from the clusterdef.csv file, which can be\n\
     748             : specified with the --input (-i) option, and the reports are written to the\n\
     749             : rsstats.csv file, which can be specified with the --output (-o) option.\n\
     750             : additional information given whenever the usage routine is invoked or with\n\
     751             : the --help (-h) option.\n"));
     752             : 
     753             :   /* referenced via rsstatsOptions.pzDetail */
     754             :   puts(_("rsstats executes all reports on the clusters specified in the cluster\n\
     755             : definition list and writes the reports to the output file.  The cluster\n\
     756             : list can be filtered by a comma separated list of cluster names with the\n\
     757             : --cluster (-c) option and the reports to be executed can be specified as a\n\
     758             : comma separated list with the --reports (-r) option.\n\n"));
     759             :   puts(_("clusterdef.csv mandatory columns :\n\
     760             : clustername_or_ip,adminname,adminpass,allow_selfsigned_certs,cacert_file\n\n"));
     761             :   puts(_("The CSV input format should conform to the RFC4180: - Records (lines) are\n\
     762             : separated with CR+LF (Windows) with LF-only (Unix) tolerance - Fields are\n\
     763             : separated by a comma - Fields can optionnaly be double-quoted, with a\n\
     764             : starting (very first char) and ending (very last char) double-quote -\n\
     765             : Spaces chars are part of the field values - If a field contains a either a\n\
     766             : comma, a CRLF or a doublequote it needs to be quoted - a double-quote\n\
     767             : inside a double-quoted value needs to be doubled (a \"sample\" value => \"a\n\
     768             : \"\"sample\"\" value\") - A line can not end with a comma as the very last\n\
     769             : character.  - Empty lines are not supported.\n\n"));
     770             :   puts(_("Example:\n\n\
     771             : 192.168.0.1,admin@demo.com,\n\
     772             : 192.168.0.2,admin@demo.com,\"\",false,\"/etc/ssl/cert.pem\"\n\
     773             : 127.0.0.1,admin@demo.com,password 192.168.0.3,admin@demo.com,password\n\
     774             : 192.168.0.4,admin@demo.com,\"passw,ord\"\n\
     775             : 192.168.1.50,admin@demo.com,password,true,\"\"\n\
     776             : 127.0.0.1,admin@demo.com,password,true,\"\"\n"));
     777             : 
     778             :   /* referenced via rsstatsOptions.pzFullVersion */
     779             :   puts(_("rsstats 0.0.1"));
     780             : 
     781             :   /* referenced via rsstatsOptions.pzFullUsage */
     782             :   puts(_("<<<NOT-FOUND>>>"));
     783             : 
     784             :   /* referenced via rsstatsOptions.pzShortUsage */
     785             :   puts(_("<<<NOT-FOUND>>>"));
     786             :   /* LIBOPTS-MESSAGES: */
     787             : #line 67 "../autoopts.c"
     788             :   puts(_("allocation of %d bytes failed\n"));
     789             : #line 89 "../autoopts.c"
     790             :   puts(_("allocation of %d bytes failed\n"));
     791             : #line 48 "../init.c"
     792             :   puts(_("AutoOpts function called without option descriptor\n"));
     793             : #line 81 "../init.c"
     794             :   puts(_("\tThis exceeds the compiled library version:  "));
     795             : #line 79 "../init.c"
     796             :   puts(_("Automated Options Processing Error!\n"
     797             :        "\t%s called AutoOpts function with structure version %d:%d:%d.\n"));
     798             : #line 78 "../autoopts.c"
     799             :   puts(_("realloc of %d bytes at 0x%p failed\n"));
     800             : #line 83 "../init.c"
     801             :   puts(_("\tThis is less than the minimum library version:  "));
     802             : #line 121 "../version.c"
     803             :   puts(_("Automated Options version %s\n"
     804             :        "\tCopyright (C) 1999-2017 by Bruce Korb - all rights reserved\n"));
     805             : #line 49 "../makeshell.c"
     806             :   puts(_("(AutoOpts bug):  %s.\n"));
     807             : #line 90 "../reset.c"
     808             :   puts(_("optionResetOpt() called, but reset-option not configured"));
     809             : #line 241 "../usage.c"
     810             :   puts(_("could not locate the 'help' option"));
     811             : #line 330 "../autoopts.c"
     812             :   puts(_("optionProcess() was called with invalid data"));
     813             : #line 697 "../usage.c"
     814             :   puts(_("invalid argument type specified"));
     815             : #line 568 "../find.c"
     816             :   puts(_("defaulted to option with optional arg"));
     817             : #line 76 "../alias.c"
     818             :   puts(_("aliasing option is out of range."));
     819             : #line 210 "../enum.c"
     820             :   puts(_("%s error:  the keyword '%s' is ambiguous for %s\n"));
     821             : #line 78 "../find.c"
     822             :   puts(_("  The following options match:\n"));
     823             : #line 263 "../find.c"
     824             :   puts(_("%s: ambiguous option name: %s (matches %d options)\n"));
     825             : #line 161 "../check.c"
     826             :   puts(_("%s: Command line arguments required\n"));
     827             : #line 43 "../alias.c"
     828             :   puts(_("%d %s%s options allowed\n"));
     829             : #line 56 "../makeshell.c"
     830             :   puts(_("%s error %d (%s) calling %s for '%s'\n"));
     831             : #line 268 "../makeshell.c"
     832             :   puts(_("interprocess pipe"));
     833             : #line 171 "../version.c"
     834             :   puts(_("error: version option argument '%c' invalid.  Use:\n"
     835             :        "\t'v' - version only\n"
     836             :        "\t'c' - version and copyright\n"
     837             :        "\t'n' - version and full copyright notice\n"));
     838             : #line 58 "../check.c"
     839             :   puts(_("%s error:  the '%s' and '%s' options conflict\n"));
     840             : #line 187 "../find.c"
     841             :   puts(_("%s: The '%s' option has been disabled."));
     842             : #line 400 "../find.c"
     843             :   puts(_("%s: The '%s' option has been disabled."));
     844             : #line 38 "../alias.c"
     845             :   puts(_("-equivalence"));
     846             : #line 439 "../find.c"
     847             :   puts(_("%s: illegal option -- %c\n"));
     848             : #line 110 "../reset.c"
     849             :   puts(_("%s: illegal option -- %c\n"));
     850             : #line 241 "../find.c"
     851             :   puts(_("%s: illegal option -- %s\n"));
     852             : #line 740 "../find.c"
     853             :   puts(_("%s: illegal option -- %s\n"));
     854             : #line 118 "../reset.c"
     855             :   puts(_("%s: illegal option -- %s\n"));
     856             : #line 305 "../find.c"
     857             :   puts(_("%s: unknown vendor extension option -- %s\n"));
     858             : #line 135 "../enum.c"
     859             :   puts(_("  or an integer from %d through %d\n"));
     860             : #line 145 "../enum.c"
     861             :   puts(_("  or an integer from %d through %d\n"));
     862             : #line 696 "../usage.c"
     863             :   puts(_("%s error:  invalid option descriptor for %s\n"));
     864             : #line 1030 "../usage.c"
     865             :   puts(_("%s error:  invalid option descriptor for %s\n"));
     866             : #line 355 "../find.c"
     867             :   puts(_("%s: invalid option name: %s\n"));
     868             : #line 497 "../find.c"
     869             :   puts(_("%s: The '%s' option requires an argument.\n"));
     870             : #line 150 "../autoopts.c"
     871             :   puts(_("(AutoOpts bug):  Equivalenced option '%s' was equivalenced to both\n"
     872             :        "\t'%s' and '%s'."));
     873             : #line 94 "../check.c"
     874             :   puts(_("%s error:  The %s option is required\n"));
     875             : #line 602 "../find.c"
     876             :   puts(_("%s: The '%s' option cannot have an argument.\n"));
     877             : #line 151 "../check.c"
     878             :   puts(_("%s: Command line arguments are not allowed.\n"));
     879             : #line 568 "../save.c"
     880             :   puts(_("error %d (%s) creating %s\n"));
     881             : #line 210 "../enum.c"
     882             :   puts(_("%s error:  '%s' does not match any %s keywords.\n"));
     883             : #line 93 "../reset.c"
     884             :   puts(_("%s error: The '%s' option requires an argument.\n"));
     885             : #line 122 "../save.c"
     886             :   puts(_("error %d (%s) stat-ing %s\n"));
     887             : #line 175 "../save.c"
     888             :   puts(_("error %d (%s) stat-ing %s\n"));
     889             : #line 143 "../restore.c"
     890             :   puts(_("%s error: no saved option state\n"));
     891             : #line 225 "../autoopts.c"
     892             :   puts(_("'%s' is not a command line option.\n"));
     893             : #line 113 "../time.c"
     894             :   puts(_("%s error:  '%s' is not a recognizable date/time.\n"));
     895             : #line 50 "../time.c"
     896             :   puts(_("%s error:  '%s' is not a recognizable time duration.\n"));
     897             : #line 92 "../check.c"
     898             :   puts(_("%s error:  The %s option must appear %d times.\n"));
     899             : #line 165 "../numeric.c"
     900             :   puts(_("%s error:  '%s' is not a recognizable number.\n"));
     901             : #line 176 "../enum.c"
     902             :   puts(_("%s error:  %s exceeds %s keyword count\n"));
     903             : #line 279 "../usage.c"
     904             :   puts(_("Try '%s %s' for more information.\n"));
     905             : #line 45 "../alias.c"
     906             :   puts(_("one %s%s option allowed\n"));
     907             : #line 170 "../makeshell.c"
     908             :   puts(_("standard output"));
     909             : #line 905 "../makeshell.c"
     910             :   puts(_("standard output"));
     911             : #line 223 "../usage.c"
     912             :   puts(_("standard output"));
     913             : #line 364 "../usage.c"
     914             :   puts(_("standard output"));
     915             : #line 574 "../usage.c"
     916             :   puts(_("standard output"));
     917             : #line 178 "../version.c"
     918             :   puts(_("standard output"));
     919             : #line 223 "../usage.c"
     920             :   puts(_("standard error"));
     921             : #line 364 "../usage.c"
     922             :   puts(_("standard error"));
     923             : #line 574 "../usage.c"
     924             :   puts(_("standard error"));
     925             : #line 178 "../version.c"
     926             :   puts(_("standard error"));
     927             : #line 170 "../makeshell.c"
     928             :   puts(_("write"));
     929             : #line 905 "../makeshell.c"
     930             :   puts(_("write"));
     931             : #line 222 "../usage.c"
     932             :   puts(_("write"));
     933             : #line 363 "../usage.c"
     934             :   puts(_("write"));
     935             : #line 573 "../usage.c"
     936             :   puts(_("write"));
     937             : #line 177 "../version.c"
     938             :   puts(_("write"));
     939             : #line 60 "../numeric.c"
     940             :   puts(_("%s error:  %s option value %ld is out of range.\n"));
     941             : #line 44 "../check.c"
     942             :   puts(_("%s error:  %s option requires the %s option\n"));
     943             : #line 121 "../save.c"
     944             :   puts(_("%s warning:  cannot save options - %s not regular file\n"));
     945             : #line 174 "../save.c"
     946             :   puts(_("%s warning:  cannot save options - %s not regular file\n"));
     947             : #line 193 "../save.c"
     948             :   puts(_("%s warning:  cannot save options - %s not regular file\n"));
     949             : #line 567 "../save.c"
     950             :   puts(_("%s warning:  cannot save options - %s not regular file\n"));
     951             :   /* END-LIBOPTS-MESSAGES */
     952             : 
     953             :   /* USAGE-TEXT: */
     954             : #line 822 "../usage.c"
     955             :   puts(_("\t\t\t\t- an alternate for '%s'\n"));
     956             : #line 1097 "../usage.c"
     957             :   puts(_("Version, usage and configuration options:"));
     958             : #line 873 "../usage.c"
     959             :   puts(_("\t\t\t\t- default option for unnamed options\n"));
     960             : #line 786 "../usage.c"
     961             :   puts(_("\t\t\t\t- disabled as '--%s'\n"));
     962             : #line 1066 "../usage.c"
     963             :   puts(_(" --- %-14s %s\n"));
     964             : #line 1064 "../usage.c"
     965             :   puts(_("This option has been disabled"));
     966             : #line 813 "../usage.c"
     967             :   puts(_("\t\t\t\t- enabled by default\n"));
     968             : #line 40 "../alias.c"
     969             :   puts(_("%s error:  only "));
     970             : #line 1143 "../usage.c"
     971             :   puts(_(" - examining environment variables named %s_*\n"));
     972             : #line 168 "../file.c"
     973             :   puts(_("\t\t\t\t- file must not pre-exist\n"));
     974             : #line 172 "../file.c"
     975             :   puts(_("\t\t\t\t- file must pre-exist\n"));
     976             : #line 329 "../usage.c"
     977             :   puts(_("Options are specified by doubled hyphens and their name or by a single\n"
     978             :        "hyphen and the flag character.\n"));
     979             : #line 882 "../makeshell.c"
     980             :   puts(_("\n"
     981             :        "= = = = = = = =\n\n"
     982             :        "This incarnation of genshell will produce\n"
     983             :        "a shell script to parse the options for %s:\n\n"));
     984             : #line 142 "../enum.c"
     985             :   puts(_("  or an integer mask with any of the lower %d bits set\n"));
     986             : #line 846 "../usage.c"
     987             :   puts(_("\t\t\t\t- is a set membership option\n"));
     988             : #line 867 "../usage.c"
     989             :   puts(_("\t\t\t\t- must appear between %d and %d times\n"));
     990             : #line 331 "../usage.c"
     991             :   puts(_("Options are specified by single or double hyphens and their name.\n"));
     992             : #line 853 "../usage.c"
     993             :   puts(_("\t\t\t\t- may appear multiple times\n"));
     994             : #line 840 "../usage.c"
     995             :   puts(_("\t\t\t\t- may not be preset\n"));
     996             : #line 1258 "../usage.c"
     997             :   puts(_("   Arg Option-Name    Description\n"));
     998             : #line 1194 "../usage.c"
     999             :   puts(_("  Flg Arg Option-Name    Description\n"));
    1000             : #line 1252 "../usage.c"
    1001             :   puts(_("  Flg Arg Option-Name    Description\n"));
    1002             : #line 1253 "../usage.c"
    1003             :   puts(_(" %3s %s"));
    1004             : #line 1259 "../usage.c"
    1005             :   puts(_(" %3s %s"));
    1006             : #line 336 "../usage.c"
    1007             :   puts(_("The '-#<number>' option may omit the hash char\n"));
    1008             : #line 332 "../usage.c"
    1009             :   puts(_("All arguments are named options.\n"));
    1010             : #line 920 "../usage.c"
    1011             :   puts(_(" - reading file %s"));
    1012             : #line 358 "../usage.c"
    1013             :   puts(_("\n"
    1014             :        "Please send bug reports to:  <%s>\n"));
    1015             : #line 100 "../version.c"
    1016             :   puts(_("\n"
    1017             :        "Please send bug reports to:  <%s>\n"));
    1018             : #line 129 "../version.c"
    1019             :   puts(_("\n"
    1020             :        "Please send bug reports to:  <%s>\n"));
    1021             : #line 852 "../usage.c"
    1022             :   puts(_("\t\t\t\t- may NOT appear - preset only\n"));
    1023             : #line 893 "../usage.c"
    1024             :   puts(_("\n"
    1025             :        "The following option preset mechanisms are supported:\n"));
    1026             : #line 1141 "../usage.c"
    1027             :   puts(_("\n"
    1028             :        "The following option preset mechanisms are supported:\n"));
    1029             : #line 631 "../usage.c"
    1030             :   puts(_("prohibits these options:\n"));
    1031             : #line 626 "../usage.c"
    1032             :   puts(_("prohibits the option '%s'\n"));
    1033             : #line 81 "../numeric.c"
    1034             :   puts(_("%s%ld to %ld"));
    1035             : #line 79 "../numeric.c"
    1036             :   puts(_("%sgreater than or equal to %ld"));
    1037             : #line 75 "../numeric.c"
    1038             :   puts(_("%s%ld exactly"));
    1039             : #line 68 "../numeric.c"
    1040             :   puts(_("%sit must lie in one of the ranges:\n"));
    1041             : #line 68 "../numeric.c"
    1042             :   puts(_("%sit must be in the range:\n"));
    1043             : #line 88 "../numeric.c"
    1044             :   puts(_(", or\n"));
    1045             : #line 66 "../numeric.c"
    1046             :   puts(_("%sis scalable with a suffix: k/K/m/M/g/G/t/T\n"));
    1047             : #line 77 "../numeric.c"
    1048             :   puts(_("%sless than or equal to %ld"));
    1049             : #line 339 "../usage.c"
    1050             :   puts(_("Operands and options may be intermixed.  They will be reordered.\n"));
    1051             : #line 601 "../usage.c"
    1052             :   puts(_("requires the option '%s'\n"));
    1053             : #line 604 "../usage.c"
    1054             :   puts(_("requires these options:\n"));
    1055             : #line 1270 "../usage.c"
    1056             :   puts(_("   Arg Option-Name   Req?  Description\n"));
    1057             : #line 1264 "../usage.c"
    1058             :   puts(_("  Flg Arg Option-Name   Req?  Description\n"));
    1059             : #line 143 "../enum.c"
    1060             :   puts(_("or you may use a numeric representation.  Preceding these with a '!'\n"
    1061             :        "will clear the bits, specifying 'none' will clear all bits, and 'all'\n"
    1062             :        "will set them all.  Multiple entries may be passed as an option\n"
    1063             :        "argument list.\n"));
    1064             : #line 859 "../usage.c"
    1065             :   puts(_("\t\t\t\t- may appear up to %d times\n"));
    1066             : #line 52 "../enum.c"
    1067             :   puts(_("The valid \"%s\" option keywords are:\n"));
    1068             : #line 1101 "../usage.c"
    1069             :   puts(_("The next option supports vendor supported extra options:"));
    1070             : #line 722 "../usage.c"
    1071             :   puts(_("These additional options are:"));
    1072             :   /* END-USAGE-TEXT */
    1073             : }
    1074             : #endif /* uncompilable code */
    1075             : #ifdef  __cplusplus
    1076             : }
    1077             : #endif
    1078             : /* rsstats-opts.c ends here */

Generated by: LCOV version 1.16