From: Markus Armbruster Date: Thu, 7 Jan 2021 06:10:53 +0000 (+0100) Subject: update: Give a few helpers internal linkage X-Git-Tag: v4.4.1~28 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=992ab36b592485d9f60b8936f73819927cd5edfa update: Give a few helpers internal linkage 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 --- diff --git a/include/update.h b/include/update.h index 5797b6c7d..8138ad769 100644 --- a/include/update.h +++ b/include/update.h @@ -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); diff --git a/src/lib/update/produce.c b/src/lib/update/produce.c index 3d7a45a93..1ee5c2a70 100644 --- a/src/lib/update/produce.c +++ b/src/lib/update/produce.c @@ -27,7 +27,7 @@ * produce.c: Produce goodies * * Known contributors to this file: - * Markus Armbruster, 2004-2016 + * Markus Armbruster, 2004-2021 */ #include @@ -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))