[Freeciv-Dev] [bug #14369] Tutorial scenario can't be started

2009-09-26 Thread pepeto

Update of bug #14369 (project freeciv):

 Assigned to:None = pepeto 


___

Reply to this item at:

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

___
  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 #13868] [patch 02/07] use an union in the struct setting

2009-09-26 Thread pepeto

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

'const' flags could be added to the values, like 'bool *const pbval' to be
sure that pointer won't be modified.

I'm not totally conviced by the names.  If you do a struct boolean, you don't
need to have 'b' in every other variables.

You can also using a anonymous union to use directly what is inside.

I would suggest:
union {
  /*** bool part ***/
  struct {
bool *const pvalue;
const bool default;
const bool_validate_func_t validate;
  } boolean;
  /*** int part ***/
struct {
int *const pvalue;
const int default;
const int min;
const int max;
const int_validate_func_t validate;
  } integer;
  /*** string part ***/
  struct {
char *const value;
const char *const default;
const size_t size;
const string_validate_func_t validate;
  } string;
};

So the bool value would be '*pset-boolean.pvalue' which looks enough clear
for me.


___

Reply to this item at:

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

___
  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 #13867] [patch 01/07] get game settings via wrapper functions

2009-09-26 Thread pepeto

Follow-up Comment #10, bug #13867 (project freeciv):

 setting_to_client() is missing function header. We are not adding new
functions without proper headers.

That's right, a short description would be good.

Also, after reading this patch, I think that translator work could be
simplified.  Very small single translated words can be included in the
format.  Example:
_(Option: %s  -  %s), setting_name(pset), _(setting_short_help(pset)
could be:
%s %s  -  %s, _(Option:), setting_name(pset), _(setting_short_help(pset)
then the translation job would be already done for:
_(Option: %s), setting_name(pset)
which could be:
%s %s, _(Option:), setting_name(pset)
I think it could be done for all prefixes.  But do not to it for long
sentences.

I don't see why do you return the pointer to the functions.  If you make a
function interface like you did, it should be made more like an
encapsulation.  So it should be 2 function different:
bool setting_get_bval(const struct setting *pset);
void setting_set_bval(struct setting *pset, bool val);

Maybe, moves the definition of the setting struct in the .c file, to make the
type opaque, to emphasize the OOP design.


___

Reply to this item at:

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

___
  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 #14371] Loading a scenario sets the is_new_game bool to FALSE

2009-09-26 Thread pepeto

Update of bug #14371 (project freeciv):

 Assigned to:None = pepeto 


___

Reply to this item at:

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

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


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