bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] WinBoard for JFW


From: h.g. muller
Subject: Re: [Bug-XBoard] WinBoard for JFW
Date: Tue, 30 Jun 2009 11:08:21 +0200

I ported the JAWS patch from WB 4.0.2 to 4.4.0. I as wondering how we
should treat this. I concentrated the entire patch in winboard.c now.
But since there are extra menus, it also needs a patched winboard.rc,
and a resource.h shared by the two to define the new menu controls
(a dozen or so).

As I figured we would not normally carry alog this code in future developments,
I tried to set it up such that future WB versions can be very easily patched
to make them support JAWS. I put all JAWS C code in a single file, jaws.c,
which needs to be #included in winboard.c to define all new functions.
I put the extensions needed to resource.h in a separate file jaws.h, which
is automatically #included from jaws.c.

It could not be avoided, though, that winboard.c must contain some scattered
modifications, to actually call the new routines at the applicable time. To
minimize the work here, jaws.c #defines the required code patches as macros.
Compiling the thus patched winboard.c, and linking it to jaws.rc (which
automatically includes jaws.h) in stead of winboard.rc (and all other, unmodified
object files), produces an executable that supports JAWS.

Now my proposal is this:as a compromise between not burdoning ordinary users
with large chunks of unnecessary code, and easy upgradability of the JAWS
version, we distribute the winboard.c that is needed for the JAWS version,
(containing some 10 extra lines of code, for the #include and macro calls), but
distribute a small dummy jaws.c with it. This dummy #defines the handful of
JAWS macros as no-ops, (empty macros that mark insertion points, macros
copying their argument for those that indicate deetions / replacements).
People that want to build a JAWS version can then obtain jaws.rc, jaws.h,
and the real jaws.c in a separate download, overwrite the dummy with the latter
and winboard.rc with jaws.rc, and then build as usual.

How about that?

H.G.
___________________________________________

// Dummy file, defining all JAWS patches to winboard.c as no-ops
#define JAWS_KB_NAVIGATION
#define JAWS_MENU_ITEMS
#define JAWS_INIT
#define JAWS_IF_TAB
#define JAWS_FALSE(X) X
#define SAY(S)
#define SAYMACHINEMOVE()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]