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: Eric Mullins
Subject: Re: [Bug-XBoard] WinBoard for JFW
Date: Tue, 30 Jun 2009 08:53:35 -0600
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

h.g. muller wrote:
As I figured we would not normally carry alog this code in future developments,
Is there some reason this shouldn't become a permanent fixture of winboard? If not, I assume most of the changes you propose below are strictly to allow people to compile winboard w/out having the JAWS API, right?

I'd be tempted to just put a JAWS definition in the makefile that is off, along with comments that direct people to where to find the API. I would then put #ifdef JAWS directives around any code that uses the API or the extra menus. RC files can also contain C preprocessor directives.
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.






reply via email to

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