~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to extra/my_print_defaults.cc

  • Committer: Brian Aker
  • Date: 2009-05-11 17:50:22 UTC
  • Revision ID: brian@gaz-20090511175022-y35q9ky6uh9ldcjt
Replacing Sun employee copyright headers (aka... anything done by a Sun
employee is copyright by Sun).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include <mystrings/m_string.h>
26
26
#include <mysys/my_getopt.h>
27
27
 
 
28
#include <stdio.h>
28
29
 
29
 
const char *config_file="my";                   /* Default config file */
30
 
uint verbose= 0, opt_defaults_file_used= 0;
 
30
const char *config_file="drizzle";              /* Default config file */
 
31
uint32_t verbose= 0, opt_defaults_file_used= 0;
31
32
 
32
33
static struct my_option my_long_options[] =
33
34
{
89
90
  printf("\nExample usage:\n%s --defaults-file=example.cnf client mysql\n", my_progname);
90
91
}
91
92
 
92
 
static bool
93
 
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
94
 
               char *argument __attribute__((unused)))
 
93
extern "C"
 
94
bool
 
95
get_one_option(int optid, const struct my_option *, char *)
95
96
{
96
97
  switch (optid) {
97
98
    case 'c':
149
150
  arguments[count]= 0;
150
151
 
151
152
  /* Check out the args */
152
 
  if (!(load_default_groups=(char**) my_malloc((argc+1)*sizeof(char*),
153
 
                                               MYF(MY_WME))))
 
153
  if (!(load_default_groups=(char**) malloc((argc+1)*sizeof(char*))))
154
154
    exit(1);
155
155
  if (get_options(&argc,&argv))
156
156
    exit(1);
177
177
  free((char*) load_default_groups);
178
178
  free_defaults(arguments);
179
179
 
180
 
  exit(error);
 
180
  return error;
181
181
}