aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/shell.h10
-rw-r--r--shell/shell.c12
2 files changed, 11 insertions, 11 deletions
diff --git a/includes/shell.h b/includes/shell.h
index c6570088..fd70b076 100644
--- a/includes/shell.h
+++ b/includes/shell.h
@@ -219,11 +219,11 @@ void shell_update_remote_menu(void);
void shell_set_remote_label(Shell *shell, gchar *label);
/* decode special information in keys */
-gboolean key_is_flagged(gchar *key); /* has $[<flags>][<tag>]$ at the start of the key */
-gboolean key_is_highlighted(gchar *key); /* flag '*' = select/highlight */
-gboolean key_wants_details(gchar *key); /* flag '!' = report should include the "moreinfo" */
-gchar *key_mi_tag(gchar *key); /* moreinfo lookup tag */
-const gchar *key_get_name(gchar *key); /* get the key's name, flagged or not */
+gboolean key_is_flagged(const gchar *key); /* has $[<flags>][<tag>]$ at the start of the key */
+gboolean key_is_highlighted(const gchar *key); /* flag '*' = select/highlight */
+gboolean key_wants_details(const gchar *key); /* flag '!' = report should include the "moreinfo" */
+gchar *key_mi_tag(const gchar *key); /* moreinfo lookup tag */
+const gchar *key_get_name(const gchar *key); /* get the key's name, flagged or not */
#endif /* __SHELL_H__ */
diff --git a/shell/shell.c b/shell/shell.c
index d213344d..0307badf 100644
--- a/shell/shell.c
+++ b/shell/shell.c
@@ -2149,11 +2149,11 @@ static ShellTree *tree_new()
return shelltree;
}
-gboolean key_is_flagged(gchar *key) {
+gboolean key_is_flagged(const gchar *key) {
return (key && *key == '$' && strchr(key+1, '$')) ? TRUE : FALSE;
}
-gboolean key_is_highlighted(gchar *key) {
+gboolean key_is_highlighted(const gchar *key) {
if (key_is_flagged(key)) {
if (strchr(key, '*'))
return TRUE;
@@ -2161,7 +2161,7 @@ gboolean key_is_highlighted(gchar *key) {
return FALSE;
}
-gboolean key_wants_details(gchar *key) {
+gboolean key_wants_details(const gchar *key) {
if (key_is_flagged(key)) {
if (strchr(key, '!'))
return TRUE;
@@ -2169,8 +2169,8 @@ gboolean key_wants_details(gchar *key) {
return FALSE;
}
-gchar *key_mi_tag(gchar *key) {
- gchar *p = key, *l, *t;
+gchar *key_mi_tag(const gchar *key) {
+ gchar *p = (gchar*)key, *l, *t;
if (key_is_flagged(key)) {
l = strchr(key+1, '$');
@@ -2186,7 +2186,7 @@ gchar *key_mi_tag(gchar *key) {
return NULL;
}
-const gchar *key_get_name(gchar *key) {
+const gchar *key_get_name(const gchar *key) {
if (key_is_flagged(key))
return strchr(key+1, '$')+1;
return key;