9
3

my_default.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* Copyright (C) 2013 Monty Program Ab
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; version 2 of the License.
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License
  10. along with this program; if not, write to the Free Software
  11. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
  12. /* Definitions for mysys/my_default.c */
  13. #ifndef MY_DEFAULT_INCLUDED
  14. #define MY_DEFAULT_INCLUDED
  15. C_MODE_START
  16. extern const char *my_defaults_extra_file;
  17. extern const char *my_defaults_group_suffix;
  18. extern const char *my_defaults_file;
  19. extern my_bool my_getopt_use_args_separator;
  20. extern my_bool my_getopt_is_args_separator(const char* arg);
  21. /* Define the type of function to be passed to process_default_option_files */
  22. typedef int (*Process_option_func)(void *ctx, const char *group_name,
  23. const char *option);
  24. extern int get_defaults_options(int argc, char **argv,
  25. char **defaults, char **extra_defaults,
  26. char **group_suffix);
  27. extern int my_load_defaults(const char *conf_file, const char **groups,
  28. int *argc, char ***argv, const char ***);
  29. extern int load_defaults(const char *conf_file, const char **groups,
  30. int *argc, char ***argv);
  31. extern int my_search_option_files(const char *conf_file, int *argc,
  32. char ***argv, uint *args_used,
  33. Process_option_func func, void *func_ctx,
  34. const char **default_directories);
  35. extern void free_defaults(char **argv);
  36. extern void my_print_default_files(const char *conf_file);
  37. extern void print_defaults(const char *conf_file, const char **groups);
  38. C_MODE_END
  39. #endif /* MY_DEFAULT_INCLUDED */