[Freeciv-Dev] [bug #13587] [patch] add upkeep information to units in city dialog
Update of bug #13587 (project freeciv): Status: In Progress = Postponed Open/Closed:Open = Closed ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #8, bug #13587 (project freeciv): Updated to recent trunk. 逃げ出してるよ! (file #5993) ___ Additional Item Attachment: File name: version6-13587-gold6.patch.diff Size:9 KB ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #7, bug #13587 (project freeciv): I made some minor improvements to your patch, see the attached version. This would be the version that I commit, if nobody sees anything wrong with it. I made unit_description() only append the upkeep information if the unit is owned by the client's player, in keeping with our discussion in other tickets. Other than that, I just improved the comments a bit and fixed the formatting of unit_activity_astr(), since it was already mostly re-written anyway. 批評を恐れないで。 (file #5930) ___ Additional Item Attachment: File name: version5-13587-gold6.patch.diff Size:9 KB ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #5, bug #13587 (project freeciv): version 3 changes: - both functions take an astring parameter - unit_activity_text() is now a wrapper for unit_activity_astr() - move include file to unit.c Also, do not include headers in other headers (as I have told you in another ticket, sorry if I repeat myself :)). When you have a pointer to No problem; it helps and I'm learning something ... (file #5898) ___ Additional Item Attachment: File name: version3-13587-gold6.patch.diff Size:7 KB ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #6, bug #13587 (project freeciv): version 4: - remove upkeep_info (see 13586) (file #5904) ___ Additional Item Attachment: File name: version4-13587-gold6.patch.diff Size:8 KB ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #4, bug #13587 (project freeciv): Alright, I was not sufficiently clear in my last comments, so I will explain what I meant. I wanted you to change unit_upkeep_text() to take an astring parameter: void unit_upkeep_text(const struct unit *punit, struct astring *astr); and have the function append its text to the end of 'astr', if it should add any text at all (i.e. if the client's player is not the unit owner, it would not add anything). The point is to avoid static variables, because they make the code non re-entrant. This means that it would not be safe to use this code with threads, or even to call this function twice in the same expression (e.g. in the arguments of a printf style function). While freeciv does not use threads, making code re-entrant generally results in a cleaner and more modular design, as well as leaving the possibility of thread use open for the future. Also, do not include headers in other headers (as I have told you in another ticket, sorry if I repeat myself :)). When you have a pointer to some undefined struct, you can just use a forward declaration: struct astring; void unit_upkeep_text(const struct unit *punit, struct astring *astr); then include the real header in the c file where the function is implemented. というわけです。 ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #3, bug #13587 (project freeciv): changes in version 2: - use astring - upkeep information are only visible for own units - also update unit_activity_text() (file #5844) ___ Additional Item Attachment: File name: version2-gold6.patch.diff Size:6 KB ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Update of bug #13587 (project freeciv): Assigned to:None = mbook ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
URL: http://gna.org/bugs/?13587 Summary: [patch] add upkeep information to units in city dialog Project: Freeciv Submitted by: syntron Submitted on: Donnerstag 28.05.2009 um 12:15 Category: general Severity: 3 - Normal Priority: 5 - Normal Status: None Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any Release: Operating System: None ___ Details: add Food/Gold/Shield upkeep information to the unit information text depends on 13856 ___ File Attachments: --- Date: Donnerstag 28.05.2009 um 12:15 Name: gold6.patch.diff Size: 2kB By: syntron http://gna.org/bugs/download.php?file_id=5829 ___ Reply to this item at: http://gna.org/bugs/?13587 ___ 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 #13587] [patch] add upkeep information to units in city dialog
Follow-up Comment #1, bug #13587 (project freeciv): possible problem: to much information for a diplomat/spy? ___ Reply to this item at: http://gna.org/bugs/?13587 ___ Nachricht geschickt von/durch Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] [bug #13587] [patch] add upkeep information to units in city dialog
2009/5/28 Matthias Pfafferodt: depends on 13856 You may want to make your patches a bit less interdependant. That way several of them could be handled parallel. Now it seems that I cannot handle any of them before book has finished handling first ones. - ML ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] [bug #13587] [patch] add upkeep information to units in city dialog
This patch really depends on 13856 due to the upkeep information saved in the unit struct. At the moment this is not working as mentioned in the text to 13856. Somehow the upkeep information is not transfered to the client. Due to the fact, that the patches touch the same code a certain dependency exists or applying the patches would mean to rebase each patch. I could rewrite this patch, so it is independant ... Am Thursday 28 May 2009 15:39:56 schrieb Marko Lindqvist: 2009/5/28 Matthias Pfafferodt: depends on 13856 You may want to make your patches a bit less interdependant. That way several of them could be handled parallel. Now it seems that I cannot handle any of them before book has finished handling first ones. - ML -- Matthias Pfafferodt - http://www.mapfa.de Matthias.Pfafferodt at mapfa.de ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] [bug #13587] [patch] add upkeep information to units in city dialog
On 28/05/2009, Marko Lindqvist cazf...@gmail.com wrote: 2009/5/28 Matthias Pfafferodt: depends on 13856 You may want to make your patches a bit less interdependant. That way several of them could be handled parallel. Now it seems that I cannot handle any of them before book has finished handling first ones. Sorry, I will try to get to them as soon as possible (been a little distracted by the other freecivs). --- 夜俺はスーパーヒーローになる。 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] [bug #13587] [patch] add upkeep information to units in city dialog
Update of bug #13587 (project freeciv): Status:None = In Progress ___ Follow-up Comment #2: possible problem: to much information for a diplomat/spy? Then the server should not send the information in the first place. You should assume that users could make their own clients to read this information. Anyway this information should not be sent as I said in #13586. A better design would be to pass the astr to the unit_upkeep_text() function, removing the need for non-reentrant static variables, and to allow the function to not append any string if the upkeep information does not exist. By the way, how would the client distinguish between a unit for which it has no upkeep information, and a unit which has all zero upkeep values? 今日の日本語の授業が終わりました。 ___ Reply to this item at: http://gna.org/bugs/?13587 ___ Message sent via/by Gna! http://gna.org/ ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev