Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add put and iget functions for b
Home

[Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add put and iget functions for b

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add put and iget functions for bool. This ma...
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 24 Feb 2002 15:00:11 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Feb 24, 2002 at 04:01:02AM -0800, freeciv@xxxxxxxxxxxxxxxxxxx wrote:
> This is an automated notification of a change to freeciv cvs, 
> on Sun Feb 24 03:56:14 PST 2002 = Sun Feb 24 11:56:14 2002 (GMT)
> by Raimar Falke <rf13@xxxxxxxxxxxxxxxxxxxxxx>
> 
> ---- Files affected:
> 
> freeciv/common packets.c
> 
> ---- Log message:
> 
> Add put and iget functions for bool. This makes the reading and
> writing of bools type-safe.

You may have noticed that this breaks the CVS version. Reason is that
code like this:
  packet.name[0]='\0';
  packet.worklist.name[0] = '\0';
  send_packet_city_request(&aconnection, &packet, PACKET_CITY_BUY);

is used. This leaves packet.worklist.is_valid unset. One solution
would be to replace:
  packet.worklist.name[0] = '\0';
with
  packet.worklist.is_valid = FALSE;
Another one is to remove this altogether and build the logic into
send_packet_city_request.

Note the 
  packet.name[0]='\0';
from above. It is used to decrease the bandwidth used. Also this can
be managed centrally in send_packet_city_request.

Bottom line: a lot of copy-paste-modified in the past :( allows now to
create a patch which removes 80 lines :)

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv

Attachment: worklist_isvalid1.diff
Description: Text document


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: [FreeCiv-Cvs] rfalke: Add put and iget functions for bool. This ma..., Raimar Falke <=