PostgreSQL Source Code  git master
option_utils.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------------------
2  *
3  * Command line option processing facilities for frontend code
4  *
5  * Portions Copyright (c) 1996-2023, PostgreSQL Global Development Group
6  * Portions Copyright (c) 1994, Regents of the University of California
7  *
8  * src/include/fe_utils/option_utils.h
9  *
10  *-------------------------------------------------------------------------
11  */
12 #ifndef OPTION_UTILS_H
13 #define OPTION_UTILS_H
14 
15 #include "postgres_fe.h"
16 
17 typedef void (*help_handler) (const char *progname);
18 
19 extern void handle_help_version_opts(int argc, char *argv[],
20  const char *fixed_progname,
21  help_handler hlp);
22 extern bool option_parse_int(const char *optarg, const char *optname,
23  int min_range, int max_range,
24  int *result);
25 
26 #endif /* OPTION_UTILS_H */
const char * progname
Definition: main.c:45
void(* help_handler)(const char *progname)
Definition: option_utils.h:17
bool option_parse_int(const char *optarg, const char *optname, int min_range, int max_range, int *result)
Definition: option_utils.c:50
void handle_help_version_opts(int argc, char *argv[], const char *fixed_progname, help_handler hlp)
Definition: option_utils.c:24
PGDLLIMPORT char * optarg
Definition: getopt.c:52