1
Description: Fix issues with new libforms
2
Author: Jens Thoms Toerring <jt@toerring.de>
3
Bug-Debian: http://bugs.debian.org/620634
4
Bug-Ubuntu: https://bugs.launchpad.net/bugs/904629
5
Forwarded: Sverre H. Huseby <shh@thathost.com>
12
-Number of Objects: 44
13
+Number of Objects: 45
26
+colors: FL_COL1 FL_COL1
27
+alignment: FL_ALIGN_CENTER
28
+style: FL_NORMAL_STYLE
29
+size: FL_DEFAULT_SIZE
33
+resize: FL_RESIZE_NONE
34
+gravity: FL_NoGravity FL_NoGravity
39
=============== FORM ===============
46
-colors: FL_COL1 FL_YELLOW
47
+colors: FL_WHITE FL_YELLOW
48
alignment: FL_ALIGN_BOTTOM
49
style: FL_NORMAL_STYLE
54
static FL_OBJECT *frmMancala[2];
55
static FL_OBJECT *frmHole[2][MAX_HOLES];
56
static FL_OBJECT *frmLight[2][MAX_HOLES];
57
-static char playerName[2][20] = { "the human player", "the computer" };
58
+static const char *playerName[2] = { "the human player", "the computer" };
59
static int maxPly[2] = { 0, 4 };
60
static int rulesDisplayed = 0;
61
static int stones_pr_hole = STONES_PR_HOLE;
63
fl_set_object_label(frm->winT, "");
66
-static void niceDoForms(void)
71
- obj = fl_do_forms();
72
- if (obj == FL_EVENT)
73
- fl_XNextEvent(&xev);
76
static void formHandler(void)
81
if (!maxPly[player]) {
82
setMessage("It's %s to move", playerName[player]);
87
if (movePlayer == player) {
97
-/* Dirty trick to make fl_do_forms() return */
98
-static void formWakeup(void)
102
- xev.type = ClientMessage;
103
- fl_XPutBackEvent(&xev);
106
/**************************************************************************
108
* P U B L I C F U N C T I O N S *
114
+ fl_trigger_object(frm->dummyButton);
117
void doLevel(FL_OBJECT *ob, long arg)
119
void doNewGame(FL_OBJECT *ob, long arg)
123
+ fl_trigger_object(frm->dummyButton);
126
void doQuit(FL_OBJECT *ob, long arg)
130
OBJS = minimax.o mancala.o
132
# Object files used by xmancala
133
-XOBJS = xform.o rulestxt.o
134
+XSRCS = xform.c rulestxt.c
135
+XOBJS = $(XSRCS:.c=.o)
141
+ fdesign -convert $<
143
mancala: textmain.o $(OBJS)
144
$(CC) $(CCOPT) -o $@ textmain.o $(OBJS) $(LDOPT) $(LIBS)
146
-xmancala: xmain.o $(XOBJS) $(OBJS)
147
+xmancala: $(XOBJS) xmain.o $(OBJS)
148
$(CC) $(CCOPT) -o $@ xmain.o $(XOBJS) $(OBJS) \
149
$(LDOPT) $(XLIBDIR) $(XLIBS)
152
$(CC) -o $@ -c $(CCOPT) $<
155
- rm -f *.o core depend *~
156
+ rm -f *.o core depend *~ xform.c xform.h
159
rm -f $(TARGETS) $(DIST)-$(VERSION).tar.gz
161
Makefile Makefile.bcc \
162
mancala.c mancala.h minimax.c minimax.h \
164
- xform.c xform.h xform.fd xmain.c rulestxt.c
165
+ xform.fd xmain.c rulestxt.c