]> git.pond.sub.org Git - empserver/commitdiff
update: Give a few helpers internal linkage
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 7 Jan 2021 06:10:53 +0000 (07:10 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Jan 2021 20:24:29 +0000 (21:24 +0100)
External use of prod_materials_cost(), prod_resource_limit() went away
in commit 4a714a37d "production: Use update code instead of
duplicating it", v4.4.0.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/update.h
src/lib/update/produce.c

index 5797b6c7d48185baa89dfa97755f536421d0289f..8138ad769ca67abbd239106efb8bcbcf6f9f26b4 100644 (file)
@@ -140,8 +140,6 @@ extern void pay_reserve(struct natstr *, int);
 /* produce.c */
 extern void produce(struct natstr *, struct sctstr *);
 extern double prod_output(struct sctstr *, double);
-extern double prod_materials_cost(struct pchrstr *, short[], int *);
-extern double prod_resource_limit(struct pchrstr *, unsigned char *);
 extern double prod_eff(int, float);
 /* removewants.c */
 extern int update_removewants(void);
index 3d7a45a93d20be2ca80af9774a810304fb5234e0..1ee5c2a7073d4d9e383bc8720edbc11ace9eec43 100644 (file)
@@ -27,7 +27,7 @@
  *  produce.c: Produce goodies
  *
  *  Known contributors to this file:
- *     Markus Armbruster, 2004-2016
+ *     Markus Armbruster, 2004-2021
  */
 
 #include <config.h>
@@ -41,7 +41,9 @@
 #include "prototypes.h"
 #include "update.h"
 
+static double prod_materials_cost(struct pchrstr *, short[], int *);
 static void materials_charge(struct pchrstr *, short *, double);
+static double prod_resource_limit(struct pchrstr *, unsigned char *);
 
 static char *levelnames[] = {
     "Technology", "Research", "Education", "Happiness"
@@ -184,7 +186,7 @@ prod_output(struct sctstr *sp, double prodeff)
  * Return how much of product @pp can be made from materials @vec[].
  * Store amount of work per unit in *@costp.
  */
-double
+static double
 prod_materials_cost(struct pchrstr *pp, short vec[], int *costp)
 {
     double count, n;
@@ -230,7 +232,7 @@ materials_charge(struct pchrstr *pp, short *vec, double count)
  * Return how much of product @pp can be made from its resource.
  * If @pp depletes a resource, @resource must point to its value.
  */
-double
+static double
 prod_resource_limit(struct pchrstr *pp, unsigned char *resource)
 {
     if (CANT_HAPPEN(pp->p_nrndx && !resource))