diff options
Diffstat (limited to 'xorg-server/hw/xwin/winprefsyacc.y')
-rw-r--r-- | xorg-server/hw/xwin/winprefsyacc.y | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y index 8dae912d5..6cbb9cc2e 100644 --- a/xorg-server/hw/xwin/winprefsyacc.y +++ b/xorg-server/hw/xwin/winprefsyacc.y @@ -65,7 +65,7 @@ static void SetDefaultSysMenu (char *menu, int pos); static void SetTrayIcon (char *fname); static void OpenMenu(char *menuname); -static void AddMenuLine(char *name, MENUCOMMANDTYPE cmd, char *param); +static void AddMenuLine(const char *name, MENUCOMMANDTYPE cmd, const char *param); static void CloseMenu(void); static void OpenIcons(void); @@ -86,9 +86,10 @@ static void OpenSysMenu(void); static void AddSysMenuLine(char *matchstr, char *menuname, int pos); static void CloseSysMenu(void); -static int yyerror (char *s); +static int yyerror (const char *s); extern char *yytext; +extern int yylineno; extern int yylex(void); #define YYMALLOC malloc @@ -281,10 +282,8 @@ debug: DEBUGOUTPUT STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free * Errors in parsing abort and print log messages */ static int -yyerror (char *s) +yyerror (const char *s) { - extern int yylineno; /* Handled by flex internally */ - ErrorF("LoadPreferences: %s line %d\n", s, yylineno); return 1; } @@ -337,7 +336,7 @@ OpenMenu (char *menuname) } static void -AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param) +AddMenuLine (const char *text, MENUCOMMANDTYPE cmd, const char *param) { if (menu.menuItem==NULL) menu.menuItem = malloc(sizeof(MENUITEM)); |