home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
TOP
/
USR
/
SRC
/
larn.t.Z
/
larn.t
/
config.c
< prev
next >
Wrap
C/C++ Source or Header
|
1988-11-13
|
3KB
|
103 lines
/*
* config.c -- This defines the installation dependent variables.
* Some strings are modified later. ANSI C would
* allow compile time string concatenation, we must
* do runtime concatenation, in main.
*
* Larn is copyrighted 1986 by Noah Morgan.
*/
#include "header.h"
#ifndef LARNHOME
# ifndef OSK
#define LARNHOME "/usr/games/larn/" /* normally supplied by a Makefile */
# else OSK
# define LARNHOME "/h0/USR/GAMES/LIB/LARN/"
# endif OSK
#endif
#ifndef WIZID
#define WIZID 0
#endif
/*
* All these strings will be appended to in main() to be complete filenames
*/
# ifndef OSK
/* the game save filename */
char savefilename[SAVEFILENAMESIZE] = LARNHOME;
/* the score file */
char scorefile[sizeof(LARNHOME)+sizeof(SCORENAME)] = LARNHOME;
/* the logging file */
char logfile[sizeof(LARNHOME)+sizeof(LOGFNAME)] = LARNHOME;
/* the help text file */
char helpfile[sizeof(LARNHOME)+sizeof(HELPNAME)] = LARNHOME;
/* the maze data file */
char larnlevels[sizeof(LARNHOME)+sizeof(LEVELSNAME)] = LARNHOME;
/* the fortune data file */
char fortfile[sizeof(LARNHOME)+sizeof(FORTSNAME)] = LARNHOME;
/* the .larnopts filename */
char optsfile[128] ="/.larnopts"; /* the option file */
/* the player id datafile name */
char playerids[sizeof(LARNHOME)+sizeof(PLAYERIDS)] = LARNHOME;
/* the holiday datafile */
char holifile[sizeof(LARNHOME)+sizeof(HOLIFILE)] = LARNHOME;
# else OSK
char savefilename[200];
char scorefile[200];
char logfile[200];
char helpfile[200];
char larnlevels[200];
char fortfile[200];
char optsfile[200];
char playerids[200];
char holifile[200];
void
do_config ()
{
char larnhome[200];
if (info_str ("GAMES.LIB", larnhome, 160)) {
if (larnhome[strlen (larnhome) - 1] != '/')
strcat (larnhome, "/");
strcat (larnhome, "LARN/");
} else
strcpy (larnhome, LARNHOME);
strcpy (savefilename, larnhome);
strcpy (scorefile, larnhome);
strcpy (logfile, larnhome);
strcpy (helpfile, larnhome);
strcpy (larnlevels, larnhome);
strcpy (fortfile, larnhome);
strcpy (optsfile, "/.larnopts");
strcpy (playerids, larnhome);
strcpy (holifile, larnhome);
do_data ();
do_store ();
}
# endif OSK
char diagfile[] ="Diagfile"; /* the diagnostic filename */
char ckpfile[] ="Larn12.0.ckp"; /* the checkpoint filename */
# ifndef OSK
char *password ="pvnert(x)"; /* the wizards password <=32*/
# else OSK
char *password ="Orcus";
# endif OSK
#if WIZID == -1
int wisid=0; /* the user id of the only person who can be wizard */
#else
int wisid=WIZID; /* the user id of the only person who can be wizard */
#endif
char psname[PSNAMESIZE]="larn"; /* the process name */