aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefsyacc.y
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winprefsyacc.y')
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y11
1 files changed, 5 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 683fc44ca..9bb28ae92 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -64,7 +64,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);
@@ -79,9 +79,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);
%}
@@ -252,10 +253,8 @@ debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("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;
}
@@ -308,7 +307,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));