home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / p / plbin.zip / pl / src / pl-main.h < prev    next >
C/C++ Source or Header  |  1992-07-07  |  3KB  |  110 lines

  1. /*  pl-main.h,v 1.3 1992/07/07 08:25:39 jan Exp
  2.  
  3.     Copyright (c) 1990 Jan Wielemaker. All rights reserved.
  4.     See ../LICENCE to find out about your rights.
  5.     jan@swi.psy.uva.nl
  6.  
  7.     Purpose: System dependent parameters
  8. */
  9.  
  10. GLOBAL int    mainArgc;        /* arguments to main() */
  11. GLOBAL char  ** mainArgv;
  12. GLOBAL char  ** mainEnv;
  13. GLOBAL void    (*PL_foreign_reinit_function) P((int argc, char **argv));
  14.  
  15.         /********************************
  16.         *           STRUCTURES        *
  17.         ********************************/
  18.  
  19. GLOBAL struct
  20. { char *state;                /* system's boot file */
  21.   char *startup;            /* default user startup file */
  22.   char *version;            /* version of this prolog */
  23.   int  local;                /* default local stack size (K) */
  24.   int  global;                /* default global stack size (K) */
  25.   int  trail;                /* default trail stack size (K) */
  26.   int  argument;            /* default argument stack size (K) */
  27.   int  lock;                /* foreign code locks (K) */
  28.   char *goal;                /* default initialisation goal */
  29.   char *toplevel;            /* default top level goal */
  30.   bool notty;                /* use tty? */
  31.   char *machine;            /* machine we are using */
  32.   char *operating_system;        /* operating system it is running */
  33.   char *home;                /* systems home directory */
  34. } systemDefaults; 
  35.  
  36. GLOBAL struct options
  37. { long        localSize;        /* size of local stack */
  38.   long        globalSize;        /* size of global stack */
  39.   long        trailSize;        /* size of trail stack */
  40.   long        argumentSize;        /* size of argument stack */
  41.   long        lockSize;        /* size of lock stack */
  42.   char *    goal;            /* initial goal */
  43.   char *    topLevel;        /* toplevel goal */
  44.   char *    initFile;        /* initialisation file */
  45.   char *    compileOut;        /* file to store compiler output */
  46. } options;
  47.  
  48. GLOBAL struct
  49. { bool        boot;            /* boot cycle */
  50.   bool        extendMode;        /* extend using ^[ and ^D */
  51.   bool        doExtend;        /* currently using extend mode ? */
  52.   bool        beep;            /* beep if extend fails */
  53.   int        debugLevel;        /* internal debuglevel (0-9) */
  54.   bool        dumped;            /* created from a dump? */
  55.   bool        notty;            /* do not use ioctl() calls */
  56.   bool        optimise;        /* use optimised compiler */
  57.   int        arithmetic;        /* inside arithmetic code ? */
  58.   bool        io_initialised;        /* I/O initoalisation has finished */
  59.   bool        initialised;        /* Initialisation completed */
  60. } status;
  61.  
  62.  
  63.         /********************************
  64.         *           PARAMETERS        *
  65.         ********************************/
  66.  
  67. #ifndef DEFSTARTUP
  68. #define DEFSTARTUP .plrc
  69. #endif
  70. #ifndef SYSTEMHOME
  71. #define SYSTEMHOME /usr/local/lib/pl
  72. #endif
  73.  
  74. #ifndef MACHINE
  75. #define MACHINE    "unknown"
  76. #endif
  77. #ifndef OPERATING_SYSTEM
  78. #define OPERATING_SYSTEM "unknown"
  79. #endif
  80.  
  81. #if O_CAN_MAP || O_SHARED_MEMORY
  82. #define DEF_DEFLOCAL    2000
  83. #define DEF_DEFGLOBAL    4000
  84. #define DEF_DEFTRAIL    4000
  85. #define DEF_DEFARGUMENT 8
  86. #define DEF_DEFLOCK    8
  87. #else
  88. #define DEF_DEFLOCAL    200
  89. #define DEF_DEFGLOBAL    200
  90. #define DEF_DEFTRAIL    200
  91. #define DEF_DEFARGUMENT 5
  92. #define DEF_DEFLOCK    5
  93. #endif
  94.  
  95. #ifndef DEFLOCAL
  96. #define DEFLOCAL    DEF_DEFLOCAL
  97. #endif
  98. #ifndef DEFGLOBAL
  99. #define DEFGLOBAL   DEF_DEFGLOBAL
  100. #endif
  101. #ifndef DEFTRAIL
  102. #define DEFTRAIL    DEF_DEFTRAIL
  103. #endif
  104. #ifndef DEFARGUMENT
  105. #define DEFARGUMENT DEF_DEFARGUMENT
  106. #endif
  107. #ifndef DEFLOCK
  108. #define DEFLOCK     DEF_DEFLOCK
  109. #endif
  110.