version 1.24 | | version 1.25 |
---|
| | |
/* | | /* |
* static char *rcsid_init_c = | | * static char *rcsid_init_c = |
* "$Id: init.c,v 1.24 2002/07/15 04:25:40 mwedel Exp $"; | | * "$Id: init.c,v 1.25 2002/09/07 22:08:07 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
void set_dumpmont(char *name) {settings.dumpvalues=10; settings.dumparg=name; } | | void set_dumpmont(char *name) {settings.dumpvalues=10; settings.dumparg=name; } |
void set_daemon() {settings.daemonmode=1; } | | void set_daemon() {settings.daemonmode=1; } |
void set_datadir(char *path) { settings.datadir=path; } | | void set_datadir(char *path) { settings.datadir=path; } |
| | void set_confdir(char *path) { settings.confdir=path; } |
void set_localdir(char *path) { settings.localdir=path; } | | void set_localdir(char *path) { settings.localdir=path; } |
void set_mapdir(char *path) { settings.mapdir=path; } | | void set_mapdir(char *path) { settings.mapdir=path; } |
void set_archetypes(char *path) { settings.archetypes=path; } | | void set_archetypes(char *path) { settings.archetypes=path; } |
| | |
{"-mon", 0, 1, set_mondebug}, | | {"-mon", 0, 1, set_mondebug}, |
#ifndef SECURE | | #ifndef SECURE |
{"-data",1,1, set_datadir}, | | {"-data",1,1, set_datadir}, |
| | {"-conf",1,1, set_confdir}, |
{"-local",1,1, set_localdir}, | | {"-local",1,1, set_localdir}, |
{"-maps", 1, 1, set_mapdir}, | | {"-maps", 1, 1, set_mapdir}, |
{"-arch", 1, 1, set_archetypes}, | | {"-arch", 1, 1, set_archetypes}, |
| | |
int has_val,comp; | | int has_val,comp; |
FILE *fp; | | FILE *fp; |
| | |
sprintf(buf,"%s/settings",settings.datadir); | | sprintf(buf,"%s/settings",settings.confdir); |
/* We don't require a settings file at current time, but down the road, | | /* We don't require a settings file at current time, but down the road, |
* there will probably be so many values that not having a settings file | | * there will probably be so many values that not having a settings file |
* will not be a good thing. | | * will not be a good thing. |
| | |
int comp; | | int comp; |
| | |
#ifdef SHUTDOWN_FILE | | #ifdef SHUTDOWN_FILE |
sprintf(buf,"%s/%s",settings.datadir,SHUTDOWN_FILE); | | sprintf(buf,"%s/%s",settings.confdir,SHUTDOWN_FILE); |
if ((fp = open_and_uncompress(buf, 0, &comp)) != NULL) { | | if ((fp = open_and_uncompress(buf, 0, &comp)) != NULL) { |
while (fgets(buf, MAX_BUF-1, fp) != NULL) | | while (fgets(buf, MAX_BUF-1, fp) != NULL) |
printf("%s", buf); | | printf("%s", buf); |
| | |
printf("Datadir:\t\t%s\n",settings.datadir); | | printf("Datadir:\t\t%s\n",settings.datadir); |
printf("Localdir:\t\t%s\n",settings.localdir); | | printf("Localdir:\t\t%s\n",settings.localdir); |
#ifdef PERM_FILE | | #ifdef PERM_FILE |
printf("Perm file:\t<LIB>/%s\n",PERM_FILE); | | printf("Perm file:\t<ETC>/%s\n",PERM_FILE); |
#endif | | #endif |
#ifdef SHUTDOWN_FILE | | #ifdef SHUTDOWN_FILE |
printf("Shutdown file:\t<LIB>/%s\n",SHUTDOWN_FILE); | | printf("Shutdown file:\t<ETC>/%s\n",SHUTDOWN_FILE); |
#endif | | #endif |
printf("Save player:\t<true>\n"); | | printf("Save player:\t<true>\n"); |
printf("Save mode:\t%4.4o\n",SAVE_MODE); | | printf("Save mode:\t%4.4o\n",SAVE_MODE); |
printf("Playerdir:\t<LIB>/%s\n",settings.playerdir); | | printf("Playerdir:\t<VAR>/%s\n",settings.playerdir); |
printf("Itemsdir:\t<LIB>/%s\n", settings.uniquedir); | | printf("Itemsdir:\t<VAR>/%s\n", settings.uniquedir); |
#ifdef USE_CHECKSUM | | #ifdef USE_CHECKSUM |
printf("Use checksum:\t<true>\n"); | | printf("Use checksum:\t<true>\n"); |
#else | | #else |