Code cleanup - make mi_opt const.
* mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Make
opts const.
* mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
* mi/mi-cmd-env.c (mi_cmd_env_path): Likewise.
(mi_cmd_env_dir): Likewise.
* mi/mi-cmd-target.c (mi_cmd_target_file_get): Likewise.
(mi_cmd_target_file_put): Likewise.
* mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
* mi/mi-cmd-var.c (mi_cmd_var_evaluate_expression): Likewise.
* mi/mi-getopt.c (mi_getopt): Make opts and opt const.
(mi_valid_noargs): Make opts const.
* mi/mi-getopt.h (mi_getopt): Make opts and opt const.
* mi/mi-main.c (mi_cmd_list_thread_groups): Make opts const.
(mi_cmd_data_read_memory): Likewise.
(mi_cmd_data_read_memory_bytes): Likewise.
(mi_cmd_data_write_memory): Likewise.
+2011-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Code cleanup - make mi_opt const.
+ * mi/mi-cmd-break.c (mi_cmd_break_insert, mi_cmd_break_watch): Make
+ opts const.
+ * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
+ * mi/mi-cmd-env.c (mi_cmd_env_path): Likewise.
+ (mi_cmd_env_dir): Likewise.
+ * mi/mi-cmd-target.c (mi_cmd_target_file_get): Likewise.
+ (mi_cmd_target_file_put): Likewise.
+ * mi/mi-cmd-target.c (mi_cmd_target_file_delete): Likewise.
+ * mi/mi-cmd-var.c (mi_cmd_var_evaluate_expression): Likewise.
+ * mi/mi-getopt.c (mi_getopt): Make opts and opt const.
+ (mi_valid_noargs): Make opts const.
+ * mi/mi-getopt.h (mi_getopt): Make opts and opt const.
+ * mi/mi-main.c (mi_cmd_list_thread_groups): Make opts const.
+ (mi_cmd_data_read_memory): Likewise.
+ (mi_cmd_data_read_memory_bytes): Likewise.
+ (mi_cmd_data_write_memory): Likewise.
+
2011-08-26 Matt Rice <ratmice@gmail.com>
* solib-sunos.c (allocate_rt_common_objfile): Add missing arguments to
IGNORE_COUNT_OPT, THREAD_OPT, PENDING_OPT, DISABLE_OPT,
TRACEPOINT_OPT,
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"h", HARDWARE_OPT, 0},
{"t", TEMP_OPT, 0},
{
READ_OPT, ACCESS_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"r", READ_OPT, 0},
{"a", ACCESS_OPT, 0},
{
FILE_OPT, LINE_OPT, NUM_OPT, START_OPT, END_OPT
};
- static struct mi_opt opts[] = {
+ static const struct mi_opt opts[] = {
{"f", FILE_OPT, 1},
{"l", LINE_OPT, 1},
{"n", NUM_OPT, 1},
{
RESET_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"r", RESET_OPT, 0},
{ 0, 0, 0 }
{
RESET_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"r", RESET_OPT, 0},
{ 0, 0, 0 }
int optind = 0;
char *optarg;
const char *remote_file, *local_file;
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{ 0, 0, 0 }
};
int optind = 0;
char *optarg;
const char *remote_file, *local_file;
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{ 0, 0, 0 }
};
int optind = 0;
char *optarg;
const char *remote_file;
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{ 0, 0, 0 }
};
{
OP_FORMAT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"f", OP_FORMAT, 1},
{ 0, 0, 0 }
int
mi_getopt (const char *prefix,
int argc, char **argv,
- struct mi_opt *opts,
+ const struct mi_opt *opts,
int *optind, char **optarg)
{
char *arg;
- struct mi_opt *opt;
+ const struct mi_opt *opt;
/* We assume that argv/argc are ok. */
if (*optind > argc || *optind < 0)
{
int optind = 0;
char *optarg;
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{ 0, 0, 0 }
};
struct mi_opt;
extern int mi_getopt (const char *prefix, int argc, char **argv,
- struct mi_opt *opt, int *optind, char **optarg);
+ const struct mi_opt *opt, int *optind, char **optarg);
/* The option list. Terminated by NAME==NULL. ARG_P that the option
requires an argument. INDEX is returned to identify th option. */
{
AVAILABLE_OPT, RECURSE_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"-available", AVAILABLE_OPT, 0},
{"-recurse", RECURSE_OPT, 1},
{
OFFSET_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"o", OFFSET_OPT, 1},
{ 0, 0, 0 }
{
OFFSET_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"o", OFFSET_OPT, 1},
{ 0, 0, 0 }
{
OFFSET_OPT
};
- static struct mi_opt opts[] =
+ static const struct mi_opt opts[] =
{
{"o", OFFSET_OPT, 1},
{ 0, 0, 0 }