Author: cazfi
Date: Sun Feb 21 20:38:45 2016
New Revision: 32010

URL: http://svn.gna.org/viewcvs/freeciv?rev=32010&view=rev
Log:
Renamed variables named 'string' as 'str' in registry_ini.c

See patch #6984

Modified:
    branches/S2_6/utility/registry_ini.c
    branches/S2_6/utility/registry_ini.h

Modified: branches/S2_6/utility/registry_ini.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/registry_ini.c?rev=32010&r1=32009&r2=32010&view=diff
==============================================================================
--- branches/S2_6/utility/registry_ini.c        (original)
+++ branches/S2_6/utility/registry_ini.c        Sun Feb 21 20:38:45 2016
@@ -1183,7 +1183,7 @@
   Insert a string entry.
 **************************************************************************/
 struct entry *secfile_insert_str_full(struct section_file *secfile,
-                                      const char *string,
+                                      const char *str,
                                       const char *comment,
                                       bool allow_replace,
                                       bool no_escape,
@@ -1216,7 +1216,7 @@
     pentry = section_entry_by_name(psection, ent_name);
     if (NULL != pentry) {
       if (ENTRY_STR == entry_type(pentry)) {
-        if (!entry_str_set(pentry, string)) {
+        if (!entry_str_set(pentry, str)) {
           return NULL;
         }
       } else {
@@ -1227,7 +1227,7 @@
   }
 
   if (NULL == pentry) {
-    pentry = section_entry_str_new(psection, ent_name, string, !no_escape);
+    pentry = section_entry_str_new(psection, ent_name, str, !no_escape);
   }
 
   if (NULL != pentry && NULL != comment) {
@@ -1321,7 +1321,7 @@
                                              const char *path, ...)
 {
   char fullpath[MAX_LEN_SECPATH];
-  const char *string;
+  const char *str;
   const char *ent_name;
   struct section *psection;
   struct entry *pentry = NULL;
@@ -1329,8 +1329,8 @@
 
   SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != secfile, NULL);
   SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != name_fn, NULL);
-  string = name_fn(enumerator);
-  SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != string, NULL);
+  str = name_fn(enumerator);
+  SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != str, NULL);
 
   va_start(args, path);
   fc_vsnprintf(fullpath, sizeof(fullpath), path, args);
@@ -1345,7 +1345,7 @@
     pentry = section_entry_by_name(psection, ent_name);
     if (NULL != pentry) {
       if (ENTRY_STR == entry_type(pentry)) {
-        if (!entry_str_set(pentry, string)) {
+        if (!entry_str_set(pentry, str)) {
           return NULL;
         }
       } else {
@@ -1356,7 +1356,7 @@
   }
 
   if (NULL == pentry) {
-    pentry = section_entry_str_new(psection, ent_name, string, TRUE);
+    pentry = section_entry_str_new(psection, ent_name, str, TRUE);
   }
 
   if (NULL != pentry && NULL != comment) {
@@ -1426,7 +1426,7 @@
                                                bool allow_replace,
                                                const char *path, ...)
 {
-  char fullpath[MAX_LEN_SECPATH], string[MAX_LEN_SECPATH];
+  char fullpath[MAX_LEN_SECPATH], str[MAX_LEN_SECPATH];
   const char *ent_name;
   struct section *psection;
   struct entry *pentry = NULL;
@@ -1440,14 +1440,14 @@
   SECFILE_RETURN_VAL_IF_FAIL(secfile, NULL, NULL != next_fn, NULL);
 
   /* Compute a string containing all the values separated by '|'. */
-  string[0] = '\0';     /* Insert at least an empty string. */
+  str[0] = '\0';     /* Insert at least an empty string. */
   if (0 != bitwise_val) {
     for (i = begin_fn(); i != end_fn(); i = next_fn(i)) {
       if (i & bitwise_val) {
-        if ('\0' == string[0]) {
-          sz_strlcpy(string, name_fn(i));
+        if ('\0' == str[0]) {
+          sz_strlcpy(str, name_fn(i));
         } else {
-          cat_snprintf(string, sizeof(string), "|%s", name_fn(i));
+          cat_snprintf(str, sizeof(str), "|%s", name_fn(i));
         }
       }
     }
@@ -1466,7 +1466,7 @@
     pentry = section_entry_by_name(psection, ent_name);
     if (NULL != pentry) {
       if (ENTRY_STR == entry_type(pentry)) {
-        if (!entry_str_set(pentry, string)) {
+        if (!entry_str_set(pentry, str)) {
           return NULL;
         }
       } else {
@@ -1477,7 +1477,7 @@
   }
 
   if (NULL == pentry) {
-    pentry = section_entry_str_new(psection, ent_name, string, TRUE);
+    pentry = section_entry_str_new(psection, ent_name, str, TRUE);
   }
 
   if (NULL != pentry && NULL != comment) {
@@ -1551,7 +1551,7 @@
                                             bool allow_replace,
                                             const char *path, ...)
 {
-  char fullpath[MAX_LEN_SECPATH], string[MAX_LEN_SECPATH];
+  char fullpath[MAX_LEN_SECPATH], str[MAX_LEN_SECPATH];
   const char *ent_name, *val_name;
   struct section *psection;
   struct entry *pentry = NULL;
@@ -1563,14 +1563,14 @@
 
   if (bitwise) {
     /* Compute a string containing all the values separated by '|'. */
-    string[0] = '\0';     /* Insert at least an empty string. */
+    str[0] = '\0';     /* Insert at least an empty string. */
     if (0 != value) {
       for (i = 0; (val_name = name_fn(data, i)); i++) {
         if ((1 << i) & value) {
-          if ('\0' == string[0]) {
-            sz_strlcpy(string, val_name);
+          if ('\0' == str[0]) {
+            sz_strlcpy(str, val_name);
           } else {
-            cat_snprintf(string, sizeof(string), "|%s", val_name);
+            cat_snprintf(str, sizeof(str), "|%s", val_name);
           }
         }
       }
@@ -1580,7 +1580,7 @@
       SECFILE_LOG(secfile, NULL, "Value %d not supported.", value);
       return NULL;
     }
-    sz_strlcpy(string, val_name);
+    sz_strlcpy(str, val_name);
   }
 
   va_start(args, path);
@@ -1596,7 +1596,7 @@
     pentry = section_entry_by_name(psection, ent_name);
     if (NULL != pentry) {
       if (ENTRY_STR == entry_type(pentry)) {
-        if (!entry_str_set(pentry, string)) {
+        if (!entry_str_set(pentry, str)) {
           return NULL;
         }
       } else {
@@ -1607,7 +1607,7 @@
   }
 
   if (NULL == pentry) {
-    pentry = section_entry_str_new(psection, ent_name, string, TRUE);
+    pentry = section_entry_str_new(psection, ent_name, str, TRUE);
   }
 
   if (NULL != pentry && NULL != comment) {

Modified: branches/S2_6/utility/registry_ini.h
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/registry_ini.h?rev=32010&r1=32009&r2=32010&view=diff
==============================================================================
--- branches/S2_6/utility/registry_ini.h        (original)
+++ branches/S2_6/utility/registry_ini.h        Sun Feb 21 20:38:45 2016
@@ -156,7 +156,7 @@
                                        const char *filename);
 
 struct entry *secfile_insert_str_full(struct section_file *secfile,
-                                      const char *string,
+                                      const char *str,
                                       const char *comment,
                                       bool allow_replace, bool no_escape,
                                       bool include,


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

Reply via email to