Пример #1
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    KOutMsg ("\n"
             "Option:\n");

    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
    HelpOptionLine (ALIAS_PRESERVE, OPTION_PRESERVE, NULL, preserve_usage);
    HelpOptionLine (ALIAS_RECURSE, OPTION_RECURSE, NULL, recurse_usage);
    HelpOptionLine (ALIAS_TEST, OPTION_TEST, NULL, test_usage);

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #2
0
rc_t CC Usage(const Args* args) { 
    rc_t rc = 0;

    const char* progname = UsageDefaultName;
    const char* fullpath = UsageDefaultName;

    if (args == NULL)
    {    rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull); }
    else
    {    rc = ArgsProgram(args, &fullpath, &progname); }

    UsageSummary(progname);

    KOutMsg ("\nOptions:\n");

    HelpOptionLine (ALIAS_ALL, OPTION_ALL, NULL, USAGE_ALL);
    HelpOptionLine (ALIAS_CFG, OPTION_CFG, NULL, USAGE_CFG);
/*  HelpOptionLine (ALIAS_NEW, OPTION_MOD, NULL, USAGE_NEW); */
    HelpOptionLine (ALIAS_FIL, OPTION_FIL, NULL, USAGE_FIL);
    HelpOptionLine (ALIAS_ENV, OPTION_ENV, NULL, USAGE_ENV);
    HelpOptionLine (ALIAS_MOD, OPTION_MOD, NULL, USAGE_MOD);
    KOutMsg ("\n");
    HelpOptionLine (ALIAS_SET, OPTION_SET, "name=value", USAGE_SET);
    KOutMsg ("\n");
    HelpOptionLine (ALIAS_OUT, OPTION_OUT, "x | n", USAGE_OUT);

    KOutMsg ("\n");

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #3
0
rc_t CC Usage ( const Args * args )
{
    rc_t rc;
    uint32_t idx, count = ( sizeof ToolOptions ) / ( sizeof ToolOptions[ 0 ] );
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;

    if ( args == NULL )
        rc = RC( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
        rc = ArgsProgram( args, &fullpath, &progname );

    if ( rc != 0 )
        progname = fullpath = UsageDefaultName;

    UsageSummary( progname );

    KOutMsg( "Options:\n" );
    for ( idx = 1; idx < count; ++idx ) /* start with 1, do not advertize row-range-option*/
        HelpOptionLine( ToolOptions[ idx ] . aliases, ToolOptions[ idx ] . name, NULL, ToolOptions[ idx ] . help );
    
    HelpOptionsStandard();
    HelpVersion( fullpath, KAppVersion() );
    return rc;
}
Пример #4
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    KOutMsg ("Parameters:\n");

    HelpParamLine ("source-file-path", first_usage);
    HelpParamLine ("extract-path", second_usage);

    KOutMsg ("Options:\n");

    HelpOptionLine (ALIAS_XML, OPTION_XML, "XML-file", xml_usage);
    HelpOptionLine (ALIAS_DIR, OPTION_DIR, "directoy-path", dir_usage);
    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);

    HelpOptionsStandard ();
/*                     1         2         3         4         5         6         7         8 */
/*            12345678901234567890123456789012345678901234567890123456789012345678901234567890 */
    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #5
0
rc_t CC Usage (const Args * args)
{
    rc_t rc;
    int i;
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    const size_t argsQty = sizeof(Options) / sizeof(Options[0]);

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    for(i = 0; i < argsQty; i++ ) {
        if( Options[i].required && Options[i].help[0] != NULL ) {
            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
        }
    }
    OUTMSG(("\nOptions:\n"));
    for(i = 0; i < argsQty; i++ ) {
        if( !Options[i].required && Options[i].help[0] != NULL ) {
            HelpOptionLine(Options[i].aliases, Options[i].name, OptHelpParam[i], Options[i].help);
        }
    }
    XMLLogger_Usage();
    OUTMSG(("\n"));
    HelpOptionsStandard ();
    HelpVersion (fullpath, KAppVersion());
    return rc;
}
Пример #6
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionLine(ALIAS_SA_CUTOFF          , OPTION_SA_CUTOFF           , "cutoff"    , sa_cutoff_usage);
    HelpOptionLine(ALIAS_SEQ_CUTOFF         , OPTION_SEQ_CUTOFF          , "cutoff"    , seq_cutoff_usage);
    HelpOptionLine(ALIAS_SA_SHORT_THRESHOLD , OPTION_SA_SHORT_THRESHOLD  , "threshold" , sa_short_threshold_usage);
    XMLLogger_Usage();

    KOutMsg ("\n");

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #7
0
    rc_t CC Usage ( struct Args const * args )
    {
        rc_t rc = 0;
        const char* progname = UsageDefaultName;
        const char* fullpath = UsageDefaultName;

        if (args == NULL)
            rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
        else
            rc = ArgsProgram(args, &fullpath, &progname);

        UsageSummary (progname);


        OUTMSG (("\nInput: the stream of lines in the format: <key> <tab> <input variation>\n\n"));
        OUTMSG (("\nOptions:\n"));

        HelpOptionLine (NULL, VarExpand::OPTION_ALG, "value", VarExpand::USAGE_ALG);

        XMLLogger_Usage();

        HelpOptionsStandard ();

        HelpVersion (fullpath, KAppVersion());

        return rc;
    }
Пример #8
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionLine (ALIAS_LITE, OPTION_LITE, NULL, lite_usage);
#if USE_FORCE
    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);
#endif
    HelpOptionsStandard ();
    HelpVersion (fullpath, KAppVersion());
    return rc;
}
Пример #9
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
        rc = ArgsProgram ( args, &fullpath, &progname );

    if ( rc )
        progname = fullpath = UsageDefaultName;

    UsageSummary ( progname );

    KOutMsg ( "Options:\n" );
    HelpOptionLine ( ALIAS_ID_ATTR,			OPTION_ID_ATTR,			NULL, 		id_attr_usage );
    HelpOptionLine ( ALIAS_FEATURE_TYPE, 	OPTION_FEATURE_TYPE, 	NULL, 		feature_type_usage );
    HelpOptionLine ( ALIAS_MODE, 			OPTION_MODE, 			NULL, 		mode_usage );

    KOutMsg ( "\n" );	
    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion() );

    return rc;
}
Пример #10
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ( "Options:\n" );


    HelpOptionLine ( ALIAS_SRC, OPTION_SRC, "src", src_usage );
    HelpOptionLine ( ALIAS_DST_PATH, OPTION_DST_PATH, "dst", dst_usage );
    HelpOptionLine ( ALIAS_CIRCULAR, OPTION_CIRCULAR, "yes|no", circular_usage);

    KOutMsg ( "\nOptions:\n" );
    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
    HelpOptionLine ( ALIAS_CHUNK_SIZE, OPTION_CHUNK_SIZE, "chunk-size", chunk_size_usage );
    HelpOptionLine ( ALIAS_IFILE, OPTION_IFILE, "fileinput", ifile_usage);
    KOutMsg( "\n" );

    HelpOptionsStandard ();

    HelpVersion ( fullpath, KAppVersion() );

    return rc;
}
Пример #11
0
rc_t CC Usage( const Args * args  )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
        rc = ArgsProgram( args, &fullpath, &progname );
    if ( rc != 0 )
        progname = fullpath = UsageDefaultName;

    UsageSummary( progname );
    KOutMsg ("Options:\n");
    HelpOptionLine ( ALIAS_ROWS, OPTION_ROWS, "rows", rows_usage );
    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
    HelpOptionLine ( ALIAS_SHOW_PROGRESS, OPTION_SHOW_PROGRESS, NULL, show_progress_usage );
    HelpOptionLine ( ALIAS_OUTFILE, OPTION_OUTFILE, NULL, outfile_usage );
    HelpOptionLine ( ALIAS_OUTMODE, OPTION_OUTMODE, NULL, outmode_usage );
    HelpOptionLine ( ALIAS_GCWINDOW, OPTION_GCWINDOW, NULL, gcwindow_usage );
    HelpOptionLine ( ALIAS_EXCLUDE, OPTION_EXCLUDE, NULL, exclude_usage );
    HelpOptionLine ( ALIAS_INFO, OPTION_INFO, NULL, info_usage );
    HelpOptionLine ( ALIAS_IGNORE_MISMATCH, OPTION_IGNORE_MISMATCH, NULL, ignore_mismatch_usage );
    HelpOptionsStandard();
    HelpVersion( fullpath, KAppVersion() );
    return rc;
}
Пример #12
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionLine ( ALIAS_OUTPUT, OPTION_OUTPUT, "output", output_usage );

    HelpOptionLine ( ALIAS_SCHEMA, OPTION_SCHEMA, "schema", schema_usage );
    HelpOptionLine ( ALIAS_FORCE, OPTION_FORCE, "force", force_usage );
    HelpOptionLine ( ALIAS_TABS, OPTION_TABS, "tabs", tabs_usage );
    HelpOptionLine ( ALIAS_WITH_PROGRESS, OPTION_WITH_PROGRESS, 
                     "load-progress", progress_usage );
    XMLLogger_Usage();
    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion() );
    return rc;
}
Пример #13
0
rc_t CC Usage ( const Args * args )
{
    rc_t rc;

    if ( args == NULL )
        rc = RC( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
    {
        const char * progname = UsageDefaultName;
        const char * fullpath = UsageDefaultName;

        rc = ArgsProgram ( args, &fullpath, &progname );

        UsageSummary( progname );

        KOutMsg( "%s src1 src2 -Iinclude1 -Iinclude2 -ooutput -Tdependency\n"
                  "    src1, src2 ..........schema source-files  (mandatory))\n"
                  " -I include1, include2 ..schema include-files (optional))\n"
                  " -o output-file .........schema output (optional)) if none --> stdout\n"
                  " -T dependency-file .....list of includes in make-syntax (optional))\n",
                  progname );

        HelpVersion( fullpath, KAppVersion() );
    }
    return rc;
}
Пример #14
0
rc_t CC Usage ( const Args *args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if (rc)
        progname = fullpath = UsageDefaultName;

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionLine (ALIAS_AMD64, OPTION_AMD64, NULL, USAGE_AMD64);
    HelpOptionLine (ALIAS_RAM  , OPTION_RAM  , NULL, USAGE_RAM);
    KOutMsg ("\n");

    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion () );

    return rc;
}
Пример #15
0
rc_t CC Usage(const Args* args) { 
    rc_t rc = 0 ;

    const char* progname = UsageDefaultName;
    const char* fullpath = UsageDefaultName;

    if (args == NULL)
    {    rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull); }
    else
    {    rc = ArgsProgram(args, &fullpath, &progname); }

    UsageSummary(progname);

    KOutMsg("Parameters:\n");

    HelpParamLine ("db-path", param_usage);

    KOutMsg ("\nOptions:\n");

    HelpOptionLine (ALIAS_ALL, OPTION_ALL, NULL, USAGE_ALL);
    HelpOptionLine (ALIAS_REF, OPTION_REF, NULL, USAGE_REF);
    HelpOptionLine (ALIAS_BAM, OPTION_BAM, NULL, USAGE_BAM);
    HelpOptionLine (ALIAS_QUA, OPTION_QUA, NULL, USAGE_QUA);

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #16
0
rc_t CC Usage( const Args* args )
{
    rc_t rc;
    int i;
    const char* progname = UsageDefaultName;
    const char* fullname = UsageDefaultName;

    rc = ArgsProgram(args, &fullname, &progname);

    UsageSummary(progname);

    for(i = 0; i < MainArgsQty; i++ ) {
        if( MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
        }
    }
    OUTMSG(("\nOptions:\n"));
    for(i = 0; i < MainArgsQty; i++ ) {
        if( !MainArgs[i].required && MainArgs[i].help[0] != NULL ) {
            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, NULL, MainArgs[i].help);
        }
    }
    XMLLogger_Usage();
    OUTMSG(("\n"));
    HelpOptionsStandard();
    HelpVersion(fullname, KAppVersion());
    return rc;
}
Пример #17
0
    rc_t CC Usage (::Args const* args)
    {
        rc_t rc = 0;
        const char* progname = UsageDefaultName;
        const char* fullpath = UsageDefaultName;

        if (args == NULL)
            rc = RC(rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
        else
            rc = ArgsProgram(args, &fullpath, &progname);

        UsageSummary (progname);

        printf("Parameters:\n");

        HelpParamLine ("src-db-path", param_usage_src);
        HelpParamLine ("new-cache-db-path", param_usage_dst);

        printf ("\nOptions:\n");

        HelpOptionLine (AlignCache::ALIAS_ID_SPREAD_THRESHOLD, AlignCache::OPTION_ID_SPREAD_THRESHOLD, "value", AlignCache::USAGE_ID_SPREAD_THRESHOLD);
        HelpOptionLine (NULL, AlignCache::OPTION_CURSOR_CACHE_SIZE, "value in MB", AlignCache::USAGE_CURSOR_CACHE_SIZE);
        HelpOptionLine (NULL, AlignCache::OPTION_MIN_CACHE_COUNT, "count", AlignCache::USAGE_MIN_CACHE_COUNT);
        XMLLogger_Usage();

        printf ("\n");

        HelpOptionsStandard ();

        HelpVersion (fullpath, KAppVersion());

        return rc;
    }
Пример #18
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    OUTMSG (("Options:\n"));

    rc = string_printf (buff, sizeof buff, NULL, "%s", tablePath);

    HelpOptionLine (ALIAS_TABLE, OPTION_TABLE, "path", table_usage);

    rc = string_printf (buff, sizeof buff, NULL, "Number of Rows.  Defaults to %u", ROWS);

    HelpOptionLine (ALIAS_ROW, OPTION_ROW, "row", row_usage);

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #19
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
        rc = ArgsProgram ( args, &fullpath, &progname );

    if ( rc )
        progname = fullpath = UsageDefaultName;

    UsageSummary ( progname );

    KOutMsg ( "Options:\n" );

    HelpOptionLine ( ALIAS_POS,   OPTION_POS,   "pos",   pos_usage );
    HelpOptionLine ( ALIAS_QSIZE, OPTION_QSIZE, "qsize", qsize_usage );
    HelpOptionLine ( ALIAS_BSIZE, OPTION_BSIZE, "bsize", bsize_usage );
    HelpOptionLine ( ALIAS_CSIZE, OPTION_CSIZE, "csize", csize_usage );
    HelpOptionLine ( ALIAS_COUNT, OPTION_COUNT, "count", count_usage );
    HelpOptionLine ( ALIAS_POS2,  OPTION_POS2,  "pos2",  pos2_usage );

    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion() );
    return rc;
}
Пример #20
0
rc_t CC Usage(const Args* args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;
    int i;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    OUTMSG(( "\nUsage:\n\t%s [options] <table>\n\n", progname));

    for(i = 0; i < MainArgsQty; i++ ) {
        if( MainArgs[i].required && MainArgs[i].help ) {
            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
        }
    }
    OUTMSG(("\nOptions:\n"));
    for(i = 0; i < MainArgsQty; i++ ) {
        if( !MainArgs[i].required && MainArgs[i].help ) {
            HelpOptionLine(MainArgs[i].aliases, MainArgs[i].name, MainParams[i], MainArgs[i].help);
        }
    }
    OUTMSG(("\n"));
    HelpOptionsStandard();
    HelpVersion(fullpath, KAppVersion());
    return rc;
}
Пример #21
0
static void CoreUsage( const char* prog, const SRADumperFmt* fmt, bool brief, int exit_status )
{
    OUTMSG(( "\n"
             "Usage:\n"
             "  %s [options] <path [path...]>\n"
             "  %s [options] [ -A ] <accession>\n"
             "\n", prog, prog));

    if ( !brief )
    {
        if ( fmt->usage )
        {
            rc_t rc = fmt->usage( fmt, KMainArgs, 1 );
            if ( rc != 0 )
            {
                LOGERR(klogErr, rc, "Usage print failed");
            }
        }
        else
        {
            int k, i;
            const SRADumperFmt_Arg* d[ 2 ] = { KMainArgs, NULL };

            d[ 1 ] = fmt->arg_desc;
            for ( k = 0; k < ( sizeof( d ) / sizeof( d[0] ) ); k++ )
            {
                for ( i = 1;
                      d[k] != NULL && ( d[ k ][ i ].abbr != NULL || d[ k ][ i ].full != NULL );
                      ++ i )
                {
                    if ( ( !fmt->gzip && strcmp( d[ k ][ i ].full, "gzip" ) == 0 ) ||
                         ( !fmt->bzip2 && strcmp (d[ k ][ i ].full, "bzip2" ) == 0 ) )
                    {
                        continue;
                    }
                    if ( k > 0 && i == 0 )
                    {
                        OUTMSG(("\nFormat options:\n\n"));
                    }
                    HelpOptionLine( d[ k ][ i ].abbr, d[ k ][ i ].full,
                                    d[ k ][ i ].param, (const char**)( d[ k ][ i ].descr ) );
                    if ( k == 0 && i == 0 )
                    {
                        OUTMSG(( "\nOptions:\n\n" ));
                    }
                }
            }
        }
    }
    else
    {
        OUTMSG(( "Use option --help for more information\n" ));
    }
    HelpVersion( prog, KAppVersion() );
    exit( exit_status );
}
Пример #22
0
rc_t CC Usage(const Args *args) {
    UsageSummary(UsageDefaultName);

    KOutMsg("Options:\n");
    HelpOptionsStandard ();

    HelpVersion(UsageDefaultName, KAppVersion());

    return 0;
}
Пример #23
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
    {
        rc = ArgsProgram ( args, &fullpath, &progname );

        if ( rc != 0 )
            progname = fullpath = UsageDefaultName;

        rc = UsageSummary ( progname );
        if ( rc != 0 )
        {
            PLOGERR( klogErr, ( klogErr, rc,
                     "UsageSummary() failed in $(func)", "func=%s", __func__ ) );

        }
        else
            rc = KOutMsg ( "Options:\n" );

        if ( rc == 0 )
        {
            uint32_t idx, count = sizeof ToolOptions / sizeof ToolOptions [ 0 ];
            for ( idx = 0; idx < count; ++idx )
            {
                OptDef * o = &ToolOptions[ idx ];
                HelpOptionLine ( o->aliases, o->name, NULL, o->help );
            }
        }

        if ( rc == 0 )
            rc = KOutMsg ( "\n" );

        if ( rc == 0 )
        {
            HelpOptionsStandard ();
            HelpVersion ( fullpath, KAppVersion() );
        }
    }
    return rc;
}
Пример #24
0
rc_t CC Usage ( const Args * args )
{
    const char * progname;
    const char * fullpath;
    rc_t rc;

    if ( args == NULL )
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);
    if ( rc )
        progname = fullpath = def_name;

    UsageSummary ( progname );
    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion() );

    return rc;
}
Пример #25
0
rc_t CC Usage ( const Args * args )
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    OUTMSG (("File:\n"
             "  The text file should be ASCII or UTF-8 using LF, CR or CR-LF\n"
             "  line termination.  Each text line will be put into the\n"
             "  KColumn as a separate Row.  Each Row will be in its own\n"
             "  blob.\n"
             "\n"
             "Column:\n"
             "  The KColumn is either an existing KColumn or a path to one\n"
             "  that can be created.\n"
                 "\n"
             "  Both paths should be relative to the current directory or full\n"
             "  from root \n"
             "\n"
             "Options:\n"));

    HelpOptionLine (ALIAS_BEGIN, OPTION_BEGIN, "Start", begin_usage);

    HelpOptionLine (ALIAS_END, OPTION_END, "Stop", end_usage);

    HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage);

    HelpOptionLine (ALIAS_APPEND, OPTION_APPEND, NULL, append_usage);

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #26
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    KOutMsg ("Options:\n");

    HelpOptionsStandard();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #27
0
rc_t CC Usage(const Args *args) {
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL) {
        rc = RC (rcExe, rcArgv, rcAccessing, rcSelf, rcNull);
    }
    else {
        rc = ArgsProgram(args, &fullpath, &progname);
    }

    if (rc != 0) {
        progname = fullpath = UsageDefaultName;
    }

    UsageSummary(progname);

    OUTMSG((
        "  Output paths are ordered according to accession list.\n"
        "\n"
        "  The accession search path will be determined according to the\n"
        "  configuration. It will attempt to find files in local and site\n"
        "  repositories, and will also check remote repositories for run\n"
        "  location.\n"));
    OUTMSG((
        "  This tool produces a path that is 'likely' to be a run, in that\n"
        "  an entry exists in the file system at the location predicted.\n"
        "  It is possible that this path will fail to produce success upon\n"
        "  opening a run if the path does not point to a valid object.\n\n"));

    OUTMSG(("Options:\n"));

    HelpOptionsStandard();

    HelpVersion(fullpath, KAppVersion());

    return rc;
}
Пример #28
0
rc_t CC Usage (const Args * args)
{
    const char * progname = UsageDefaultName;
    const char * fullpath = UsageDefaultName;
    rc_t rc;

    if (args == NULL)
        rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull);
    else
        rc = ArgsProgram (args, &fullpath, &progname);

    UsageSummary (progname);

    OUTMSG (("Options\n"));

    HelpOptionLine (ALIAS_LOAD, OPTION_LOAD, "Path", load_usage);

    HelpOptionsStandard ();

    HelpVersion (fullpath, KAppVersion());

    return rc;
}
Пример #29
0
rc_t CC Usage ( const Args * args )
{
    const char * progname;
    const char * fullpath;
    rc_t rc;

    if ( args == NULL )
        rc = RC ( rcApp, rcArgv, rcAccessing, rcSelf, rcNull );
    else
        rc = ArgsProgram ( args, &fullpath, &progname );
    if ( rc )
        progname = fullpath = UsageDefaultName;

    UsageSummary ( progname );

    OUTMSG (( "Options:\n" ));
    HelpOptionLine ( ALIAS_METHOD, OPTION_METHOD, "method", method_usage );
    HelpOptionLine ( ALIAS_DIRECTION, OPTION_DIRECTION, "direction", direction_usage );

    HelpOptionsStandard ();
    HelpVersion ( fullpath, KAppVersion() );
    return rc;
}
Пример #30
0
rc_t CC Usage ( const Args *args )
{
    uint32_t i;
    const char *progname, *fullpath;
    rc_t rc = ArgsProgram ( args, & fullpath, & progname );
    if ( rc != 0 )
        progname = fullpath = UsageDefaultName;
    
    UsageSummary ( progname );
    
    KOutMsg ( "Options:\n" );
    
    for ( i = 0; i < sizeof options / sizeof options [ 0 ]; ++ i )
    {
        HelpOptionLine ( options [ i ] . aliases, options [ i ] . name,
            option_params [ i ], options [ i ] . help );
    }

    HelpOptionsStandard ();
    
    HelpVersion ( fullpath, KAppVersion () );

    return 0;
}