From: Christophe CURIS Date: Sun, 16 Jun 2013 15:57:45 +0000 (+0200) Subject: wmaker: Added 'const' attribute to function 'GetShortcutString' X-Git-Tag: wmaker-0.95.5~23 X-Git-Url: https://repo.or.cz/w/wmaker-crm.git/commitdiff_plain/062ff99fac1e31ea460519a135164429ea1d557b wmaker: Added 'const' attribute to function 'GetShortcutString' Signed-off-by: Christophe CURIS --- diff --git a/src/misc.c b/src/misc.c index 9bcd6b8c..c3f55dee 100644 --- a/src/misc.c +++ b/src/misc.c @@ -733,16 +733,16 @@ static char *keysymToString(KeySym keysym, unsigned int state) } #endif -char *GetShortcutString(char *text) +char *GetShortcutString(const char *shortcut) { char *buffer = NULL; char *k; int modmask = 0; /* KeySym ksym; */ int control = 0; - char *tmp; + char *tmp, *text; - tmp = text = wstrdup(text); + tmp = text = wstrdup(shortcut); /* get modifiers */ while ((k = strchr(text, '+')) != NULL) { diff --git a/src/misc.h b/src/misc.h index 251afff6..6a3344b7 100644 --- a/src/misc.h +++ b/src/misc.h @@ -38,7 +38,7 @@ void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg); char *ShrinkString(WMFont *font, const char *string, int width); char *FindImage(char *paths, char *file); char *ExpandOptions(WScreen * scr, char *cmdline); -char *GetShortcutString(char *text); +char *GetShortcutString(const char *text); char *GetShortcutKey(WShortKey key); char *EscapeWM_CLASS(char *name, char *class); char *StrConcatDot(char *a, char *b);