# HG changeset patch # User jwe # Date 856380159 0 # Node ID 7a820bb7f406271b6dcf127340275280d5ed9ba0 # Parent cd5f72e530e20ed871f74b6c891a8c0e30df9486 [project @ 1997-02-19 19:22:34 by jwe] diff -r cd5f72e530e2 -r 7a820bb7f406 Announce --- a/Announce Wed Feb 19 19:16:17 1997 +0000 +++ b/Announce Wed Feb 19 19:22:39 1997 +0000 @@ -4,12 +4,16 @@ in the directory /pub/octave. Diffs from the previous release are also available in the same directory. + -rw-r--r-- 1 jwe 3312470 Feb 18 13:08 octave-2.0.3.tar.gz + -rw-r--r-- 1 jwe 217812 Feb 18 13:43 octave-2.0.2-2.0.3.patch. + In addition to the source distributions, there are binary -distributions available for Linux running on Intel systems and OSF/1 -running on Alpha systems. Binary distributions for other platforms -will be available from ftp.che.wisc.edu when they are contributed by -volunteers. If you would like to help to make a binary distribution -available, please contact bug-octave@bevo.che.wisc.edu. +distributions available for Linux running on Intel systems, OSF/1 +running on Alpha systems, and HA-UX 9.x running on HPPA systems. +Binary distributions for other platforms will be available from +ftp.che.wisc.edu when they are contributed by volunteers. If you +would like to help to make a binary distribution available, please +contact bug-octave@bevo.che.wisc.edu. Version 2.0.3 is primarily a bug-fixing release. Most bugs reported since the release of version 2.0.2 have been fixed. There are also a diff -r cd5f72e530e2 -r 7a820bb7f406 ChangeLog --- a/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,5 +1,13 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + Tue Feb 18 09:22:04 1997 John W. Eaton + * configure.in (SH_LDFLAGS): Fix typo in last change. + (RLD_FLAG): Don't forget to put -shared in SH_LDFLAGS for alpha + systems. + * Version 2.0.3 released. Tue Feb 18 00:33:36 1997 John W. Eaton diff -r cd5f72e530e2 -r 7a820bb7f406 NEWS --- a/NEWS Wed Feb 19 19:16:17 1997 +0000 +++ b/NEWS Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,12 @@ +Summary of changes for version 2.0.4: +------------------------------------ + + * It is now possible to use commands like ls, save, and cd as simple + variable names. They still cannot be used as formal parameters + for functions, or as the names of structure variables. Failed + assignments leave them undefined (you can recover the orginal + definition as a function using clear). + Summary of changes for version 2.0.3: ------------------------------------ diff -r cd5f72e530e2 -r 7a820bb7f406 PROJECTS --- a/PROJECTS Wed Feb 19 19:16:17 1997 +0000 +++ b/PROJECTS Wed Feb 19 19:22:39 1997 +0000 @@ -259,9 +259,6 @@ * Make it possible to get the names of the arguments that are passed to functions, at least if simple variables are passed. - * Fix name of text-style functions (or at least explain it in the - manual). - * Consider allowing an arbitrary property list to be attached to any variable. This could be a more general way to handle the help string that can currently be added with `document'. @@ -404,8 +401,6 @@ This is pretty ugly and introduces some conflicts. - * Make it possible to use text-style function names as variables. - * Add a command that works like bash's `builtin' command. * Handle comments in parse trees for use with the type command. diff -r cd5f72e530e2 -r 7a820bb7f406 configure.in --- a/configure.in Wed Feb 19 19:16:17 1997 +0000 +++ b/configure.in Wed Feb 19 19:22:39 1997 +0000 @@ -21,7 +21,7 @@ ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA ### 02111-1307, USA. -AC_REVISION($Revision: 1.255 $) +AC_REVISION($Revision: 1.256 $) AC_PREREQ(2.9) AC_INIT(src/octave.cc) AC_CONFIG_HEADER(config.h) @@ -397,7 +397,7 @@ CPICFLAG= CXXPICFLAG= FPICFLAG= - SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" + SH_LDFLAGS="-shared -Xlinker -expect_unresolved -Xlinker '*'" RLD_FLAG='-Xlinker -rpath -Xlinker $(libdir)' ;; changequote(,)dnl diff -r cd5f72e530e2 -r 7a820bb7f406 kpathsea/ChangeLog --- a/kpathsea/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/kpathsea/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,9 @@ +Tue Feb 18 17:36:03 1997 John W. Eaton + + * Makefile.in (pic/tex-file.o): Delete extra pic/ in commands. + + * configure.in (SH_LDFLAGS): Fix typo in last change. + Thu Feb 13 17:35:20 1997 John W. Eaton * configure.in: Update config for shared libraries. diff -r cd5f72e530e2 -r 7a820bb7f406 kpathsea/Makefile.in --- a/kpathsea/Makefile.in Wed Feb 19 19:16:17 1997 +0000 +++ b/kpathsea/Makefile.in Wed Feb 19 19:22:39 1997 +0000 @@ -145,7 +145,7 @@ pic/tex-file.o: $(CC) $(CPPFLAGS) $(CPICFLAG) $(CFLAGS) \ -DDEFAULT_FONT_SIZES='"$(default_texsizes)"'\ - -c $(srcdir)/tex-file.c -o pic/$@ + -c $(srcdir)/tex-file.c -o $@ # Need the -DHAVE_CONFIG_H. gmalloc.o: diff -r cd5f72e530e2 -r 7a820bb7f406 kpathsea/configure.in --- a/kpathsea/configure.in Wed Feb 19 19:16:17 1997 +0000 +++ b/kpathsea/configure.in Wed Feb 19 19:22:39 1997 +0000 @@ -28,7 +28,7 @@ ;; alpha-dec-osf*) CPICFLAG= - SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" + SH_LDFLAGS="-Xlinker -expect_unresolved -Xlinker '*'" ;; rs6000-ibm-aix* | powerpc-ibm-aix*) CPICFLAG= diff -r cd5f72e530e2 -r 7a820bb7f406 libcruft/ChangeLog --- a/libcruft/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/libcruft/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,7 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + Tue Feb 18 09:22:04 1997 John W. Eaton * Version 2.0.3 released. diff -r cd5f72e530e2 -r 7a820bb7f406 liboctave/ChangeLog --- a/liboctave/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/liboctave/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,11 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + +Wed Feb 19 09:42:30 1997 John W. Eaton + + * lo-ieee.cc: D'oh, it's `extern "C"', not `#extern "C"'. + Tue Feb 18 09:22:04 1997 John W. Eaton * Version 2.0.3 released. diff -r cd5f72e530e2 -r 7a820bb7f406 liboctave/lo-ieee.cc --- a/liboctave/lo-ieee.cc Wed Feb 19 19:16:17 1997 +0000 +++ b/liboctave/lo-ieee.cc Wed Feb 19 19:22:39 1997 +0000 @@ -42,11 +42,11 @@ #endif #if defined (HAVE_INFINITY) -#extern "C" double infinity (); +extern "C" double infinity (); #endif #if defined (HAVE_QUIET_NAN) -#extern "C" double quiet_nan (long); +extern "C" double quiet_nan (long); #endif #include "lo-ieee.h" diff -r cd5f72e530e2 -r 7a820bb7f406 readline/ChangeLog --- a/readline/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/readline/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,7 @@ +Tue Feb 18 17:35:05 1997 John W. Eaton + + * configure.in (SH_LDFLAGS): Fix typo in last change. + Fri Feb 14 16:22:28 1997 John W. Eaton * Makefile.in (bin-dist): Don't write empty strings to LIBRARIES. diff -r cd5f72e530e2 -r 7a820bb7f406 readline/configure.in --- a/readline/configure.in Wed Feb 19 19:16:17 1997 +0000 +++ b/readline/configure.in Wed Feb 19 19:22:39 1997 +0000 @@ -40,7 +40,7 @@ ;; alpha-dec-osf*) CPICFLAG= - SH_LDFLAGS="-Xlinker -exepct_unresolved -Xlinker '*'" + SH_LDFLAGS="-Xlinker -expect_unresolved -Xlinker '*'" ;; rs6000-ibm-aix* | powerpc-ibm-aix*) CPICFLAG= diff -r cd5f72e530e2 -r 7a820bb7f406 scripts/ChangeLog --- a/scripts/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/scripts/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,9 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + + * miscellaneous/paren.m: New file. + Tue Feb 18 09:22:04 1997 John W. Eaton * Version 2.0.3 released. diff -r cd5f72e530e2 -r 7a820bb7f406 src/ChangeLog --- a/src/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/src/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,5 +1,15 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + + * lex.l (handle_identifier): Allow commands like ls, save, etc. to + also be used as simple variable names. Also make it possible to + use the normal function call syntax to invoke them. + Tue Feb 18 09:22:04 1997 John W. Eaton + * Makefile.in (%.oct:%.o, %.oct:pic/%.o): Use $(SH_LDFLAGS) here. + * Version 2.0.3 released. Tue Feb 18 00:27:49 1997 John W. Eaton diff -r cd5f72e530e2 -r 7a820bb7f406 src/lex.l --- a/src/lex.l Wed Feb 19 19:16:17 1997 +0000 +++ b/src/lex.l Wed Feb 19 19:22:39 1997 +0000 @@ -1072,6 +1072,23 @@ return curr_sym_tab->lookup (name, 1, 0); } +static bool +is_variable (const string& name) +{ + symbol_record *sr = curr_sym_tab->lookup (name, 0, 0); + + return sr && sr->is_variable (); +} + +static void +force_local_variable (const string& name) +{ + symbol_record *sr = curr_sym_tab->lookup (name, 1, 0); + + if (sr) + sr->define (octave_value ()); +} + // Grab the help text from an function file. Always overwrites the // current contents of help_buf. @@ -1721,22 +1738,10 @@ TOK_RETURN (plot_option_kw); } - // If we are looking at a text style function, set up to gobble its - // arguments. These are also reserved words, but only because it - // would be very difficult to do anything intelligent with them if - // they were not reserved. - - if (is_text_function_name (tok)) - { - BEGIN TEXT_FCN; - - if (tok == "gset") - lexer_flags.doing_set = 1; - } - int c = yyinput (); yyunput (c, yytext); - int next_tok_is_eq = (c == '='); + bool next_tok_is_eq = (c == '='); + bool next_tok_is_paren = (c == '('); // Make sure we put the return values of a function in the symbol // table that is local to the function. @@ -1745,6 +1750,25 @@ && lexer_flags.defining_func && lexer_flags.maybe_screwed) curr_sym_tab = tmp_local_sym_tab; + // Kluge alert. + // + // If we are looking at a text style function, set up to gobble its + // arguments. If the following token is `=', force the symbol to be + // inserted as a variable in the current symbol table. + + if (is_text_function_name (tok) && ! is_variable (tok)) + { + if (next_tok_is_eq) + force_local_variable (tok); + else if (! next_tok_is_paren) + { + if (tok == "gset") + lexer_flags.doing_set = 1; + + BEGIN TEXT_FCN; + } + } + // Find the token in the symbol table. yylval.tok_val = new token (lookup_identifier (tok), diff -r cd5f72e530e2 -r 7a820bb7f406 test/ChangeLog --- a/test/ChangeLog Wed Feb 19 19:16:17 1997 +0000 +++ b/test/ChangeLog Wed Feb 19 19:22:39 1997 +0000 @@ -1,3 +1,7 @@ +Wed Feb 19 10:30:14 1997 John W. Eaton + + * Version 2.0.4 released. + Tue Feb 18 09:22:04 1997 John W. Eaton * Version 2.0.3 released.