Skip to main content

svn_opt_print_help5

Function svn_opt_print_help5 

Source
pub unsafe extern "C" fn svn_opt_print_help5(
    os: *mut apr_getopt_t,
    pgm_name: *const c_char,
    print_version: svn_boolean_t,
    quiet: svn_boolean_t,
    verbose: svn_boolean_t,
    version_footer: *const c_char,
    header: *const c_char,
    cmd_table: *const svn_opt_subcommand_desc3_t,
    option_table: *const apr_getopt_option_t,
    global_options: *const c_int,
    footer: *const c_char,
    pool: *mut apr_pool_t,
) -> *mut svn_error_t
Expand description

Central dispatcher function for various kinds of help message. Prints one of:

  • subcommand-specific help (svn_opt_subcommand_help)
  • generic help (svn_opt_print_generic_help)
  • version info
  • simple usage complaint: “Type ‘@a pgm_name help’ for usage.”

If @a os is not @c NULL and it contains arguments, then try printing help for them as though they are subcommands, using @a cmd_table and @a option_table for option information. If not @c NULL, @a global_options is a zero-terminated array of options taken by all subcommands.

Else, if @a print_version is TRUE, then print version info, in brief form if @a quiet is also TRUE; if @a quiet is FALSE, then if @a version_footer is non-NULL, print it following the version information. If @a verbose is TRUE, also print information about the running system and loaded shared libraries, where available.

Else, if @a os is not @c NULL and does not contain arguments, print generic help, via svn_opt_print_generic_help2() with the @a header, @a cmd_table, @a option_table, and @a footer arguments.

Else, when @a os is @c NULL, print the simple usage complaint.

Use @a pool for temporary allocations.

Notes: The reason this function handles both version printing and general usage help is that a confused user might put both the –version flag and subcommand arguments on a help command line. The logic for handling such a situation should be in one place.

@since New in 1.11.