SYSCF for VMS (trunk only)
Enable SYSCF_FILE for VMS, and simplify option initialization in the process. I still need to put a template into the playground directory during initial install, and the one in sys/unix/ probably isn't appropriate.
This commit is contained in:
@@ -43,12 +43,17 @@
|
|||||||
# define WIZARD 1
|
# define WIZARD 1
|
||||||
# define WIZARD_NAME Local_WIZARD
|
# define WIZARD_NAME Local_WIZARD
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef SYSCF
|
||||||
|
# define SYSCF
|
||||||
|
#endif
|
||||||
|
|
||||||
/* filenames require punctuation to avoid redirection via logical names */
|
/* filenames require punctuation to avoid redirection via logical names */
|
||||||
#undef RECORD
|
#undef RECORD
|
||||||
#define RECORD "record;1" /* scoreboard file (retains high scores) */
|
#define RECORD "record;1" /* scoreboard file (retains high scores) */
|
||||||
#undef LOGFILE
|
#undef LOGFILE
|
||||||
#define LOGFILE "logfile;0" /* optional file (records all games) */
|
#define LOGFILE "logfile;0" /* optional file (records all games) */
|
||||||
|
#undef SYSCF_FILE
|
||||||
|
#define SYSCF_FILE "sysconf;0"
|
||||||
|
|
||||||
#define HLOCK "perm;1" /* an empty file used for locking purposes */
|
#define HLOCK "perm;1" /* an empty file used for locking purposes */
|
||||||
|
|
||||||
|
|||||||
+7
-4
@@ -561,12 +561,17 @@ const char *ev;
|
|||||||
return (char *)0;
|
return (char *)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Split initoptions into 2 parts for SYSCF but don't break anything not
|
/* process options, possibly including SYSCF */
|
||||||
* using SYSCF. */
|
|
||||||
void
|
void
|
||||||
initoptions()
|
initoptions()
|
||||||
{
|
{
|
||||||
initoptions_init();
|
initoptions_init();
|
||||||
|
#ifdef SYSCF
|
||||||
|
/* someday there may be other SYSCF alternatives besides text file */
|
||||||
|
# ifdef SYSCF_FILE
|
||||||
|
read_config_file(SYSCF_FILE, SET_IN_SYS);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
initoptions_finish();
|
initoptions_finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -660,9 +665,7 @@ initoptions_init()
|
|||||||
if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) {
|
if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) {
|
||||||
#ifdef LOADSYMSETS
|
#ifdef LOADSYMSETS
|
||||||
if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY);
|
if (!symset[PRIMARY].name) load_symset("IBMGraphics", PRIMARY);
|
||||||
|
|
||||||
if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET);
|
if (!symset[ROGUESET].name) load_symset("RogueIBM", ROGUESET);
|
||||||
|
|
||||||
switch_symbols(TRUE);
|
switch_symbols(TRUE);
|
||||||
#endif
|
#endif
|
||||||
# ifdef TEXTCOLOR
|
# ifdef TEXTCOLOR
|
||||||
|
|||||||
+2
-8
@@ -136,9 +136,7 @@ char *argv[];
|
|||||||
chdirx(dir,0);
|
chdirx(dir,0);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SYSCF
|
#ifdef SYSCF
|
||||||
initoptions_init();
|
initoptions();
|
||||||
read_config_file(SYSCF_FILE, SET_IN_SYS);
|
|
||||||
initoptions_finish();
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef PANICTRACE
|
#ifdef PANICTRACE
|
||||||
ARGV0 = argv[0]; /* save for possible stack trace */
|
ARGV0 = argv[0]; /* save for possible stack trace */
|
||||||
@@ -165,11 +163,7 @@ char *argv[];
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
check_linux_console();
|
check_linux_console();
|
||||||
#endif
|
#endif
|
||||||
initoptions_init();
|
initoptions();
|
||||||
#ifdef SYSCF
|
|
||||||
read_config_file(SYSCF_FILE, SET_IN_SYS);
|
|
||||||
#endif
|
|
||||||
initoptions_finish();
|
|
||||||
#ifdef PANICTRACE
|
#ifdef PANICTRACE
|
||||||
ARGV0 = argv[0]; /* save for possible stack trace */
|
ARGV0 = argv[0]; /* save for possible stack trace */
|
||||||
# ifndef NO_SIGNAL
|
# ifndef NO_SIGNAL
|
||||||
|
|||||||
@@ -91,6 +91,9 @@ char *argv[];
|
|||||||
if (!strncmp(argv[1], "-s", 2)) {
|
if (!strncmp(argv[1], "-s", 2)) {
|
||||||
#ifdef CHDIR
|
#ifdef CHDIR
|
||||||
chdirx(dir, FALSE);
|
chdirx(dir, FALSE);
|
||||||
|
#endif
|
||||||
|
#ifdef SYSCF
|
||||||
|
initoptions();
|
||||||
#endif
|
#endif
|
||||||
prscore(argc, argv);
|
prscore(argc, argv);
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user