

/* This is the basic initialization file for Yacas. It gets loaded
 * each time Yacas is started. All the basic files are loaded.
 */


/* The truly required files (Yacas NEEDS to load). */
Use("stdopers.ys");
Use("patterns.ys");
Use("deffunc.ys");
Use("constants.ys");
Use("standard.ys");

/* Maintain an array of deffiles */
DefPackages:={};
RuleBase("CntDefLoad",{file});
Rule("CntDefLoad",1,1,True)
[
  DestructiveInsert(DefPackages,1,file);
  DefLoad(file);
];

/* Load the def files for the other modules. The def files contain lists
 * of functions defined in that file. So, in solve.def you can find the
 * functions defined in the file solve. Each time a function is invoked
 * for which the interpreter can not find a definition, the file is loaded.
 */
CntDefLoad("solve.ys");
CntDefLoad("deriv.ys");
CntDefLoad("linalg.ys");
CntDefLoad("random.ys");
CntDefLoad("lists.ys");
CntDefLoad("controlflow.ys");
CntDefLoad("complex.ys");
CntDefLoad("stdfuncs.ys");
CntDefLoad("sums.ys");
CntDefLoad("newly.ys");
CntDefLoad("univar.ys");
CntDefLoad("stubs.ys");
CntDefLoad("numbers.ys");
CntDefLoad("integrate.ys");
CntDefLoad("substitute.ys");
CntDefLoad("simplify.ys");
CntDefLoad("functional.ys");
CntDefLoad("assoc.ys");
CntDefLoad("html.ys");
CntDefLoad("fakedb.ys");
CntDefLoad("array.ys");
CntDefLoad("example.ys");
CntDefLoad("trigsimp.ys");
CntDefLoad("formula.ys");
CntDefLoad("predicates.ys");
CntDefLoad("stats.ys");
CntDefLoad("padic.ys");
CntDefLoad("factors.ys");
CntDefLoad("testers.ys");
CntDefLoad("tensor.ys");
CntDefLoad("texform.ys");
CntDefLoad("logic.ys");
CntDefLoad("radsimp.ys");
CntDefLoad("pslq.ys");
CntDefLoad("odesolver.ys");
CntDefLoad("c_form.ys");
CntDefLoad("limit.ys");
CntDefLoad("localrules.ys");

/* set the help system. This can be overridden in ~/.yacasrc */

SetHelpBrowser(browser):=
[
  Browser:=browser;
];
Help(f):= SystemCall(Browser:" ":FindFile("documentation/ref.html"):"#":f);
Help() := SystemCall(Browser:" ":FindFile("documentation/books.html"));
SetHelpBrowser("lynx");
