#! /bin/sh # # To apply this patch, cd to the top level Octave source directory and # run this file through /bin/sh. It will first remove any files that # have been deleted from the source distribution since the last # release and then update the sources with patch(1). # # Diffs for updating *.ps, *.dvi, and *.info* files are not included # because they can be recreated from the Texinfo files using TeX and # makeinfo. # # Diffs for updating parse.cc and y.tab.h are not included because # they can be recreated from the file parse.y using bison. # # Diffs for updating lex.cc are not included because it can be # recreated from lex.l using flex. # # Diffs for updating the configure script are not included because # it can be recreated from configure.in using autoconf. # # John W. Eaton # jwe@bevo.che.wisc.edu # University of Wisconsin-Madison # Department of Chemical Engineering if test -f src/octave.cc ; then true else echo '***********************************************************' 1>&2 echo 'You must run this script in the top-level octave directory!' 1>&2 echo '***********************************************************' 1>&2 exit 1 fi ### ### Special commands should go here. ### echo 'patching existing files' patch -p1 << \PATCH_EOF diff -cNr octave-2.0.8/ChangeLog octave-2.0.9/ChangeLog *** octave-2.0.8/ChangeLog Mon Jun 23 14:27:12 1997 --- octave-2.0.9/ChangeLog Wed Jul 9 19:45:32 1997 *************** *** 1,3 **** --- 1,26 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + + Wed Jul 9 19:27:02 1997 John W. Eaton + + * configure.in: Also check for getwd. + + Tue Jul 8 17:47:11 1997 John W. Eaton + + * aclocal.m4 (OCTAVE_FLIBS): Avoid grabbing an argument starting + with a - as an option for another argument. + + Wed Jul 2 21:34:15 1997 John W. Eaton + + * emacs/octave-mod.el (octave-auto-indent): New variable. + (octave-electric-semi, octave-electric-space): Use it. + + Thu Jun 26 22:16:59 1997 John W. Eaton + + * configure.in: Only set GCC_IEEE_FP_FLAG to -mieee-fp on Intel + systems if it seems to work. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/INSTALL.OCTAVE octave-2.0.9/INSTALL.OCTAVE *** octave-2.0.8/INSTALL.OCTAVE Tue May 20 17:50:51 1997 --- octave-2.0.9/INSTALL.OCTAVE Tue Jul 8 17:59:29 1997 *************** *** 35,41 **** Create shared libraries. If you are planning to use `--enable-lite-kernelel' or the dynamic loading features, you will probably want to use this option. It will make your ! `.oct' files much smaller. You may also want to build a shared version of `libg++', if your system doesn't already have one. Note that a patch is --- 35,43 ---- Create shared libraries. If you are planning to use `--enable-lite-kernelel' or the dynamic loading features, you will probably want to use this option. It will make your ! `.oct' files much smaller and on some systems it may be ! necessary to build shared libraries in order to use ! dynamically linked functions. You may also want to build a shared version of `libg++', if your system doesn't already have one. Note that a patch is diff -cNr octave-2.0.8/NEWS octave-2.0.9/NEWS *** octave-2.0.8/NEWS Mon Jun 23 14:02:57 1997 --- octave-2.0.9/NEWS Wed Jul 9 19:53:59 1997 *************** *** 1,3 **** --- 1,17 ---- + Summary of changes for version 2.0.9: + ------------------------------------ + + This is a bug-fixing release, but there is one new user-visible + feature: + + * It is now possible to specify a label for lines in the plot key + when using the plot function. For example, + + plot (x, y, "-*;sin(x);") + + plots y vs. x using the linespoints style and sets the title of + the line in the key to be `sin(x)' + Summary of changes for version 2.0.8: ------------------------------------ diff -cNr octave-2.0.8/aclocal.m4 octave-2.0.9/aclocal.m4 *** octave-2.0.8/aclocal.m4 Wed Jun 4 02:34:12 1997 --- octave-2.0.9/aclocal.m4 Tue Jul 8 17:54:17 1997 *************** *** 193,198 **** --- 193,209 ---- for arg in $foutput; do old_want_arg=$want_arg want_arg= + dnl + dnl None of the options that take arguments expect the argument to + dnl start with a -, so pretend we didn't see anything special. + dnl + if test -n "$old_want_arg"; then + case "$arg" in + -*) + old_want_arg= + ;; + esac + fi case "$old_want_arg" in '') case $arg in *************** *** 263,268 **** --- 274,280 ---- ;; -u) want_arg=$arg + arg= ;; -Y) want_arg=$arg *************** *** 275,280 **** --- 287,295 ---- ;; -[lLR]) arg="$old_want_arg $arg" + ;; + -u) + arg="-u $arg" ;; -Y) dnl diff -cNr octave-2.0.8/config.h.in octave-2.0.9/config.h.in *** octave-2.0.8/config.h.in Tue May 20 17:48:04 1997 --- octave-2.0.9/config.h.in Wed Jul 9 19:45:53 1997 *************** *** 315,320 **** --- 315,323 ---- /* Define if you have the getuid function. */ #undef HAVE_GETUID + /* Define if you have the getwd function. */ + #undef HAVE_GETWD + /* Define if you have the infinity function. */ #undef HAVE_INFINITY diff -cNr octave-2.0.8/configure.in octave-2.0.9/configure.in *** octave-2.0.8/configure.in Mon Jun 23 09:17:34 1997 --- octave-2.0.9/configure.in Wed Jul 9 19:27:01 1997 *************** *** 276,293 **** fi AC_SUBST(CC_VERSION) ! ### On Intel systems with gcc, we need to compile with -mieee-fp to ### get full support for IEEE floating point. ### ### On Alpha/OSF systems, wee need -mieee, but that also ### requires gcc 2.8.x or later. case "$canonical_host_type" in changequote(,)dnl i[3456789]86-*-*) changequote([,])dnl ! GCC_IEEE_FP_FLAG="-mieee-fp" ! AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) ;; alpha-dec-osf*) case "$gcc_version" in --- 276,296 ---- fi AC_SUBST(CC_VERSION) ! ### On Intel systems with gcc, we may need to compile with -mieee-fp to ### get full support for IEEE floating point. ### ### On Alpha/OSF systems, wee need -mieee, but that also ### requires gcc 2.8.x or later. + GCC_IEEE_FP_FLAG= case "$canonical_host_type" in changequote(,)dnl i[3456789]86-*-*) changequote([,])dnl ! XCFLAGS="$CFLAGS" ! CFLAGS="$CFLAGS -mieee-fp" ! AC_TRY_LINK([], [], [GCC_IEEE_FP_FLAG="-mieee-fp"], []) ! CFLAGS="$XCFLAGS" ;; alpha-dec-osf*) case "$gcc_version" in *************** *** 297,307 **** ;; *) GCC_IEEE_FP_FLAG="-mieee" - AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) ;; esac ;; esac AC_SUBST(GCC_IEEE_FP_FLAG) ### Use -static if compiling on Alpha OSF/1 1.3 systems. --- 300,312 ---- ;; *) GCC_IEEE_FP_FLAG="-mieee" ;; esac ;; esac + if test -n "$GCC_IEEE_FP_FLAG"; then + AC_MSG_RESULT([defining GCC_IEEE_FP_FLAG to be $GCC_IEEE_FP_FLAG]) + fi AC_SUBST(GCC_IEEE_FP_FLAG) ### Use -static if compiling on Alpha OSF/1 1.3 systems. *************** *** 711,719 **** AC_CHECK_FUNCS(atexit bcopy bzero dup2 endgrent endpwent execvp fcntl \ fork getcwd getegid geteuid getgid getgrent getgrgid getgrnam \ ! gethostname getpgrp getpid getppid getpwent getpwnam getpwuid getuid \ ! lstat memmove mkdir mkfifo on_exit pipe putenv rename rindex rmdir \ ! setgrent setpwent setvbuf sigaction sigpending sigprocmask \ sigsuspend stat strcasecmp strdup strerror stricmp strncasecmp \ strnicmp tempnam umask unlink usleep vfprintf vsprintf waitpid) --- 716,724 ---- AC_CHECK_FUNCS(atexit bcopy bzero dup2 endgrent endpwent execvp fcntl \ fork getcwd getegid geteuid getgid getgrent getgrgid getgrnam \ ! gethostname getpgrp getpid getppid getpwent getpwnam getpwuid \ ! getuid getwd lstat memmove mkdir mkfifo on_exit pipe putenv rename \ ! rindex rmdir setgrent setpwent setvbuf sigaction sigpending sigprocmask \ sigsuspend stat strcasecmp strdup strerror stricmp strncasecmp \ strnicmp tempnam umask unlink usleep vfprintf vsprintf waitpid) diff -cNr octave-2.0.8/doc/ChangeLog octave-2.0.9/doc/ChangeLog *** octave-2.0.8/doc/ChangeLog Mon Jun 23 14:27:07 1997 --- octave-2.0.9/doc/ChangeLog Wed Jul 9 19:45:06 1997 *************** *** 1,3 **** --- 1,14 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + + Wed Jul 2 16:41:04 1997 John W. Eaton + + * refcard/Makefile.in: Remove .tex files from binary distributions. + + * interpreter/Makefile.in: Add DVI and Postscript files to binary + distributions. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/doc/interpreter/Makefile.in octave-2.0.9/doc/interpreter/Makefile.in *** octave-2.0.8/doc/interpreter/Makefile.in Wed Feb 19 22:43:45 1997 --- octave-2.0.9/doc/interpreter/Makefile.in Wed Jul 2 16:45:04 1997 *************** *** 35,44 **** DISTFILES = Makefile.in dir octave.1 $(TEXINFO) $(FORMATTED) ifeq ($(wildcard octave.info), ) ! BINDISTFILES = $(srcdir)/octave.1 $(srcdir)/octave.info \ ! $(wildcard $(srcdir)/octave.info-[0-9]*) else ! BINDISTFILES = $(srcdir)/octave.1 octave.info octave.info-[0-9]* endif # Look for version.h to get version information. --- 35,43 ---- DISTFILES = Makefile.in dir octave.1 $(TEXINFO) $(FORMATTED) ifeq ($(wildcard octave.info), ) ! BINDISTFILES = $(addprefix $(srcdir)/, octave.1 $(FORMATTED)) else ! BINDISTFILES = $(srcdir)/octave.1 $(FORMATTED) endif # Look for version.h to get version information. diff -cNr octave-2.0.8/doc/interpreter/install.texi octave-2.0.9/doc/interpreter/install.texi *** octave-2.0.8/doc/interpreter/install.texi Tue May 20 14:42:41 1997 --- octave-2.0.9/doc/interpreter/install.texi Tue Jul 8 13:27:17 1997 *************** *** 56,62 **** Create shared libraries. If you are planning to use @code{--enable-lite-kernelel} or the dynamic loading features, you will probably want to use this option. It will make your @file{.oct} files ! much smaller. You may also want to build a shared version of @code{libg++}, if your system doesn't already have one. Note that a patch is needed to build --- 56,63 ---- Create shared libraries. If you are planning to use @code{--enable-lite-kernelel} or the dynamic loading features, you will probably want to use this option. It will make your @file{.oct} files ! much smaller and on some systems it may be necessary to build shared ! libraries in order to use dynamically linked functions. You may also want to build a shared version of @code{libg++}, if your system doesn't already have one. Note that a patch is needed to build diff -cNr octave-2.0.8/doc/interpreter/var.texi octave-2.0.9/doc/interpreter/var.texi *** octave-2.0.8/doc/interpreter/var.texi Tue May 20 14:42:41 1997 --- octave-2.0.9/doc/interpreter/var.texi Tue Jul 8 14:59:57 1997 *************** *** 247,255 **** @end deffn @deftypefn {Built-in Function} {} exist (@var{name}) ! Return 1 if the name exists as a variable, and 2 if the name (after ! appending @samp{.m}) is a function file in the path. Otherwise, return ! 0. @end deftypefn @deftypefn {Built-in Function} {} document (@var{symbol}, @var{text}) --- 247,256 ---- @end deffn @deftypefn {Built-in Function} {} exist (@var{name}) ! Return 1 if the name exists as a variable, 2 if the name (after ! appending @samp{.m}) is a function file in the path, 3 if the name is a ! @samp{.oct} file in the path, or 5 if the name is a built-in function. ! Otherwise, return 0. @end deftypefn @deftypefn {Built-in Function} {} document (@var{symbol}, @var{text}) diff -cNr octave-2.0.8/doc/refcard/Makefile.in octave-2.0.9/doc/refcard/Makefile.in *** octave-2.0.8/doc/refcard/Makefile.in Wed Feb 26 12:29:17 1997 --- octave-2.0.9/doc/refcard/Makefile.in Wed Jul 2 16:45:32 1997 *************** *** 26,32 **** DISTFILES := Makefile.in $(TEX) $(FORMATTED) ! BINDISTFILES = $(addprefix $(srcdir)/, $(TEX) $(FORMATTED)) all: $(FORMATTED) --- 26,36 ---- DISTFILES := Makefile.in $(TEX) $(FORMATTED) ! ifeq ($(wildcard refcard-letter.ps), ) ! BINDISTFILES = $(addprefix $(srcdir)/, $(FORMATTED)) ! else ! BINDISTFILES = $(FORMATTED) ! endif all: $(FORMATTED) diff -cNr octave-2.0.8/emacs/octave-mod.el octave-2.0.9/emacs/octave-mod.el *** octave-2.0.8/emacs/octave-mod.el Fri Feb 28 22:08:33 1997 --- octave-2.0.9/emacs/octave-mod.el Wed Jul 2 21:41:50 1997 *************** *** 293,298 **** --- 293,301 ---- (modify-syntax-entry ?\n ">" table) (setq octave-mode-syntax-table table))) + (defvar octave-auto-indent nil + "*Non-nil means automatically indent line after a semicolon or space.") + (defvar octave-auto-newline nil "*Non-nil means automatically newline after a semicolon in Octave mode.") *************** *** 399,404 **** --- 402,411 ---- Variables you can use to customize Octave mode ============================================== + octave-auto-indent + Non-nil means indent current line after a semicolon or space. + Default is nil. + octave-auto-newline Non-nil means auto-insert a newline and indent after a semicolon. Default is nil. *************** *** 1180,1186 **** (if abbrev-mode (expand-abbrev)) (if octave-blink-matching-block (octave-blink-matching-block-open)) ! (indent-according-to-mode) (insert ";") (if octave-auto-newline (newline-and-indent)))) --- 1187,1194 ---- (if abbrev-mode (expand-abbrev)) (if octave-blink-matching-block (octave-blink-matching-block-open)) ! (if octave-auto-indent ! (indent-according-to-mode)) (insert ";") (if octave-auto-newline (newline-and-indent)))) *************** *** 1197,1205 **** (if abbrev-mode (expand-abbrev)) (if octave-blink-matching-block (octave-blink-matching-block-open)) ! (if (save-excursion ! (skip-syntax-backward " ") ! (not (bolp))) (indent-according-to-mode)) (self-insert-command 1))) --- 1205,1214 ---- (if abbrev-mode (expand-abbrev)) (if octave-blink-matching-block (octave-blink-matching-block-open)) ! (if (and octave-auto-indent ! (save-excursion ! (skip-syntax-backward " ") ! (not (bolp)))) (indent-according-to-mode)) (self-insert-command 1))) *************** *** 1381,1386 **** --- 1390,1396 ---- octave-maintainer-address (concat "Emacs version " emacs-version) (list + 'octave-auto-indent 'octave-auto-newline 'octave-blink-matching-block 'octave-block-offset diff -cNr octave-2.0.8/libcruft/ChangeLog octave-2.0.9/libcruft/ChangeLog *** octave-2.0.8/libcruft/ChangeLog Mon Jun 23 14:27:11 1997 --- octave-2.0.9/libcruft/ChangeLog Wed Jul 9 19:45:22 1997 *************** *** 1,3 **** --- 1,7 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/liboctave/ChangeLog octave-2.0.9/liboctave/ChangeLog *** octave-2.0.8/liboctave/ChangeLog Mon Jun 23 14:27:10 1997 --- octave-2.0.9/liboctave/ChangeLog Wed Jul 9 19:45:19 1997 *************** *** 1,3 **** --- 1,15 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + + Mon Jul 7 21:14:41 1997 John W. Eaton + + * lo-mappers.cc (xisnan (double)): Return only 1 or 0. + (xfinite (double)): Ditto. + + * dbleQR.cc (QR::init): Don't forget to initialize Q when type is raw. + * CmplxQR.cc (ComplexQR::init): Ditto. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/liboctave/CmplxQR.cc octave-2.0.9/liboctave/CmplxQR.cc *** octave-2.0.8/liboctave/CmplxQR.cc Thu Feb 27 19:53:31 1997 --- octave-2.0.9/liboctave/CmplxQR.cc Tue Jul 8 17:32:23 1997 *************** *** 99,104 **** --- 99,109 ---- for (int i = limit + 1; i < m; i++) A_fact.elem (i, j) *= tau.elem (j); } + + r = A_fact; + + if (m > n) + r.resize (m, n); } else { diff -cNr octave-2.0.8/liboctave/dbleQR.cc octave-2.0.9/liboctave/dbleQR.cc *** octave-2.0.8/liboctave/dbleQR.cc Thu Feb 27 20:10:16 1997 --- octave-2.0.9/liboctave/dbleQR.cc Tue Jul 8 17:31:58 1997 *************** *** 97,102 **** --- 97,107 ---- for (int i = limit + 1; i < m; i++) A_fact.elem (i, j) *= tau.elem (j); } + + r = A_fact; + + if (m > n) + r.resize (m, n); } else { diff -cNr octave-2.0.8/liboctave/lo-mappers.cc octave-2.0.9/liboctave/lo-mappers.cc *** octave-2.0.8/liboctave/lo-mappers.cc Fri Jun 20 10:40:14 1997 --- octave-2.0.9/liboctave/lo-mappers.cc Tue Jul 8 18:18:21 1997 *************** *** 42,48 **** extern "C" { ! double F77_FCN (dgamma, DGAMMA) (const double&); int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&); } --- 42,48 ---- extern "C" { ! int F77_FCN (xdgamma, XDGAMMA) (const double&, double&); int F77_FCN (dlgams, DLGAMS) (const double&, double&, double&); } *************** *** 150,156 **** xisnan (double x) { #if defined (HAVE_ISNAN) ! return (double) isnan (x); #else return 0; #endif --- 150,156 ---- xisnan (double x) { #if defined (HAVE_ISNAN) ! return (double) (isnan (x) != 0); #else return 0; #endif *************** *** 160,166 **** xfinite (double x) { #if defined (HAVE_FINITE) ! return (double) finite (x); #elif defined (HAVE_ISINF) && defined (HAVE_ISNAN) return (double) (! isinf (x) && ! isnan (x)); #else --- 160,166 ---- xfinite (double x) { #if defined (HAVE_FINITE) ! return (double) (finite (x) != 0); #elif defined (HAVE_ISINF) && defined (HAVE_ISNAN) return (double) (! isinf (x) && ! isnan (x)); #else diff -cNr octave-2.0.8/scripts/ChangeLog octave-2.0.9/scripts/ChangeLog *** octave-2.0.8/scripts/ChangeLog Mon Jun 23 14:27:08 1997 --- octave-2.0.9/scripts/ChangeLog Wed Jul 9 19:45:10 1997 *************** *** 1,3 **** --- 1,21 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + + Wed Jun 25 21:26:24 1997 John W. Eaton + + * plot/mesh.m: Set noparametric plot mode after plotting. + + Wed Jun 25 21:06:10 1997 Rick Niles + + * plot/__pltopt__.m: Handle key/legend names. + Correctly set colors, line styles, and point styles. + + Wed Jun 25 13:34:06 1997 John W. Eaton + + * polynomial/polyfit.m: Return fit y values as second output. + Don't use QR factorization to solve least squares problem. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/scripts/plot/__pltopt__.m octave-2.0.9/scripts/plot/__pltopt__.m *** octave-2.0.8/scripts/plot/__pltopt__.m Tue Feb 18 11:47:47 1997 --- octave-2.0.9/scripts/plot/__pltopt__.m Wed Jun 25 21:43:11 1997 *************** *** 1,4 **** ! ## Copyright (C) 1996 John W. Eaton ## ## This file is part of Octave. ## --- 1,4 ---- ! ## Copyright (C) 1996, 1997 John W. Eaton ## ## This file is part of Octave. ## *************** *** 39,62 **** ## "n" with n in 1-6 (wraps at 8), plot color ## "nm" with m in 1-6 (wraps at 6), point style (only valid for "@" or "-@") ## "c" where c is one of ["r", "g", "b", "m", "c", "w"] colors. ## ## Special points formats: ## ! ## "+", "*", "o", "x" will display points in that style. ## ## The legend may be fixed to include the name of the variable ## plotted in some future version of Octave. ## ! ## The color line styles have the following meanings on terminals ! ## that support color. ## ! ## Number Gnuplot colors (lines)points style ! ## 1 red "*" ! ## 2 green "+" ! ## 3 blue "o" ! ## 4 magenta "x" ! ## 5 cyan house ! ## 6 brown there exists ## Author: Rick Niles ## Adapted-By: jwe --- 39,65 ---- ## "n" with n in 1-6 (wraps at 8), plot color ## "nm" with m in 1-6 (wraps at 6), point style (only valid for "@" or "-@") ## "c" where c is one of ["r", "g", "b", "m", "c", "w"] colors. + ## ";title;" where "title" is the label for the key. ## ## Special points formats: ## ! ## "+", "*", "o", "x" will display points in that style for term x11. ## ## The legend may be fixed to include the name of the variable ## plotted in some future version of Octave. ## ! ## The colors, line styles, and point styles have the following ! ## meanings for X11 and Postscript terminals under Gnuplot 3.6. ## ! ## Number ------ Color ------- Line Style ---- Points Style ---- ! ## x11 postscript postscript x11 postscript ! ## ===================================================================== ! ## 1 red green solid "o" "+" ! ## 2 green blue long dash "+" "x" ! ## 3 blue red short dash square "*" ! ## 4 magenta magenta dotted "x" open square ! ## 5 cyan cyan dot long dash triangle filled square ! ## 6 brown yellow dot short dash "*" "o" ## Author: Rick Niles ## Adapted-By: jwe *************** *** 73,78 **** --- 76,82 ---- set_steps = 0; set_boxes = 0; set_errbars = 0; + set_key = 0; more_opts = 1; WITH = "w"; *************** *** 85,90 **** --- 89,95 ---- IMPULSES = "i"; STEPS = "s"; ERRORBARS = "e"; + TITLE = "title"; if (nargin != 2) usage ("__pltopt__ (opt)"); *************** *** 99,105 **** ## First get next char. if (max (size (opt)) > 1) ! [char, opt] = sscanf (opt, "%c %s", "C"); else char = opt; more_opts = 0; --- 104,112 ---- ## First get next char. if (max (size (opt)) > 1) ! # [char, opt] = sscanf (opt, "%c %s", "C"); ! char = opt(1); ! opt = opt(2:length(opt)); else char = opt; more_opts = 0; *************** *** 155,161 **** elseif (strcmp (char, "*")) set_points = 1; set_symbol = 1; ! symbol = "1"; elseif (strcmp (char, "+")) set_points = 1; set_symbol = 1; --- 162,168 ---- elseif (strcmp (char, "*")) set_points = 1; set_symbol = 1; ! symbol = "6"; elseif (strcmp (char, "+")) set_points = 1; set_symbol = 1; *************** *** 163,175 **** elseif (strcmp (char, "o")) set_points = 1; set_symbol = 1; ! symbol = "3"; elseif (strcmp (char, "x")) set_points = 1; set_symbol = 1; symbol = "4"; else ! error (sprintf ("%s: unrecognized format character %s", caller, char)); endif endwhile --- 170,210 ---- elseif (strcmp (char, "o")) set_points = 1; set_symbol = 1; ! symbol = "1"; elseif (strcmp (char, "x")) set_points = 1; set_symbol = 1; symbol = "4"; + elseif (strcmp (char, ";")) # title mode. + set_key = 1; + working = 1; + key_title = ""; + while (working) + if (max (size (opt)) > 1) + char = opt(1); + opt = opt(2:length(opt)); + else + char = opt; + if (! strcmp (char, ";")) + error ("%s: unfinished key label", caller); + end + more_opts = 0; + working = 0; + endif + if strcmp (char, ";") + working = 0; + else + if (isempty (key_title)) # needs this to avoid empty matrix warning. + key_title = char; + else + key_title = strcat (key_title, char); + endif + endif + endwhile + elseif (strcmp (char, " ")) + ## whitespace -- do nothing. else ! error ("%s: unrecognized format character: '%s'", caller, char); endif endwhile *************** *** 214,217 **** --- 249,255 ---- fmt = strcat (fmt, " 1 ", symbol); endif + if (set_key) + fmt = strcat (fmt, " ", TITLE, ' "', key_title, '" '); + endif endfunction diff -cNr octave-2.0.8/scripts/plot/contour.m octave-2.0.9/scripts/plot/contour.m *** octave-2.0.8/scripts/plot/contour.m Fri Feb 21 20:33:30 1997 --- octave-2.0.9/scripts/plot/contour.m Wed Jun 25 21:32:52 1997 *************** *** 26,36 **** function contour (z, n, x, y) - if (nargin == 1) n = 10; endif if (nargin == 1 || nargin == 2) if (is_matrix (z)) gset nosurface; --- 26,39 ---- function contour (z, n, x, y) if (nargin == 1) n = 10; endif + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + if (nargin == 1 || nargin == 2) if (is_matrix (z)) gset nosurface; *************** *** 42,48 **** gset view 0, 0, 1, 1; gsplot z w l 1; else ! error ("mesh: argument must be a matrix"); endif elseif (nargin == 4) if (is_vector (x) && is_vector (y) && is_matrix (z)) --- 45,51 ---- gset view 0, 0, 1, 1; gsplot z w l 1; else ! error ("contour: argument must be a matrix"); endif elseif (nargin == 4) if (is_vector (x) && is_vector (y) && is_matrix (z)) *************** *** 70,84 **** gset view 0, 0, 1, 1; gsplot zz w l 1; else ! msg = "mesh: rows (z) must be the same as length (x) and"; msg = sprintf ("%s\ncolumns (z) must be the same as length (y)", msg); error (msg); endif else ! error ("mesh: x and y must be vectors and z must be a matrix"); endif else ! usage ("mesh (z, levels, x, y)"); endif endfunction --- 73,87 ---- gset view 0, 0, 1, 1; gsplot zz w l 1; else ! msg = "contour: rows (z) must be the same as length (x) and"; msg = sprintf ("%s\ncolumns (z) must be the same as length (y)", msg); error (msg); endif else ! error ("contour: x and y must be vectors and z must be a matrix"); endif else ! usage ("contour (z, levels, x, y)"); endif endfunction diff -cNr octave-2.0.8/scripts/plot/loglog.m octave-2.0.9/scripts/plot/loglog.m *** octave-2.0.8/scripts/plot/loglog.m Thu Nov 14 22:50:59 1996 --- octave-2.0.9/scripts/plot/loglog.m Wed Jun 25 21:37:09 1997 *************** *** 33,38 **** --- 33,42 ---- function loglog (...) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + gset logscale x; gset logscale y; gset nopolar; diff -cNr octave-2.0.8/scripts/plot/mesh.m octave-2.0.9/scripts/plot/mesh.m *** octave-2.0.8/scripts/plot/mesh.m Thu Nov 14 22:50:55 1996 --- octave-2.0.9/scripts/plot/mesh.m Wed Jun 25 21:31:55 1997 *************** *** 32,37 **** --- 32,41 ---- function mesh (x, y, z) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + if (nargin == 1) z = x; if (is_matrix (z)) *************** *** 69,74 **** --- 73,79 ---- gset parametric; gset view 60, 30, 1, 1 gsplot (zz); + gset noparametric; else msg = "mesh: rows (z) must be the same as length (x) and"; msg = sprintf ("%s\ncolumns (z) must be the same as length (y)", msg); *************** *** 95,100 **** --- 100,106 ---- gset parametric; gset view 60, 30, 1, 1 gsplot (zz); + gset noparametric; else error ("mesh: x, y, and z must have same dimensions"); endif diff -cNr octave-2.0.8/scripts/plot/plot.m octave-2.0.9/scripts/plot/plot.m *** octave-2.0.8/scripts/plot/plot.m Thu Nov 14 22:50:06 1996 --- octave-2.0.9/scripts/plot/plot.m Wed Jun 25 21:37:03 1997 *************** *** 65,70 **** --- 65,74 ---- function plot (...) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + gset nologscale; gset nopolar; diff -cNr octave-2.0.8/scripts/plot/polar.m octave-2.0.9/scripts/plot/polar.m *** octave-2.0.8/scripts/plot/polar.m Thu Nov 14 22:49:57 1996 --- octave-2.0.9/scripts/plot/polar.m Wed Jun 25 21:37:00 1997 *************** *** 30,35 **** --- 30,39 ---- function polar (x1, x2, fmt) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + gset nologscale; gset nopolar; diff -cNr octave-2.0.8/scripts/plot/semilogx.m octave-2.0.9/scripts/plot/semilogx.m *** octave-2.0.8/scripts/plot/semilogx.m Thu Nov 14 22:49:52 1996 --- octave-2.0.9/scripts/plot/semilogx.m Wed Jun 25 21:36:53 1997 *************** *** 33,38 **** --- 33,42 ---- function semilogx (...) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + gset logscale x; gset nologscale y; gset nopolar; diff -cNr octave-2.0.8/scripts/plot/semilogy.m octave-2.0.9/scripts/plot/semilogy.m *** octave-2.0.8/scripts/plot/semilogy.m Thu Nov 14 22:49:48 1996 --- octave-2.0.9/scripts/plot/semilogy.m Wed Jun 25 21:36:56 1997 *************** *** 33,38 **** --- 33,42 ---- function semilogy (...) + ## XXX FIXME XXX -- these plot states should really just be set + ## temporarily, probably inside an unwind_protect block, but there is + ## no way to determine their current values. + gset nologscale x; gset logscale y; gset nopolar; diff -cNr octave-2.0.8/scripts/polynomial/polyfit.m octave-2.0.9/scripts/polynomial/polyfit.m *** octave-2.0.8/scripts/polynomial/polyfit.m Mon Jul 15 17:20:21 1996 --- octave-2.0.9/scripts/polynomial/polyfit.m Tue Jul 8 18:44:33 1997 *************** *** 17,33 **** ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. ! ## usage: polyfit (x, y, n) ## ## Returns the coefficients of a polynomial p(x) of degree n that ## minimizes sumsq (p(x(i)) - y(i)), i.e., that best fits the data ## in the least squares sense. ## Author: KH ## Created: 13 December 1994 ## Adapted-By: jwe ! function p = polyfit (x, y, n) if (nargin != 3) --- 17,36 ---- ## Software Foundation, 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. ! ## usage: [p, yf] = polyfit (x, y, n) ## ## Returns the coefficients of a polynomial p(x) of degree n that ## minimizes sumsq (p(x(i)) - y(i)), i.e., that best fits the data ## in the least squares sense. + ## + ## If two outputs are requested, also return the values of the + ## polynomial for each value of x. ## Author: KH ## Created: 13 December 1994 ## Adapted-By: jwe ! function [p, yf] = polyfit (x, y, n) if (nargin != 3) *************** *** 46,67 **** x = reshape (x, l, 1); y = reshape (y, l, 1); ! X = ones (l, 1); ! if (n > 0) ! tmp = (x * ones (1, n)) .^ (ones (l, 1) * (1 : n)); ! X = [X, tmp]; ! endif ! ## Compute polynomial coeffients, making returned value compatible ! ## with Matlab. ! [Q, R] = qr (X, 0); ! p = flipud (R \ (Q' * y)); if (! prefer_column_vectors) p = p'; endif endfunction --- 49,74 ---- x = reshape (x, l, 1); y = reshape (y, l, 1); ! ## Unfortunately, the economy QR factorization doesn't really save ! ## memory doing the computation -- the returned values are just ! ## smaller. ! ## [Q, R] = qr (X, 0); ! ## p = flipud (R \ (Q' * y)); ! ## XXX FIXME XXX -- this is probably not so good for extreme values of ! ## N or X... ! X = (x * ones (1, n+1)) .^ (ones (l, 1) * (0 : n)); ! p = flipud ((X' * X) \ (X' * y)); if (! prefer_column_vectors) p = p'; + endif + + if (nargout == 2) + yf = X * p; endif endfunction diff -cNr octave-2.0.8/src/ChangeLog octave-2.0.9/src/ChangeLog *** octave-2.0.8/src/ChangeLog Mon Jun 23 14:27:09 1997 --- octave-2.0.9/src/ChangeLog Wed Jul 9 19:45:15 1997 *************** *** 1,3 **** --- 1,32 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + + * sysdep.cc (octave_getcwd): If getwd is available, use it. + Call error handler if we can't find the current directory. + + Mon Jul 7 21:14:07 1997 John W. Eaton + + * qr.cc (Fqr): Correctly handle nargout == 0. + + Wed Jul 2 16:47:09 1997 John W. Eaton + + * matherr.c: New file. Move matherr function here. + * sysdep.cc: From here. + * Makefile.in (SOURCES): Add matherr.c to the list. + + * error.cc (handle_message): Avoid bug in g++ snapshot. + + Thu Jun 26 22:04:09 1997 John W. Eaton + + * utils.cc (file_in_path): Add default load path to PATH arg if + it begins or ends with a colon. + + Wed Jun 25 10:51:03 1997 John W. Eaton + + * pt-fvc.cc (tree_indirect_ref::reference): Always make returned + value unique. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. diff -cNr octave-2.0.8/src/Makefile.in octave-2.0.9/src/Makefile.in *** octave-2.0.8/src/Makefile.in Wed Jun 4 02:12:22 1997 --- octave-2.0.9/src/Makefile.in Wed Jul 2 16:52:51 1997 *************** *** 100,106 **** SOURCES := BaseSLList.cc Map.cc SLList.cc SLStack.cc Stack.cc \ data.cc defaults.cc dirfns.cc dynamic-ld.cc error.cc \ file-io.cc fn-cache.cc gripes.cc help.cc input.cc lex.l \ ! load-save.cc mappers.cc oct-fstrm.cc oct-hist.cc \ oct-iostrm.cc oct-map.cc oct-obj.cc oct-prcstrm.cc \ oct-procbuf.cc oct-stdstrm.cc oct-stream.cc oct-strstrm.cc \ pager.cc parse.y pr-output.cc procstream.cc pt-base.cc \ --- 100,106 ---- SOURCES := BaseSLList.cc Map.cc SLList.cc SLStack.cc Stack.cc \ data.cc defaults.cc dirfns.cc dynamic-ld.cc error.cc \ file-io.cc fn-cache.cc gripes.cc help.cc input.cc lex.l \ ! load-save.cc mappers.cc matherr.c oct-fstrm.cc oct-hist.cc \ oct-iostrm.cc oct-map.cc oct-obj.cc oct-prcstrm.cc \ oct-procbuf.cc oct-stdstrm.cc oct-stream.cc oct-strstrm.cc \ pager.cc parse.y pr-output.cc procstream.cc pt-base.cc \ diff -cNr octave-2.0.8/src/defaults.cc octave-2.0.9/src/defaults.cc *** octave-2.0.8/src/defaults.cc Mon May 19 20:15:17 1997 --- octave-2.0.9/src/defaults.cc Thu Jun 26 21:16:14 1997 *************** *** 403,409 **** } static int ! loadpath (void) { int status = 0; --- 403,409 ---- } static int ! octave_loadpath (void) { int status = 0; *************** *** 429,435 **** 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 (IMAGEPATH, OCTAVE_IMAGEPATH, 0, imagepath, --- 429,435 ---- DEFVAR (EXEC_PATH, Vexec_path, 0, exec_path, "colon separated list of directories to search for programs to run"); ! DEFVAR (LOADPATH, Vload_path, 0, octave_loadpath, "colon separated list of directories to search for scripts"); DEFVAR (IMAGEPATH, OCTAVE_IMAGEPATH, 0, imagepath, diff -cNr octave-2.0.8/src/error.cc octave-2.0.9/src/error.cc *** octave-2.0.8/src/error.cc Mon May 19 19:55:14 1997 --- octave-2.0.9/src/error.cc Wed Jul 2 16:48:11 1997 *************** *** 213,219 **** if (nargin > 0) { ! octave_value arg = ((nargin > 1) ? Fsprintf (args, 1) : args) (0); if (arg.is_defined ()) { --- 213,227 ---- if (nargin > 0) { ! octave_value arg; ! ! if (nargin > 1) ! { ! octave_value_list tmp = Fsprintf (args, 1); ! arg = tmp(0); ! } ! else ! arg = args(0); if (arg.is_defined ()) { diff -cNr octave-2.0.8/src/matherr.c octave-2.0.9/src/matherr.c *** octave-2.0.8/src/matherr.c Wed Dec 31 18:00:00 1969 --- octave-2.0.9/src/matherr.c Wed Jul 2 17:24:21 1997 *************** *** 0 **** --- 1,59 ---- + /* + + Copyright (C) 1997 John W. Eaton + + This file is part of Octave. + + Octave is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + Octave is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with Octave; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + */ + + #ifdef HAVE_CONFIG_H + #include + #endif + + #if defined (EXCEPTION_IN_MATH) + + #include + + int + matherr (struct exception *x) + { + /* Possibly print our own message someday. Should probably be + user-switchable. */ + + switch (x->type) + { + case DOMAIN: + case SING: + case OVERFLOW: + case UNDERFLOW: + case TLOSS: + case PLOSS: + default: + break; + } + + /* But don't print the system message. */ + + return 1; + } + #endif + + /* + ;;; Local Variables: *** + ;;; mode: C *** + ;;; End: *** + */ diff -cNr octave-2.0.8/src/pt-fvc.cc octave-2.0.9/src/pt-fvc.cc *** octave-2.0.8/src/pt-fvc.cc Mon Feb 24 20:54:13 1997 --- octave-2.0.9/src/pt-fvc.cc Wed Jun 25 11:24:30 1997 *************** *** 538,543 **** --- 538,544 ---- else if (indir) { octave_value& tmp = indir->reference (); + tmp.make_unique (); if (tmp.is_undefined () || ! tmp.is_map ()) tmp = Octave_map (); return tmp.struct_elt_ref (nm); diff -cNr octave-2.0.8/src/qr.cc octave-2.0.9/src/qr.cc *** octave-2.0.8/src/qr.cc Wed Jan 29 08:25:05 1997 --- octave-2.0.9/src/qr.cc Tue Jul 8 17:32:42 1997 *************** *** 73,79 **** else if (arg_is_empty > 0) return octave_value_list (3, Matrix ()); ! QR::type type = nargout == 1 ? QR::raw : (nargin == 2 ? QR::economy : QR::std); if (arg.is_real_type ()) --- 73,79 ---- else if (arg_is_empty > 0) return octave_value_list (3, Matrix ()); ! QR::type type = (nargout == 0 || nargout == 1) ? QR::raw : (nargin == 2 ? QR::economy : QR::std); if (arg.is_real_type ()) *************** *** 82,99 **** if (! error_state) { ! if (nargout < 3) { ! QR fact (m, type); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! else ! { ! QRP fact (m, type); ! retval(2) = fact.P (); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); } } } --- 82,113 ---- if (! error_state) { ! switch (nargout) { ! case 0: ! case 1: ! { ! QR fact (m, type); ! retval(0) = fact.R (); ! } ! break; ! ! case 2: ! { ! QR fact (m, type); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! break; ! ! default: ! { ! QRP fact (m, type); ! retval(2) = fact.P (); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! break; } } } *************** *** 103,120 **** if (! error_state) { ! if (nargout < 3) { ! ComplexQR fact (m, type); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! else ! { ! ComplexQRP fact (m, type); ! retval(2) = fact.P (); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); } } } --- 117,148 ---- if (! error_state) { ! switch (nargout) { ! case 0: ! case 1: ! { ! ComplexQR fact (m, type); ! retval(0) = fact.R (); ! } ! break; ! ! case 2: ! { ! ComplexQR fact (m, type); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! break; ! ! default: ! { ! ComplexQRP fact (m, type); ! retval(2) = fact.P (); ! retval(1) = fact.R (); ! retval(0) = fact.Q (); ! } ! break; } } } diff -cNr octave-2.0.8/src/sysdep.cc octave-2.0.9/src/sysdep.cc *** octave-2.0.8/src/sysdep.cc Mon Jun 23 09:40:10 1997 --- octave-2.0.9/src/sysdep.cc Wed Jul 9 19:42:18 1997 *************** *** 153,186 **** } #endif - // XXX FIXME XXX -- some systems define struct __exception. - - #if defined (EXCEPTION_IN_MATH) - extern "C" - int - matherr (struct exception *x) - { - // Possibly print our own message someday. Should probably be - // user-switchable. - - switch (x->type) - { - case DOMAIN: - case SING: - case OVERFLOW: - case UNDERFLOW: - case TLOSS: - case PLOSS: - default: - break; - } - - // But don't print the system message. - - return 1; - } - #endif - void sysdep_init (void) { --- 153,158 ---- *************** *** 363,378 **** octave_getcwd (void) { string retval; char buf[MAXPATHLEN]; #if defined (__EMX__) ! char *tmp = _getcwd2 (buf, MAXPATHLEN); ! #else ! char *tmp = getcwd (buf, MAXPATHLEN); #endif if (tmp) retval = tmp; return retval; } --- 335,357 ---- octave_getcwd (void) { string retval; + char buf[MAXPATHLEN]; + char *tmp = 0; + #if defined (__EMX__) ! tmp = _getcwd2 (buf, MAXPATHLEN); ! #elif defined (HAVE_GETWD) ! tmp = getwd (buf); ! #elif defined (HAVE_GETCWD) ! tmp = getcwd (buf, MAXPATHLEN); #endif if (tmp) retval = tmp; + else + error ("unable to find current directory"); return retval; } diff -cNr octave-2.0.8/src/utils.cc octave-2.0.9/src/utils.cc *** octave-2.0.8/src/utils.cc Fri Nov 8 18:04:29 1996 --- octave-2.0.9/src/utils.cc Thu Jun 26 22:05:53 1997 *************** *** 263,269 **** if (argc == 3) { ! string fname = search_path_for_file (argv[1], argv[2]); if (fname.empty ()) retval = Matrix (); --- 263,271 ---- if (argc == 3) { ! string path = maybe_add_default_load_path (argv[1]); ! ! string fname = search_path_for_file (path, argv[2]); if (fname.empty ()) retval = Matrix (); diff -cNr octave-2.0.8/src/version.h octave-2.0.9/src/version.h *** octave-2.0.8/src/version.h Thu Jun 12 12:32:18 1997 --- octave-2.0.9/src/version.h Wed Jul 2 16:55:04 1997 *************** *** 20,26 **** */ ! #define OCTAVE_VERSION "2.0.8" #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997 John W. Eaton." --- 20,26 ---- */ ! #define OCTAVE_VERSION "2.0.9" #define OCTAVE_COPYRIGHT \ "Copyright (C) 1996, 1997 John W. Eaton." diff -cNr octave-2.0.8/test/ChangeLog octave-2.0.9/test/ChangeLog *** octave-2.0.8/test/ChangeLog Mon Jun 23 14:27:05 1997 --- octave-2.0.9/test/ChangeLog Wed Jul 9 19:45:00 1997 *************** *** 1,3 **** --- 1,7 ---- + Wed Jul 9 19:44:54 1997 John W. Eaton + + * Version 2.0.9 released. + Mon Jun 23 14:26:56 1997 John W. Eaton * Version 2.0.8 released. PATCH_EOF