home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Games / larn12s.arc / LARN.ARC / CONFIG.C < prev    next >
C/C++ Source or Header  |  1987-10-28  |  3KB  |  102 lines

  1. /*
  2.  *    config.c    --    This defines the installation dependent variables.
  3.  *                  Some strings are modified later.  ANSI C would
  4.  *                  allow compile time string concatenation, we must
  5.  *                  do runtime concatenation, in main.
  6.  *
  7.  *        Larn is copyrighted 1986 by Noah Morgan.
  8.  */
  9. #include "header.h"
  10.  
  11. #ifndef LARNHOME
  12. #define LARNHOME "/usr/games/larn/"        /* normally supplied by a Makefile */
  13. #endif
  14.  
  15. #ifndef WIZID
  16. #define WIZID    0
  17. #endif
  18.  
  19. /*
  20.  *    All these strings will be appended to in main() to be complete filenames
  21.  */
  22.  
  23. # ifdef UNIX
  24.         /* the game save filename   */
  25. char savefilename[SAVEFILENAMESIZE] =     LARNHOME;
  26.  
  27.         /* the score file            */
  28. char scorefile[sizeof(LARNHOME)+sizeof(SCORENAME)] =    LARNHOME;
  29.  
  30.         /* the logging file         */
  31. char logfile[sizeof(LARNHOME)+sizeof(LOGFNAME)]  =        LARNHOME;
  32.  
  33.         /* the help text file        */
  34. char helpfile[sizeof(LARNHOME)+sizeof(HELPNAME)] =         LARNHOME;
  35.  
  36.         /* the maze data file        */
  37. char larnlevels[sizeof(LARNHOME)+sizeof(LEVELSNAME)] =     LARNHOME;
  38.  
  39.         /* the fortune data file    */
  40. char fortfile[sizeof(LARNHOME)+sizeof(FORTSNAME)] =        LARNHOME;
  41.  
  42.         /* the .larnopts filename */
  43. char optsfile[128];                /* the option file            */
  44.  
  45.         /* the player id datafile name */
  46. char playerids[sizeof(LARNHOME)+sizeof(PLAYERIDS)] =    LARNHOME;
  47.  
  48. # ifdef TIMECHECK
  49.         /* the holiday datafile */
  50. char holifile[sizeof(LARNHOME)+sizeof(HOLIFILE)] =        LARNHOME;
  51. # endif
  52.  
  53. char ckpfile[] ="Larn12.ckp";        /* the checkpoint filename    */
  54.  
  55. # ifdef EXTRA
  56. char diagfile[] ="Diagfile";        /* the diagnostic filename    */
  57. # endif
  58.  
  59. # else /* ndef MSDOS */
  60.  
  61. /* For MSDOS, use fixed length files because of a bug in sizeof.
  62.  */
  63. #   ifdef DGK
  64. /* Make LARNHOME readable from the larnopt file into a lardir variable.
  65.  */
  66. char savefilename[PATHLEN];
  67. char scorefile[PATHLEN];
  68. char logfile[PATHLEN];
  69. char helpfile[PATHLEN];
  70. char larnlevels[PATHLEN];
  71. char fortfile[PATHLEN];
  72. char optsfile[PATHLEN];
  73. char playerids[PATHLEN];
  74. char ckpfile[PATHLEN];
  75. char swapfile[PATHLEN];
  76. char larndir[DIRLEN]        = LARNHOME;
  77. #   else
  78. char savefilename[PATHLEN]    = LARNHOME;
  79. char scorefile[PATHLEN]        = LARNHOME;
  80. char logfile[PATHLEN]        = LARNHOME;
  81. char helpfile[PATHLEN]        = LARNHOME;
  82. char larnlevels[PATHLEN]    = LARNHOME;
  83. char fortfile[PATHLEN]        = LARNHOME;
  84. char optsfile[PATHLEN]        = LARNHOME;
  85. char playerids[PATHLEN]        = LARNHOME;
  86. char swapfile[PATHLEN]        = LARNHOME;
  87. char ckpfile[PATHLEN]        = LARNHOME;
  88. #   endif
  89. # endif    /* ndef MSDOS */
  90.  
  91. #ifdef GEMDOS
  92. char cmdshell[PATHLEN]        = CMDSHELL;
  93. #endif
  94.  
  95. char *password ="pvnert(x)";                    /* the wizards password <=32*/
  96. #if WIZID == -1
  97. int wisid=0;            /* the user id of the only person who can be wizard */
  98. #else
  99. int wisid=WIZID;        /* the user id of the only person who can be wizard */
  100. #endif
  101. char psname[PSNAMESIZE]="larn";                        /* the process name        */
  102.