+2017-09-27 Tom Tromey <tom@tromey.com>
+
+ * macrocmd.c (macro_expand_command, macro_expand_once_command)
+ (skip_ws, extract_identifier, macro_define_command)
+ (macro_undef_command, macro_list_command): Constify.
+
2017-09-27 Tom Tromey <tom@tromey.com>
* infcmd.c (environment_info, set_environment_command)
}
static void
-macro_expand_command (char *exp, int from_tty)
+macro_expand_command (const char *exp, int from_tty)
{
struct macro_scope *ms = NULL;
char *expanded = NULL;
static void
-macro_expand_once_command (char *exp, int from_tty)
+macro_expand_once_command (const char *exp, int from_tty)
{
struct macro_scope *ms = NULL;
char *expanded = NULL;
/* User-defined macros. */
static void
-skip_ws (char **expp)
+skip_ws (const char **expp)
{
while (macro_is_whitespace (**expp))
++*expp;
parameters. */
static char *
-extract_identifier (char **expp, int is_parameter)
+extract_identifier (const char **expp, int is_parameter)
{
char *result;
- char *p = *expp;
+ const char *p = *expp;
unsigned int len;
if (is_parameter && startswith (p, "..."))
}
static void
-macro_define_command (char *exp, int from_tty)
+macro_define_command (const char *exp, int from_tty)
{
struct macro_definition new_macro;
char *name = NULL;
static void
-macro_undef_command (char *exp, int from_tty)
+macro_undef_command (const char *exp, int from_tty)
{
char *name;
static void
-macro_list_command (char *exp, int from_tty)
+macro_list_command (const char *exp, int from_tty)
{
macro_for_each (macro_user_macros, print_one_macro);
}