changeset 3192:bdf2186d4592

[project @ 1998-10-23 19:47:59 by jwe]
author jwe
date Fri, 23 Oct 1998 19:48:01 +0000
parents e4f4b2d26ee9
children 973954fc757e
files NEWS src/ChangeLog src/defaults.cc
diffstat 3 files changed, 265 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,229 @@
     when it crashes or is killed by a signal.  The default value is 1
     (0 if you use --traditional).
 
+  * If LOADPATH contains a doubled colon, the default path is inserted
+    in its place.  This is similar to the substitution that also takes
+    place for leading or trailing colons in the LOADPATH.
+
+  * Loops of the form `for i = STRING ... endfor' are now allowed.
+
+  * It is now possible to set the iteration limit for lsode using
+    lsode_options ("step limit", N).
+
+  * New functions:
+
+      is_complex  -- tell whether a variable is complex
+      rehash      -- re-initialize the cache of directories in LOADPATH
+      graw        -- send a string to the gnuplot subprocess
+
+  * New functions from Kurt Hornik's Octave-ci package:
+
+    In finance (new directory):
+
+      fv
+      fvl
+      irr
+      nper
+      npv
+      pmt
+      pv
+      pvl
+      rate
+      vol
+
+    In linear-algebra:
+
+      dmult
+
+    In signal:
+
+      arch_fit
+      arch_rnd
+      arch_test
+      arma_rnd
+      autocor
+      autocov
+      autoreg_matrix
+      bartlett
+      blackman
+      diffpara
+      durbinlevinson
+      fractdiff
+      hamming
+      hanning
+      hurst
+      periodogram
+      rectangle_lw
+      rectangle_sw
+      sinetone
+      sinewave
+      spectral_adf
+      spectral_xdf
+      spencer
+      stft
+      synthesis
+      triangle_lw
+      triangle_sw
+      yulewalker
+
+    In statistics/base (new directory):
+
+      center
+      cloglog
+      cor
+      cov
+      cut
+      iqr
+      kendall
+      logit
+      mean
+      meansq
+      moment
+      ppplot
+      probit
+      qqplot
+      range
+      ranks
+      run_count
+      spearman
+      statistics
+      studentize
+      table
+      values
+      var
+
+    In statistics/distributions (new directory):
+
+      beta_cdf
+      beta_inv
+      beta_pdf
+      beta_rnd
+      binomial_cdf
+      binomial_inv
+      binomial_pdf
+      binomial_rnd
+      cauchy_cdf
+      cauchy_inv
+      cauchy_pdf
+      cauchy_rnd
+      chisquare_cdf
+      chisquare_inv
+      chisquare_pdf
+      chisquare_rnd
+      discrete_cdf
+      discrete_inv
+      discrete_pdf
+      discrete_rnd
+      empirical_cdf
+      empirical_inv
+      empirical_pdf
+      empirical_rnd
+      exponential_cdf
+      exponential_inv
+      exponential_pdf
+      exponential_rnd
+      f_cdf
+      f_inv
+      f_pdf
+      f_rnd
+      gamma_cdf
+      gamma_inv
+      gamma_pdf
+      gamma_rnd
+      geometric_cdf
+      geometric_inv
+      geometric_pdf
+      geometric_rnd
+      hypergeometric_cdf
+      hypergeometric_inv
+      hypergeometric_pdf
+      hypergeometric_rnd
+      kolmogorov_smirnov_cdf
+      laplace_cdf
+      laplace_inv
+      laplace_pdf
+      laplace_rnd
+      logistic_cdf
+      logistic_inv
+      logistic_pdf
+      logistic_rnd
+      lognormal_cdf
+      lognormal_inv
+      lognormal_pdf
+      lognormal_rnd
+      normal_cdf
+      normal_inv
+      normal_pdf
+      normal_rnd
+      pascal_cdf
+      pascal_inv
+      pascal_pdf
+      pascal_rnd
+      poisson_cdf
+      poisson_inv
+      poisson_pdf
+      poisson_rnd
+      stdnormal_cdf
+      stdnormal_inv
+      stdnormal_pdf
+      stdnormal_rnd
+      t_cdf
+      t_inv
+      t_pdf
+      t_rnd
+      uniform_cdf
+      uniform_inv
+      uniform_pdf
+      uniform_rnd
+      weibull_cdf
+      weibull_inv
+      weibull_pdf
+      weibull_rnd
+      wiener_rnd
+
+    In statistics/models (new directory):
+
+      logistic_regression
+      logistic_regression_derivatives
+      logistic_regression_likelihood
+
+    In statistics/tests (new directory):
+
+      anova
+      bartlett_test
+      chisquare_test_homogeneity
+      chisquare_test_independence
+      cor_test
+      f_test_regression
+      hotelling_test
+      hotelling_test_2
+      kolmogorov_smirnov_test
+      kolmogorov_smirnov_test_2
+      kruskal_wallis_test
+      manova
+      mcnemar_test
+      prop_test_2
+      run_test
+      sign_test
+      t_test
+      t_test_2
+      t_test_regression
+      u_test
+      var_test
+      welch_test
+      wilcoxon_test
+      z_test
+      z_test_2
+
+  * The load command now accepts the option -append to save the
+    variables at the end of the file, leaving the existing contents.
+
+  * New command-line option --no-history (also available using the
+    single character option -H) inhibits saving command history.
+
+  * The mkoctfile script now accepts -DDEF options and passes them on
+    to the C and C++ compilers.
+
   * Running `make check' should work now before you run `make install', 
     even if you build a copy of Octave that depends on shared versions
     of the Octave libraries.
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,19 @@
+Fri Oct 23 12:07:32 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* defaults.cc (Vdefault_load_path): New static variable.
+	(set_default_path): Set it.
+	(maybe_add_default_load_path): Use it.
+	(symbols_of_defaults): Add DEFCONST for DEFAULT_LOADPATH.
+	Thanks to Rafael Laboissiere <rafael@icp.inpg.fr>.
+
+	* defaults.cc (set_default_path): If OCTAVE_PATH is set in the
+	environment, call maybe_add_default_load_path on it.
+
+Tue Oct 20 20:58:04 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* defaults.cc (maybe_add_default_load_path): If LOADPATH contains
+	an embedded "::", insert the default path there too.
+
 Fri Oct 16 00:52:15 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* parse.y (in_matrix_or_assign_lhs): New subroutine for lexical
--- a/src/defaults.cc
+++ b/src/defaults.cc
@@ -70,6 +70,9 @@
 // (--path path; -p path)
 string Vload_path;
 
+// The default load path with OCTAVE_HOME appropriately substituted.
+static string Vdefault_load_path;
+
 // And the cached directory path corresponding to Vload_path.
 dir_path Vload_path_dir_path;
 
@@ -181,11 +184,12 @@
 static void
 set_default_path (void)
 {
-  string std_path = subst_octave_home (OCTAVE_FCNFILEPATH);
+  Vdefault_load_path = subst_octave_home (OCTAVE_FCNFILEPATH);
 
   string oct_path = octave_env::getenv ("OCTAVE_PATH");
 
-  Vload_path = oct_path.empty () ? std_path : oct_path;
+  Vload_path = oct_path.empty ()
+    ? Vdefault_load_path : maybe_add_default_path (oct_path);
 
   Vload_path_dir_path = dir_path (Vload_path);
 }
@@ -239,22 +243,30 @@
 string
 maybe_add_default_load_path (const string& pathstring)
 {
-  string std_path = subst_octave_home (OCTAVE_FCNFILEPATH);
-
   string retval;
 
   if (! pathstring.empty ())
     {
       if (pathstring[0] == SEPCHAR)
 	{
-	  retval = std_path;
+	  retval = Vdefault_load_path;
 	  retval.append (pathstring);
 	}
       else
 	retval = pathstring;
 
       if (pathstring[pathstring.length () - 1] == SEPCHAR)
-	retval.append (std_path);
+	retval.append (Vdefault_load_path);
+
+      size_t pos = 0;
+      do
+	{
+	  pos = retval.find ("::");
+
+	  if (pos != NPOS)
+	    retval.insert (pos+1, Vdefault_load_path);
+	}
+      while (pos != NPOS);
     }
 
   return retval;
@@ -415,9 +427,15 @@
   DEFVAR (EXEC_PATH, Vexec_path, 0, exec_path,
     "colon separated list of directories to search for programs to run");
 
-  DEFVAR (LOADPATH, Vload_path, 0, loadpath,
-    "colon separated list of directories to search for scripts");
+  DEFVAR (LOADPATH, ":", 0, octave_loadpath,
+    "colon separated list of directories to search for scripts.\n\
+The default value is \":\", which means to search the default list\n\
+of directories.  The default list of directories may be found in\n\
+the built-in constant DEFAULT_LOADPATH");
 
+  DEFCONST (DEFAULT_LOADPATH, Vdefault_load_path,
+    "the default colon separated list of directories to search for scripts");
+  
   DEFVAR (IMAGEPATH, OCTAVE_IMAGEPATH, 0, imagepath,
     "colon separated list of directories to search for image files");