[Freeciv-Dev] [patch #1617] Release script objects for removed units and cities

2010-04-12 Thread Matthias Pfafferodt

Follow-up Comment #1, patch #1617 (project freeciv):

I think something similar is needed for struct player as it is also exported
to lua and can be freed

___

Reply to this item at:

  http://gna.org/patch/?1617

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1582] UTF-8 utilities

2010-04-12 Thread pepeto

Update of patch #1582 (project freeciv):

  Status:  Ready For Test = None   

___

Follow-up Comment #5:

 ATM there is an issue with MAX_LEN_NAME. This is supposed to
 limit city names, for instance, at 32 characters. Instead it
 limits then at 32 bytes which is incorrect. Most places which
 use it should instead use a longer or malloc'd buffer, and use
 fc_utf8_strlen() to make sure the name isn't too long.

A problem would be for the packets. The packet size seems to need a byte
limit, not in characters.

 How do we know just because a character is 4 bytes long that
 bytes 2-4 are valid? Does UTF-8 allow any byte sequence in
 here? What about malicious chats from the client?

It is the role of base_fc_utf8_char_validate() called by
fc_utf8_char_validate() and fc_utf8_validate(), then
fc_utf8_validate_trunc().

 Casts should not be needed in passing values to these
 functions. Doing so is a sign the parameters used are not
 right. In fact I think one such case is quite wrong.

I am not sure to understand what do you criticize here. The only casts are to
unsure the calculation is done with unsigned characters. There are also some
casts to (char *) which are used to do internally tricky things (e.g. in
fc_utf8_validate_trunc()).

 Each function provided should do everything that it needs to.
 Specifically, fc_utf8_char_size is not a useful function in
 its current form (except for internal usage). 

I agree, this function was needed for defining fc_utf8_char_next() in the
first patch, I forgot to remove it from the header file in the second.

 Are we sure that using these variants everywhere is easier
 than converting all freeciv to wide characters?

I don't know.


___

Reply to this item at:

  http://gna.org/patch/?1582

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15810] Sanity check should use fc_assert()

2010-04-12 Thread pepeto

Update of bug #15810 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?15810

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15816] add a comment about a needed empty line in the nation.ruleset file

2010-04-12 Thread pepeto

Update of bug #15816 (project freeciv):

 Assigned to:None = pepeto 

___

Follow-up Comment #5:

I intent to commit my fixes in the listed branch by 'Planned Release'.


___

Reply to this item at:

  http://gna.org/bugs/?15816

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15841] API: Do not use tolua_outside

2010-04-12 Thread Ulrik Sverdrup

Follow-up Comment #1, bug #15841 (project freeciv):

Updated patch, this way it's even better/easier. Will commit soon.

(file #8928)
___

Additional Item Attachment:

File name: 2010041201-API-Do-not-use-tolua_outside.patch Size:6 KB


___

Reply to this item at:

  http://gna.org/bugs/?15841

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1617] Release script objects for removed units and cities

2010-04-12 Thread Ulrik Sverdrup

Follow-up Comment #2, patch #1617 (project freeciv):

Ah ok. I'll look at player in a followup patch. It seems players are never
released, but they are put into an unusable state after being removed so it's
similar.

Attached patch has minor update for change in tolua_outside patch.

(file #8929)
___

Additional Item Attachment:

File name: 2010041207-Release-script-objects-for-removed-units-and-c.patch
Size:6 KB


___

Reply to this item at:

  http://gna.org/patch/?1617

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1617] Release script objects for removed units and cities

2010-04-12 Thread Matthias Pfafferodt

Follow-up Comment #3, patch #1617 (project freeciv):

At the moment an array of 32 players is allocated at the start. So the number
of players is fixed. Perhaps someday the players will be a dynamically
allocated list ...

But you are right. Especially in that case, a player will never be deleted /
removed but only marked as dead.

___

Reply to this item at:

  http://gna.org/patch/?1617

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15857] Fix buggy find_transport_from_tile

2010-04-12 Thread Ulrik Sverdrup

URL:
  http://gna.org/bugs/?15857

 Summary: Fix buggy find_transport_from_tile
 Project: Freeciv
Submitted by: englabenny
Submitted on: måndag 2010-04-12 den 14:05
Category: general
Severity: 3 - Normal
Priority: 1 - Later
  Status: Ready For Test
 Assigned to: englabenny
Originator Email: 
 Open/Closed: Open
 Release: 2.2
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.2.1, 2.3.0

___

Details:

find_transport_from_tile reversed the order of the cargo and
transporter unit arguments.

Fix for 2.2 and trunk attached.



___

File Attachments:


---
Date: måndag 2010-04-12 den 14:05  Name:
2010041201-Fix-movmement.c-find_transport_from_tile-use-o.patch  Size: 912 B 
 By: englabenny

http://gna.org/bugs/download.php?file_id=8933

___

Reply to this item at:

  http://gna.org/bugs/?15857

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15841] API: Do not use tolua_outside

2010-04-12 Thread Ulrik Sverdrup

Update of bug #15841 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?15841

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #13709] Switch from toluaxx to tolua-5.1b

2010-04-12 Thread Ulrik Sverdrup

Update of bug #13709 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 

___

Follow-up Comment #10:

Switched to tolua-5.1 (tolua 5.1.3)

___

Reply to this item at:

  http://gna.org/bugs/?13709

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #13709] Switch from toluaxx to tolua-5.1b

2010-04-12 Thread Matthias Pfafferodt

Follow-up Comment #11, bug #13709 (project freeciv):

I get errors trying to compile S2_2 and trunk

S2_2:

dependencies/Makefile.am:3: required directory dependencies/tolua-5.1 does
not exist
utility/Makefile.am:60: `%'-style pattern rules are a GNU make extension
configure.ac:942: required file `dependencies/tolua-5.1/Makefile.in' not
found
configure.ac:942: required file `dependencies/tolua-5.1/src/Makefile.in' not
found
configure.ac:942: required file `dependencies/tolua-5.1/src/lib/Makefile.in'
not found
configure.ac:942: required file `dependencies/tolua-5.1/src/bin/Makefile.in'
not found
make: *** [Makefile.in] Error 1


here it is the directory tolua-5.1b

trunk:

tolua.c: In function ‘main’:
tolua.c:109: error: nested extern declaration of ‘tolua_tolua_open’
make[5]: *** [tolua.o] Error 1
make[5]: Leaving directory
`/home/matthias/data/git/freeciv.svn/trunk/dependencies/tolua-5.1/src/bin'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/home/matthias/data/git/freeciv.svn/trunk/dependencies/tolua-5.1/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory
`/home/matthias/data/git/freeciv.svn/trunk/dependencies/tolua-5.1'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/home/matthias/data/git/freeciv.svn/trunk/dependencies'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/matthias/data/git/freeciv.svn/trunk'
make: *** [all] Error 2


This function is defined in a tolua.c and toluabind.c with different
definitions?


___

Reply to this item at:

  http://gna.org/bugs/?13709

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1574] add a player to a running game

2010-04-12 Thread Matthias Pfafferodt

Follow-up Comment #10, patch #1574 (project freeciv):

I think the interface could be

create_player(player name, nation name)

with both arguments as string. Is it possible to set nation name to nil to
get a NULL pointer in freeciv? This way it would be possible to define a
nation but also a random nation can be set.

___

Reply to this item at:

  http://gna.org/patch/?1574

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1582] UTF-8 utilities

2010-04-12 Thread Matthias Pfafferodt

Follow-up Comment #6, patch #1582 (project freeciv):

 A problem would be for the packets. The packet size seems to need a byte
limit, not in characters. 

This could be solved by multiplying all packet string sizes by 4(?) to take
into account multicharacter bytes

___

Reply to this item at:

  http://gna.org/patch/?1582

___
  Nachricht geschickt von/durch Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #13709] Switch from toluaxx to tolua-5.1b

2010-04-12 Thread Ulrik Sverdrup

Update of bug #13709 (project freeciv):

  Status:   Fixed = In Progress
 Planned Release:   2.3.0 = 2.2.1, 2.3.0   

___

Follow-up Comment #14:

The trunk error might be a warning from a newer gcc (I compiled with v 4.3).
Here is a diff that might fix that (Attached). Do you see an error or warning
before / after the patch?


I will update 2.2 to tolua 5.1.3 now.

(file #8937)
___

Additional Item Attachment:

File name: tolua_no_nested_decl.diff  Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?13709

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15860] Fix compiler warning in tolua-5.1

2010-04-12 Thread Ulrik Sverdrup

URL:
  http://gna.org/bugs/?15860

 Summary: Fix compiler warning in tolua-5.1
 Project: Freeciv
Submitted by: englabenny
Submitted on: måndag 2010-04-12 den 20:48
Category: general
Severity: 3 - Normal
Priority: 1 - Later
  Status: Ready For Test
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.2.1, 2.3.0

___

Details:

There may be a warning emitted for 'nested extern declaration' in 
tolua-5.1, which causes compilation failure in debug mode.

Reported by Matthias Pfafferodt in bug #13709




___

Reply to this item at:

  http://gna.org/bugs/?15860

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #13709] Switch from toluaxx to tolua-5.1b

2010-04-12 Thread Ulrik Sverdrup

Update of bug #13709 (project freeciv):

  Status: In Progress = Fixed  

___

Follow-up Comment #17:

The compilation error is tracked in a separate bug #15860

___

Reply to this item at:

  http://gna.org/bugs/?13709

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15860] Fix compiler warning in tolua-5.1

2010-04-12 Thread pepeto

Follow-up Comment #2, bug #15860 (project freeciv):

 This is a compilation failure, commit directly?

If this is the case (not for me at least), you could commit it immediately.


___

Reply to this item at:

  http://gna.org/bugs/?15860

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1611] Scripting: Hide Lua module 'debug'

2010-04-12 Thread Ulrik Sverdrup

Update of patch #1611 (project freeciv):

 Planned Release:   2.3.0 = 2.2.1, 2.3.0   

___

Follow-up Comment #1:

This should go into both 2.2 and trunk, since the change is easily available
to make in 2.2 as well.

___

Reply to this item at:

  http://gna.org/patch/?1611

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1605] API: Add Tile:city() and Tile:num_units() accessors

2010-04-12 Thread Ulrik Sverdrup

Update of patch #1605 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?1605

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1606] API: Add Tile, Player:units_iterate(), and Player:cities_iterate()

2010-04-12 Thread Ulrik Sverdrup

Update of patch #1606 (project freeciv):

  Status:  Ready For Test = Done   
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?1606

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1617] Release script objects for removed units and cities

2010-04-12 Thread Ulrik Sverdrup

Follow-up Comment #4, patch #1617 (project freeciv):

Updating the patch. This makes the mechanism much better. 

New summary:

We change the type of the userdata to a marker class called
'Nonexistent' [when a freeciv object such as city or unit is free'd].
Nonexistent has one single method :exists() that always returns false. City
and Unit correspondingly have :exists() methods which should always return
true.

'Nonexistent' class is common for everything that is removed. I don't think
the extra complexity is needed to have separate Dead_Unit, Razed_City etc
types. In the end, there is no sensible methods you can call on a dead unit
anyway.

Players are also removed.

(file #8939)
___

Additional Item Attachment:

File name: 2010041201-Remove-script-objects-for-removed-units-cities.patch
Size:9 KB


___

Reply to this item at:

  http://gna.org/patch/?1617

___
  Meddelandet skickades via/av Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [patch #1622] Karelian nation

2010-04-12 Thread J.M. Maalderink

URL:
  http://gna.org/patch/?1622

 Summary: Karelian nation
 Project: Freeciv
Submitted by: mixcoatl
Submitted on: Monday 04/12/2010 at 22:38
Category: rulesets
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

Karelians



___

File Attachments:


---
Date: Monday 04/12/2010 at 22:38  Name: karelian.patch  Size: 49kB   By:
mixcoatl

http://gna.org/patch/download.php?file_id=8940

___

Reply to this item at:

  http://gna.org/patch/?1622

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #15858] Game crashes on startup

2010-04-12 Thread David Lowe

Follow-up Comment #1, bug #15858 (project freeciv):

I suspect you're using the binary provided by Napoleon XIV?  The rest of us
have moved on to 2.2.0 by now, but there's no binary yet.  If you install the
'fink' build system you can test out my 2.2.0 package.

Anyway, that binary has a known problem with permissions on its internal copy
of the freetype library.  See how to fix it in the forum here: 

http://forum.freeciv.org/viewtopic.php?t=4313

and look for the post dated Sat Oct 11, 2008 6:03 am

___

Reply to this item at:

  http://gna.org/bugs/?15858

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev