Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: indefinite improvements
Home

[Freeciv-Dev] Re: indefinite improvements

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: indefinite improvements
From: Jeff Mallatt <jjm@xxxxxxxxxxxx>
Date: Sun, 20 Aug 2000 10:44:29 -0400

At 2000/08/20 01:22 , David Pfitzner wrote:
>
>One likely problem I noticed is in common/worklist.h:
>
>#define WORKLIST_END (U_LAST+B_LAST+MAX_NUM_WORKLISTS)
>
>This value is used in protocol and in savegames as a marker
>past last used entry in worklist.  Since this patch changes B_LAST,
>the numerical value of WORKLIST_END changes (from 284 to 416?) which
>I guess means problems (I haven't looked).
>
>Suggested fixes:  Use (-1), or 0xFFFF for WORKLIST_END, and
>use some sort of work-around for code which currently checks 
>for specific value of WORKLIST_END (eg, look for out-of-range
>value, or 284 from old clients, etc).

Thanks!

I changed WORKLIST_END to 0xFFFF, and simply changed the save-file loader
to translate 284 to (the new) WORKLIST_END when loading old save-files
(discriminated by a new SAVEFILE_OPTION, "new_worklist_end").  The rest of
the code shouldn't have to change.

Also, updated the patch to latest CVS version.

Attachment: indef-impr-8.diff.gz
Description: Binary data

jjm

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