[Freeciv-Dev] [bug #13807] [patch] define the settings within a function

2009-06-28 Thread Matthias Pfafferodt
URL: http://gna.org/bugs/?13807 Summary: [patch] define the settings within a function Project: Freeciv Submitted by: syntron Submitted on: Sonntag 28.06.2009 um 17:31 Category: general Severity: 2 -

[Freeciv-Dev] [bug #13807] [patch] define the settings within a function

2009-06-28 Thread Madeline Book
Update of bug #13807 (project freeciv): Assigned to:None = mbook ___ Reply to this item at: http://gna.org/bugs/?13807 ___ Message sent

[Freeciv-Dev] [bug #13807] [patch] define the settings within a function

2009-06-28 Thread Madeline Book
Follow-up Comment #1, bug #13807 (project freeciv): I'm not sure that we need to get rid of the static 'settings' array and use dynamic memory for settings, since even with your approach there will still be at least one variable global to the settings.c file. If you are worried that you cannot

[Freeciv-Dev] [bug #13807] [patch] define the settings within a function

2009-06-28 Thread Matthias Pfafferodt
Follow-up Comment #3, bug #13807 (project freeciv): If you are worried that you cannot use static initializers with unions, you need not be, since you can use the syntax: union foo { int i; const char *s; bool b; }; union foo f1 = { .b = TRUE }; union foo f2 = { .s = hi };

[Freeciv-Dev] [bug #13807] [patch] define the settings within a function

2009-06-28 Thread Madeline Book
Follow-up Comment #4, bug #13807 (project freeciv): This will help! The 'static initializers' error message was the reason for me to try it with a function. Is an union portable to win, ...? Struct/union initializers are part of the c language (but not c++ apparently), so it should work with