Clean up dead code in orde()
Does not change optimized code (gcc -O) apart from __LINE__.
This commit is contained in:
parent
eea24fb017
commit
ae6ad76516
1 changed files with 12 additions and 24 deletions
|
@ -59,7 +59,6 @@
|
||||||
int
|
int
|
||||||
orde(void)
|
orde(void)
|
||||||
{
|
{
|
||||||
int diffeachship = 0;
|
|
||||||
int sub, level;
|
int sub, level;
|
||||||
int scuttling = 0;
|
int scuttling = 0;
|
||||||
struct nstr_item nb;
|
struct nstr_item nb;
|
||||||
|
@ -80,7 +79,6 @@ orde(void)
|
||||||
continue;
|
continue;
|
||||||
if (opt_SAIL) {
|
if (opt_SAIL) {
|
||||||
if (*ship.shp_path) {
|
if (*ship.shp_path) {
|
||||||
if (!diffeachship)
|
|
||||||
pr("Ship #%d has a \"sail\" path!\n", ship.shp_uid);
|
pr("Ship #%d has a \"sail\" path!\n", ship.shp_uid);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -90,14 +88,8 @@ orde(void)
|
||||||
"Ship #%d, declare, cancel, suspend, resume, level? ",
|
"Ship #%d, declare, cancel, suspend, resume, level? ",
|
||||||
ship.shp_uid);
|
ship.shp_uid);
|
||||||
p = getstarg(player->argp[2], prompt, buf);
|
p = getstarg(player->argp[2], prompt, buf);
|
||||||
if (player->aborted || !p)
|
if (player->aborted || !p || !*p)
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
if (!*p) {
|
|
||||||
if (!diffeachship)
|
|
||||||
return RET_FAIL;
|
|
||||||
else
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
default:
|
default:
|
||||||
pr("Bad order type!\n");
|
pr("Bad order type!\n");
|
||||||
|
@ -206,13 +198,11 @@ orde(void)
|
||||||
i1 = whatitem(player->argp[5], "Commodity? ");
|
i1 = whatitem(player->argp[5], "Commodity? ");
|
||||||
if (!i1)
|
if (!i1)
|
||||||
break;
|
break;
|
||||||
else {
|
|
||||||
p1 = getstarg(player->argp[6], "Amount? ",
|
p1 = getstarg(player->argp[6], "Amount? ",
|
||||||
buf);
|
buf);
|
||||||
if (!p1)
|
if (!p1)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
level = atoi(p1);
|
level = atoi(p1);
|
||||||
}
|
|
||||||
if (level < 0) {
|
if (level < 0) {
|
||||||
level = 0; /* prevent negatives. */
|
level = 0; /* prevent negatives. */
|
||||||
pr("You must use positive number! Level set to 0.\n");
|
pr("You must use positive number! Level set to 0.\n");
|
||||||
|
@ -226,13 +216,11 @@ orde(void)
|
||||||
i1 = whatitem(player->argp[5], "Commodity? ");
|
i1 = whatitem(player->argp[5], "Commodity? ");
|
||||||
if (!i1)
|
if (!i1)
|
||||||
break;
|
break;
|
||||||
else {
|
|
||||||
p1 = getstarg(player->argp[6], "Amount? ",
|
p1 = getstarg(player->argp[6], "Amount? ",
|
||||||
buf);
|
buf);
|
||||||
if (!p1)
|
if (!p1)
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
level = atoi(p1);
|
level = atoi(p1);
|
||||||
}
|
|
||||||
if (level < 0) {
|
if (level < 0) {
|
||||||
level = 0;
|
level = 0;
|
||||||
pr("You must use positive number! Level set to 0.\n");
|
pr("You must use positive number! Level set to 0.\n");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue