From 898c74a80f16422af93431313210ff2e80a3c7ba Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 30 Apr 2006 18:20:23 +0000 Subject: [PATCH] (get_couval, get_outstand): Remove. Unused since automatic loans were removed (buy.c rev. 1.18, trad.c rev. 1.15), should have been removed then. --- include/loan.h | 1 - include/trade.h | 1 - src/lib/subs/trdsub.c | 38 -------------------------------------- 3 files changed, 40 deletions(-) diff --git a/include/loan.h b/include/loan.h index 48447c19..79f2df5e 100644 --- a/include/loan.h +++ b/include/loan.h @@ -56,7 +56,6 @@ struct lonstr { #define LS_PROPOSED AGREE_PROPOSED #define LS_SIGNED AGREE_SIGNED -extern long get_outstand(int); extern double loan_owed(struct lonstr *loan, time_t paytime); #define getloan(n, p) ef_read(EF_LOAN, (n), (p)) diff --git a/include/trade.h b/include/trade.h index 63e8d272..1fb0e5a1 100644 --- a/include/trade.h +++ b/include/trade.h @@ -69,7 +69,6 @@ extern int trade_check_item_ok(union trdgenstr *); extern char *trade_nameof(struct trdstr *, union trdgenstr *); extern int trade_desc(struct trdstr *, union trdgenstr *); extern int trade_getitem(struct trdstr *, union trdgenstr *); -extern long get_couval(int); #define gettrade(n, p) ef_read(EF_TRADE, (n), (p)) #define puttrade(n, p) ef_write(EF_TRADE, (n), (p)) diff --git a/src/lib/subs/trdsub.c b/src/lib/subs/trdsub.c index 55aede7c..15d39203 100644 --- a/src/lib/subs/trdsub.c +++ b/src/lib/subs/trdsub.c @@ -240,44 +240,6 @@ trade_getitem(struct trdstr *tp, union trdgenstr *tgp) return 1; } -long -get_couval(int cnum) -{ - struct sctstr *sp; - int j, k, val; - long secttot = 0; - - for (j = 0; NULL != (sp = getsectid(j)); j++) { - if (sp->sct_own != cnum) - continue; - secttot += (long)(dchr[sp->sct_type].d_value * - ((float)sp->sct_effic + 100.0)); - for (k = 0; ichr[k].i_name; k++) { - if (ichr[k].i_value == 0 || ichr[k].i_uid == I_NONE) - continue; - val = sp->sct_item[ichr[k].i_uid]; - secttot += val * ichr[k].i_value; - } - } - return secttot; -} - -long -get_outstand(int cnum) -{ - struct lonstr loan; - int j; - long loantot = 0; - - for (j = 0; getloan(j, &loan); j++) { - if (loan.l_status == LS_FREE) - continue; - if (loan.l_lonee == cnum) - loantot += loan.l_amtdue; - } - return loantot; -} - /* * Return amount due for LOAN at time PAYTIME. */