option_utils.h 835 B

1234567891011121314151617181920212223242526
  1. /*-------------------------------------------------------------------------
  2. *
  3. * Command line option processing facilities for frontend code
  4. *
  5. * Portions Copyright (c) 1996-2022, 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. #include "postgres_fe.h"
  15. typedef void (*help_handler) (const char *progname);
  16. extern void handle_help_version_opts(int argc, char *argv[],
  17. const char *fixed_progname,
  18. help_handler hlp);
  19. extern bool option_parse_int(const char *optarg, const char *optname,
  20. int min_range, int max_range,
  21. int *result);
  22. #endif /* OPTION_UTILS_H */