summaryrefslogtreecommitdiff
path: root/src/menus.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-18 00:24:30 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-07-18 00:32:25 -0700
commite84f2e87222879ca667c1fb3d1cb3236a1159d12 (patch)
tree811a62b78ef6ba09d9781fc3dd1159cb079b55b4 /src/menus.c
parentb16ce9773e4da5897ab546de85e48a3ea58d0e00 (diff)
Constification cleanup - fix dozens of gcc warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/menus.c')
-rw-r--r--src/menus.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/menus.c b/src/menus.c
index 4c0e22a..cb6cb5b 100644
--- a/src/menus.c
+++ b/src/menus.c
@@ -213,8 +213,8 @@ Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name,
-int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot,
- Bool rightside, Bool append)
+int CreateTitleButton (const char *name, int func, const char *action,
+ MenuRoot *menuroot, Bool rightside, Bool append)
{
TitleButton *tb = (TitleButton *) malloc (sizeof(TitleButton));
@@ -617,7 +617,7 @@ UpdateMenu()
* \param name the name of the menu root
*/
MenuRoot *
-NewMenuRoot(char *name)
+NewMenuRoot(const char *name)
{
MenuRoot *tmp;
@@ -676,8 +676,8 @@ NewMenuRoot(char *name)
* \param back background color string
*/
MenuItem *
-AddToMenu(MenuRoot *menu, char *item, char *action, MenuRoot *sub, int func,
- char *fore, char *back)
+AddToMenu(MenuRoot *menu, const char *item, const char *action,
+ MenuRoot *sub, int func, const char *fore, const char *back)
{
MenuItem *tmp;
int width;
@@ -1123,7 +1123,7 @@ PopDownMenu()
* \param name the name of the menu root
*/
MenuRoot *
-FindMenuRoot(char *name)
+FindMenuRoot(const char *name)
{
MenuRoot *tmp;
@@ -1279,7 +1279,7 @@ WarpThere(TwmWindow *t)
int
-ExecuteFunction(int func, char *action, Window w, TwmWindow *tmp_win,
+ExecuteFunction(int func, const char *action, Window w, TwmWindow *tmp_win,
XEvent *eventp, int context, int pulldown)
{
static Time last_time = 0;
@@ -2336,7 +2336,7 @@ NeedToDefer(MenuRoot *root)
* \param s the string containing the command
*/
static int
-System (char *s)
+System (const char *s)
{
int pid, status;
if ((pid = fork ()) == 0) {
@@ -2351,7 +2351,7 @@ System (char *s)
#endif
void
-Execute(char *s)
+Execute(const char *s)
{
/* FIXME: is all this stuff needed? There could be security problems here. */
static char buf[256];