29 #include "../subcmd.h" 33 "Set if we are to show short or long filenames",
34 " {on|off|toggle} \n\nSet if we are to show short or long filenames.",
37 "Set GNU Make debug mask (set via --debug or -d)",
38 " VALUE \n\nSet GNU Make debug mask (set via --debug or -d).",
41 "Set value of GNU Make --ignore-errors (or -i) flag",
42 " {on|off|toggle} \n\nSet value of GNU Make --ignore-errors (or -i) flag.",
45 "Set value of GNU Make --keep-going (or -k) flag",
46 " {on|off|toggle}\n\nSet value of GNU Make --keep-going (or -k) flag.",
49 "Set value of GNU Make --silent (or -s) flags.",
50 " {on|off|toggle} \n\nSet value of GNU Make --silent (or -s) flags.",
54 "Set value of shell_tracing.",
59 "Change a debugger setting",
60 " OPTION is one of: basename, debug, ignore-errors, keep-going, or silent\n\n" 62 "See also 'setq' and 'setqx' for setting a GNU Make variable.",
65 { NULL, NULL, NULL, NULL,
false, 0}
69 dbg_cmd_set_bool(
const char *psz_varname,
const char *psz_flag_name,
70 const char *psz_flag_value,
71 unsigned int min,
int *p_bool_flag)
74 if (!psz_flag_value || 0==strlen(psz_flag_value))
86 dbg_cmd_set(
char *psz_args)
88 if (!psz_args || 0==strlen(psz_args)) {
90 for (i = 0; set_subcommands[i].
name; i++) {
92 &(set_subcommands[i]),
false);
96 char *psz_varname =
get_word(&psz_args);
99 while (*psz_args && whitespace (*psz_args))
105 if (
get_int(psz_args, &dbg_mask,
true)) {
112 return dbg_cmd_set_var(psz_args, 1);
118 for (p_subcmd_info = set_subcommands; p_subcmd_info && p_subcmd_info->
name;
120 if (dbg_cmd_set_bool(psz_varname, p_subcmd_info->
name,
125 dbg_errmsg(
"Unknown set option %s\nSee 'help set' for options. Or did you mean setq?\n",
132 dbg_cmd_set_init(
unsigned int c)
135 short_command[c].func = &dbg_cmd_set;
136 short_command[c].use =
137 _(
"set OPTION {on|off|toggle}");
const char * name
Definition: subcmd.h:5
subcommand_var_info_t set_subcommands[]
Definition: set.h:31
void on_off_toggle(const char *psz_onoff, int *var)
bool is_abbrev_of(const char *psz_substr, const char *psz_word, unsigned int i_min)
debug_return_t dbg_cmd_show(char *psz_args)
Definition: show.h:81
debug_return_t
Definition: trace.h:32
#define _(msgid)
Definition: make.h:293
char * get_word(char **ppsz_str)
int db_level
Definition: debug.h:163
void dbg_help_subcmd_entry(const char *psz_subcmd_name, const char *psz_fmt, subcommand_var_info_t *p_subcmd, bool full_info)
Definition: help.h:25
bool get_int(const char *psz_arg, int *pi_result, bool b_warn)
unsigned int min_abbrev
Definition: subcmd.h:13
int * var
Definition: subcmd.h:8