Author: sveinung
Date: Fri Nov 13 13:25:37 2015
New Revision: 30594

URL: http://svn.gna.org/viewcvs/freeciv?rev=30594&view=rev
Log:
Mark string vector strings in packets.def

Use a field type alias to STRING to make the change as unintrusive as
possible for now. I have verified that there is no difference in the
code generated by generate_packets.py.

See patch #6592

Modified:
    branches/S2_5/common/packets.def

Modified: branches/S2_5/common/packets.def
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/common/packets.def?rev=30594&r1=30593&r2=30594&view=diff
==============================================================================
--- branches/S2_5/common/packets.def    (original)
+++ branches/S2_5/common/packets.def    Fri Nov 13 13:25:37 2015
@@ -193,6 +193,10 @@
 type MEMORY             = memory(unsigned char)
 type REQUIREMENT        = requirement(struct requirement)
 type STRING             = string(char)
+# A string vector encoded to a string outside the packet and field system.
+# Marking it this way is useful as documentation. The marking can also be
+# used in non vanilla generate_packets.py packet generators.
+type STRVEC             = STRING
 type TECH_LIST          = tech_list(int)
 type UNIT_LIST          = unit_list(int)
 type BUILDING_LIST      = building_list(int)
@@ -1245,7 +1249,7 @@
   BV_UNIT_CLASSES embarks;
   BV_UNIT_CLASSES disembarks;
 
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 
   BV_UTYPE_FLAGS flags;
   BV_UTYPE_ROLES roles;
@@ -1292,7 +1296,7 @@
   UINT8 reqs_count;
   REQUIREMENT reqs[MAX_NUM_REQS:reqs_count];
 
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_GOVERNMENT_RULER_TITLE = 143; sc, lsend
@@ -1310,7 +1314,7 @@
   UINT32 preset_cost, num_reqs;
   STRING name[MAX_LEN_NAME];
   STRING rule_name[MAX_LEN_NAME];
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
   STRING graphic_str[MAX_LEN_NAME];
   STRING graphic_alt[MAX_LEN_NAME];
 end
@@ -1331,7 +1335,7 @@
   STRING rule_name[MAX_LEN_NAME];
   STRING graphic_str[MAX_LEN_NAME];
   STRING graphic_alt[MAX_LEN_NAME];
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_TERRAIN_CONTROL = 146; sc, lsend
@@ -1435,7 +1439,7 @@
   BV_IMPR_FLAGS flags;
   STRING soundtag[MAX_LEN_NAME];
   STRING soundtag_alt[MAX_LEN_NAME];
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_TERRAIN = 151; sc, lsend
@@ -1478,7 +1482,7 @@
   UINT8 color_green;
   UINT8 color_blue;
 
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_TERRAIN_FLAG = 231; sc, lsend
@@ -1519,7 +1523,7 @@
   SINT8 vision_invis_sq;
   BV_BASE_FLAGS flags;
   BV_BASES conflicts;
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_ROAD = 220; sc, lsend
@@ -1545,7 +1549,7 @@
   BV_UNIT_CLASSES native_to;
   BV_ROADS hidden_by;
   BV_ROAD_FLAGS flags;
-  STRING helptext[MAX_LEN_PACKET];
+  STRVEC helptext[MAX_LEN_PACKET];
 end
 
 PACKET_RULESET_DISASTER = 224; sc, lsend


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

Reply via email to