Author: cazfi
Date: Tue Jun 28 07:55:02 2016
New Revision: 33076

URL: http://svn.gna.org/viewcvs/freeciv?rev=33076&view=rev
Log:
Removed resource name functions.

See patch #7328

Modified:
    trunk/common/terrain.c
    trunk/common/terrain.h
    trunk/server/ruleset.c

Modified: trunk/common/terrain.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/terrain.c?rev=33076&r1=33075&r2=33076&view=diff
==============================================================================
--- trunk/common/terrain.c      (original)
+++ trunk/common/terrain.c      Tue Jun 28 07:55:02 2016
@@ -358,40 +358,6 @@
     return NULL;
   }
   return civ_resources[type];
-}
-
-/****************************************************************************
-  Return the resource type matching the name, or NULL when none matches.
-****************************************************************************/
-struct extra_type *resource_by_rule_name(const char *name)
-{
-  const char *qname = Qn_(name);
-
-  resource_type_iterate(presource) {
-    if (0 == fc_strcasecmp(extra_rule_name(presource), qname)) {
-      return presource;
-    }
-  } resource_type_iterate_end;
-
-  return NULL;
-}
-
-/****************************************************************************
-  Return the (translated) name of the resource.
-  You don't have to free the return pointer.
-****************************************************************************/
-const char *resource_name_translation(const struct resource_type *presource)
-{
-  return name_translation_get(&(resource_extra_get(presource)->name));
-}
-
-/**************************************************************************
-  Return the (untranslated) rule name of the resource.
-  You don't have to free the return pointer.
-**************************************************************************/
-const char *resource_rule_name(const struct resource_type *presource)
-{
-  return rule_name_get(&(resource_extra_get(presource)->name));
 }
 
 /****************************************************************************

Modified: trunk/common/terrain.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/terrain.h?rev=33076&r1=33075&r2=33076&view=diff
==============================================================================
--- trunk/common/terrain.h      (original)
+++ trunk/common/terrain.h      Tue Jun 28 07:55:02 2016
@@ -313,10 +313,6 @@
 Resource_type_id resource_number(const struct extra_type *presource);
 
 struct extra_type *resource_by_number(const Resource_type_id id);
-struct extra_type *resource_by_rule_name(const char *name);
-
-const char *resource_rule_name(const struct resource_type *presource);
-const char *resource_name_translation(const struct resource_type *presource);
 
 /* Special helper functions */
 const char *get_infrastructure_text(bv_extras extras);

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=33076&r1=33075&r2=33076&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Tue Jun 28 07:55:02 2016
@@ -857,7 +857,7 @@
 {
   struct extra_type *pres;
 
-  pres = resource_by_rule_name(name);
+  pres = extra_type_by_rule_name(name);
 
   if (pres == NULL) {
     ruleset_error(LOG_ERROR,


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

Reply via email to