diff options
-rw-r--r-- | src/gram.y | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -78,8 +78,9 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xos.h> #include <X11/Xmu/CharSet.h> -static char *Action = ""; -static char *Name = ""; +static char empty[1]; +static char *Action = empty; +static char *Name = empty; static MenuRoot *root, *pull = NULL; static MenuRoot *GetRoot ( const char *name, const char *fore, const char *back ); @@ -193,7 +194,7 @@ stmt : error AddToMenu(root,"x",Action, NULL,$2,NULLSTR,NULLSTR); } - Action = ""; + Action = empty; pull = NULL; } | string fullkey { GotKey($1, $2); } @@ -259,7 +260,7 @@ stmt : error AddToMenu(root,"x",Action, NULL,$2, NULLSTR, NULLSTR); } - Action = ""; + Action = empty; pull = NULL; } | WINDOW_FUNCTION action { Scr->WindowFunction.func = $2; @@ -267,7 +268,7 @@ stmt : error Scr->WindowFunction.item = AddToMenu(root,"x",Action, NULL,$2, NULLSTR, NULLSTR); - Action = ""; + Action = empty; pull = NULL; } | WARP_CURSOR { list = &Scr->WarpCursorL; } @@ -567,9 +568,9 @@ function_entries: /* Empty */ | function_entries function_entry ; -function_entry : action { AddToMenu(root, "", Action, NULL, $1, +function_entry : action { AddToMenu(root, empty, Action, NULL, $1, NULLSTR, NULLSTR); - Action = ""; + Action = empty; } ; @@ -582,13 +583,13 @@ menu_entries : /* Empty */ menu_entry : string action { AddToMenu(root, $1, Action, pull, $2, NULLSTR, NULLSTR); - Action = ""; + Action = empty; pull = NULL; } | string LP string COLON string RP action { AddToMenu(root, $1, Action, pull, $7, $3, $5); - Action = ""; + Action = empty; pull = NULL; } ; @@ -797,7 +798,7 @@ static void GotButton(int butt, int func) NULL, func, NULLSTR, NULLSTR); } } - Action = ""; + Action = empty; pull = NULL; cont = 0; mods_used |= (unsigned)mods; @@ -816,7 +817,7 @@ static void GotKey(char *key, int func) break; } - Action = ""; + Action = empty; pull = NULL; cont = 0; mods_used |= (unsigned)mods; @@ -832,7 +833,7 @@ static void GotTitleButton (char *bitmapname, int func, Bool rightside) "unable to create %s titlebutton \"%s\"\n", rightside ? "right" : "left", bitmapname); } - Action = ""; + Action = empty; pull = NULL; } |