53 for (i = 0; opt_array[
i].
name; i++)
55 if (opt_array[i].
val < 255)
57 *p++ = (char) opt_array[i].
val;
82 (*handle) = LoadLibrary (path);
84 (*handle) = dlopen (path, RTLD_NOW | RTLD_MEMBER);
86 (*handle) = dlopen (path, RTLD_NOW | RTLD_GLOBAL);
118 (*symbol_handle) = GetProcAddress ((HMODULE) library_handle, symbol_name);
121 (*symbol_handle) = dlsym (library_handle, symbol_name);
147 FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
148 GetLastError (), MAKELANGID (LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) (&error), 0,
NULL);
149 fprintf (fp,
"%s\n", error);
152 fprintf (fp,
"%s\n", dlerror ());
168 if (option[i].
val == option_value)
170 return option[
i].
name;
191 char option_string[64];
198 option_value =
getopt_long (argc, argv, option_string, option, &option_index);
199 if (option_value == -1)
203 else if (option_value ==
'?' || option_value ==
':')
236 #
if defined(TRANLIST_PASSWORD_S)
237 || (index ==
TRANLIST && value == TRANLIST_PASSWORD_S)
261 for (i = 0; arg_map[
i].
arg_ch; i++)
263 if (arg_map[i].arg_ch == arg_ch)
272 int value = 0, result;
274 result =
parse_int (&value, option_arg, 10);
300 if (option_arg[0] ==
'-')
335 string_table_arg = &util_map->
arg_map[
i];
340 if (string_table_arg ==
NULL)
344 num_string_args = count -
index;
345 string_table = (
char **) malloc (
sizeof (
char *) * num_string_args);
346 if (string_table ==
NULL)
350 memset (string_table, 0,
sizeof (
char *) * num_string_args);
351 for (i = 0; index <
count; index++, i++)
353 string_table[
i] = argv[
index];
360 fprintf (stderr,
"'%s' argument is not needed.\n",
361 string_table[need_args_num] ==
NULL ?
"" : string_table[need_args_num]);
382 memset (arg,
'*',
strlen (arg));
#define TDE_DBA_PASSWORD_S
int utility_load_symbol(DSO_HANDLE library_handle, DSO_HANDLE *symbol_handle, const char *symbol_name)
union UTIL_ARG_MAP::@81 value_info
int parse_int(int *ret_p, const char *str_p, int base)
GETOPT_LONG * getopt_long
union UTIL_ARG_MAP::@82 arg_value
void util_hide_password(char *arg)
int getopt_long(int, char *const *, const char *, const struct option *, int *)
void utility_load_print_error(FILE *fp)
#define UTILITY_INIT_FUNC_NAME
int utility_load_library(DSO_HANDLE *handle, const char *path)
int(* UTILITY_INIT_FUNC)(void)
char * utility_make_getopt_optstring(const GETOPT_LONG *opt_array, char *buf)
int count(int &result, const cub_regex_object ®, const std::string &src, const int position, const INTL_CODESET codeset)
int util_parse_argument(UTIL_MAP *util_map, int argc, char **argv)
static void error(const char *msg)
static int util_parse_string_table(UTIL_MAP *util_map, int index, int count, char **argv)
#define KILLTRAN_DBA_PASSWORD_S
static const char * util_get_option_name(GETOPT_LONG *option, int option_value)
char * strdup(const char *str)
int parse_bigint(INT64 *ret_p, const char *str_p, int base)
#define OPTION_STRING_TABLE
#define UNLOAD_PASSWORD_S
static int util_put_option_value(UTIL_MAP *util_map, int arg_ch, const char *option_arg)
static bool util_is_password_argument(int index, int value)