(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.
This commit is contained in:
Markus Armbruster 2006-04-30 18:20:23 +00:00
parent abc14df544
commit 898c74a80f
3 changed files with 0 additions and 40 deletions

View file

@ -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))

View file

@ -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))

View file

@ -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.
*/