Follow-up Comment #6, bug #19868 (project freeciv):

Attached is a version of the patch updated to svn trunk revision 22384 and a
file containing the data it is based on.

Should a multi line comment end in a blank line ( * last linen */)? Should
comments I only change a part of be updated to the new style (include a * on
new lines) I have tried to follow "If you need to comment a declared variable,
it should be as such:" from the code style unless all variables / constants in
a block is used. In fc_types this has resulted in a block like this:

#define MAX_NUM_PLAYER_SLOTS 128 /* Used in the network protocol. */
#define MAX_NUM_BARBARIANS   2
#define MAX_NUM_PLAYERS      MAX_NUM_PLAYER_SLOTS - MAX_NUM_BARBARIANS
#define MAX_NUM_CONNECTIONS (2 * (MAX_NUM_PLAYER_SLOTS)) /* Used in the
                                                          * protocol. */
#define MAX_NUM_ITEMS   200     /* eg, unit_types
                                 * Used in the network protocol */
#define MAX_NUM_TECH_LIST 10 /* Used in the network protocol. */
#define MAX_NUM_UNIT_LIST 10 /* Used in the network protocol. */
#define MAX_NUM_BUILDING_LIST 10 /* Used in the network protocol. */
#define MAX_LEN_VET_SHORT_NAME 8
#define MAX_VET_LEVELS 20 /* see diplomat_success_vs_defender()
                           * Used in the network protocol */
#define MAX_BASE_TYPES 32 /* Used in the network protocol. */
#define MAX_ROAD_TYPES 8 /* Used in the network protocol. */
#define MAX_DISASTER_TYPES 10
#define MAX_NUM_LEADERS MAX_NUM_ITEMS /* Used in the network protocol. */
#define MAX_NUM_NATION_GROUPS 128 /* Used in the network protocol. */
#define MAX_NUM_STARTPOS_NATIONS 1024 /* Used in the network protocol. */

Should it be kept like it is, should I separate the constants used in the
protocol to a commented section (like the one below, even if it makes the
stronger claim that this will probably break network compatability) or include
a comment that most constants in this section is used in the network protocol?

(file #17269, file #17270)
    _______________________________________________________

Additional Item Attachment:

File name: labelProtoChangesDraft.patch   Size:16 KB
File name: packetsDependOn                Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?19868>

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


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

Reply via email to