Author: cazfi
Date: Tue Mar  1 03:10:44 2016
New Revision: 32139

URL: http://svn.gna.org/viewcvs/freeciv?rev=32139&view=rev
Log:
Added deprecation warnings about "prefered" entries

See patch #7016

Modified:
    trunk/client/tilespec.c
    trunk/server/ruleset.c

Modified: trunk/client/tilespec.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/tilespec.c?rev=32139&r1=32138&r2=32139&view=diff
==============================================================================
--- trunk/client/tilespec.c     (original)
+++ trunk/client/tilespec.c     Tue Mar  1 03:10:44 2016
@@ -1,4 +1,4 @@
-/********************************************************************** 
+/**********************************************************************
  Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@
 #include "astring.h"
 #include "bitvector.h"
 #include "capability.h"
+#include "deprecations.h"
 #include "fcintl.h"
 #include "log.h"
 #include "mem.h"
@@ -2229,6 +2230,10 @@
     t->preferred_themes =
       (char **) secfile_lookup_str_vec(file, &num_preferred_themes,
                                        "tilespec.prefered_themes");
+    if (num_preferred_themes > 0) {
+      log_deprecation("Entry tilespec.prefered_themes in tilespec."
+                      " Use correct spelling tilespec.preferred_themes 
instead");
+    }
   }
   t->num_preferred_themes = num_preferred_themes;
   for (i = 0; i < t->num_preferred_themes; i++) {

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=32139&r1=32138&r2=32139&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Tue Mar  1 03:10:44 2016
@@ -5287,6 +5287,10 @@
 
   /* section: tileset */
   pref_text = secfile_lookup_str_default(file, "", "tileset.prefered");
+  if (pref_text != NULL) {
+    log_deprecation("Entry tileset.prefered in game.ruleset."
+                    " Use correct spelling tileset.preferred instead");
+  }
   pref_text = secfile_lookup_str_default(file, pref_text, "tileset.preferred");
   if (pref_text[0] != '\0') {
     /* There was tileset suggestion */
@@ -5298,6 +5302,10 @@
 
   /* section: soundset */
   pref_text = secfile_lookup_str_default(file, "", "soundset.prefered");
+  if (pref_text != NULL) {
+    log_deprecation("Entry soundset.prefered in game.ruleset."
+                    " Use correct spelling soundset.preferred instead");
+  }
   pref_text = secfile_lookup_str_default(file, pref_text, 
"soundset.preferred");
   if (pref_text[0] != '\0') {
     /* There was soundset suggestion */
@@ -5309,6 +5317,10 @@
 
   /* section: musicset */
   pref_text = secfile_lookup_str_default(file, "", "musicset.prefered");
+  if (pref_text != NULL) {
+    log_deprecation("Entry musicset.prefered in game.ruleset."
+                    " Use correct spelling musicset.preferred instead");
+  }
   pref_text = secfile_lookup_str_default(file, pref_text, 
"musicset.preferred");
   if (pref_text[0] != '\0') {
     /* There was musicset suggestion */


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

Reply via email to