MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
my_default.h
1 /* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
2 
3  This program is free software; you can redistribute it and/or modify
4  it under the terms of the GNU General Public License as published by
5  the Free Software Foundation; version 2 of the License.
6 
7  This program is distributed in the hope that it will be useful,
8  but WITHOUT ANY WARRANTY; without even the implied warranty of
9  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  GNU General Public License for more details.
11 
12  You should have received a copy of the GNU General Public License
13  along with this program; if not, write to the Free Software
14  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
15 
16 #ifndef MY_DEFAULT_INCLUDED
17 #define MY_DEFAULT_INCLUDED
18 
19 
20 #include "my_global.h"
21 
22 C_MODE_START
23 
24 extern const char *my_defaults_extra_file;
25 extern const char *my_defaults_group_suffix;
26 extern const char *my_defaults_file;
27 extern my_bool my_getopt_use_args_separator;
28 
29 /* Define the type of function to be passed to process_default_option_files */
30 typedef int (*Process_option_func)(void *ctx, const char *group_name,
31  const char *option);
32 
33 my_bool my_getopt_is_args_separator(const char* arg);
34 int get_defaults_options(int argc, char **argv,
35  char **defaults, char **extra_defaults,
36  char **group_suffix, char **login_path);
37 int my_load_defaults(const char *conf_file, const char **groups,
38  int *argc, char ***argv, const char ***);
39 int load_defaults(const char *conf_file, const char **groups,
40  int *argc, char ***argv);
41 int my_search_option_files(const char *conf_file, int *argc,
42  char ***argv, uint *args_used,
43  Process_option_func func, void *func_ctx,
44  const char **default_directories);
45 void free_defaults(char **argv);
46 void my_print_default_files(const char *conf_file);
47 void print_defaults(const char *conf_file, const char **groups);
48 
49 C_MODE_END
50 
51 #endif // MY_DEFAULT_INCLUDED