Declare all configuration parameters in optlist.h. Remove some
redundant declarations elsewhere.
This commit is contained in:
parent
6b67276f4f
commit
966eb40899
13 changed files with 65 additions and 58 deletions
|
@ -34,11 +34,11 @@
|
|||
#include <fcntl.h>
|
||||
#include "misc.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
|
||||
int
|
||||
disa(void)
|
||||
{
|
||||
extern s_char *disablefil;
|
||||
int fd;
|
||||
|
||||
if ((fd = open(disablefil, O_RDWR | O_CREAT | O_TRUNC, 0660)) < 0)
|
||||
|
|
|
@ -35,12 +35,11 @@
|
|||
#include <fcntl.h>
|
||||
#include "misc.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
|
||||
int
|
||||
enab(void)
|
||||
{
|
||||
extern s_char *disablefil;
|
||||
|
||||
(void)unlink(disablefil);
|
||||
pr("Updates are enabled\n");
|
||||
return RET_OK;
|
||||
|
|
|
@ -55,7 +55,6 @@ mobupdate(void)
|
|||
extern int updating_mob;
|
||||
struct mob_acc_globals timestamps;
|
||||
long now;
|
||||
extern s_char *timestampfil;
|
||||
|
||||
if (!opt_MOB_ACCESS) {
|
||||
pr("Command invalid - MOB_ACCESS is not enabled.\n");
|
||||
|
|
|
@ -35,14 +35,13 @@
|
|||
#include "player.h"
|
||||
#include "tel.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
int
|
||||
turn(void)
|
||||
{
|
||||
extern s_char *upfil;
|
||||
extern s_char *downfil;
|
||||
int fd;
|
||||
struct telstr tgm;
|
||||
register s_char *p;
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
#include "player.h"
|
||||
#include "commands.h"
|
||||
#include "optlist.h"
|
||||
|
||||
#include "keyword.h"
|
||||
#include "wantupd.h"
|
||||
|
||||
|
@ -51,7 +50,6 @@ upda(void)
|
|||
FILE *fp;
|
||||
struct mob_acc_globals timestamps;
|
||||
extern int updating_mob;
|
||||
extern s_char *timestampfil;
|
||||
|
||||
if (opt_MOB_ACCESS) {
|
||||
#if !defined(_WIN32)
|
||||
|
|
|
@ -374,7 +374,6 @@ next_update_check_time(time_t * now, time_t * tim, time_t * delta)
|
|||
int
|
||||
updates_disabled(void)
|
||||
{
|
||||
extern s_char *disablefil;
|
||||
int fd;
|
||||
|
||||
if ((fd = open(disablefil, O_RDONLY, 0)) < 0)
|
||||
|
|
|
@ -286,9 +286,9 @@ int opt_NUKEFAILDETONATE = 0;
|
|||
#endif
|
||||
|
||||
#ifdef SHIPNAMES
|
||||
int opt_SHIPNAMES = 1; /* not used currently */
|
||||
int opt_SHIPNAMES = 1;
|
||||
#else
|
||||
int opt_SHIPNAMES = 0; /* not used currently */
|
||||
int opt_SHIPNAMES = 0;
|
||||
#endif
|
||||
|
||||
#ifdef NEUTRON
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "empio.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
|
@ -154,7 +155,6 @@ explain(void)
|
|||
int
|
||||
gamedown(void)
|
||||
{
|
||||
extern s_char *downfil;
|
||||
int downf;
|
||||
struct telstr tgm;
|
||||
s_char buf[1024];
|
||||
|
|
|
@ -209,7 +209,6 @@ pass_cmd(void)
|
|||
static int
|
||||
play_cmd(void)
|
||||
{
|
||||
extern char *banfil;
|
||||
struct player *other;
|
||||
natid cnum;
|
||||
struct natstr *natp;
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
#include "gen.h"
|
||||
#include "subs.h"
|
||||
#include "common.h"
|
||||
#include "optlist.h"
|
||||
|
||||
#if !defined(_WIN32)
|
||||
#include <unistd.h>
|
||||
|
@ -65,7 +66,6 @@ extern int m_m_p_d;
|
|||
void
|
||||
player_main(struct player *p)
|
||||
{
|
||||
extern s_char *authfil;
|
||||
struct natstr *natp;
|
||||
int hour[2];
|
||||
int secs;
|
||||
|
@ -347,7 +347,6 @@ execute(void)
|
|||
int
|
||||
show_motd(void)
|
||||
{
|
||||
extern s_char *upfil;
|
||||
int upf;
|
||||
struct telstr tgm;
|
||||
s_char buf[MAXTELSIZE];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue