[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread akfaew
URL: http://gna.org/bugs/?18086 Summary: comparison is always false due to limited range of data type Project: Freeciv Submitted by: akfaew Submitted on: Sat 30 Apr 2011 08:30:27 AM GMT Category: None

[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread anonymous
Follow-up Comment #1, bug #18086 (project freeciv): This is a bug! I'm woundering why you get an error message and I never did see it? Do you use special compiler options or the default ones for debug? Which gcc / distribution do you use? Some background: I had citizens equal to short int but

[Freeciv-Dev] [bug #18081] warning: null format string

2011-04-30 Thread anonymous
Follow-up Comment #1, bug #18081 (project freeciv): Could you check how many of such calls exists (with NULL for message). I think it would be best, if these calls are corrected. You never know if similar checks will not be included in gcc for linux ...

[Freeciv-Dev] [bug #18081] warning: null format string

2011-04-30 Thread akfaew
Follow-up Comment #2, bug #18081 (project freeciv): How many such calls? Hundereds. Maybe the __printf__ assertion can be moved to a lower level and the fc_assert defines should include a test: fmt == NULL ? : fmt or something instead.

[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread akfaew
Follow-up Comment #2, bug #18086 (project freeciv): Standard compile with --disable-nls. I don't use debug since warnings are treated as errors and I get hundereds of warnings from those NULLS in printfs. [12:11:pts/10][dude@hopek:~:74] gcc --version gcc (GCC) 4.2.1 20070719 [FreeBSD]

[Freeciv-Dev] [bug #18081] warning: null format string

2011-04-30 Thread akfaew
Follow-up Comment #3, bug #18081 (project freeciv): This is just terrible, if I change NULL to I get: warning: zero-length printf format string I propose, in fc_assert_fail and similar change if (NULL != message) { into if (NOMSG != message) { where NOMSG is some define, like (void*)0x1.

[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread Marko Lindqvist
Follow-up Comment #3, bug #18086 (project freeciv): 692 void city_repair_size(struct city *pcity, citizens change) I think error is in that change is of type citizens in the first place. I would try to change it to int. ___ Reply to

[Freeciv-Dev] [bug #18081] warning: null format string

2011-04-30 Thread akfaew
Follow-up Comment #4, bug #18081 (project freeciv): Check out attached patch (file #12929) ___ Additional Item Attachment: File name: noprintfassertfail.diffSize:1 KB ___

[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread anonymous
Follow-up Comment #4, bug #18086 (project freeciv): 692 void city_repair_size(struct city *pcity, citizens change) I think error is in that change is of type citizens in the first place. I would try to change it to int. Yes; I think this is that I have done for the function citizens_add()

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread J. M. Gorbach
Follow-up Comment #3, bug #18085 (project freeciv): Maybe enable construction bridge over the lake terrain is solution, but only one tile over the lake. Nothing two tiles or crosswise / diagonally. Example: ''p+p'' = plain - lake - plain ''rbr'' = road - bridge - road Enable = north/south -

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread Marko Lindqvist
Follow-up Comment #4, bug #18085 (project freeciv): Specials are buffalo, coal, fish, etc. No, those are resources stored to map.res??? in recent versions (in older versions there could be only two types of resources for each terrain type and those were stored as resource1 and resource2 in

[Freeciv-Dev] [bug #18086] comparison is always false due to limited range of data type

2011-04-30 Thread akfaew
Follow-up Comment #5, bug #18086 (project freeciv): Also here: vision_site_size_set found in ./common/vision.c: 134: void vision_site_size_set(struct vision_site *psite, citizens size) 135: { 136: fc_assert_ret(psite != NULL); 137: fc_assert_ret(size = MAX_CITY_SIZE); 138:

[Freeciv-Dev] [bug #18081] warning: null format string

2011-04-30 Thread akfaew
Follow-up Comment #5, bug #18081 (project freeciv): Missed one call (file #12930) ___ Additional Item Attachment: File name: sanitycheck.c Size:0 KB ___ Reply to

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread J. M. Gorbach
Follow-up Comment #5, bug #18085 (project freeciv): But shouldn't you be doing it in freeciv map editor anyway? What should I do in freeciv map editor anyway? Place and remove rivers? ___ Reply to this item at:

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread Marko Lindqvist
Follow-up Comment #6, bug #18085 (project freeciv): This is a bit complicated and I'm not explaining all the alternatives now. I'll just explain the most probable way the river information is stored in your scenarios. Test this, and if it doesn't work we'll check other alternatives. River

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread J. M. Gorbach
Follow-up Comment #7, bug #18085 (project freeciv): River information is topmost bit in spe01_ maps. So, any tile with value higher than or equal to 8 has river in it (possible hex values being 0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f). If value is less than 8, just add 8 to get same specials as

[Freeciv-Dev] [bug #18087] server segfault on a map with 1.3M tiles

2011-04-30 Thread akfaew
Follow-up Comment #1, bug #18087 (project freeciv): Oh there is so much stack abuse in freeciv. Is it OK if I post patch to each file as a separate diff and message? (file #12933) ___ Additional Item Attachment: File name:

[Freeciv-Dev] [bug #18087] server segfault on a map with 1.3M tiles

2011-04-30 Thread akfaew
Follow-up Comment #2, bug #18087 (project freeciv): The problem with my previous patch is that it will take up that space forever, which is also wrong. I think this needs to be done with malloc and free. I won't continue with this today and will wait for some feedback. Disregard startpos.c.diff

[Freeciv-Dev] [bug #18088] Chat tab has white background when using a dark GTK theme

2011-04-30 Thread anonymous
URL: http://gna.org/bugs/?18088 Summary: Chat tab has white background when using a dark GTK theme Project: Freeciv Submitted by: None Submitted on: Sat 30 Apr 2011 02:27:47 PM UTC Category: client-gtk-2.0

[Freeciv-Dev] [bug #18089] Want Left and middle click support to scroll minimap

2011-04-30 Thread anonymous
URL: http://gna.org/bugs/?18089 Summary: Want Left and middle click support to scroll minimap Project: Freeciv Submitted by: None Submitted on: Sat 30 Apr 2011 02:41:36 PM UTC Category: client Severity: 2

[Freeciv-Dev] [bug #18091] Entry missing in effects.ruleset

2011-04-30 Thread anonymous
URL: http://gna.org/bugs/?18091 Summary: Entry missing in effects.ruleset Project: Freeciv Submitted by: None Submitted on: Sat 30 Apr 2011 02:56:21 PM UTC Category: rulesets Severity: 4 - Important

[Freeciv-Dev] [bug #18087] server segfault on a map with 1.3M tiles

2011-04-30 Thread akfaew
Follow-up Comment #3, bug #18087 (project freeciv): The attached patch manages to get me thru the segfaults. (It's a cat of small diffs, gna only allows max 4 uploads) Now there are problems with assertions: 1: in dbv_init() [bitvector.c::57]: assertion 'bits 0 bits 512 * 1024' failed. 1:

[Freeciv-Dev] [bug #18092] Fix some defines

2011-04-30 Thread akfaew
URL: http://gna.org/bugs/?18092 Summary: Fix some defines Project: Freeciv Submitted by: akfaew Submitted on: Sat 30 Apr 2011 03:43:37 PM GMT Category: None Severity: 3 - Normal Priority:

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread Marko Lindqvist
Follow-up Comment #8, bug #18085 (project freeciv): Is it possible to associate river with letter or symbol in the tXXX layer? t)errain layer contains base terrain. Rivers are specials that can appear on top of such base terrains. So no, you cannot define rivers in terrain layer (though civ1

[Freeciv-Dev] [bug #18089] Want Left and middle click support to scroll minimap

2011-04-30 Thread David Lowe
Follow-up Comment #1, bug #18089 (project freeciv): Actually, left click on on the minimap currently performs a goto for the active unit(s). It's kind of annoying, actually, since you can't really be sure where you are clicking at that resolution. But you'd have to convince the community to

[Freeciv-Dev] [bug #18085] River and Map Format

2011-04-30 Thread J. M. Gorbach
Follow-up Comment #9, bug #18085 (project freeciv): Thanks for reply. Are you limiting yourself to creating maps usable with default ruleset, or are you prepared to create custom rulesets to support them? Default and custom rulesets.