Mercurial > hg > octave-lojdl
changeset 2621:337a09dd1c06
[project @ 1997-01-24 21:49:41 by jwe]
author | jwe |
---|---|
date | Fri, 24 Jan 1997 21:55:06 +0000 |
parents | 5c773d4745d6 |
children | bcfaa40e4d7b |
files | ChangeLog NEWS PROJECTS README.Linux aclocal.m4 doc/interpreter/emacs.texi doc/interpreter/install.texi doc/interpreter/octave.texi doc/interpreter/program.texi libcruft/ChangeLog libcruft/misc/d1mach.f libcruft/misc/machar.c liboctave/ChangeLog liboctave/CmplxSVD.cc liboctave/dbleSVD.cc scripts/ChangeLog scripts/miscellaneous/xor.m scripts/specfun/erfinv.m src/ChangeLog src/lex.l src/mk-oct-links.in test/ChangeLog test/octave.test/return/return.exp test/octave.test/unwind/unwind-2.m |
diffstat | 24 files changed, 264 insertions(+), 128 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Wed Jan 22 11:14:07 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * aclocal.m4 (ld_run_path): Anchor search at beginning of line to + avoid GNU sed bug on HP-UX systems. Use just one sed command. + + * emacs/octave-hlp.el, emacs/octave-inf.el, emacs/octave-mod.el: + New files from Kurt Hornik. + * emacs/octave.el: Delete. + Mon Jan 20 11:16:21 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * mkoctfile.in (ALL_CXXFLAGS): Delete reference to -lg++.
--- a/NEWS +++ b/NEWS @@ -1,6 +1,14 @@ Summary of changes for version 2.0.2: ------------------------------------ + * Octave now stops executing commands from a script file if an error + is encountered. + + * The return, and break commands now cause Octave to quit executing + commands from script files. When used in invalid contexts, the + break, continue, and return commands are now simply ignored + instead of producing parse errors. + * size ("") is now [0, 0]. Summary of changes for version 2.0:
--- a/PROJECTS +++ b/PROJECTS @@ -394,10 +394,6 @@ * print_usage() should set error_state in most cases? - * Add an option to make Octave quit executing a script when error() is - called. Also make it possible for `return' or `break' to exit a - script. - * Make statements like this foo bar baz
--- a/README.Linux +++ b/README.Linux @@ -41,6 +41,8 @@ for the libraries. If it is not, please ask the maintainers of the libraries to clarify the documentation. +Please note that I am NOT + Octave won't even compile -------------------------
--- a/aclocal.m4 +++ b/aclocal.m4 @@ -126,8 +126,7 @@ fi dnl ld_run_path=`echo $foutput | \ - sed -n -e 's/.*\(LD_RUN_PATH *= *[^ ]*\).*/\1/p' | \ - sed -e 's/LD_RUN_PATH *= *//'` + sed -n -e 's/^.*\(LD_RUN_PATH *= *\([^ ]*\).*/\1/p'` dnl dnl We are only supposed to find this on Solaris systems, and this dnl substitution is probably only going to work with gcc on those
--- a/doc/interpreter/emacs.texi +++ b/doc/interpreter/emacs.texi @@ -1,6 +1,6 @@ -@c Copyright (C) 1996 John W. Eaton -@c Written by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> on 1996/05/17 -@c Updated for octave.el version 0.8.3 by KH on 1996/07/02 +@c Copyright (C) 1996, 1997 John W. Eaton +@c Written by Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> on 1996/05/17. +@c Last updated by KH on 1997/01/22. @c This is part of the Octave manual. @c For copying conditions, see the file gpl.texi. @@ -28,14 +28,31 @@ or suggestions on using Emacs with Octave. @menu -* Setting Up Octave Mode:: +* Installing the Emacs Octave Package:: * Using Octave Mode:: * Running Octave From Within Emacs:: * Using the Emacs Info Reader for Octave:: @end menu -@node Setting Up Octave Mode, Using Octave Mode, Emacs, Emacs -@section Setting Up Octave Mode +@node Installing the Emacs Octave Package, Using Octave Mode, Emacs, Emacs +@section Installing the Emacs Octave Package + +The Emacs package @file{octave} consists of the three files +@file{octave-mod.el}, @file{octave-inf.el}, and @file{octave-hlp.el}. +These files, or better yet their byte-compiled versions, should be +somewhere in your Emacs load-path. + +If you have GNU Emacs with a version number at least as high as 19.35, +you are all set up, because the package is respectively will be part of +GNU Emacs as of version 19.35. + +Otherwise, copy the three files from the @file{emacs} subdirectory of +the Octave distribution to a place where Emacs can find them (this +depends on how your Emacs was installed). Byte-compile them for speed +if you want. + +@node Using Octave Mode, Running Octave From Within Emacs, Installing the Emacs Octave Package, Emacs +@section Using Octave Mode If you are lucky, your sysadmins have already arranged everything so that Emacs automatically goes into Octave mode whenever you visit an @@ -44,23 +61,12 @@ @enumerate @item -Make sure that the file @file{octave.el} (or better, its byte-compiled -version @file{octave.elc}) from the Octave distribution is somewhere in -your load-path. - -@quotation -@strong{Note:} The current version of @file{octave.el} was developed, -tested and byte-compiled under GNU Emacs 19.31. It may not work under -other Emacs versions, in particular under XEmacs. -@end quotation - -@item To begin using Octave mode for all @file{.m} files you visit, add the following lines to a file loaded by Emacs at startup time, typically your @file{~/.emacs} file: @lisp -(autoload 'octave-mode "octave" nil t) +(autoload 'octave-mode "octave-mod" nil t) (setq auto-mode-alist (cons '(\"\\\\.m$\" . octave-mode) auto-mode-alist)) @end lisp @@ -81,9 +87,6 @@ Font-lock mode. @end enumerate -@node Using Octave Mode, Running Octave From Within Emacs, Setting Up Octave Mode, Emacs -@section Using Octave Mode - In Octave mode, the following special Emacs commands can be used in addition to the standard Emacs commands. @@ -102,14 +105,15 @@ @item ; Insert an ``electric'' semicolon (@code{octave-electric-semi}). If -@code{octave-auto-indent} is non-@code{nil}, typing a @samp{;} +@code{octave-auto-newline} is non-@code{nil}, typing a @samp{;} automatically reindents the current line, inserts a newline and indents the new line. @item ` Start entering an abbreviation (@code{octave-abbrev-start}). If Abbrev mode is turned on, typing @kbd{`C-h} or @kbd{`?} lists all abbrevs. -Any other key combination is executed normally. +Any other key combination is executed normally. Note that all Octave +abbrevs start with a grave accent. @item M-LFD Break line at point and insert continuation marker and alignment @@ -142,11 +146,19 @@ Properly indents the Octave function which contains point (@code{octave-indent-defun}). +@item M-; +If there is no comment already on this line, create a code-level comment +(started by two comment characters) if the line is empty, or an in-line +comment (started by one comment character) otherwise +(@code{octave-indent-for-comment}). +Point is left after the start of the comment which is properly aligned. + @item C-c ; -Puts the first character of @code{octave-comment-start} (usually -@samp{#}) at the beginning of every line in the region -(@code{octave-comment-region}). With just @kbd{C-u} prefix argument, -uncomment each line in the region. +Puts the comment character @samp{#} (more precisely, the string value of +@code{octave-comment-start}) at the beginning of every line in the +region (@code{octave-comment-region}). With just @kbd{C-u} prefix +argument, uncomment each line in the region. A numeric prefix argument +@var{N} means use @var{N} comment characters. @item C-c : Uncomments every line in the region (@code{octave-uncomment-region}). @@ -224,8 +236,8 @@ The variable @code{octave-help-files} is a list of files to search through and defaults to @code{'("octave")}. If there is also an Octave -Local Guide with corresponding info file @file{octave-LG} (for example), -you can have @code{octave-help} search both files by +Local Guide with corresponding info file, say, @file{octave-LG}, you can +have @code{octave-help} search both files by @lisp (setq octave-help-files '("octave" "octave-LG")) @end lisp @@ -282,15 +294,6 @@ Extra indentation applied to statements in block structures. Default is 2. -@item octave-comment-column -Column to indent right-margin comments to. -Default is 32. -(Such comments are created using @key{M-;} (@code{indent-for-comment}).) - -@item octave-comment-start -Delimiter inserted to start new comment. -Default value is @samp{# }. - @item octave-continuation-offset Extra indentation applied to Octave continuation lines. Default is 4. @@ -299,14 +302,9 @@ String used for Octave continuation lines. Normally @samp{\}. -@item octave-fill-column -Column beyond which automatic line-wrapping should happen. -Default is 72. - -@item octave-inhibit-startup-message -If @code{t}, no startup message is displayed when Octave mode is -called. -Default is @code{nil}. +@item octave-mode-startup-message +If @code{t} (default), a startup message is displayed when Octave mode +is called. @end table @@ -356,16 +354,20 @@ to directly start an inferior Octave process. If Emacs does not know about this command, add the line @lisp -(autoload 'run-octave "octave" nil t) +(autoload 'run-octave "octave-inf" nil t) @end lisp @noindent to your @file{.emacs} file. This will start Octave in a special buffer the name of which is specified by the variable @code{inferior-octave-buffer} and defaults to -@code{"*Octave Interaction*"}. From within this buffer, you can +@code{"*Inferior Octave*"}. From within this buffer, you can interact with the inferior Octave process `as usual', i.e., by entering -Octave commands at the prompt. +Octave commands at the prompt. The buffer is in Inferior Octave mode, +which is derived from the standard Comint mode, a major mode for +interacting with an inferior interpreter. See the documentation for +@code{comint-mode} for more details, and use @kbd{C-h b} to find out +about available special keybindings. You can also communicate with an inferior Octave process from within files with Octave code (i.e., buffers in Octave mode), using the @@ -391,7 +393,7 @@ Make sure that `inferior-octave-buffer' is displayed (@code{octave-show-process-buffer}). @item C-c i h -Delete all windows that display @file{inferior-octave-buffer} +Delete all windows that display the inferior Octave buffer (@code{octave-hide-process-buffer}). @item C-c i k Kill the inferior Octave process and its buffer @@ -423,7 +425,7 @@ startup; note that these commands will not produce any visible output in the process buffer. Which file to use is controlled by the variable @code{inferior-octave-startup-file}. If this is @code{nil}, the file -@file{~/.emacs_octave} is used if it exists. +@file{~/.emacs-octave} is used if it exists. And finally, @code{inferior-octave-mode-hook} is run after starting the process and putting its buffer into Inferior Octave mode. Hence, if you @@ -456,16 +458,17 @@ You can also set up the Emacs Info reader for dealing with the results of Octave's @samp{help -i}. For this, the package @file{gnuserv} needs -to be installed. The @file{gnuserv} package is not distributed with GNU -Emacs, but it can be retrieved from any GNU Emacs Lisp Code Directory -archive, e.g.@: +to be installed, which unfortunately still does not come with GNU Emacs +(it does with XEmacs). It can be retrieved from any GNU Emacs Lisp Code +Directory archive, e.g.@: @file{ftp://ftp.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive}, -in the @file{packages} subdirectory. There is also a newer version -around (use archie to look for @file{gnuserv-2.1alpha.tar.gz}). +in the @file{packages} subdirectory. The alpha version of an enhanced +version of gnuserv is available at +@file{ftp://ftp.wellfleet.com/netman/psmith/emacs/gnuserv-2.1alpha.tar.gz}. If @file{gnuserv} is installed, add the lines @lisp -(autoload 'octave-help "octave" nil t) +(autoload 'octave-help "octave-hlp" nil t) (require 'gnuserv) (gnuserv-start) @end lisp @@ -480,9 +483,9 @@ that the Emacs variable @code{octave-help-files} is set correctly). In this case, set @code{INFO_PROGRAM} to @code{"info-emacs-octave-help"}. -If you use Octave from within Emacs, it is probably best to put these -settings in the @file{~/.emacs_octave} startup file (or in the file -named by the Emacs variable @code{inferior-octave-startup-file}). +If you use Octave from within Emacs, these settings are best done in the +@file{~/.emacs-octave} startup file (or the file pointed to by the Emacs +variable @code{inferior-octave-startup-file}). @c Local Variables: @c TeX-command-default: "Texinfo"
--- a/doc/interpreter/install.texi +++ b/doc/interpreter/install.texi @@ -183,10 +183,27 @@ @samp{ldso} package. @item -You may need to edit some files in the gcc include subdirectory to add -prototypes for functions there. For example, Ultrix 4.2 needs proper -declarations for the @code{signal()} and the @code{SIG_IGN} macro in the -file @file{signal.h}. +If you encounter errors like + +@smallexample +@group +passing `void (*)()' as argument 2 of + `octave_set_signal_handler(int, void (*)(int))' +@end group +@end smallexample + +@noindent +or + +@smallexample +warning: ANSI C++ prohibits conversion from `(int)' to `(...)' +@end smallexample + +@noindent +while compiling @file{sighandlers.cc}, you may need to edit some files +in the gcc include subdirectory to add proper prototypes for functions +there. For example, Ultrix 4.2 needs proper declarations for the +@code{signal()} and the @code{SIG_IGN} macro in the file @file{signal.h}. On some systems the @code{SIG_IGN} macro is defined to be something like this: @@ -203,11 +220,25 @@ @end example @noindent -to match the prototype declaration for @code{signal()}. +to match the prototype declaration for @code{signal()}. This change +should also be made for the @code{SIG_DFL} and @code{SIG_ERR} symbols. +It may be necessary to change the definitions in @file{sys/signal.h} as +well. + +The gcc fixincludes/fixproto script should probably fix these problems +when gcc installs its modified set of header files, but I don't think +that's been done yet. -The gcc fixincludes/fixproto script should probably fix this when gcc -installs its modified set of header files, but I don't think that's -been done yet. +@strong{You should not change the files in @file{/usr/include}}. You +can find the gcc include directory tree by running the command + +@example +gcc -print-libgcc-file-name +@end example + +@noindent +The directory of gcc include files normally begins in the same directory +that contains the file @file{libgcc.a}. @item There is a bug with the makeinfo program that is distributed with
--- a/doc/interpreter/octave.texi +++ b/doc/interpreter/octave.texi @@ -323,7 +323,7 @@ Using Emacs With Octave -* Setting Up Octave Mode:: +* Installing the Emacs Octave Package:: * Using Octave Mode:: * Running Octave From Within Emacs:: * Using the Emacs Info Reader for Octave::
--- a/doc/interpreter/program.texi +++ b/doc/interpreter/program.texi @@ -283,19 +283,35 @@ 0. @end deftypefn -@deftypefn {Built-in Function} {} error (@var{msg}) -Print the message @var{msg}, prefixed by the string @samp{error: }, and -set Octave's internal error state such that control will return to the -top level without evaluating any more commands. This is useful for -aborting from functions. +@deftypefn {Built-in Function} {} error (@var{template}, @dots{}) +The @code{error} function formats the optional arguments under the +control of the template string @var{template} using the same rules as +the @code{printf} family of functions (@pxref{Formatted Output}). +The resulting message is prefixed by the string @samp{error: } and +printed on the @code{stderr} stream. -If @var{msg} does not end with a new line character, Octave will print a -traceback of all the function calls leading to the error. For example, +Calling @code{error} also sets Octave's internal error state such that +control will return to the top level without evaluating any more +commands. This is useful for aborting from functions or scripts. + +If the error message does not end with a new line character, Octave will +print a traceback of all the function calls leading to the error. For +example, given the following function definitions: @example +@group function f () g () end function g () h () end function h () nargin == 1 || error ("nargin != 1"); end +@end group +@end example + +@noindent +calling the function @code{f()} will result in a list of messages that +can help you to quickly locate the exact location of the error: + +@example +@group f () error: nargin != 1 error: evaluating index expression near line 1, column 30 @@ -303,22 +319,21 @@ error: called from `h' error: called from `g' error: called from `f' +@end group @end example -@noindent -produces a list of messages that can help you to quickly locate the -exact location of the error. - -If @var{msg} ends in a new line character, Octave will only print -@var{msg} and will not display any traceback messages as it returns +If the error message ends in a new line character, Octave will print the +message but will not display any traceback messages as it returns control to the top level. For example, modifying the error message in the previous example to end in a new line causes Octave to only print a single message: @example +@group function h () nargin == 1 || error ("nargin != 1\n"); end f () error: nargin != 1 +@end group @end example @end deftypefn
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,9 @@ +Wed Jan 22 15:03:33 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc/Makefile.in (pic/machar.o): Add $(CPICFLAG) for this target. + + * misc/d1mach.f (d1mach): Move SAVE statement ahead of DATA statment. + Wed Jan 15 21:04:29 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * blas/*.f: Update to latest version from Netlib.
--- a/libcruft/misc/d1mach.f +++ b/libcruft/misc/d1mach.f @@ -2,8 +2,8 @@ integer i logical init double precision dmach(5) + save init, dmach data init /.false./ - save init, dmach if (.not. init) then call machar (dmach(1), dmach(2), dmach(3), dmach(4), dmach(5)) init = .true.
--- a/libcruft/misc/machar.c +++ b/libcruft/misc/machar.c @@ -19,7 +19,7 @@ #define PREC "Single " #define REALSIZE 1 #endif - + #ifdef DP #define REAL double #define ZERO 0.0e0 @@ -27,7 +27,7 @@ #define PREC "Double " #define REALSIZE 2 #endif - + #include <math.h> #include <stdio.h> @@ -54,9 +54,9 @@ translation of the Fortran 77 program in W. J. Cody, "MACHAR: A subroutine to dynamically determine machine parameters". TOMS (14), 1988. - + Parameter values reported are as follows: - + ibeta - the radix for the floating-point representation it - the number of base ibeta digits in the floating-point significand @@ -112,12 +112,12 @@ second, or perhaps third, largest number, being too small by 1 or 2 units in the last digit of the significand. - + Latest revision - August 4, 1988 - + Author - W. J. Cody Argonne National Laboratory - + */ { @@ -189,11 +189,11 @@ (*negep) = (*it) + 3; betain = one / beta; a = one; - + for (i = 1; i<=(*negep); i++) { a = a * betain; } - + b = a; tmp = (one-a); tmp = tmp-one; @@ -223,7 +223,7 @@ } *eps = a; - + /* determine ngrd */ @@ -286,7 +286,7 @@ } mx = iz + iz - 1; } - + /* loop to determine minexp, xmin. exit from loop is signaled by an underflow. @@ -352,14 +352,14 @@ (*xmax) = (*xmax) / (beta * beta * beta * (*xmin)); i = (*maxexp) + (*minexp) + 3; if (i > 0) { - + for (j = 1; j<=i; j++ ) { if ((*ibeta) == 2) (*xmax) = (*xmax) + (*xmax); if ((*ibeta) != 2) (*xmax) = (*xmax) * beta; } } - + return; }
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,8 @@ +Wed Jan 22 16:18:53 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleSVD.cc (SVD::init): Work around apparent dgesvd() bug. + * CmplxSVD.cc (ComplexSVD::init): Work around apparent zgesvd() bug. + Mon Jan 20 18:44:11 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * chMatrix.cc (charMatrix::charMatrix (const string&)):
--- a/liboctave/CmplxSVD.cc +++ b/liboctave/CmplxSVD.cc @@ -99,7 +99,15 @@ break; case SVD::sigma_only: - jobu = jobv = 'N'; + + // Note: for this case, both jobu and jobv should be 'N', but + // there seems to be a bug in dgesvd from Lapack V2.0. To + // demonstrate the bug, set both jobu and jobv to 'N' and find + // the singular values of [eye(3), eye(3)]. The result is + // [-sqrt(2), -sqrt(2), -sqrt(2)]. + + jobu = 'O'; + jobv = 'N'; ncol_u = nrow_vt = 1; break; @@ -109,7 +117,7 @@ type_computed = svd_type; - if (jobu != 'N') + if (! (jobu == 'N' || jobu == 'O')) left_sm.resize (m, ncol_u); Complex *u = left_sm.fortran_vec (); @@ -117,7 +125,7 @@ sigma.resize (nrow_s, ncol_s); double *s_vec = sigma.fortran_vec (); - if (jobv != 'N') + if (! (jobv == 'N' || jobv == 'O')) right_sm.resize (nrow_vt, n); Complex *vt = right_sm.fortran_vec (); @@ -140,7 +148,7 @@ (*current_liboctave_error_handler) ("unrecoverable error in zgesvd"); else { - if (jobv != 'N') + if (! (jobv == 'N' || jobv == 'O')) right_sm = right_sm.hermitian (); }
--- a/liboctave/dbleSVD.cc +++ b/liboctave/dbleSVD.cc @@ -99,7 +99,15 @@ break; case SVD::sigma_only: - jobu = jobv = 'N'; + + // Note: for this case, both jobu and jobv should be 'N', but + // there seems to be a bug in dgesvd from Lapack V2.0. To + // demonstrate the bug, set both jobu and jobv to 'N' and find + // the singular values of [eye(3), eye(3)]. The result is + // [-sqrt(2), -sqrt(2), -sqrt(2)]. + + jobu = 'O'; + jobv = 'N'; ncol_u = nrow_vt = 1; break; @@ -109,7 +117,7 @@ type_computed = svd_type; - if (jobu != 'N') + if (! (jobu == 'N' || jobu == 'O')) left_sm.resize (m, ncol_u); double *u = left_sm.fortran_vec (); @@ -117,7 +125,7 @@ sigma.resize (nrow_s, ncol_s); double *s_vec = sigma.fortran_vec (); - if (jobv != 'N') + if (! (jobv == 'N' || jobv == 'O')) right_sm.resize (nrow_vt, n); double *vt = right_sm.fortran_vec (); @@ -137,7 +145,7 @@ (*current_liboctave_error_handler) ("unrecoverable error in dgesvd"); else { - if (jobv != 'N') + if (! (jobv == 'N' || jobv == 'O')) right_sm = right_sm.transpose (); }
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,11 @@ +Wed Jan 22 11:28:30 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * specfun/erfinv.m: Avoid A([]) = X, X != [] error. + +Tue Jan 21 11:16:40 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/xor.m: Make it work. + Mon Jan 20 12:28:34 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * plot/sombrero.m: Doc fix.
--- a/scripts/miscellaneous/xor.m +++ b/scripts/miscellaneous/xor.m @@ -26,14 +26,14 @@ function z = xor (x, y) - if (nargin != 2) + if (nargin == 2) + if (is_scalar (x) || is_scalar (y) || size (x) == size (y)) + z = (x | y) - (x & y); + else + error ("xor: x and y must be of common size or scalars"); + endif + else usage ("xor (x, y)"); endif - if (is_scalar (x) || is_scalar (y) || size (x) == size (y)) - error ("xor: x and y must be of common size or scalars"); - endif - - z = (x | y) - (x & y); - endfunction
--- a/scripts/specfun/erfinv.m +++ b/scripts/specfun/erfinv.m @@ -37,8 +37,11 @@ y(i) = NaN * ones (length (i), 1); endif - y (find (x == -1)) = (-Inf) * ones (sum (x == -1), 1); - y (find (x == 1)) = Inf * ones (sum (x == 1), 1); + t = find (x == -1); + y (tmp) = (-Inf) * ones (size (t)); + + t = find (x == 1); + y (t) = Inf * ones (size (t)); i = find ((x > -1) & (x < 1)); if any (i)
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +Fri Jan 24 10:05:00 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mk-oct-links.in: New arg, -p, to just print list of files to link. + + * lex.l (handle_number): Convert `D' or `d' exponents to `e' + before scanning. + Thu Jan 23 10:00:00 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * pt-pr-code.h, pt-pr-code.cc (tree_print_code::visit_no_op_command):
--- a/src/lex.l +++ b/src/lex.l @@ -1341,8 +1341,17 @@ static void handle_number (char *yytext) { + char *tmp = strsave (yytext); + + char *idx = strpbrk (tmp, "Dd"); + + if (idx) + *idx = 'e'; + double value; - int nread = sscanf (yytext, "%lf", &value); + int nread = sscanf (tmp, "%lf", &value); + + delete [] tmp; // If yytext doesn't contain a valid number, we are in deep doo doo.
--- a/src/mk-oct-links.in +++ b/src/mk-oct-links.in @@ -3,9 +3,17 @@ # Create additional links to .oct files that define more than one # function. -# The first arg is taken as the directory where the .oct files are -# installed. The remaining arguments should be the list of source -# files that were used to create the .oct files. +# If the first arg is -p, only print the links we need to make. + +# The first non-option arg is taken as the directory where the .oct +# files are installed. The remaining arguments should be the list of +# source files that were used to create the .oct files. + +print_only=false +if [ $1 = "-p" ]; then + print_only=true + shift +fi LN_S="%LN_S%" @@ -22,8 +30,12 @@ if [ "$n" = "$base" ]; then true else - echo "creating link $n.oct -> $base.oct" - ( cd $links_dir; rm -f $n.oct; $LN_S $base.oct $n.oct ) + if $print_only; then + echo $base.oct $n.oct + else + echo "creating link $n.oct -> $base.oct" + ( cd $links_dir; rm -f $n.oct; $LN_S $base.oct $n.oct ) + fi fi done fi
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +Thu Jan 23 13:48:19 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave.test/unwind/unwind-2.m: Scripts now stop executing when + errors are encountered. + + * octave.test/return/return.exp: Return at top level is no longer + an error. + Tue Jan 7 00:16:23 1997 John W. Eaton <jwe@bevo.che.wisc.edu> * Version 2.0.1 released.