From 44f6656e2f721e0bd54e09f0d8f3d236309cd77c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 17 Feb 2008 08:47:51 +0100 Subject: [PATCH] Remove unused check_cost() --- include/prototypes.h | 1 - src/lib/subs/chkmoney.c | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/include/prototypes.h b/include/prototypes.h index 5b8ea6959..080bebcca 100644 --- a/include/prototypes.h +++ b/include/prototypes.h @@ -419,7 +419,6 @@ extern int check_loan_ok(struct lonstr *); extern int check_trade_ok(struct trdstr *); /* chkmoney.c */ extern int chkmoney(long, long, char *); -extern int check_cost(int, int, long, int *, char *); /* coastal.c */ extern void set_coastal(struct sctstr *, int, int); /* control.c */ diff --git a/src/lib/subs/chkmoney.c b/src/lib/subs/chkmoney.c index 0896edd59..b25c71dd6 100644 --- a/src/lib/subs/chkmoney.c +++ b/src/lib/subs/chkmoney.c @@ -54,28 +54,3 @@ chkmoney(long cost, long cash, char *argp) } return 0; } - -int -check_cost(int looping, int cost, long cash, int *warnedp, - char *argp) -{ - char buf[1024]; - char *p; - - if (looping && cash > 0 && player->dolcost + cost > cash - && *warnedp < 2) { - *warnedp = 2; - pr("You will go broke! (it will cost $%d and you only have $%ld)\n", cost, cash - (long)player->dolcost); - p = getstarg(argp, "Are you sure you wish to continue? ", buf); - if (p == 0 || *p != 'y') - return 1; - } - player->dolcost += cost; - if (looping && cash > 0 && player->dolcost > cash / 2 && *warnedp < 1) { - *warnedp = 1; - pr("WARNING. You have just spent over half of your money.\n"); - pr("You started with $%ld and now you only have $%ld left\n", - cash, cash - (long)player->dolcost); - } - return 0; -} -- 2.43.0