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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
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; }
LIB_EXPORT void CC XMLLogger_Usage(void) { size_t i; for(i = 0; i < XMLLogger_ArgsQty; i++ ) { if( XMLLogger_Args[i].help[0] != NULL ) { HelpOptionLine(XMLLogger_Args[i].aliases, XMLLogger_Args[i].name, "logfile", XMLLogger_Args[i].help); } } }
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 ); }
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; }
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; }
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; }
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; }
void print_common_helplines( void ) { HelpOptionLine ( ALIAS_REF, OPTION_REF, "name[:from-to]", ref_usage ); HelpOptionLine ( ALIAS_OUTF, OPTION_OUTF, "output-file", outf_usage ); HelpOptionLine ( ALIAS_TABLE, OPTION_TABLE, "shortcut", table_usage ); HelpOptionLine ( ALIAS_BZIP, OPTION_BZIP, NULL, bzip_usage ); HelpOptionLine ( ALIAS_GZIP, OPTION_GZIP, NULL, gzip_usage ); HelpOptionLine ( NULL, OPTION_NO_MT, NULL, no_mt_usage ); }
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; }
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; }
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; }
rc_t CC Usage ( const Args * args ) { const char * progname = UsageDefaultName; const char * fullpath = UsageDefaultName; uint32_t n, i; 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" ); n = ( sizeof( DumpOptions ) / sizeof( DumpOptions[ 0 ] ) ); for( i = 0; i < n; i++ ) { if ( DumpOptions[ i ].help != NULL ) { HelpOptionLine( DumpOptions[ i ].aliases, DumpOptions[ i ].name, NULL, DumpOptions[ i ].help ); } } KOutMsg( "\n" ); HelpOptionsStandard (); HelpVersion ( fullpath, KAppVersion() ); return rc; }
rc_t CC Usage (const Args * args) { const char * progname = UsageDefaultName; const char * fullpath = UsageDefaultName; char const *const file_crypt = de[0] == 'd' ? "file to decrypt" : "file to encrypt"; char const *const dir_crypt = de[0] == 'd' ? "directory to decrypt" : "directory to encrypt"; const char * const pline[] = { file_crypt, NULL, "name of resulting file", NULL, "directory of resulting file", NULL, dir_crypt, NULL }; rc_t rc, orc; if (args == NULL) rc = RC (rcApp, rcArgv, rcAccessing, rcSelf, rcNull); else rc = ArgsProgram (args, &fullpath, &progname); orc = UsageSummary (progname); if (rc == 0) rc = orc; KOutMsg ("Parameters:\n"); HelpParamLine ("source-file" , pline); HelpParamLine ("destination-file" , pline + 2); HelpParamLine ("destination-directory", pline + 4); HelpParamLine ("directory" , pline + 6); KOutMsg ("\nOptions:\n"); HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, ForceUsage); CryptOptionLines (); HelpOptionsStandard (); /* forcing editor alignment */ /* 12345678901234567890123456789012345678901234567890123456789012345678901234567890*/ KOutMsg ( "\n" "Details:\n" " All %scryptions are non-destructive until successful. No files are deleted or\n" " replaced until the %scryptions are complete.\n" "\n", de, de); KOutMsg ( " The extension '.ncbi_enc' will be %s when a file is %scrypted.\n" "\n", Decrypting ? "removed" : "added", de); if (Decrypting) KOutMsg ( " NCBI Archive files that contain NCBI database objects will not be decrypted\n" " unless the %s option is used. As these objects can be used without\n" " decryption it is recommended they remain encrypted.\n" "\n", OPTION_SRA); else KOutMsg ( " NCBI Archive files that contain NCBI database objects will not have the\n" " .ncbi_enc extension added.\n\n"); KOutMsg ( " If the only parameter is a file name then it will be replaced by a file that\n" " is %scrypted with a possible changed extension.\n" " \n", de); KOutMsg ( " If the only parameter is a directory, all files in that directory including\n" " all files in subdirectories will be replaced with a possible change\n" " in the extension.\n" "\n"); KOutMsg ( " If there are two parameters a copy is made but the copy will be %scrypted.\n" " If the second parameter is a directory the new file might have a different\n" " extension. If it is not a directory, the extension will be as given in the\n" " the parameter.\n" "\n", de); KOutMsg ( " Missing directories in the destination path will be created.\n" "\n"); KOutMsg ( " Already existing destination files will cause the program to end with\n" " an error and will be left unchanged unless the --%s option is used to\n" " force the files to be overwritten.\n" "\n", OPTION_FORCE); KOutMsg ( "Encryption key (file password):\n" " The encryption key or file password is handled by configuration. If not yet\n" " set, this program will fail.\n\n" " You can set the encryption key by running:\n\n" " perl configuration-assistant.perl\n" "\n"); HelpVersion (fullpath, KAppVersion()); return rc; }
rc_t CC Usage (const Args * args) { static const char archive[] = "archive"; 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); OUTMSG (("Archive Command:\n" " All of these options require the next token on the command line to be\n" " the name of the archive\n\n")); KOutMsg ("Options:\n"); HelpOptionLine (ALIAS_CREATE, OPTION_CREATE, archive, create_usage); HelpOptionLine (ALIAS_EXTRACT, OPTION_EXTRACT, archive, extract_usage); HelpOptionLine (ALIAS_TEST, OPTION_TEST, archive, test_usage); OUTMSG (("\n" "Archive:\n" " Path to a file that will/does hold the archive of other files.\n" " This can be a full or relative path.\n" "\n" "Directory:\n" " Required for create or extract command, ignored for test command.\n" " This can be a full or relative path.\n" "\n" "Filters:\n" " When present these act as include filters.\n" " Any file name will be included in the extracted files, created archive\n" " or test operation listing\n" " Any directory will be included as well as its contents\n" "\n" "Options:\n")); HelpOptionLine (ALIAS_DIRECTORY, OPTION_DIRECTORY, "Directory", directory_usage); HelpOptionLine (ALIAS_FORCE, OPTION_FORCE, NULL, force_usage); HelpOptionLine (ALIAS_ALIGN, OPTION_ALIGN, "alignment", align_usage); HelpOptionLine (ALIAS_LONGLIST, OPTION_LONGLIST, NULL, longlist_usage); HelpOptionsStandard (); OUTMSG (("\n" "Use examples:" "\n" " To create an archive named 'example.sra' that contains the same\n" " contents as a subdirectory 'example' of the current directory\n" "\n" " $ %s --%s example.sra --%s example\n", progname, OPTION_CREATE, OPTION_DIRECTORY)); OUTMSG (("\n" " To replace an existing archive named 'example.sra' with another that contains\n" " the same contents as a subdirectory 'example' of the current directory\n" "\n" " $ %s -%s -%s example.sra -%s example\n", progname, ALIAS_FORCE, ALIAS_CREATE, ALIAS_DIRECTORY)); OUTMSG (("\n" " To examine in detail the contents of an archive named 'example.sra'\n" "\n" " $ %s --%s --%s example.sra\n", progname, OPTION_LONGLIST, OPTION_TEST)); OUTMSG (("\n" " To extract the files from an archive named 'example.sra' into\n" " a subdirectory 'example' of the current directory.\n" " NOTE: all extracted files will be read only.\n" "\n" " $ %s --%s example.sra --%s example\n", progname, OPTION_EXTRACT, OPTION_DIRECTORY)); HelpVersion (fullpath, KAppVersion()); return rc; }