#!/bin/csh
setenv GROEB /usr/local/matte/bergman
mv $GROEB/logs/mklog $GROEB/logs/mklog~
$psys/psl > $GROEB/logs/mklog <<EOF

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Copyright (C) 1992,1994 Joergen Backelin
%%
%% Bergman is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY.  No author or distributor
%% accepts responsibility to anyone for the consequences of using it
%% or for whether it serves any particular purpose or works at all,
%% unless he says so in writing.  Refer to the Bergman General Public
%% License for full details.

%% Everyone is granted permission to copy, modify and redistribute
%% bergman, but only under the conditions described in the
%% Bergman General Public License.   A copy of this license is
%% supposed to have been given to you along with bergman so you
%% can know your rights and responsibilities.  It should be in a
%% file named copyright.  Among other things, the copyright notice
%% and this notice must be preserved on all copies.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


(SETQ TOPLOOPNAME!* "")
%	CHANGES:

(OFF RAISE)
(GLOBAL '(SPairs cSPairs GBasis cGBasis InPols cInPols MAXDEG
	  BigNumbFile InumModLimit LogModLimit EMBDIM MAOaux
	  HISTORYLIST!*))

% Here is a (hopefully complete) list of file names and file name suffixes
% used by bergman automatic file reading commands. PSL suffixes are not
% added.
%  Some names are identifiers in capitals; these are translated to lower
% case letters by the PSL procedure LOAD.

(SETQ BigNumbFile 'NBIG30)

(SETQ InumModLimit (SUB1 (EXPT 2 15)))
(SETQ InumLogModLimit (SUB1 (EXPT 2 30)))
(SETQ LogModLimit (EXPT 2 20))

(OFF USERMODE) (OFF REDEFMSG)

(COND ((NOT (MEMBER (MKBMPATHEXPAND "$GROEB/") LOADDIRECTORIES!*))
       (SETQ LOADDIRECTORIES!* (CONS (MKBMPATHEXPAND "$GROEB/") LOADDIRECTORIES!*))))
(COND ((NOT (MEMBER (MKBMPATHEXPAND "$GROEB/bin/") LOADDIRECTORIES!*))
       (SETQ LOADDIRECTORIES!* (CONS (MKBMPATHEXPAND "$GROEB/bin/") LOADDIRECTORIES!*))))

(LOAD "slextens" "full" "auxil")

% (DSKIN (MKBMPATHEXPAND "$GROEB/src/debug.sl")))

(OFF RAISE)
(OFF GC)


% Some flags and modes, default settings/initiations.

(ON SAVERECVALUES)

(COMMIFY)

(LAPIN "topproc.sl")

(ON IMMEDIATEFULLREDUCTION)
(ON RAISE)
(ON USERMODE) (ON REDEFMSG)


% For possible future use:

(COND ((FILEP "patches.sl") (LAPIN "patches.sl")))


% For local modifications:

(COND ((FILEP "local.sl") (LAPIN "local.sl")))


(SAVESYSTEM  "Bergman 0.9"
	    (MKBMPATHEXPAND "$GROEB/bergman")
	    '((SETQ TOPLOOPNAME!* "bergman")
	      (READ-INIT-FILE "bergman.ini")))

EOF
