This changes valid_user_defined_cmd_name_p to return bool.
gdb/ChangeLog
2019-05-04 Tom Tromey <tom@tromey.com>
* cli/cli-decode.c (valid_user_defined_cmd_name_p): Return bool.
* command.h (valid_user_defined_cmd_name_p): Channge return type.
+2019-05-04 Tom Tromey <tom@tromey.com>
+
+ * cli/cli-decode.c (valid_user_defined_cmd_name_p): Return bool.
+ * command.h (valid_user_defined_cmd_name_p): Channge return type.
+
2019-05-04 Raul Tambre <raul@tambre.ee>
* python/lib/gdb/prompt.py (_ExtendedPrompt)
This is a stricter subset of all gdb commands,
see find_command_name_length. */
-int
+bool
valid_user_defined_cmd_name_p (const char *name)
{
const char *p;
if (*name == '\0')
- return FALSE;
+ return false;
/* Alas "42" is a legitimate user-defined command.
In the interests of not breaking anything we preserve that. */
|| *p == '_')
; /* Ok. */
else
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* This routine takes a line of TEXT and a CLIST in which to start the
/* API to the manipulation of command lists. */
-extern int valid_user_defined_cmd_name_p (const char *name);
+extern bool valid_user_defined_cmd_name_p (const char *name);
/* Const-correct variant of the above. */