aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefsyacc.y
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-11-16 13:22:38 +0000
committermarha <marha@users.sourceforge.net>2009-11-16 13:22:38 +0000
commitfc2f819d646afc6df3304615fff9777a464cbe62 (patch)
tree4a5f4569199f55353c6c8d0124d9950cfa591b34 /xorg-server/hw/xwin/winprefsyacc.y
parentc4fa5f94b72b3d837959c79e773615fe9bd3ca97 (diff)
downloadvcxsrv-fc2f819d646afc6df3304615fff9777a464cbe62.tar.gz
vcxsrv-fc2f819d646afc6df3304615fff9777a464cbe62.tar.bz2
vcxsrv-fc2f819d646afc6df3304615fff9777a464cbe62.zip
Use flex and bison to generate winprefslex.c winprefsyacc.c and winprefsyacc.h
Diffstat (limited to 'xorg-server/hw/xwin/winprefsyacc.y')
-rw-r--r--xorg-server/hw/xwin/winprefsyacc.y15
1 files changed, 9 insertions, 6 deletions
diff --git a/xorg-server/hw/xwin/winprefsyacc.y b/xorg-server/hw/xwin/winprefsyacc.y
index 0c2775192..14ac3cb7e 100644
--- a/xorg-server/hw/xwin/winprefsyacc.y
+++ b/xorg-server/hw/xwin/winprefsyacc.y
@@ -39,6 +39,7 @@
#include <stdlib.h>
#include <string.h>
#include "winprefs.h"
+#include "winmsg.h"
/* The following give better error messages in bison at the cost of a few KB */
#define YYERROR_VERBOSE 1
@@ -80,10 +81,12 @@ static void CloseSysMenu(void);
static int yyerror (char *s);
-extern void ErrorF (const char* /*f*/, ...);
extern char *yytext;
extern int yylex(void);
+#define YYMALLOC malloc
+#define YYFREE free
+
%}
%union {
@@ -94,7 +97,7 @@ extern int yylex(void);
%token NEWLINE MENU LB RB ICONDIRECTORY DEFAULTICON ICONS STYLES
%token TOPMOST MAXIMIZE MINIMIZE BOTTOM NOTITLE OUTLINE NOFRAME DEFAULTSYSMENU
-%token SYSMENU ROOTMENU SEPARATOR ATSTART ATEND EXEC ALWAYSONTOP DEBUG
+%token SYSMENU ROOTMENU SEPARATOR ATSTART ATEND EXEC ALWAYSONTOP DEBUGTOK
%token RELOAD TRAYICON SILENTEXIT
%token <sVal> STRING
@@ -215,7 +218,7 @@ sysmenu: SYSMENU LB NEWLINE {OpenSysMenu();} newline_or_nada sysmenulist RB {Clo
silentexit: SILENTEXIT NEWLINE { pref.fSilentExit = TRUE; }
;
-debug: DEBUG STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($2); }
+debug: DEBUGTOK STRING NEWLINE { winDebug("LoadPreferences: %s\n", $2); free($2); }
;
@@ -326,7 +329,7 @@ static void
OpenIcons (void)
{
if (pref.icon != NULL) {
- ErrorF("LoadPreferences: Redefining icon mappings\n");
+ winDebug("LoadPreferences: Redefining icon mappings\n");
free(pref.icon);
pref.icon = NULL;
}
@@ -362,7 +365,7 @@ static void
OpenStyles (void)
{
if (pref.style != NULL) {
- ErrorF("LoadPreferences: Redefining window style\n");
+ winDebug("LoadPreferences: Redefining window style\n");
free(pref.style);
pref.style = NULL;
}
@@ -395,7 +398,7 @@ static void
OpenSysMenu (void)
{
if (pref.sysMenu != NULL) {
- ErrorF("LoadPreferences: Redefining system menu\n");
+ winDebug("LoadPreferences: Redefining system menu\n");
free(pref.sysMenu);
pref.sysMenu = NULL;
}