MCPcopy Create free account
hub / github.com/apache/cloudberry / handle_help_version_opts

Function handle_help_version_opts

src/fe_utils/option_utils.c:21–38  ·  view source on GitHub ↗

* Provide strictly harmonized handling of --help and --version * options. */

Source from the content-addressed store, hash-verified

19 * options.
20 */
21void
22handle_help_version_opts(int argc, char *argv[],
23 const char *fixed_progname, help_handler hlp)
24{
25 if (argc > 1)
26 {
27 if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
28 {
29 hlp(get_progname(argv[0]));
30 exit(0);
31 }
32 if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
33 {
34 printf("%s (Apache Cloudberry) " PG_VERSION "\n", fixed_progname);
35 exit(0);
36 }
37 }
38}

Callers 9

mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

get_prognameFunction · 0.85

Tested by

no test coverage detected