Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] corecleanup comments
Home

[Freeciv-Dev] corecleanup comments

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] corecleanup comments
From: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 17:29:06 +0300 (IDT)

This is what I did:

downloaded corecleanup_05a-1_12_0.gz and corecleanup_05b-1_12_0.gz from
ftp.freeciv.org, had a brief look at them (the places that interest
me most), applied them, had a look at map.h and map.c, compiled and run a
game whereas one of the clients crashed.

Let's start from the crash.
it happened at client/packhand.c line 1425
where iteration is done _completely_manually_ which is so strange that I
suspect it is done for some religious reasons...
please use one of your iterate_ macros there.

Now some abuse.  Sometimes I really find your commenting insufficient.
Please try to explain how you do things, because you don't do them the
easy way (from human point of view).  Not everyone who might look at your
code is that proficient with macro-magic and bitwise operations.  

In some cases you should also say more about what a macro is supposed
to do.  Just to to give you some pointers:

DIR_REV in map.h -- after staring at it for 10 minutes I concluded that it
is probably REVersal of a direction...  but why don't you just say that in
the comments?

maybe make a picture which iterate macro does what?  it would be a good
reference for the people who will use them in future.  here I might be
able to help you...

I am not sure what block_iterate does in the torus case.  your picture
looks weird.

straightest_direction in gorohand.c -- this one is just a big puzzle.

so much for now,
G.




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] corecleanup comments, Gregory Berkolaiko <=