Mercurial > hg > octave-nkf
changeset 2330:12ff450cbb1f
[project @ 1996-07-19 01:39:22 by jwe]
Initial revision
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/Announce @@ -0,0 +1,133 @@ +Subject: ANNOUNCING: Octave Version 1.2 + +Octave version 1.2 is now available for ftp from ftp.che.wisc.edu +in the directory /pub/octave. Gzipped tar files are available along +with a patch file relative to 1.1.0. Please read the comments at the +top of the patch file if you choose to use it to upgrade your +installation. + +This is a primarily a bug-fixing release, but there are a few new +features. A list of user-visible changes since the last release is +available in the file NEWS. The file ChangeLog in the source +distribution contains a more detailed record of changes made since the +last release. + +Most bugs reported since the release of 1.1.0 have been fixed. You +can help make Octave more reliable by reporting any bugs you find. +Please see the directions at the end of this announcement to find out +how to ensure that the bugs you report will be fixed. + +Binaries for several popular systems are also available. If you would +like help out by making binaries available for other systems, please +contact bug-octave@bevo.che.wisc.edu. + +What is Octave? +--------------- + +Octave is a high-level interactive language, primarily intended for +numerical computations that is mostly compatible with Matlab. + +Octave can do arithmetic for real and complex scalars and matrices, +solve sets of nonlinear algebraic equations, integrate functions over +finite and infinite intervals, and integrate systems of ordinary +differential and differential-algebraic equations. + +Octave uses the GNU readline library to handle reading and editing +input. By default, the line editing commands are similar to the +cursor movement commands used by GNU Emacs, and a vi-style line +editing interface is also available. At the end of each session, the +command history is saved, so that commands entered during previous +sessions are not lost. + +The Octave distribution includes a 200+ page Texinfo manual. Access +to the complete text of the manual is available via the help command +at the Octave prompt. + +Two and three dimensional plotting is fully supported using gnuplot. + +The underlying numerical solvers are currently standard Fortran ones +like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library +of C++ classes. If possible, the Fortran subroutines are compiled +with the system's Fortran compiler, and called directly from the C++ +functions. If that's not possible, you can still compile Octave if +you have the free Fortran to C translator f2c. + +Octave is also 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. + +Instructions for obtaining Octave are given below. + +Where to get Octave +------------------- + +If you are on the Internet, you can copy the latest distribution +version of Octave from the file /pub/octave/octave-M.N.tar.gz, on the +host ftp.che.wisc.edu. This tar file has been compressed with GNU +gzip, so be sure to use binary mode for the transfer. M and N stand +for version numbers; look at a listing of the directory through ftp to +see what version is available. After you unpack the distribution, be +sure to look at the files README and INSTALL. + +Installation +------------ + +Octave requires approximately 50MB of disk storage to unpack and +install (significantly less if you don't compile with debugging +symbols). In order to build Octave, you will need a current version +of g++, libg++, and GNU make. If you don't have these tools, you can +get them from many anonymous ftp archives, including ftp.che.wisc.edu, +ftp.uu.net, prep.ai.mit.edu, and wuarchive.wustl.edu, or by writing to +the FSF at 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +Octave has been compiled and tested with g++ and libg++ on a +SPARCstation 2 running SunOS 4.1.2, an IBM RS/6000 running AIX 3.2.5, +DEC Alpha systems running OSF/1 1.3 and 3.0, a DECstation 5000/240 +running Ultrix 4.2a, and i486 systems running Linux. It should work +on most other Unix systems that have a working port of g++ and libg++. + +Implementation +-------------- + +Octave is being developed with GNU make, bison (a replacement for +YACC), flex (a replacement for lex), gcc/g++, and libg++ on Sun +SPARCstations, DEC DECstations, and IBM RS/6000s. It should be +easy to port it to any machine that has a working port of gcc/g++. + +The underlying numerical solvers are currently standard Fortran ones +like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library +of C++ classes (see the files in the libcruft and liboctave +subdirectories). If possible, the Fortran subroutines are compiled +with the system's Fortran compiler, and called directly from the C++ +functions. If that's not possible, they are translated with f2c and +compiled with a C compiler. Better performance is usually achieved if +the intermediate translation to C is avoided. + +The library of C++ classes may also be useful by itself, and they are +distributed under the same terms as Octave. + +Bugs +---- + +Please report any problems you have to + + bug-octave@bevo.che.wisc.edu + +Your bug reports play an essential role in making Octave reliable. + +Reporting a bug may help you by bringing a solution to your problem, +or it may not. In any case, the principal function of a bug report +is to help the entire community by making the next version of Octave +work better. Bug reports are your contribution to the maintenance of +Octave. + +The file BUGS in the top level directory of the source distribution +contains more information about how to provide useful bug reports. + +Comments and suggestions are also always welcome. + +-- +John W. Eaton +jwe@bevo.che.wisc.edu +University of Wisconsin-Madison +Department of Chemical Engineering
new file mode 100644 --- /dev/null +++ b/CHECKLIST @@ -0,0 +1,23 @@ +Things to do before making a release: + + * Ask testers for the type(s) of machines they are using. + + * Update the version number in src/version.h. + + * Update the version number in doc/refcard.tex. + + * Add a `Version M.N.P released.' line to the ChangeLog. + + * Update the NEWS file. + + * Check the README file. + + * Create a new Announce.M.N.P file for the current release. + + * Run autoconf, autoheader, and configure before making tar files. + + * Update the NEWS and README.octave files in the anonymous ftp + directory. + + * Don't forget to use -static when linking the binaries for the + binary distributions.
new file mode 100644 --- /dev/null +++ b/CLASSES @@ -0,0 +1,212 @@ +numerical stuff: +=============== + + Array<T> + ^ + | + +-- MArray<T> + | ^ + | | + | +-- ColumnVector (T = double) + | +-- ComplexColumnVector (T = Complex) + | +-- RowVector (T = double) + | +-- ComplexRowVector (T = Complex) + | + +-- DiagArray<T> + | ^ + | | + | +-- MDiagArray<T> + | ^ + | | + | +-- DiagMatrix (T = double) + | +-- ComplexDiagMatrix (T = Complex) + | + +-- Array2<T> + ^ + | + +-- MArray2<T> + | ^ + | | + | +-- Matrix (T = double) + | +-- ComplexMatrix (T = Complex) + | +-- chMatrix (T = char) + | + +-- Array3<T> + + + AEPBAL + ComplexAEPBAL + + + CHOL + ComplexCHOL + + + DET + ComplexDET + + + EIG + + + GEPBAL + + + HESS + ComplexHESS + + + LU + ComplexLU + + + SCHUR + ComplexSCHUR + + + SVD + ComplexSVD + + + QR + ^ + | + +-- QRP + + + ComplexQR + ^ + | + +-- ComplexQRP + + + base_diff_eqn + ^ + | + +-- ODE --> ODEFunc + | ^ + | | + | +-- LSODE --> LSODE_options + | + +-- DAE --> DAEFunc + ^ + | + +-- DASSL --> DASSL_options + + + NLEqn + + + Bounds + LinConst + NLConst + + base_minimizer + ^ + | + +-- LP + | ^ + | | + | +-- LPsolve --> LPsolve_options + | + +-- QP + | ^ + | | + | +-- QPSOL --> QPSOL_options + | + +-- NLP + ^ + | + +-- NPSOL --> NPSOL_options + + + Quad + + Range + + CollocWt + + +utilities: +========= + + command_history + dir_entry + dir_path + file_stat + glob_match + idx_vector + prog_args + string_vector + +parser stuff: +============ + + tree_print_code + ^ + | + +-- tree_statement + +-- tree_statement_list ----> SLList<tree_statement*> + +-- tree_if_clause + +-- tree_if_command_list ---> SLList<tree_if_clause*> + +-- tree_global + +-- tree_global_init_list --> SLList<tree_global*> + +-- tree_argument_list -----> SLList<tree_expression*> + +-- tree_parameter_list ----> SLList<tree_identifier*> + +-- tree_return_list -------> SLList<tree_index_expression*> + +-- tree_va_return_list ----> SLList<tree_constant> + +-- tree_matrix_row --------> SLList<tree_expression*> + | + +-- plot_limits + +-- plot_range + +-- subplot_using + +-- subplot_style + +-- subplot + +-- subplot_list ---> SLList<subplot*> + | + +-- tree + ^ + | + +-- tree_command + | ^ + | | + | +-- tree_global_command + | +-- tree_while_command + | +-- tree_for_command + | +-- tree_if_command + | +-- tree_unwind_protect_command + | +-- tree_try_catch_command + | +-- tree_break_command + | +-- tree_continue_command + | +-- tree_return_command + | +-- tree_plot_command + | + +-- tree_expression + ^ + | + +-- tree_prefix_expression + +-- tree_postfix_expression + +-- tree_unary_expression + +-- tree_binary_expression + +-- tree_simple_assignment_expression + +-- tree_colon_expression + +-- tree_matrix --> SLList<tree_matrix_row*> + +-- tree_multi_val_ret + ^ + | + +-- octave_value_list + +-- tree_index_expression + +-- tree_multi_assignment_expression + +-- tree_fvc + ^ + | + +-- tree_identifier + +-- tree_indirect_ref + +-- tree_builtin + +-- tree_function + +-- octave_value + + +other interpreter classes: +========================= +
new file mode 100644 --- /dev/null +++ b/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program 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 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License.
new file mode 100644 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,642 @@ +Mon Jul 15 14:26:48 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * config.sub: Update to new version from FSF (gcc sources). + +Thu Jun 13 16:38:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Look for g77 before other fortran compilers. + +Thu Jun 6 00:05:47 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Add check for multiple plot windows in gnuplot. + * acconfig.h: Add #undef for GNUPLOT_HAS_FRAMES. + +Wed May 22 15:05:40 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (UCB_INCFLAGS): Another kluge to try to find + getrusage on Solaris systems. + * Makeconf.in Substitute it. + + * configure.in (SH_LIBS, SH_FLIBS, SH_TERMLIBS): Define. + * Makeconf.in: Substitute. + +Wed May 22 02:42:32 1996 Kurt Hornik <Kurt.Hornik@tuwien.ac.at> + + * emacs/octave.el (octave-indent-new-line): Protect + octave-indent-line with save-excursion. + (octave-calc-indent-this-line): Attempt to handle end tokens that + are not on separate lines. + (octave-electric-semi): Make `;' self-insert if inside comment. + (octave-previous-line): Don't try to go back past the beginning of + the buffer. + +Tue May 21 23:11:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (F77): Also check for f90. + +Mon May 20 12:22:54 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * emacs/octave.el (octave-indent-new-line): Make it do what the + docstring says it does. + + * octave-bug.in: Fix previous change so it also matches things + like 1.90, not just 1.1.90. + +Fri May 17 09:58:49 1996 Kurt Hornik <Kurt.Hornik@tuwien.ac.at> + + * emacs/octave.el (octave-electric-semi): Also call octave-indent-line + to indent the current line after inserting a semicolon. + +Fri May 17 02:53:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (DIRS_TO_MAKE): Add octincludedir. + (all): Add mkoctfile. + + * configure.in: Don't set values for exec_prefix, bindir, datadir, + libdir, libexecdir, includedir, mandir, or infodir, so that they + can be set from the configure command line. + + * configure.in, Makeconf.in: Handle mandir, man1dir and man1ext. + Change topincludedir to includedir. Use octincludedir as the + subdirectory of includedir where we really install include files. + + * octave-bug.in (BUGADDR): Also set to octave-maintainers if this + looks like a pretest version number. + + * Makeconf.in (do-subst-config-vals): Use $< instead of + referencing $(srcdir) directly. + (do-subst-default-vals): Likewise. + + * octMakefile.in (octave-bug): Depend on octave-bug.in + (mkoctfile): Likewise, depend on mkoctfile.in. + +Thu May 16 11:49:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (DISTFILES): Add mkoctfile.in. + (install): Install mkoctfile too. + + * aclocal.m4 (OCTAVE_F2C_F77_COMPAT): Fix typo in last change + +Mon May 13 04:02:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (UGLY_DEFS): Quote " with more \'s. + + * Makeconf.in (do-subst-config-vals): Quote substitutions here. + * octave-bug.in, mkoctfile: Not here. + + * octMakefile.in (octave-bug, mkoctfile): Depend on Makeconf, + octMakefile. + + * Makeconf.in (do-subst-default-vals): New definition, from + src/Makefile.in. + + * Makeconf.in (do-subst-config-vals): Define here. + * octMakefile.in: Not here. + + * octave-bug.in: Handle more configuration stuff. + + * configure.in (config_opts): Set from ac_configure_args and subst. + * Makeconf.in: Handle config_opts. + * octMakefile.in (do-subst-config-vals): Substitute them. + +Sun May 12 03:37:55 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in (TERMLIBS): Substitute here. + + * configure.in (topincludedir): New variable. + * Makeconf.in (libexecdir): Substitute it. + + * octMakefile.in (do-subst-config-vals): Define new command. + (octave-bug): Use it. + (mkoctfile): New target. + + * Makefile.in (TARGETS): Add mkoctfile. + + * examples: New subdirectory. + * octMakefile.in: Add it to the appropriate lists. + * configure.in: Create examples/Makefile. + + * octMakefile.in (DIRS_TO_MAKE): Add $(libdir) here. + (install): Use INSTALL_PROGRAM to install octave-bug script. + Also install config.h. + + * aclocal.m4 (OCTAVE_F2C_F77_COMPAT): Provide a definition for + MAIN__ on Linux systems. + +Tue Apr 30 05:44:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Handle --enable-bounds-check. + * acconfig.h: Add undef for BOUNDS_CHECKING + +Mon Apr 29 01:42:38 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_FUNC_SETVBUF_REVERSED): Delete. Octave doesn't + need this check (it was for info, which has its own configure now). + +Sun Apr 28 05:41:26 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (DEFAULT_PAGER): Don't append -e to less here. + +Sat Apr 27 22:23:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Check for pid_t and sys/types.h. + +Tue Apr 23 17:44:18 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Check for fcntl.h, not sys/fcntl.h. + Add checks for various system calls. + +Sun Apr 7 16:42:54 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Check for strdup. + + * Makefile.in (TARGETS): Add dlfcn. + * octMakefile.in (DISTSUBDIRS): Add dlfcn. + (SUBDIRS): Add @DLFCN_DIR@. + * configure.in: On AIX systems: set DLFCN_DIR=dlfcn when doing + shared libraries, bypass checks for dlopen, etc., set and + substitute LIBDLFCN and DLFCN_INCFLAGS. Create dlfcn/Makefile. + +Sat Apr 6 21:45:40 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in (%.d : %.cc, %.d : %.c): Add dependency for pic/%.o. + +Fri Mar 29 13:38:40 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (maintainer-clean distclean): Delete mk-oct-links. + +Wed Mar 27 09:05:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * aclocal.m4 (OCTAVE_FLIBS): Fix typo in message. + +Tue Mar 26 02:41:16 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (UGLY_DEFS): Undo previous change. + When checking for various libraries, don't check for main(), but + instead look for functions that are actually supposed to be in + those libraries. + Require autoconf 2.9. + If using solaris2, don't add /usr/ucblib/libucb.a to LIBS until + near the very end, then check for for getrusage and times just + after that. + + * Makeconf.in (UGLY_DEFS): Ditto. + + * octave-bug.in: Don't send empty bug reports. + +Sat Mar 23 04:55:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (DISTDIRS): Omit plplot for now. + * Makefile.in (TARGETS): Likewise. + +Fri Mar 22 06:15:44 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Add checks for sys/times.h and times(). + (GCC_IEEE_FP_FLAG): Define this if using gcc 2.8.x or later on + Alpha/OSF systems. + +Wed Mar 20 02:04:08 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (octave.info): cd to doc/interpreter, not doc. + +Sun Mar 3 10:01:13 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * config.h.bot: Define HEAVYWEIGHT_INDEXING here. + + * Makefile.in (TARGETS): Remove dld. + * octMakefile.in (DISTSUBDIRS): Ditto. + * configure.in: Don't create dld/Makefile. + Do create doc/fac/Makefile, doc/interpreter/Makefile, + doc/liboctave/Makefile, and doc/refcard/Makefile. + +Thu Feb 29 08:55:25 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in (%.o : %.c): Use pattern rule instead of suffix rule. + (%.o : %.cc): Likewise. + (pic/%.o : %.c, pic/%.o : %.cc): Use separate rules instead of + expecting one rule to generate two output files. + * configure.in (f77_rules_frag): Use separate rules here too. + +Mon Feb 26 03:34:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: If --disable-dl or --disable-shl, don't check for + dynamic linking functions. + (includedir): Append version. + +Wed Feb 14 12:20:57 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (snapshot-version): Don't quote version number. + + * aclocal.m4 (OCTAVE_FLIBS): Avoid setting FLIBS=" ". + +Sat Feb 10 12:59:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * glob/Makefile.in (install): New target. + +Fri Feb 9 14:00:53 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Fix help text for --enable-shared option. + +Thu Feb 8 10:17:55 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (CONF_DISTFILES): New variable. + (DISTFILES): Use it instead of listing things twice. + (CONF_DISTSUBDIRS): New variable. + (conf-dist): New target. + + * Makefile.in (TARGETS): Add conf-dist. + + * configure.in (CXX_VERSION, CC_VERSION): Substitute them. + * octMakefile.in (octave-bug): Substitute them here too. + * octave-bug.in: Put them in the configuration message. + +Sat Feb 3 08:53:56 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: RLD_FLAG should be empty by default, but give it a + value for alpha-dec-osf* systems. + +Fri Feb 2 23:03:40 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in: Actually do add substitutions for FPICFLAG, + CPICFLAG, and CXXPICFLAG. + +Thu Feb 1 14:58:16 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (%.c : %.f): Fix typo. + +Wed Jan 24 14:47:58 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Also configure in glob subdirectory. + Make pattern rule say how to make .o from .f, not .f from .o. Duh. + + * octMakefile.in: Add glob stuff to the appropriate lists. + * Makeconf.in: Likewise. + + * aclocal.m4: Add test for program_invocation_name. + * configure.in: Use it here. + + * acconfig.h: Add #undef here. + +Mon Jan 22 17:32:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Add checks for mode_t, off_t, size_t, uid_t, + dev_t, ino_t, and nlink_t typedefs. + * acconfig.h: Add undefs for dev_t, ino_t, and nlink_t. + +Sat Jan 20 21:05:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: For Fortran rules, use pattern rules instead of + suffix rules. + +Fri Jan 19 12:38:23 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: When checking for libf2c.a, add -lm and an extra lib. + +Wed Jan 10 16:36:43 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.i: Add missing colon in .o.f pattern for f2c rules. + +Mon Jan 8 23:18:39 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_PROG_LN_S): New check. + * Makeconf.in (LN_S): Substitute it. + + * configure.in (libexecdir): New variable. + (archlibdir, octfiledir, localoctfiledir): Use it instead of libdir. + (datadir): Default to $(prefix)/share instead of $(prefix)/lib. + + * Makeconf.in (libexecdir): Substitute it. + + * configure.in (localoctfiledir): Use $(libdir), not $(datadir). + +Sun Jan 7 18:40:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * aclocal.m4 (OCTAVE_SMART_PUTENV): New macro, extracted from + the kpathsearch library. + * configure.in: Call it. + +Fri Dec 29 22:07:52 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makeconf.in (subdir-for-command): New definition for + SUBDIR_FOR_COMMAND using GNU Make `foreach' instead of shell `for' + command. + * libcruft/Makefile.in, scripts/Makefile.in, octMakefile.in: + Invoke new definition with `@'. + +Wed Dec 27 14:27:48 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (SUBDIRS): Delete DLD_DIR. + (distclean): Delete Makerules.f77. + + * Makeconf.in (WITH_DLD): Delete variable. + + * configure.in: Delete support for dynamic linking with dld. + + * configure.in, Makeconf.in: Use consistent names for WITH_DL, + WITH_SHL, OCTAVE_LITE, and SHARED_LIBS + + * config.h.bot: Undo previous change. + * acconfig.h: Add #undef for WITH_DYNAMIC_LINKING. + * Makeconf.in: Substitute it here too. + * configure.in: Set it here. + +Tue Dec 26 00:12:14 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_CONFIG_SUBDIRS): Delete libcruft. + (AC_OUTPUT): List libcruft files here. + + * configure.in, Makeconf.in: Handle Fortran compilation rules + using an included fragment in Makeconf. + +Mon Dec 25 22:14:21 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (CPICFLAG, CXXPICFLAG, FPICFLAG): New variables. + * Makeconf.in: Substitute them. + + * configure.in: Handle --enable-shared option. + Handle Fortran source files differently. + * Makeconf.in (SHARED_LIBS): Substitute shared_libs. + (SHLEXT, RLD_FLAG, fortran_rules_flag): Substitute these too. + (.c.o, .cc.o): Handle creating position independent code for + shared libraries. + +Sun Dec 24 00:29:12 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * config.h.bot: Maybe define WITH_DYNAMIC_LINKING. + + * Makeconf.in (WITH_DL, WITH_SHL): Substitute values. + * acconfig.h: Add undefs for WITH_DL and WITH_SHL. + * configure.in: Handle --enable-dl and --enable-shl. + Check for -ldl and dlopen, dlsym, dlclose, and dlerror. + Check for -ldld and shl_load, shl_findsym. + (have_fortran_compiler): Quit if no suitable Fortran compiler is + found. + +Fri Nov 3 03:33:42 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * emacs/octave-mode.el: Rename from octave.el. + +Wed Oct 11 19:22:12 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (GNUPLOT_BINARY): When checking for multiplot, + issue a `set term unknown' command first. + +Wed Oct 4 01:42:35 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * config.guess: Add entry for PowerPC Macs running Machten. + + * octMakefile.in (dist-z): Remove old .gz file before creating new one. + +Mon Oct 2 19:17:22 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Check to see if it looks like gnuplot supports + multiplot. + * acconfig.h: Add undef for GNUPLOT_HAS_MULTIPLOT. + + * acconfig.h: #undefs for HAVE_FINITE, HAVE_ISNAN, HAVE_ISINF, + HAVE_TERMIOS_H, HAVE_TERMIO_H, and HAVE_SGTTY_H removed. This + file should only have things that autoheader can't figure out. + +Sun Oct 1 17:08:37 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (clean-tar): Also omit directories called OLD and + files beginning with =. + +Fri Sep 29 01:04:31 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * ROADMAP: New file. + * (DISTFILES): Include it. + + * emacs: New subdirectory for Emacs-related stuff. + * octMakefile.in (DISTDIRS, BINDISTSUBDIRS): Include emacs. + (DISTFILES, BINDISTFILES): Don't include octave-mode.el. + +Tue Sep 26 03:56:39 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Don't add -Wno-unused to CFLAGS or CXXFLAGS. + * config.h.bot: Remove definition of UNUSED. + + * config.sub: Replace with current version from FSF. + * config.guess: Likewise. + +Thu Sep 21 20:29:00 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AR, ARFLAGS): Set defaults for these, but also + allow them to come from the environment. + * Makeconf.in (AR, ARFLAGS): New variables to substitute. + +Wed Sep 20 00:51:24 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * octMakefile.in (maintainer-clean): Also remove Makeconf, + config.cache, config.h, and config.log. + +Tue Sep 19 17:20:32 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * sighandlers.h [HAVE_SIGACTION && HAVE_SIGPROCMASK && + HAVE_SIGPENDING && HAVE_SIGSUSPEND]: #define HAVE_POSIX_SIGNALS. + + * configure.in: Check for sigaction(), sigprocmask(), + sigpending(), and sigsuspend() functions. + Don't do anything special about checking for termios.h, termio.h, + and sgtty.h. + +Mon Sep 18 22:39:33 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * config.h.bot [__GNUC__]: Define NORETURN. + +Fri Sep 15 05:12:29 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_C_BIGENDIAN): Remove test. + +Thu Sep 14 02:07:51 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (LIBPLPLOT): Disable plplot by default for now. + Check for mkdir, rmdir, rename, and umask. + + * All Makefile.in files: Convert from realclean to + maintainer-clean, for GNU coding standards. + + * configure.in: Call AC_FUNC_CLOSEDIR_VOID. + +Wed Sep 13 03:25:37 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Do check for IEEE functions on the Alpha. + +Mon Sep 11 19:08:47 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Call AC_STRUCT_ST_BLKSIZE, AC_STRUCT_ST_BLOCKS, + and AC_STRUCT_ST_RDEV. + +Tue Sep 5 02:02:35 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Check for sys/param.h and sys/stat.h + Use AC_HEADER_TIME, not AC_TIME_WITH_SYS_TIME. + Use AC_HEADER_SYS_WAIT. + +Thu Aug 24 15:35:44 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * configure.in: Don't set or call AC_SUBST for CXXFLAGS or CFLAGS, + and don't call AC_SUBST for LDFLAGS -- autoconf takes care of this. + If adding -Wall, add -Wno-unused too. + +Tue Aug 22 01:37:02 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (all): Update message. + + * config.h.bot: New file. + * octMakefile.in (DISTFILES): Add it to the list. + + * acconfig.h (USE_PLPLOT): Add #undef. + +Mon Aug 21 19:33:33 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (NO_DEP_TARGETS): New variable, for targets that can + be made without updating dependency files. + +Sun Jun 25 18:27:49 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (FFLAGS): Add -fpe1 on alpha-dec-osf1 systems. + +Thu May 4 22:26:34 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: export CC, CXX, and F77 before calling + AC_CONFIG_SUBDIRS. + +Mon May 1 14:17:07 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Handle --with-plplot. + (AC_CONFIG_SUBDIRS): Add plplot directory if --with-plplot. + * plplot: New subdirectory. + * Makefile.in (plplot): New target. + * octMakefile.in (SUBDIRS): Add @PLPLOT_DIR@. + (DISTDIRS): Add plplot. + + * acconfig.h: Add #undef for GETTIMEOFDAY_NO_TZ. + + * configure.in: Improve check for gettimeofday. + +Mon May 1 12:50:03 1995 John Eaton (jwe@bullwinkle.che.utexas.edu) + + * acconfig.h (OCTAVE_LITE): Fix comment. + +Tue Apr 11 20:31:52 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (INFO_DIR, READLINE_DIR): New variables. + If $USE_GNU_INFO, AC_DEFINE it, don't AC_SUBST it. + Likewise, for USE_READLINE. + + * octMakefile.in (SUBDIRS): Substitute INFO_DIR and READLINE_DIR. + + * aclocal.m4 (OCTAVE_F77_UPPERCASE_NAMES): New macro. + (OCTAVE_F77_APPEND_UNDERSCORES): Require it. + * configure.in: Use it. + (info_subdir): If $USE_GNU_INFO, then run configure in info + subdirectory too. + Don't check for sys/ttold.h or sys/ptem.h. + +Mon Apr 10 00:17:57 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (UGLY_DEFS): Delete commands to create this. + * Makeconf.in (UGLY_DEFS): Delete substitution. + * Makeconf.in (UGLY_ALL_CFLAGS): Delete definition. + + * configure.in: Add scripts and libcruft to CONFIG_SUBDIRS. + Don't edit scripts or libcruft Makefiles here. + Reorganize checking for the Fortran compiler. + + * octMakefile.in (DISTFILES): Delete f2c-compat.sh flibs.sh + cxxlibs.sh from list. Add aclocal.m4. + * configure.in: Use new macros defined in aclocal.m4. Don't use + external shell scripts. Cache values. + + * aclocal.m4: New file. + +Sun Apr 9 12:47:27 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Print status message before exiting. + Cache CXXLIBS and FLIBS. + + * acconfig.h: Delete #undefs for floating point format. + * octMakefile.in (DISTFILES): Delete float-type.c from list. + * configure.in: Don't try to determine floating point format at + configuration time. + +Mon Apr 3 21:46:10 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Create scripts/time/Makefile too. + + * configure.in (gxx_version): Handle new gcc version message. + (gcc_version): Likewise. + +Wed Mar 29 22:59:42 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (AC_STRFTIME): Delete check. + (AC_STRUCT_TIMEZONE): New check. + +Wed Mar 22 08:31:21 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makeconf.in (ALL_FFLAGS, FUGLY): New variables. + + * configure.in: Use AC_ARG_ENABLE and AC_ARG_WITH consistently. + Handle --with-g77. Substitute new variable FUGLY. If F77 is g77, + set it to -fugly. Substitute command for making .o from .f. + +Tue Mar 21 14:24:32 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * cxxlibs.sh: Extract -R options like -L options. + * configure.in (FLIB_PATH, FLIB_LIST): Extract -R options along + with -L options. + +Tue Mar 21 14:20:55 1995 Paul Eggert <eggert@twinsun.com> + + * configure.in (CXX): Export; cxxlibs.sh needs this. + (FLIB_LIST, CXXLIB_LIST): Extract -R options along with -L options. + + * flibs.sh: Treat `-L foo' like `-Lfoo'. Extract -R options + like -L options. + +Tue Mar 21 08:08:06 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * flibs.sh: Search for values-X*.o, not values-*.o. + +Fri Mar 10 10:32:27 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makeconf.in (SUBDIR_FOR_COMMAND): New command definition. + * octMakefile.in: Use it. + + * octMakefile.in (install, uninstall, tags, TAGS, clean, + mostlyclean, distclean, realclean): Combine actions. + +Tue Feb 28 21:24:35 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (FC): Set to $F77 and substitute it. + * Makeconf.in (FC): Add substitution line. + +Sun Feb 26 00:20:19 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * dointsall.sh: Create ls-R database. + + * configure.in: Configure kpathsea using AC_CONFIG_SUBDIRS(). + Remove check for SMART_PUTENV. + Remove kpathsea/c-auto.h from AC_CONFIG_HEADER(). + + * make: New directory, for kpathsea configuration. + * octMakefile.in (DISTDIRS): Add it + + * kpathsea: Update with 2.6 distribution. + + * Makefile.in (TARGETS): New variable. Combine all identical targets. + + * configure.in (LIBINFO, LIBREADLINE): New variables to substitute. + +Sat Feb 25 18:47:11 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * acconfig.h (USE_READLINE): Add #undef. + * configure.in: Add support for --enable-readline. + + * acconfig.h (USE_GNU_INFO): Add #undef. + * configure.in: Add support for --enable-info. + + * acconfig.h (RUN_IN_PLACE): Delete #undef. + +See ChangeLog.1 for earlier changes.
new file mode 100644 --- /dev/null +++ b/ChangeLog.1 @@ -0,0 +1,10392 @@ +Thu Feb 23 09:32:01 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Version 1.1.1 released. + + * src/idx-vector.cc (idx_vector (const Range&)): Always initialize + data to 0. + (idx_vector (const Matrix&, int, const char *, int)): Likewise. + (idx_vector (const idx_vector&): Likewise, do it first. + * src/idx-vector.h (~idx_vector): Simply delete data. + + * octMakefile.in: Combine libcruft, liboctave,dld, info, readline, + kpathsea, src, scripts, and doc targets into just one. + (all): Depend on $(SUBDIRS). + * libcruft/Makefile.in (make-objects): Change to $(SUBDIRS) + target that doesn't use a loop. + (all): Depend on $(SUBDIRS). + +Wed Feb 22 07:27:18 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Don't leave @LIBDLD@ on a line by itself. + + * src/tc-rep-idx.cc (fortran_style_matrix_index): Handle zero-one + indexing as a separate case. + (fortran_style_matrix_index): Check for out-of-bounds index. + + * src/idx-vector.cc (init_state): Don't forget len, num_zeros, and + the one_zero flag for vectors of all zero elements. + (convert_one_zero_to_idx): Set data to zero after deleting it. + + * src/data.cc (check_dimensions): + Handle case of treat_neg_dim_as_zero = "warn". + +Tue Feb 21 08:18:19 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-misc.cc (initialize_undefined_elements): Don't declare + arg const. + + * src/sysdepl.cc (octave_getcwd): Declare arg as char *, not + const char *. + + * src/input.cc (match_sans_spaces): Initialize ep from copy of + arg, not arg itself. + + * octMakefile.in (snapshot-version): Look for OCTAVE_VERSION, + not just VERSION. Don't end #define with a semicolon. + +Mon Feb 20 15:57:17 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/image/Makefile.in (clean): Delete octtopnm.o and octtopnm. + +Fri Feb 17 08:12:09 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/variables.cc (maybe_add_default_load_path): New function, + extracted from default_path(), which no longer needs it. + * src/user-prefs.cc (sv_loadpath): Call it here. + +Wed Feb 15 15:13:22 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/octave.cc (verbose_usage): Format help message more like + the help messages of other GNU programs. + + * src/variables.cc (install_builtin_variables): New builtin + variable, suppress_verbose_help_message. + * src/user-prefs.cc (user_prefs): New field, + suppress_verbose_help_message. + * src/user-prefs.cc (suppress_verbose_help_message): New function. + * src/help.cc (additional_help_message): Check + user_pref.suppress_verbose_help_message before printing message. + +Tue Feb 14 15:36:01 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/sysdep.cc (octave_chdir): New function. + * src/dirfns.cc (change_to_directory): Use it. + + * src/sysdep.cc (octave_getcwd): New function. + * src/dirfns.cc (get_working_directory, Fpwd): Use it. + * src/input.cc (decode_prompt_string): Likewise. + + * src/version.h (VERSION): New #define. + (version_string): Use it. + (OCTAVE_COPYRIGHT): New #define. + (OCTAVE_NAME_AND_VERSION): New #define. + (OCTAVE_NAME_VERSION_AND_COPYRIGHT): New #define. + (OCTAVE_STARTUP_MESSAGE): New #define. + * src/octave.cc (main): Use new macros from version.h + (print_version_and_exit): Likewise. + (verbose_usage): Likewise. + (Fwarranty): Likewise. + + * Makeconf.in (version): Make work with new version.h. + * octMakefile.in (snapshot-version): Likewise. + + * src/variables.cc (default_path): Use SEPCHAR instead of literal ':'. + * src/utils.cc (pathstring_to_vector): Likewise. + * src/octave.cc (initialize_globals): Likewise, use SEPCHAR_STR to + construct format string instead of using literal `:'. + + * configure.in: Call AC_DEFINE for SEPCHAR and SEPCHAR_STR. + * acconfig.h: Add #undefs for SEPCHAR and SEPCHAR_STR. + + * src/dynamic-ld.cc: Don't include dld.h unless WITH_DLD. + + * src/octave.cc (parse_and_execute): Close file. + +Mon Feb 13 19:39:12 1995 John Eaton (jwe@bullwinkle.che.utexas.edu) + + * scripts/general/linspace.m: Delete. + * src/data.cc (Flinspace): New function. + * liboctave/dRowVector.cc (linspace): New function. + * liboctave/CRowVector.cc (linspace): New function. + +Sun Feb 12 21:23:54 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/load-save.cc (read_mat_binary_data): Only convert to string + if the number of rows is 1. + + * scripts/image/saveimage.m: Force ASCII save. + +Thu Feb 9 08:46:09 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/elfun/sec.m: Returned variable is `w', not `y'. + * scripts/elfun/sech.m: Likewise. + +Wed Feb 8 10:51:33 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/f-find.cc (find_nonzero_elem_idx): Increment i, j indices by + 1 before stashing them. + +Fri Feb 3 15:44:03 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-misc.cc + (tree_parameter_list::initialize_undefined_elements): New function. + * src/tree-expr.cc (tree_function::eval): Use it to define return + values. + (tree_simple_assignment_expression:eval): Complain if RHS is undefined. + (tree_multi_assignment_expression:eval): Complain if any of the + RHS values are undefined. + * src/user-prefs.h (init_user_prefs): New structure element, + define_all_return_values. + * src/user-prefs.cc (define_all_return_values): New function. + * src/variables.cc (install_builtin_variables): Add DEFVARs for + default_return_value and define_all_return_values. + (builtin_any_variable): New function. + +Wed Feb 1 08:02:28 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/parse.y (parse_error): Call yyerror() here. + (input): Not here. + + * src/lex.l (handle_string): Call have_continuation and + have_ellipsis_continuation with 0 arg, to disallow comments after + continuation characters inside strings. + (have_continuation): New arg, trailing_comments_ok with default + value of 1. If !trailing_comments_ok, don't allow comments to + follow continuation token. + (have_ellipsis_continuation): New arg, trailing_comments_ok, with + default value of 1. Pass it along to have_continuation. + + * src/parse.y (yyerror): Call parse_error with first arg == "%s", + since msg might contain format specifiers. + + * src/tree-expr.cc (tree_index_expression::eval (int)): Detect + undefined elements in argument list and print error message. + (tree_index_expression::eval (int, int, const Octave_object&)): + Likewise. + + * configure.in: Only set CFLAGS, CXXFLAGS, LDFLAGS, FFLAGS, and + F2CFLAGS if they are not already set in the environment. + + * doinstall.sh: Add -print to find commands. + +Tue Jan 31 13:26:53 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (<MATRIX>{S}*\,{S}*): Eat any trailing continuation + here. Use value returned from eat_continuation to decide whether + to insert a row separator. + (<MATRIX>{S}+): Likewise. + (<MATRIX>{SNLCMT}*\n{SNLCMT}*): Eat any trailing whitespace here. + + * lex.l (ATE_SPACE_OR_TAB, ATE_NEWLINE): New macros. + (eat_whitespace): Use them to set return value. + +Mon Jan 30 14:02:24 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/user-prefs.cc (set_output_precision): Don't pass NaN to NINT. + (set_output_max_field_width): Likewise. + (set_save_precision): Likewise. + * src/file-io.cc (return_valid_file): Likewise. + (fgets_internal): Likewise. + (fseek_internal): Likewise. + (process_printf_format): Likewise. + (fread_internal): Likewise. + * src/f-colloc.cc (Fcolloc): Likewise. + * src/f-fft.cc (Ffft): Likewise. + * src/f-fft2.cc (Ffft2): Likewise. + * src/f-ifft.cc (Fifft): Likewise. + * src/f-ifft2.cc (Fifft2): Likewise. + * src/f-npsol.cc (do_npsol_option): Likewise. + * src/f-qpsol.cc (do_qpsol_option): Likewise. + * src/f-rand.cc (Frand): Likewise. + * src/pr-output.cc (all_elements_are_ints): Likewise. + * src/tree-plot.cc (subplot_using::eval): Likewise. + (subplot_style::print): Likewise. + * src/sysdep.cc (Fpause): Likewise. + * src/tc-rep.cc (TC_REP::valid_as_scalar_index): Likewise. + (TC_REP::valid_as_zero_index): Likewise. + (TC_REP::convert_to_str): Likewise. + * src/tc-rep-idx.cc (TC_REP::do_scalar_index): Likewise. + (TC_REP::fortran_style_matrix_index): Likewise. + * src/tc-rep-ass.cc (TC_REP::fortran_style_matrix_assignment): + Likewise. + +Sat Jan 28 13:09:44 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/general/tril.m: Allow the k == nc for k > 0 and + -k == nr for k < 0. Make faster by eliminating nested loops. + * scripts/general/triu.m: Likewise. + +Fri Jan 27 08:32:10 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * libcruft/lapack: Update with files from LAPACK 2.0. + + * src/lex.l (\[{S}*): Don't call fixup_column_count() here. + Don't use TOK_RETURN here, since we call eat_whitespace(). + (eat_whitespace): Decrement current_input_column when calling + yyunput(). + (<MATRIX>{SNLCMT}*\n{SNLCMT}): Always call fixup_column_count(). + + * src/parse.y (rows): Don't accept repeated semicolons. + (matrix_row): Likewise, for commas. + + * src/Makefile.in (LIBOBJS): Delete. + + * liboctave/f77-uscore.h: Don't use C++ style comments. + + * octMakefile.in (DISTDIRS): Don't include bsd-math. + * src/Makefile.in (VPATH): Don't include bsd-math directory. + (SOURCES): Include acosh.c, asinh.c, atanh.c, erf.c erfc.c, and + lgamma.c. + * configure.in: Create libcruft/slatec-fn/Makefile. + Use AC_CHECK_FUNCS to look for acosh, asinh, atanh. + Don't do anything special if they are missing. + * src/acosh.c, src/asinh.c, src/atanh.c, src/erf.c, src/erfc.c, + src/lgamma.c: New files. + * acconfig.h: Delete #undefs for ACOSH_MISSING, ASINH_MISSING, + and ATANH_MISSING. + * libcruft/Makefile.in (CRUFT_DIRS): Add slatec-fn. + * libcruft/slatec-fn: New directory. + + * configure.in: Don't try to use IEEE floating point on m68k HP + systems. + +Thu Jan 26 12:57:05 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (maybe_unput_comma): New function, extracted from + handle_identifier(). Correctly handle the dot in things like + `a.b' inside matrix lists. + (handle_identifier): Use it. Don't allow things like [a .1] or + [a.b .1] to fool us. + +Wed Jan 25 08:04:16 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/Makefile.in (realclean): Don't depend on distclean. Do + delete Makefile here. + + * flibs.sh: Also check for /*values-*.o, for Sun Fortran 2.x. + * configure.in (FLIB_LIST, CXXLIB_LIST, FLIB_PATH, CXXLIB_PATH): + Delete any .o files found here. + When checking for -lm, also append -lc on Linux systems. + + * mkinstalldirs: Create directories with mode 0755, to avoid + problems because the installers umask is too restrictive. + + * octave-bug.in: Don't use rmail, it crashes on Ultrix systems if + the message file isn't just right. Use nested if statements + instead of ||, for Ultrix /bin/sh. Avoid Ultrix awk crash. + + * scripts/linear-algebra/trace.m: Handle row and column vectors as + a special case. + * scripts/linear-algebra/null.m: Likewise. + * scripts/linear-algebra/orth.m: Likewise. + +Tue Jan 24 08:11:51 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * octave-bug.in: Add F2C, F2CFLAGS, FLIBS, and LDFLAGS to report. + * Makefile.in (octave-bug): Substitute them. + +Mon Jan 23 20:42:55 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-misc.cc (tree_if_clause::is_else_clause): New function. + (tree_if_command_list::print_code): Use it to decide whether to + print "else" or "elseif" here. + (tree_if_clause::print_code): Don't print "else" here. + + * scripts/image/colormap.m: Fix logic for initializing default + colormap and handling subsequent calls with no arguments. + + * src/lex.h (TOK_PUSH_AND_RETURN): Correct last change. + +Sun Jan 22 18:02:37 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (handle_identifier): Handle incrementing + current_input_column here. + ({IDENT}{S}*): Not here. + + * src/lex.h (TOK_PUSH_AND_RETURN): New macro. + * src/lex.l: Use it. + + * src/parse.y (yyerror): If printing input line, always print `^' + error marker too. + + * src/parse.y (command [BREAK]): Allow break to occur in function + bodies too. + * src/tree-expr.cc (tree_function::eval): Also check to see if + function exited because of a break statement. + +Fri Jan 20 10:48:18 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * config.guess: Replace with current version from FSF. + * config.sub: Likewise. + + * src/tempname.c: Include statdefs.h. + + * src/tree-expr.cc (eval): Improve error messages. + +Thu Jan 19 08:33:50 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (handle_string): Properly handle pending escapes. + Call error() for unterminated string constants. + * src/parse.y (input): For parse errors, call yyerror(). + + * test/config/unix-octave.exp (octave_start): Correctly set OSPATH + from $OCTAVE_SCRIPT_PATH, not to the string OCTAVE_SCRIPT_PATH. + + * test/Makefile.in (OCTAVE_SCRIPT_PATH): Delete surrounding quotes + in definition. + + * doc/texinfo.tex: Move to version 2.140. + + * src/f-rand.cc (Frand): Use different method for generating + initial seed so that it varies more each time Octave starts. + + * src/file-io.cc (feof_internal): Use args(0), not args(1). + + * src/Makefile.in (SOURCES): Use tempnam.c, not tmpnam.c. + * src/tempnam.c: New file, from the GNU C library. + +Wed Jan 18 08:10:31 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/user-prefs.h (user_prefs): New field, read_only_constants. + * src/user-prefs.cc (read_only_constants): New function. + * src/variables.cc (install_builtin_variables): Add DEFVAR for + read_only_constants, but leave it #if 0'd out since we're not + really ready for it yet.. + * src/symtab.cc (symbol_record::read_only_error): Check + user_prefs.read_only_constants to see if it is ok to redefine + constants that are marked as read-only. + + * src/user-prefs.h (user_prefs): New field, ps4. + * src/user-prefs.cc (sv_ps4): New function. + * src/variables.cc (install_builtin_variables): Add DEFVAR for PS4. + * src/input.cc (do_input_echo): New function. Use PS4 variable as + prefix of echoed input. Send echoed input through the pager. + + * flibs.sh: Ignore -lang* options. + + * src/load-save.cc (Fsave): Send `save - ...' output through the + pager. + + * doc/Makefile.in: Create and distribute refcards of various sizes. + Delete rules for making refcard.tex from refcard.tex.in. + Don't make or distribute refcard-local. + * doc/refcard.tex: Handle setting paper size with \refcardsize. + * doc/refcard-a4.tex, doc/refcard-legal.tex, doc/refcard-letter.tex: + New files. + +Mon Jan 16 13:19:29 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tc-rep-ass.cc (TC_REP::do_scalar_assignment): Handle + assignments like a(0) = []. + * src/tc-inlines.h (valid_zero_index): New function. + * src/tc-rep.cc (valid_as_zero_index): New function. + * src/tree-const.h (valid_as_zero_index): New function. + + * src/parse.y (func_def2): Check user_prefs before warning about + function name and function file name conflict. + * src/user-prefs.h (user_prefs): New field, warn_function_name_clash. + * src/user-prefs.cc (warn_function_name_clash): New function. + * src/variables.cc (install_builtin_variables): Add DEFVAR for + warn_function_name_clash. + + * scripts/image/octtopnm.c: Include stdlib.h instead of malloc.h. + +Sun Jan 15 15:08:04 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * readline/rldefs.h: Use new #defines for directory headers now + that we are using autoconf 2. + + * scripts/special-matrix/hankel.m: Use .', instead of '. + + * src/input.cc (match_sans_spaces): Use strcmp, not strncmp. + + * src/tc-rep-ass.cc (TC_REP::fortran_style_matrix_assignment): + For scalar index, don't do assignment if RHS and LHS are both empty. + + * src/data.cc (Fsize): Handle optional second arg. + + * src/tree-expr.cc (tree_function::eval (int)): Correctly set + nargin and nargout to zero when evaluating function. + + * src/lex.l (handle_string): Correct handling of string escapes. + +Thu Jan 12 15:25:34 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Version 1.1.0 released. + + * octMakefile.in (bin-dist-tar): Ignore errors on strip commands. + + * src/tree-expr.cc (tree_builtin::eval (int)): Set nargout to 0 + when calling function. + + * doc/Makefile.in (FORMATTED): Add refcard.dvi and refcard.ps so + that they are distributed along with the other docs. + * octMakefile.in (clean-doc-dist-tar): Delete target. + (doc-dist): Depend on doc-dist-tar, not clean-doc-dist-tar. + +Tue Jan 10 14:29:43 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/help.cc (print_usage): Print warning if symbol isn't found. + + * src/utils.cc (Fundo_string_escapes): Fix typo in call to + print_usage(). + + * src/octave.cc (Fsystem): Correctly compute exit code. + + * scripts/miscellaneous/etime.m: Complain if args are not the + right length, not if they are. Reverse sense of test for years. + Duh. + + * src/f-find.cc (find_to_fortran_idx): For the case of one output + argument, return a row vector if the original argument to find was + a row vector. + +Mon Jan 9 12:57:27 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (grab_help_text): Always overwrite help_buf. + ({CCHAR}): Don't call grab_help_text() if there is already + something in help_buf. + +Sat Jan 7 12:28:35 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (HOST_CXXFLAGS): New variable to substitute. + * Makeconf.in (ALL_CXXFLAGS, UGLY_ALL_CXXFLAGS, BUG_CXXFLAGS): + Add $(HOST_CXXFLAGS). + +Fri Jan 6 13:07:09 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/special-matrix/toeplitz.m: Use .' instead of '. + +Tue Jan 3 18:14:33 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * test: Rewrite many tests to not run Octave interactively. This + makes the log files much more readable. + + * octMakefile.in (clean-tar): Delete octave-test/npsol directory, + not just test/octave.test/npsol.exp. Likewise, add a command for + deleting qpsol tests. + +Mon Jan 2 20:02:10 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * src/octave.cc (main): Return 0 if error_state is not set. + + * src/error.cc (error_1): New function. + (error): Use it. + (parse_error): New function. + * src/parse.y: Never call error and yyerror; just use yyerror. + (yyerror): Improve logic. Use new parse_error() function so that + error_state is always set for a parse error. Don't use + ostream::form(). + (ABORT_PARSE): Don't call reset parser here. + (colon_expr): Don't call yyerror here. An error message is + printed by tree_colon_expression::chain() if it fails. + +Mon Dec 26 20:11:01 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-expr.cc (eval): Only call multi-arg form of eval for + object_to_eval if necessary. + +Fri Dec 23 00:08:08 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l: Don't increment promptflag anywhere. + (eat_continuation): New function. + (eat_whitespace): Handle embedded continuations. Return nonzero + if whitespace consumed. + (handle_close_brace): Don't pass yytext. Do pass flag indicating + whether whitespace follows brace. + (handle_identifier): Check for next token being `=' here. Pass + flag indicating whether whitespace follows identifier. + (<MATRIX>{SNLCMT}*;{SNLCMT}*): Call eat_whitespace() here. + ({IDENT}{S}*): Call eat_continuation() here. + (do_comma_insert_check): And here, but put a space back if + whitespace is gobbled. + (have_continuation, have_ellipsis_continuation): Decrement + promptflag here. + +Wed Dec 21 09:56:49 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-plot.cc (Fclearplot): Send "set nolabel" too. + +Mon Dec 19 17:50:15 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-plot.h, src/tree-plot.cc (subplot): Rename using to + using_clause to avoid new C++ keyword. Rename title and style to + match. + +Fri Dec 16 00:09:01 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Don't check for fpsetmask. + * src/sysdep.cc (sysdep_init): Don't check HAVE_FPSETMASK + +Thu Dec 15 00:28:52 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/variables.cc (install_builtin_variables) [default_save_format]: + Fix doc string. + + * configure.in: Rework DEFAULT_DOT_O_FROM_DOT_F and + DEFAULT_DOT_C_FROM_DOT_F to avoid embedded newlines. + * Makeconf.in: Likewise. + + * src/pager.cc (flush_output_to_pager): Close stream before + resetting signal handler. + + * src/help.cc (Fhelp): Call fcn_file_in_path here. Delete it too. + Print file name before help message. + * src/variables.cc (get_help_from_file): Don't call + fcn_file_in_path here. + (gobble_leading_white_space): Correctly grab only first set of + comments. + +Wed Dec 14 11:42:13 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/parse.y (pager_buf): Don't make it a fixed-size array. + * src/variables.cc (get_help_from_file): New function. + (gobble_leading_white_space): Return first block of comments for + later use as help string. + (looks_like_octave_copyright): New function. + (parse_fcn_file): Stash help from gobble_leading_white_space in + global help_buf. + * src/lex.l (grab_help_text): Don't overwrite help found by + gobble_leading_white_space. + (reset_parser): Delete help_buf. + * src/help.cc (Fhelp): Only try to get help from symbol records + that are defined. If all else fails, try get_help_from_file. + + * src/pager.cc (flush_output_to_pager): Re-initialize pager_buf + immediately after extracting message. Delete message immediately + after sending it to the output stream. Ignore interrupts while + running pager. + + * octMakefile.in (clean-tar): Delete npsol.exp and any .m files + that are in the test/octave.test directory. + (install): Use $(INSTALL), not just install. + + * src/lex.l (reset_parser): Don't reset input column or line + number if reading from a script file or a function file. + (is_keyword): Don't set line number to 1 if reading function file + or script file. + * src/variables.cc (gobble_leading_whitespace): Count lines. + * src/octave.cc (main): If reading file, set reading_script_file + and curr_fcn_file_name before calling get_input_from_file(). + + * src/tc-rep.cc (TC_REP::matrix_value): If implicit_str_to_num_ok, + convert empty string to empty matrix. + +Tue Dec 13 20:25:34 1994 Frederick (Rick) A Niles <niles@axp745.gsfc.nasa.gov> + + * liboctave/dbleQR.cc, liboctave/dbleQRP.cc, liboctave/CmplxQR.cc, + liboctave/CmplxQRP.cc: Get economy-sized dimensions correct. + + * libcruft/misc/i1mach.f, libcruft/misc/gen-d1mach.c, + libcruft/ranlib/ignuin.f: Prevent warnings about variable may be + used before defined. + +Tue Dec 13 11:07:34 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/variables.cc: Change commas_in_literal_matrix to + whitespace_in_literal_matrix. + * src/user-prefs.h (user_preferences): Likewise. + * src/user-prefs.cc (init_user_prefs): Likewise. + (whitespace_in_literal_matrix): Likewise, rename function. + * src/lex.l: Likewise. + (nesting_level): Rename from in_brace_or_paren. + (<MATRIX>{SNLCMT}*\n{SNLCMT}*): Make separate case from + <MATRIX>{SNLCMT}*;{SNLCMT}. Check nesting level to decide whether + to convert newline to semicolon. + ({NL}, {CCHAR}): Check nesting level to decide whether to eat + or return newline. + ("("): Decrement promptflag. + (")"): Increment promptflag. + +Mon Dec 12 00:02:51 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/Makefile.in, scripts/*/Makefile.in (install): Don't + depend on all. + + * octMakefile.in: Put doc dir last. + * doc/Makefile.in (dir): New file. + (DISTFILES): Distribute dir. + (install): Install dir if it does not already exist in $(infodir). + Otherwise, print message. + + * src/lex.l: Handle {IDENT}{S}*/= with yyinput() instead of + trailing context. + (handle_close_brace): New function. + (handle_number): New function. + (have_continuation, handle_ellipsis_continuation, handle_string): + New functions for handling strings and continuation lines in + string constants. + (eat_whitespace): New function eliminates need for NEW_MATRIX + start state. + +Sun Dec 11 15:53:03 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l: Eliminate special case for eating whitespace when + start state is <TEXT_FCN>. + Merge three cases for handling `]' for <MATRIX> start state. + +Fri Dec 9 12:21:35 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l: Handle `\' as a continuation character too. + Allow comments and blanks to follow continuation characters. + Improve handling of comments in matrices. Create a few more + definitions for patterns. Restructure source. + + * configure.in: Check for bcopy too. + + * configure.in (gxx_version): Don't use -fno-implicit-templates on + AIX systems with g++ 2.6.x. + + * octave-bug.in: Check for CC: lines too. Use case-insensitive + match for To: and Cc: lines. Actually send file that has header + separator stripped. Print list of CC: addresses too. + + * src/input.cc (get_user_input): If user enters empty string, + return empty matrix or empty string. + + * src/help.cc (Fhelp, Ftype, Fwhich): Don't allow lookup_by_name + to execute script files. + +Thu Dec 8 23:20:02 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tc-rep.cc (print): Don't check `print', which is not a + variable in this context. + +Wed Dec 7 10:52:59 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/configure.in: Check for fpsetmask. + * src/sysdep.cc (sysdep_init): Check HAVE_FPSETMASK. Only call it + if either __386BSD__ or __FreeBSD__ is defined. + Don't check __386BSD__ as a condition for including + floatingpoint.h. + +Mon Dec 5 12:29:07 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/utils.cc: Update directory header macro names for autoconf 2. + * src/dirfns.cc: Likewise. + +Sun Dec 4 22:00:40 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octMakefile.in (DISTFILES): Don't distribute GCC.PATCH, since it + is not needed with gcc 2.6.3. + + * configure.in: Really do disable IEEE floating point functions on + the Alpha. + +Wed Nov 30 11:42:44 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * doc/FAQ.texi: New file. + * doc/Makefile.in: Create info, dvi, and ps files and distribute + them. + + * Makefile.in (all): Expand initial message. + +Sat Nov 26 21:47:05 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/octave.cc (Fcomputer): Always append ios::ends to ostrstream + before returning. + +Mon Nov 21 09:41:34 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l: When start state is TEXT_FCN, gobble blanks with + pattern that matches only blanks before other patterns that can + also match just blanks. Always check whether in_brace_or_paren + stack is empty before trying to use it. + + * src/parse.y (make_multi_val_ret): Call constructor for + tree_simple_assignment_expression with correct number of args. + + * scripts/plot/shg.m: New function. + + * src/f-qpsol.cc (Fqpsol): Correct for changes in meaning of + nargin and the way args is loaded. + * src/f-npsol.cc (Fnpsol): Likewise. + + * scripts/polynomial/roots.m: Return empty matrix for scalar or + empty matrix args. + + * src/tree-plot.cc (gnuplot_terminal_type): New static variable. + (Fset): If this is a set term command, set gnuplot_terminal_type. + (open_plot_stream): Use gnuplot_terminal_type if it is set. + + * src/idx-vector.cc (idx_vector::init): Don't check max value of + index vector against dimension here. We may need to resize. + * src/tc-rep-idx.cc (do_scalar_index): Do check idx-vector max + value here. + + * src/lex.l (is_plot_keyword): Don't set past_plot_range here. + Don't accept abbreviations for clear. + (handle_identifier): Don't call is_plot_keyword unless plotting. + Set past_plot_range here, before checking for plot option keywords. + +Fri Nov 18 17:25:59 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/data.cc (Fis_struct): New function. + +Thu Nov 17 18:13:56 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octMakefile.in (DISTFILES): Distribute GCC.PATCH. Don't + distribute LIBG++.PATCH. + + * src/tree-plot.cc (Fclearplot): Turn off grid and reset + plot_line_count to zero. + + * configure.in: Check for sys/resource.h. + Create scripts/strings/Makefile too. + + * src/timefns.cc: Surround inclusion of sys/resource.h in extern "C". + Only include sys/resource.h if both HAVE_SYS_RESOURCE_H and + HAVE_GETRUSAGE are defined. + +Wed Nov 16 09:26:10 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/plot/plot_opt.m: New function. + * scripts/plot/semilogx.m, scripts/plot/semilogx.m, + scripts/plot/loglog.m, scripts/plot/plot.m: Handle additional + args and format strings. + * scripts/plot/polar.m: Handle format arg. + * scripts/plot/polar_int_1.m, scripts/plot/polar_int_2.m: Extract + from polar_int.m. + * scripts/plot/plot_int_1.m, scripts/plot/plot_int_2.m: Extract + from plot_int.m. + * scripts/plot/plot_2_s_s.m, scripts/plot/plot_2_v_v.m, + scripts/plot/plot_2_m_m.m, scripts/plot/plot_2_v_m.m, + scripts/plot/plot_2_m_v.m: Handle format arg. + + * scripts/strings/strcmp.m: Move here. + * scripts/general/strcmp.m: From here. + + * src/xdiv.cc (result_ok): Issue warning instead of error if warn + is nonzero. + +Tue Nov 15 15:54:19 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-plot.cc (Fcloseplot): Clear title and labels too. + + * src/help.cc (keywords): Add entries for all_va_args, + unwind_protect, unwind_protect_cleanup, and end_unwind_protect. + + * liboctave/Makefile.in: Use -include for dependency files. + * src/Makefile.in: Likewise. + +Mon Nov 14 10:28:23 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-misc.cc (convert_to_const_vector): Resize vector before + returning. + + * src/lex.l (plot_style_token): Also allow "steps", "boxes", and + "boxerrorbars". + + * src/parse.y (UNWIND): Rename from UNWIND_PROTECT. + (CLEANUP): Rename from UNWIND_PROTECT_CLEANUP. + (command): Allow optsep after UNWIND and CLEANUP tokens. + * src/lex.l (is_keyword): Use new token names + + * src/tree-const.h (tree_constant::all_va_args): New enum. + (tree_constant (tree_constant::all_va_args t)): New constructor. + (is_all_va_args): New function. + (is_empty, is_zero_by_zero, make_numeric_or_magic, + make_numeric_or_range_or_magic): Handle all_va_args type. + * src/tc-rep.h (constant_type::all_va_args): New enum element. + (is_all_va_args): New function. + * src/tc-rep.cc (TC_REP::tree_constant_rep (TC_REP::constant_type), + TC_REP::print_code): Handle all_va_args. + * src/tree-misc.cc (tree_argument_list::convert_to_const_vector): + Handle all_va_args. + * src/tree-expr.cc (tree_index_expression::eval): After call to + tree_argument_list::convert_to_const_vector (), check error_state. + (tree_simple_assignment_expression::eval): Likewise. + (tree_function::octave_all_va_args): New function. + * src/parse.y (ALL_VA_ARGS): New token. + (arg_list): Handle ALL_VA_ARGS. + * src/lex.l (is_keyword): Handle all_va_args. + + * src/tree-expr.cc (tree_identifier::bump_value): Check read-only + status of sym before altering value. + (tree_prefix_expression::eval): Check error_state after call to + tree_identifier::bump_value (). + + * src/variables.cc (bind_nargin_and_nargout): Don't make nargin + and nargout read only. + + * scripts/strings: New subdirectory for string functions. + * scripts/Makefile.in (SUBDIRS): Add strings. + * scripts/strings/strcat.m: New function. + +Fri Nov 11 14:17:31 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/load-save.cc (extract_keyword): Allow trailing blanks on the + input line. + +Thu Nov 10 09:53:35 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/general/reshape.m, scripts/image/ind2gray.m, + scripts/image/ind2gray.m, scripts/image/ind2rgb.m, + scripts/image/rgb2ind.m: unwind_protect do_fortran_indexing. + * scripts/general/strcmp.m: unwind_protect implicit_str_to_num_ok. + * scripts/miscellaneous/menu.m: unwind_protect page_screen_output. + + * src/parse.y (UNWIND_PROTECT, UNWIND_PROTECT_CLEANUP): New tokens. + (command): Handle unwind-protect. + * src/lex.l (is_keyword): Handle unwind_protect, + unwind_protect_cleanup, and end_unwind_protect. + * src/tree-cmd.cc (tree_unwind_protect_command): New class, to + handle unwind-protect. + + * src/token.h (end_tok_type): New field, end_unwind_protect. + + * src/error.cc (verror): Flush pending output to pager here. + (error): Not here. + + * src/tc-rep.cc (force_numeric): Don't jump to top level on error. + * src/tc-rep.cc, src/tc-rep-ass.cc, src/tc-rep-idx.cc: Check + error_state after calls to make_numeric* functions. + + * src/f-lpsolve.cc: Define Flp_solve and Flp_solve_options, not + Flpsolve or Flpsolve_options. + + * src/utils.cc (Ffile_in_path): Define Ffile_in_path, not + Ffile_in_pat. + + * src/f-inv.cc: Add DEFUN for inverse. + +Wed Nov 9 09:30:15 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/load-save.cc (read_mat_file_header): Check for mopt < 0 too. + Don't fail if reading mopt fails. + (save_mat_binary_data): Handle range data as a special case. + (get_default_save_format): Also accept `mat-binary' and + `mat_binary'. + (Fsave): Add ios::trunc to flags for opening output file. + + * src/parse.y (func_def2): Stash function name before stashing + file name. + + * src/utils.cc (fcn_file_in_path): Don't append `.m' if the name + already ends in `.m'. + (oct_file_in_path): Likewise, for `.oct'. + + * src/error.cc (usage): Set error state to -1, so we get traceback + information after a call to usage. + + * src/tree-expr.cc (stash_fcn_file_name): Store full name of the + file. + + * scripts/*/*.m: Change messages to say `invalid' instead of + `illegal', since no laws are being broken by using these functions + incorrectly. + + * src/timefns.cc (Fcputime): New function. + * configure.in: Check for getrusage. + + * src/scripts/miscellaneous/tic.m: New function. + * src/scripts/miscellaneous/toc.m: New function. + * src/scripts/miscellaneous/etime.m: New function. + * src/scripts/miscellaneous/is_leap_year.m: New function. + + * src/error.cc (Fwarning, Fusage): New functions. + * scripts/*/*.m: Use them instead of printing warning and usage + messages directly with disp, printf, or fprintf. + + * src/file-io.cc (close_files): Check Pix before using. + (file_count): Delete unnecessary variable. Instead, use + DLList::length to get the number of files in the list. + + * src/sighandlers.cc (install_signal_handlers): Explicitly ignore + SIGPOLL and SIGIO. + +Tue Nov 8 15:26:50 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/general/logspace.m: Lose fractional part of third arg. + Don't round, for compatibility with Matlab. + * scripts/general/linspace.m: Likewise. + + * liboctave/CMatrix.cc (row_min, row_max, row_min_loc, row_max_loc): + Handle case of row containing only real elements. + (column_min, column_max, column_min_loc, column_max_loc): + Likewise, for columnwise operations. + * src/f-minmax.cc (two-complex-arg min, max): Handle case of both + columns containing only real elements. + + * src/variables.cc (Fclear): Pass 0 to symbol_table::list() for + pats and npats. + +Mon Nov 7 20:22:36 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * liboctave/dColVector.cc (operator +=): Don't return reference to + temporary. + (operator -=): Likewise. + * liboctave/CMatrix.cc (operator +=, operator -=): Likewise. + +Sun Nov 6 23:15:24 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octMakefile.in (DISTSUBDIRS): Don't use $(SUBDIRS) here. + + * src/load-save.cc (Fsave): Open output file with mode == + ios::out, not ios::in. + +Sat Nov 5 18:18:11 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (HAVE_SYS_SIGLIST): Check for sys_siglist variable, + even if it isn't declared in a system header. + * acconfig.h (HAVE_SYS_SIGLIST): Add #undef. + * src/sighandlers.cc (sys_siglist): Define our own if + HAVE_SYS_SIGLIST is not defined, not if SYS_SIGLIST_DECLARED is + not defined. + + * src/tree-plot.cc (Fclearplot): New function. + (clg): Alias for clearplot. + + * src/parse.y (CLEAR): New token. + (statement): Handle PLOT CLEAR as a special case. + * src/lex.l (is_plot_keyword): Handle CLEAR here too. + +Fri Nov 4 08:44:57 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * All: Remove remaining #pragma interface/implementation statements. + + * src/tree-plot.cc (subplot): Move actual code here from .h file. + + * src/tree-expr.cc (tree_expression): Declare destructor virtual. + Delete unnecessary destructors. + + * src/SLStack.h, src/SLStack.cc (operator =): Return reference to + SLStack, not void. + + * src/f-qzval.cc (Fqzval): Rename from Fqzvalue. Change Help + and usage messages too. + + * scripts/plot/plot_int.m: Really figure out if there are any + imaginary parts. + + * scripts/control/are.m: Fix typo. + +Thu Nov 3 18:44:11 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/load-save.cc (save_ascii_data): Handle new arg, + strip_nan_and_inf. Change callers. + (strip_infnan): New functions. + (save_three_d): Strip inf and nan values here too. + + * src/tree-plot.h (subplot_using): New data have_values and val. + * src/tree-plot.cc (subplot_using::eval, subplot_using::values): + New functions. + (subplot_style::errorbars): New function. + (subplot::extract_plot_data, subplot::handle_plot_data): New functions. + (subplot::print): Improve handling of data. + +Wed Nov 2 08:11:08 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/file-io.cc (do_scanf): If reading from stdin, flush stdout + first. + + * configure.in: Leave some comments in the configure file. + Improve checking for termios.h, termio.h, and sgtty.h. + + * src/variables.cc (install_builtin_variables): DEFVAR realmax and + realmin here. + * src/sysdep.cc: Instead of DEFUNing them here. + + * src/variables.cc (do_who): Accept globbing patterns as args. + (maybe_list): Handle them here. + + * src/symtab.cc (matches_patterns): New function. + (symbol_table::list, symbol_table::long_list): Accept list of + patterns, and use matches_patterns to see if the given string is a + match. Change all callers. + + * src/load-save.cc (read_binary_data): Don't fail if reading + name_len fails. + (do_load): Quit quietly if nothing is left to read. Clean up doc + and name in all cases. + +Tue Nov 1 16:34:20 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/lex.l (")"): Set cant_be_identifier to 1 here too. + + * src/tree-plot.cc: Use abbreviations for gnpulot plot, splot, + replot, with, using, and title commands. + +Mon Oct 31 14:26:12 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/variables.cc (Fclear): Look in global symbol table for + user-defined function names. + + * src/load-save.cc (do_load): New function. + (Fload): Use it to avoid assigning streams. + (write_binary_header): New function. + (save_vars): New function. + (Fsave): Use it to avoid assigning streams. + + * libcruft/linpack/zgesl.f (zgesl): Comment out unused varialbes + and statement functions. + + * src/sysdep.cc (Fisieee): New function. + (Frealmax, Frealmin): Ditto. + + * scripts/miscellaneous/version.m: New file. + +Fri Oct 28 14:52:08 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octMakefile.in (distclean): Also delete config.cache and + config.log. + + * Makeconf.in (CPPFLAGS): Allow substitution. + + * configure.in: Use AC_PREFIX_DEFAULT. + + * configure.in: Use AC_CANONICAL_HOST instead of doing this + ourselves. + + * install-sh: Rename from install.sh. + * octMakefile.in (DISTFILES): Distribute install-sh, not install.sh. + +Mon Oct 24 10:04:27 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octave-bug.in: Print message if bug report appears to have been + mailed successfully. Otherwise, exit with error status. + +Fri Oct 21 14:05:10 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tc-rep-ass.cc (TC_REP::do_vector_assign (rhs, idx-vector)): + Handle all four cases of row/colum mixing. Report an error if the + RHS is a matrix. + + * src/tc-rep-idx.cc (TC_REP::do_index): Don't barf on indexing an + empty matrix with colon(s). + (TC_REP::do_scalar_index): Create index vector with z_len = 1. + (TC_REP::do_matrix_index (Range, tree_constant)): Correctly handle + case of colon as second arg. + + * octave-bug.in: Put mail commands in subshells so error message + really do go away. + +Thu Oct 20 11:05:36 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * octave-bug.in: If passing $SUBJECT on the command line to a + mailer, quote it. Don't assume /bin/mail takes any args other + than a recipient address. Do the right thing if the To: line + changes. + + * src/tc-rep.cc (TC_REP::rows, TC_REP::columns): Return -1 for + anything that doesn't really have rows or columns. + + * src/tc-rep-idx.cc (fortran_style_matrix_index): Check max and + min index values. + + * Makefile.in (FORCE): New phony target. Used instead of .PHONY + to be portable. + + * octave-bug.in: Try harder to mail the message. + + * src/dynamic-ld.cc: Undefine true, false, and boolean after + including kpathse/pathsearch.h. + + * src/sysdep.cc: Include <float.h>. + +Wed Oct 19 10:28:49 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in (CXXLIB_LIST, FLIB_LIST, CXXLIB_PATH, FLIB_PATH): + Be careful not to match -l or -L in the middle of a word. + + * src/f-minmax.cc: Correctly handle mixed scalar/matrix args. + + * octMakefile.in: Rename from Makefile.in. + * Makefile.in: New file. For `all' target, print message and + execute make again using octMakefile. For other targets, just + execute make again using octMakefile. + + * configure.in: Check for sys_siglist. + * src/sighandlers.h [! HAVE_SYS_SIGLIST]: Provide an external + declaration. + * src/sighandlers.cc (generic_sig_handler): New function, replaces + most individual signal handler functions. + (sigint_handler, sigpipe_handler): Restore signal handler before + doing anything else. + [! HAVE_SYS_SIGLIST] (sys_siglist): Provide our own definition. + + * config.guess: Update from FSF sources. + +Tue Oct 18 23:36:24 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * flibs.sh: Don't pass -Y P,path. Instead, turn it into a series + of -L dir args. + + * configure.in: Update for autoconf 2.0. + Delete support for --enable-run-in-place (it is too hard to make + this work reliably...). + +Mon Oct 17 11:40:49 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/user-prefs.cc (init_user_prefs): Declare to return void, + not int. + + * configure.in: Change quote characters around tr command. Some + systems actually do need the []'s for ranges... + +Sun Oct 16 12:22:14 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tempname.c, src/tmpnam.c: New files. + * src/Makefile.in (SOURCES): Add them. + * src/dirfns.cc: Delete functions extracted from glibc. + + * configure.in (localfcnfiledir, localoctfiledir, imagedir): + New variables. Use them to define localfcnfilepath, + localoctfilepath, and imagepath. + * Makeconf.in: Substitute them here. + + * src/utils.cc (get_fcn_file_names) [WITH_DLD]: Also match .oct + files. + + * dld/find_exec.c (dld_find_executable): Don't be fooled by + directories or other special files in PATH. + (ABSOLUTE_FILENAME_P): Also return true if the name includes a + `/'. This isn't necessarily an absolute path, but we will turn it + into one later. + * src/dynamic-ld.cc (octave_dld_init): Call make_absolute() on + value returned from dld_find_executable(). + +Sat Oct 15 08:35:13 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * flibs.sh: Undo previous change. Only substitute spaces for + commas if it looks like we have output from xlf. Handle -Y and + LD_RUN_PATH using gcc's -Xlinker option. + + * Makefile.in (snapshot-version): Use move-if-change for version.h. + +Fri Oct 14 09:18:08 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/image/Makefile.in (SOURCES): Don't forget octtopnm.c. + + * Makefile.in (BINDISTFILES): Distribute octave-bug too. + + * configure.in (imagepath): Install at same level as fcnfiledir, + not below it. + + * doinstall.sh: Correctly extract version numbers that are not all + digits. Also install images too. Also install octaverc. Ask + octave for the target host type. Also create site/m and + site/oct directories. Also install octave-bug. + + * scripts/image/Makefile.in (DISTFILES): Distribute demo image + files too. + + * doinstall.sh: Update for new directory organization. + + * src/variables.cc (subst_octave_home): Make it work for multiple + substitutions. + + * flibs.sh: Handle -Y P,path:of:lib:dirs output from f77 on Solaris. + + * src/strfns.cc (Ftoascii): New file, new function. + (Fisstr, Fsetstr): Move here, fromd ata.cc. + + * src/Makefile.in (SOURCES): Include it. + +Thu Oct 13 11:58:03 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/signal/filter.m: Postpad `b' before reshaping. + + * mkinstalldirs: New file. + * Makefile.in: Distribute it, don't make mkpath. + * All Makefile.in files: Use it instead of mkpath. + + * src/utils.cc (Foctave_tmp_file): New function. + + * src/utils.cc (undo_string_escape): Move here from tc-rep.cc, + rename from undo_string_escapes, and make extern. + (undo_string_escapes): New function, for undoing a whole string. + (Fundo_string_escapes): New function. + + * scripts/miscellaneous/dump_prefs.m, + scripts/miscellaneous/dump_1_pref.m: New functions. + * scripts/miscellaneous/bug_report.m: Record user preferences in a + file and pass the name of the file to octave-bug. Use + octave_tmp_file to generate tmp file name. + * octave-bug.in: Accept a final file-name arg as a file that + contains a list of user-preferences. + +Wed Oct 12 09:09:37 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Redefine archlibdir and octfiledir so that oct + and exec directories are at the same level as the m directory. + Redefine localoctfilepath so that site/oct is a the same level as + site/m. + + * Makeconf.in (F77): Substitute it. + (BUG_CFLAGS, BUG_CXXFLAGS): New vars. + * configure.in: + * scripts/bug_report.m: New file. + * octave-bug.in: New file. + * Makefile.in (DISTFILES): Distribute octave-bug.in. + (dirs_to_make): Add $bindir. + (all): Add octave-bug. + (octave-bug): New target. + (install): Install it. + * src/defaults.h.in: Add defines for bindir. + * src/Makefile.in (defaults.h): Substitute it. + * src/variables.cc (octave_bin_dir): New function. + * src/octave.cc (initialize_globals): Also add $bindir to path. + + * configure.in: Check for gettimeofday. Add AC_TIME_WITH_SYS_TIME. + * src/systime.h: New file. + * src/timefns.h: Use gettimeofday if available. + * src/Makefile.in (INCLUDES): Add systime.h. + +Mon Oct 10 14:34:56 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/octave.cc (verbose_flag): New global variable. + (long_opts): Add "verbose". + (usage_string): Update. + (main): Set verbose_flag if given --verbose. + (execute_startup_files): Don't print messages about reading + startup files if verbose_flag is not set. + + * src/tree-expr.cc (apply_mapper_fcn): Handle scalars as a special + case, but then just try to convert other arg types to a matrix. + + * src/f-det.cc (Fdet): Check if arg is complex type, but not + necessarily a complex matrix. + * src/f-schur.cc (Fschur): Likewise, and also for real types. + * src/f-lu.cc (Flu): Likewise. + * src/f-minmax.cc (Fmin, Fmax): Likewise. + +Sun Oct 9 21:04:17 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tc-rep-ass.cc (TC_REP::assign): If LHS is undefined, don't + try to force it to be a numeric type. + +Fri Oct 7 09:05:10 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: Define LD_STATIC_FLAG for Alpha OSF/1 1.3 systems. + + * src/tc-rep-idx.cc (TC_REP::do_index): Only work for numeric + types, but don't panic if conversion doesn't work. + * src/tc-rep-ass.cc (TC_REP::assign): Likewise. + + * src/tc-rep.cc (TC_REP::gripe_wrong_type_arg): New function. + + * src/gripes.cc (gripe_wrong_type_arg): Define here. + * src/tree-const.cc: Not here. + +Wed Oct 5 16:24:38 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/file-io.cc (do_scanf): Don't panic if string is NULL. + + * src/gripes.cc (gripe_unrecognized_float_fmt): New function. + (gripe_2_or_3_dim_plot): Ditto. + (gripe_unrecognized_data_fmt): Ditto. + (gripe_data_conversion): Ditto. Use it in load-save.cc data + conversion routines that aren't implemented yet. + + * src/load-save.cc (do_double_format_conversion): Don't panic on + unrecognized floating point formats. + (do_float_format_conversion): Likewise. + (write_doubles): Don't panic if data format is unrecognized. + (do_save): Likewise + (install_loaded_variable): Don't panic for unknown symbol types. + (read_binary_data): Also check error_state after calls to read_doubles. + + * src/symtab.cc (symbol_table::rename): Don't panic if symbol + can't be renamed. + * src/parse.y (return_list): Abort parse if renaming results in an + error. + + * src/tree-misc.cc (tree_if_command::eval): Don't panic if all + (all (cond)) is not a scalar. + + * src/tree-expr.cc (tree_unary_expression::print_code): Don't + panic if expression type is unknown. + + * src/tree-plot.cc (tree_plot_command::eval): Don't panic if plot + is not 2 or 3 dimensional. + (tree_plot_command::print_code, subplot::print, save_in_tmp_file): + Likewise. + + * src/variables.cc (alias_builtin): Panic with better message. + (subst_octave_home): Don't panic if OCTAVE_HOME doesn't contain + OCTAVE_PREFIX. + + * src/tc-inlines.h (REP_RHS_MATRIX): Use panic_impossible() + instead of abort(). + (REP_ELEM_ASSIGN, CRMATRIX): Likewise. + + * src/data.cc (Fdiag, make_diag): Do work here. + * src/tc-rep.cc (TC_REP::diag, make_diag): Not here. + * src/tc-rep.h (TC_REP::diag): Delete. + * src/tree-const.h (tree_constant::diag): Delete. + +Tue Oct 4 08:35:37 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/f-fft.cc (Ffft): Correctly set n_points for row vectors if + nargin == 1. + * src/f-ifft.cc (Fifft): Likewise. + + * src/load-save.cc (Fsave): Declare file and stream static. + +Mon Oct 3 10:40:50 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tree-expr.cc (octave_va_arg): Correct arg count and index to + match recent change to arg passing/nargin. + (define_param_list): Always set num_named_args = param_list->length (). + + * readline/Makefile.in (install): Don't install libreadline.a by + default. + (uninstall): Now no need to delete it. + + * configure.in (localfcnfilepath, localoctfilepath): Change to + match organization of system fcn and oct files, and enable + recursive searching in both. Enable recursive searching in + $(octfiledir). + (includedir): Change to $(prefix)/include/octave. + +Sun Oct 2 10:14:18 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: For now, disable IEEE floating point functions on + the Alpha. This is braindead, but at least prevents divide by + zero crashes... + + * src/file-io.cc (fseek_internal): Use values for origin that + match what we use to define SEEK_SET, SEEK_CUR, and SEEK_END in + variables.cc. + + * dld: Merge various changes for Linux from dld 3.2.4 that is + being distributed with jacal. + + * src/file-io.cc (fwrite_internal): Correct indexing of args. + + * src/tree-expr.cc (apply_mapper_fcn): New function. + (tree_builtin::eval): Use it instead of tree_constant::mapper(). + * src/tree-const.h (tree_constant::mapper): Delete. + * src/tc-rep.cc, src/tc-rep.h (TC_REP::mapper): Delete. + + * src/data.cc (Fcumprod, Fcumsum, Fprod, Fsum, Fsumsq): Do work here. + * src/tc-rep.cc (TC_REP::cumprod, TC_REP::cumsum, TC_REP::prod, + TC_REP::sum, TC_REP::sumsq): Not here. Delete. + * src/tc-rep.h (TC_REP::cumprod, TC_REP::cumsum, TC_REP::prod, + TC_REP::sum, TC_REP::sumsq): Delete + * src/tree-const.h (tree_constant::cumprod, tree_constant::cumsum, + tree_constant::prod, tree_constant::sum, tree_constant::sumsq): + Delete. + + * tree-const.h: Don't check gcc minor version number. + * tc-rep.h: Likewise. + + * src/file-io.h (class file_info): Declare here. + * src/file-io.cc: Not here. + + * configure.in (LIBOCTDLD, LIBDLD): Remove ../ prefix. + * Makefile.in (distclean, realclean): Don't remove *.a. + * src/Makefile.in (OCTAVE_LIBS): Correct directory spec for libs. + Build, install, and clean liboctdld.a, not ../liboctdld.a. + * dld/Makefile.in: Build, install, and clean libdld.a, not ../libdld.a. + * info/Makefile.in: Likewise, for libinfo.a. + * kpathsea/Makefile.in: Likewise, for libkpathsea.a. + * libcruft/Makefile.in: Likewise, for libcruft.a. + * liboctave/Makefile.in: Likewise, for liboctave.a. + * readline/Makefile.in: Likewise, for libreadline.a. + + * configure.in (gxx_version): Require 2.6.x or later. Don't + define EXTERNAL_TEMPLATES. Do define NO_IMPLICIT_TEMPLATES. + * liboctave/Array-C.cc, liboctave/Array-d.cc, src/Array-tc.cc, + src/DLList-fi.cc src/SLStack-tok.cc, src/SLStack-ue.cc, + src/SLStack-tm.cc, src/SLStack-pc.cc, src/SLStack-i.cc, + src/SLList-tc.cc, src/SLStack-sym.cc, src/SLStack-ui.cc, + src/SLList-misc.cc, src/SLList-expr.cc, src/SLList-plot.cc, + src/Map-tc.cc: New files. Instantiate templates here. + * libocave/Array.cc, src/Map.cc, src/Stack.cc, src/SLStack.cc: + Not here. Remove #pragma implementation hack. + * liboctave/Array.h, src/Stack.h, src/Map.h, src/SLStack.h: Remove + #pragma interface hack. + * Makeconf.in: Substitute NO_IMPLICIT_TEMPLATES, not + EXTERNAL_TEMPLATES. + (ALL_CXX_FLAGS, UGLY_ALL_CXX_FLAGS): Use $(NO_IMPLICIT_TEMPLATES), + not $(EXTERNAL_TEMPLATES). + * acconfig.h: Remove USE_EXTERNAL_TEMPLATES #undef. + * src/Makefile.in (XALL_CXX_FLAGS): Delete -fno-implicit-templates. + (TI_SRC, TI_OBJ): New variables. + (libtinst.a): New target. + * liboctave/Makefile.in (TI_SRC): New variable. + (SOURCES): Add it to list. + +Fri Sep 30 09:52:15 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/Makefile.in: Automatically generate more lists. + Use := in more places. + * src/Array-C.cc src/Array-d.cc src/Array-tc.cc src/Map-tc.cc + src/Stack-i.cc src/SLStack-pc.cc src/SLStack-sym.cc + src/SLStack-tok.cc src/SLStack-tm.cc src/SLStack-ue.cc: + New template instantiation files. + * configure.in: If using gcc 2.6.x or later, use + -fno-implicit-templates instead of -fexternal-templates. + + * src/tc-inlines.h: Rename from tc-inlines.cc. + + * src/parse.y (looking_at_indirect_ref): New global flag, for + parser feedback. + (tree_indirect_ref_type): New token type. + (TEXT_ID): New token. + (indirect_ref): New non-terminal. + (make_index_expression): New function. + (variable): Use it to build variable from indirect_ref, not just + identifier. + + * src/lex.l (handle_identifier): Handle identifiers differently if + looking at an indirect reference. Add `.' to list of other ops. + + * src/tree-expr.cc (tree_identifier::do_lookup): Handle new + exec_script arg. + (tree_identifier::assign): New functions for assignment to a + strucutre element. + (print_constant): New function. + (tree_identifier::eval, tree_indirect_ref::eval): Use it. + ( + + * src/tree-expr.h (tree_indirect_ref): New class for handling + structure references. + (tree_expression::is_indirect_ref): New virtual function. + (tree_fvc::lookup_map_element): New virtual function. + (tree_index_expression, tree_simple_assignment_expression): + Add new constructors for handling indirect references. + + * src/oct-map.h: New file, for class managing Octave's + structure/map type. + + * src/tree-misc.cc (tree_global::eval): Don't allow individual + structure elements to be tagged global. + + * src/tc-rep.h (tree_constant_rep): Add new field, a_map, and a + new type_tag, map_constant. + * src/tree-const.cc (tree_constant::is_map): New function. + * src/tree-const.cc (tree_constant::map_value, + tree_constant::assign_map_element, tree_constant::make_unique, + tree_constant::lookup_map_element, + tree_constant::make_unique_map_element): New functions. + + * src/Map.h (CHNode::CHNode): Copy key. + (CHNode::~CHNode): Delete it. + (CHMap::contents): Don't declare return value const. + + * src/tc-inlines.cc: Move some macros here from tc-rep.cc so they + can appear in one place and be shared by tc-rep-idx.cc, + tc-rep-ass.cc, and tc-pre.cc. + + * src/tc-rep-idx.cc, src/tc-rep-ass.cc: New files, extracted from + tc-rep.cc to make compilation of tc-rep stuff faster and require + less memory. + + * src/variables.cc (Fwhos): Correctly insert "-long" into arg list + for Fwho. + +Mon Sep 26 12:59:55 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * test/Makefile.in (OCTAVE_SCRIPT_PATH): Append `//' for recursive + searching. + +Fri Sep 23 07:53:13 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/plot/bar.m: Don't return values if nargout == 0. + * scripts/plot/hist.m: Likewise. + * scripts/plot/stairs.m: Likewise. + + * src/tree-plot.cc (Fishold): New function. + (plot_line_count, parametric_plot, clear_before_plotting): + Declare static. + + * src/f-fft.cc (Ffft): Handle row vector as a special case. + * src/f-ifft.cc (Fifft): Ditto. + +Thu Sep 22 13:20:53 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/help.cc (print_symbol_type): New function, extracted from Fwhich. + (Fwhich): Use it. + (Fhelp): Use it to print type info before help message. + + * src/dynamic-ld.cc: Hide all DLD-specific functions behind + #ifdef WITH_DLD. + + * scripts/startup: New directory. + * scripts/startup/Makefile.in: New file. + * scripts/startup/octaverc: New file. Don't overwrite existing + file when nstalling. + * configure.in: Generate Makefile in scripts/startup. + * scripts/Makefile.in (SUBDIRS): Add startup. + * src/defaults.h.in (OCTAVE_STARTUPFILEDIR): New macro. + * src/variables.cc (get_site_defaults): Look for octaverc in + OCTAVE_STARTUPFILEDIR. + + * configure.in (fcnfiledir): Make it end in `//'. + + * src/error.cc (Ferror): Correct indexing error. + + * src/Map.h, src/Map.cc: New files implementing associative arrays. + * src/Makefile.in: Include them in the list of files to distribute + and compile. + +Wed Sep 21 09:50:19 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (DISTSUBDIRS): Add dld to the list. + + * scripts/plot/hist.m: New function file. + + * src/tc-rep.cc (TC_REP::do_matrix_index (tree_constant, + tree_constant): For case of scalar as first arg, move call to + index check to the TC_REP::do_matrix_index (int, tree_constant) + function. + (TC_REP::do_matrix_index (int, tree_constant): Be compatible with + Matlab for indexing of the form row_vector (0, :). + (TC_REP::do_matrix_index (tree_constant, int): Likewise, for + indexing of the form col_vector (:, 0). + (TC_REP::do_matrix_assignment): Similar changes for assignment. + +Tue Sep 20 17:48:39 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/parse.y (return_list, return_list1): New nonterminals. + Rename from func_def1a. Handle variable number of return values. + * src/tree-expr.h (tree_function::vr_list): New field. + * src/tree-expr.cc (delete_vr_list): New function. + (tree_function::octave_vr_val, tree_function::takes_var_return): + New functions, for variable return lists. + (tree_function::define_ret_list, tree_function::eval): Handle vr_list. + (Fvr_val): New function. + * src/tree-misc.h (tree_va_return_list): New list class. + * src/tree-misc.cc (tree_parameter_list::convert_to_const_vector): + Take pointer to tree_va_return_list as arg, and append the values + found there. + + * src/arith-ops.cc (mx_stupid_bool_op): Correctly handle empty + matrices for == and != ops. + + * src/variables.cc (Fis_global): Check args(0), not args(1). + (Fexist): Likewise. + (install_builtin_mapper): Set nargin_max to 1, not 2. + + * src/dynamic-ld.cc (octave_dld_init): Make raw program name + absolute before calling dld_find_executable. + + * src/octave.cc (initialize_error_handlers): New function. + (main): Call init_user_prefs and initialize_error_handlers. + Rearrange order of calls to initialization functions. + + * src/user-prefs.cc (init_user_prefs): New function. + + * src/data.cc (map): Correct condition for assert (). Correct + handling of empty args. + + * src/f-lsode.cc src/f-dassl.cc src/f-quad.cc src/f-npsol.cc + src/f-fsolve.cc: Pass correct number of args to + takes_correct_nargs (). + * src/variables.cc (takes_correct_nargs): Use %s, not %c in format + string. + + * src/f-ifft2.cc src/f-expm.cc src/f-det.cc src/f-svd.cc + src/f-syl.cc src/f-schur.cc src/f-qzval.cc src/f-qr.cc + src/f-pinv.cc src/f-lu.cc src/f-log.cc src/f-inv.cc src/f-hess.cc + src/f-eig.cc src/f-chol.cc src/f-balance.cc src/f-lsode.cc + src/f-dassl.cc src/f-quad.cc src/f-npsol.cc src/f-fsolve.cc: + Correctly handle return value from empty_arg (). + * src/utils.cc (empty_arg): Clarify usage, correct return value if + arg is empty but no message is printed. + + * src/Makefile.in (dist): Delete builtins.cc too. + + * configure.in (DYNAMIC_LD_OBJ): Delete. + * src/Makefile.in (OBJECTS): Don't substitute DYNAMIC_LD_OBJ. + Always include dynamic-ld.o. + + * configure.in: Generate Makefile in scripts/elfun and + scripts/specfun. + + * Makeconf.in (version): Use `:=' and `$(shell )', not just `=' + and backticks, so we only extract the version number once. + +Mon Sep 19 09:04:30 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/tc-rep.h (represent_strings_with_doubles): New field in + tree_constant_rep class. + + * tree-misc.cc (tree_argument_list::convert_to_const_vector): + Don't allocate extra arg for function name. + * sysdep.cc, pr-output.cc, input.cc, file-io.cc, error.cc, + tc-rep.cc, tree-expr.cc, f-svd.cc, f-sort.cc, f-schur.cc, + f-rand.cc, f-qzval.cc, f-quad.cc, f-qr.cc, f-qpsol.cc, f-pinv.cc, + f-npsol.cc, f-minmax.cc, f-lu.cc, f-lsode.cc, f-log.cc, f-inv.cc, + f-ifft2.cc, f-ifft.cc, f-hess.cc, f-givens.cc, f-fsolve.cc, + f-fft2.cc, f-fft.cc, f-expm.cc, f-eig.cc, f-det.cc, f-dassl.cc, + f-colloc.cc, f-chol.cc, f-balance.cc, f-syl.cc, variables.cc, + tree-misc.cc, data.cc, octave.cc, utils.cc, defun-int.h: + Change meaning and usage of nargin and args.length() to cope with + above change. This makes nargin mean the same thing in built-in + functions as it does in M-files. + +Sat Sep 17 09:29:08 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/general/nargchk.m: New function. + +Fri Sep 16 08:48:13 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * Makeconf.in (FLIB_LIST, FLIB_PATH, CXXLIBS, CXXLIB_LIST, + CXXLIB_PATH): Set these. + + * cxxlibs.sh: New file. + * configure.in: Use it to determine extra C++ libraries to link + to. Use sed magic to extract list of libraries and directories + from FLIBS and CXXLIBS. + * Makefile.in: (DISTFILES): Include cxxlibs.sh. + + * configure.in: Change AC_VERBOSE messages to match + autoconf-generated messages. + + * src/dynamic-ld.cc (dld_octave_resolve_reference): Search library + path for list of files to link. + + * src/utils.cc (pathstring_to_vector): Un-#if 0 it. + + * Makefile.in: Install liboctdld.a if not linking to it. + (defaults.h): Substitute FLIB_LIST, FLIB_PATH, CXXLIB_LIST, + CXXLIB_PATH. + +Thu Sep 15 09:31:29 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * Makeconf.in (LD_STATIC_FLAG): Actually substitute LD_STATIC_FLAG. + (ALL_LDFLAGS): Include it here. + + * configure.in: Check for signgam declaration in math.h + * acconfig.h: Add #undef for SIGNGAM_DECLARED. + * src/mappers.h: Provide our own declaration of signgam if + HAVE_LGAMMA but not SIGNGAM_DECLARED. + +Wed Sep 14 11:28:09 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/dynamic-ld.cc (mangled_octave_builtin_name, + mangle_octave_oct_file_name, load_octave_builtin, + load_octave_oct_file, init_dynamic_linker): New functions. + [WITH_DLD] (octave_dld_init, dld_octave_resolve_reference, + dld_octave_builtin, dld_octave_oct_file): New functions to handle + details of dynamic linking using dld. + + * src/variables.cc (load_fcn_from_file) [WITH_DLD]: Handle looking + for .oct file to link at run time. + + * src/tree-expr.cc (tree_builtin::tree_builtin): Always init my_name. + (tree_builtin::eval): If no definition, try to load one using + load_octave_builtin(). + + * src/octave.cc (main): Initialize dynamic linking here. + + * src/defun-int.h (DEFINE_FUN_STRUCT, DEFINE_FUN_STRUCT_FUN): + New macros. + * src/defun-dld.h (DEFUN_DLD_BUILTIN): Rename from DEFUN_DLD and + handle case of WITH_DLD && OCTAVE_LITE && MAKE_BUITLINS. + (DEFUN_DLD): Use this for external user-supplied functions that + are intended to be dynamically linked. + + * configure.in: Handle --enable-lite-kernel. Call AC_SUBST for + use_dld and lite_kernel. Define LIBOCTDLD unless doing dynamic + linking and small kernel requested. + * acconfig.h: Add #undefs for OCTAVE_LITE and SMART_PUTENV. + * Makeconf.in: Define WITH_DLD from @use_dld@ and OCTAVE_LITE from + @lite_kernel@. + + * src/octave.cc (Fsystem): Rename from shell_cmd. + (Fshell_cmd): Define as alias to Fsystem. + +Mon Sep 12 20:19:20 1994 John Eaton <jwe@schoch.che.utexas.edu> + + * src/mappers.cc: Include error.h and math.h. + +Sat Sep 10 11:49:11 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Makefile.in: Clean up rules for making distributions. + (DISTDIRS): Distribute kpathsea + +Fri Sep 9 08:46:03 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/dMatrix.cc (pseudo_inverse): New function. + * liboctave/CMatrix.cc (pseudo_inverse): New function. + * src/f-pinv.cc: New file, for pinv(). + * src/Makefile.in (DLD_SRC): Add f-pinv.cc. + (DLD_OBJ): Add f-pinv.o. + * scripts/linear-algebra/pinv.m: Delete. + + * configure.in: Define and substitute $imagepath. + * src/Makefile.in: Substitute OCTAVE_IMAGEPATH. + * src/defaults.h.in: Add OCTAVE_IMAGEPATH. + * src/variables.cc (install_builtin_variables): Define IMAGEPATH. + * src/user-prefs.cc (image_path): New function. + * Makeconf.in (imagepath): substitute it. + + * src/octave.cc (initialize_globals): Ensure that $archlibdir is + in the user's PATH. + + * utils.cc (search_path_for_file, Ffile_in_path): New functions. + + * configure.in: Append `//' to $fcnfiledir, for recursive + searching. + (AC_OUTPUT): Edit makefiles in script subdirectories too. + + * scripts: Regroup function files in the following directories, + each with its own Makefile.in: + + image plot signal control + linear-algebra polynomial special-matrix general + miscellaneous set statistics + + * src/help.cc (simple_help): Use kpathsea functions to find files + in path. + * src/utils.cc (get_fcn_file_names): Likewise. + (pathstring_to_vector): #if 0 out. + +Thu Sep 8 16:59:42 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/Makefile.in (OCTAVE_LIBS): Include ../libkpathsea.a. + * configure.in: Include configure stuff for kpathsea here too. + * Makefile.in (kpathsea): New target. + * src/utils.cc (file_in_path): Use kpathsea function instead of + doing our own searching. + * kpathsea/Makefile.in (lib): Define as ../libkpathsea.a, not just + kpathsea.a. + +Wed Sep 7 09:39:20 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/user-prefs.cc (check_str_pref): Fix comment. + + * src/utils.cc (empty_arg): Check flag == 0, not is_empty > 0. + + * src/f-fft2.cc (Ffft2): New file and function. + * src/f-ifft2.cc (Fifft2): Likewise. + * src/fft2.m, src/ifft2.m: Delete. + + * src/f-fft.cc (Ffft): Handle second arg. Depending on value of + propagate_empty_matrices, return empty matrix for empty arg. + * src/f-ifft.cc (Fifft): Likewise. + + * liboctave/CMatrix.cc (fourier2d, ifourier2d): New functions. + * liboctave/dMatrix.cc (fourier2d, ifourier2d): New functions. + + * src/tree-misc.cc (eval (int, int)): New function. + * src/octave.cc (eval_string, Feval): Handle multiple output args. + + * src/error.cc (suppress_octave_error_messages): New global. + (error): Check it to see if messages should be printed. + * src/octave/cc (Feval): Set it if `catch' arg is supplied. + + * src/octave.cc (Feval): Handle second `catch' arg. + + * src/load-save.cc (read_mat_file_header): Init swap to zero. + + * doc/octave.1: New simple man page. + * doc/Makefile.in: Distribute and install it. + + * src/variables.cc (Fclear): Handle -x option for exclusive clear. + +Tue Sep 6 16:00:34 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/load-save.cc (save_mat_binary_data): New function. + (do_save): Handle LS_MAT_BINARY. + (Fsave): Handle -mat-binary. + (Changes from G. Beyerle <gbeyerle@AWI-Potsdam.DE>.) + + * src/variables.cc (subs_octave_home, octave_arch_lib_dir): + New functions. + (octave_home, octave_info_dir, octave_lib_dir, default_path): + Fix for new directory organization. + + * src/tree-expr.h (tree_multi_val_ret): New class to serve as a + base for objects that can produce more than one value when + evaluated. + (tree_fvc, tree_index_expression, tree_multi_assignment_expression): + Use it as a base. + + * src/parse.y (make_multi_val_re): New function. + (expression): Use it to construct multiple value assignments. + + * configure.in, Makefile.in, Makeconf.in, src/defaults.h.in: + Revamp directory structure used for installed versions of Octave. + + * src/f-schur.cc (Fschur): Correct argument count in error message. + + * src/octave.cc (Fcomputer): New function. + * scripts/computer.in: Delete. + * scripts/Makefile.in: Don't edit or distribute computer.in. + +Thu Sep 1 09:02:06 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/variables.cc (install_builtin_variables): New builtin + variable, OCTAVE_VERSION. + +Tue Aug 30 17:18:14 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * tree-expr.cc: Include string.h + (tree_matrix::eval): Fix handling of strings to work as in 1.0. + +Mon Aug 29 14:55:14 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.l: Handle ".+" and ".-" too. + + * src/dirfns.cc (dir_acess, exists, gen_tempname, tempnam): New + functions from glibc. + * src/utils.cc (octave_tmp_file_name): Use tempnam. + (choose_temp_base_try): Delete. + * configure.in: Check for tempnam. + + * src/load-save.cc (Fsave): Only write floating point format if + doing binary save. + + * liboctave/Array.cc (operator =): Check to see if assignment is + to same object. + +Sun Aug 28 23:32:59 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/CollocWt.cc (CollocWt::init): Call delete [] on vectors. + * liboctave/NPSOL.cc (NPSOL::minimize): Eliminate some memory leaks. + * liboctave/QPSOL.cc (QPSOL::minimize): Likewise. + * liboctave/NLEqn.cc (NLEqn::solve): Likewise. + +Thu Aug 25 09:27:04 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * info/session.c (info_get_input_char): Don't exit immediately if + we see EOF on the input stream. + + * scripts/kurtosis.m, scripts/skewness.m: Update from KH. + +Wed Aug 24 00:19:49 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * dld/Makefile.in, scripts/Makefile.in, doc/Makefile.in, + readline/Makefile.in, info/Makefile.in, libcruft/Makefile.in, + liboctave/Makefile.in, src/Makefile.in (INSTALL, INSTALL_PROGRAM, + INSTALL_DATA): Define here. + * Makeconf.in: Not here. + + * src/tree-plot.cc (send_to_plot_stream): Handle + user_pref.automatic_replot. + * src/variables.cc (install_builtin_variables): + Add DEFVAR for automatic_replot. + * src/user-prefs.cc (automatic_replot): New function. + * src/user-prefs.h (user_preferences): Add automatic_replot to the + list. + + * src/data.cc (Fatan2): Make work for mixed scalar and Matrix args. + (map): New functions for two arg mappers (like atan2). + + * src/f-fsqp.cc: Don't surround everything in FSQP_MISSING, so + that trying to use fsqp will result in a message about fsqp not + being freely redistributable. + * src/f-npsol.cc: Likewise, for NPSOL_MISSING. + * src/f-qpsol.cc: Likewise, for QPSOL_MISSING. + +Tue Aug 23 12:56:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-expr.cc (tree_identifier::eval): Don't call delete for + ans_id. The destructor for tree_simple_assignment_expression does + this now. + + * src/Makefile.in (%.def : %.cc): Use sed, not awk. + (realclean, distclean, local-dist, dist): Delete .d and .def files. + + * liboctave/Array.h (DiagArray::Proxy): Make compilation + conditional on gcc version, not just _AIX. + + * src/utils.cc (octave_tmp_file_name, choose_temp_base_try): New + functions, stolen from GCC. If HAVE_MKTEMP is not defined, just + call tmpnam; otherwise, try harder to please. + * src/tree-plot.cc (save_in_tmp_file): Use it, instead of calling + tmpnam() directly. + * src/file-io.cc (do_scanf): Likewise. + * src/octave-hist.cc (mk_tmp_hist_file): Likewise. + * configure.in: Check for mktemp. + + * src/tree-const.h (is_matrix_type, is_scalar_type): Make private. + * src/tc-rep.h (is_matrix_type, is_scalar_type): Likewise. + + * src/tc-rep.h (force_numeric, make_numeric, + make_numeric_or_magic, make_numeric_or_range_or_magic): Make + private. + (make_numeric_or_range): #if 0 out. + + * src/utils.cc (empty_arg): Correctly set return value. + + * src/arith-ops.cc: Don't include setjmp.h. + * src/utils.cc: Surround setjmp.h with extern "C". + * src/octave.cc: Likewise. + + * src/sighandlers.cc (octave_new_handler): New function. + (install_signal_handlers): Call it. + + * src/f-qzval.cc (Fqzvalue): Don't call make_numeric for args. + Check error state after attempting to extract values. Simplify + where possible. + * src/f-colloc.cc (Fcolloc): Likewise. + * src/f-rand.cc (Frand): Likewise. + * src/f-sort.cc (Fsort): Likewise. + * src/f-find.cc (Ffind): Likewise. + * src/f-minmax.cc (Fmin, Fmax): Likewise. + * src/f-fft.cc (Ffft): Likewise. + * src/f-ifft.cc (Fifft): Likewise. + * src/f-svd.cc (Fsvd): Likewise. + * src/f-inv.cc (Finv): Likewise. + * src/f-det.cc (Fdet): Likewise. + * src/f-eig.cc (Feig): Likewise. + * src/f-lu.cc (Flu): Likewise. + * src/f-hess.cc (Fhess): Likewise. + * src/f-qr.cc (Fqr): Likewise. + * src/f-givens.cc (Fgivens): Likewise. + * src/f-syl.cc (Fsyl): Likewise. + * src/f-log.cc (Flog): Likewise. + * src/f-expm.cc (Fexpm): Likewise. + * src/f-balance.cc (Fbalance): Likewise. + * src/f-schur.cc (Fschur): Likewise. + * src/f-chol.cc (Fchol): Likewise. + * src/f-npsol.cc (Fnpsol, npsol_options): Likewise. + * src/f-fsolve.cc (Ffsolve, fsolve_options): Likewise. + * src/f-dassl.cc (Fdassl, dassl_options): Likewise. + * src/f-lsode.cc (Flsode, lsode_options): Likewise. + * src/f-quad.cc (Fquad, quad_options): Likewise. + * src/tree-expr.cc (tree_matrix::eval): Likewise, while building + matrix. + (tree_colon_expression::eval): Likewise, for elements of range. + * src/variables.cc (is_valid_function, Fis_global, Fexist): + Likewise. + * src/sysdep.cc (Fgetenv, Fpause): Likewise. + * src/octave.cc (eval_string, Fshell_cmd): Likewise. + * src/input.cc (get_user_input): Likewise. + * src/file-io.cc (return_valid_file, fopen_file_for_user, + fgets_internal, fseek_internal, process_printf_format, do_printf, + do_scanf, fread_internal, fwrite_internal, feof_internal): + Likewise. + + * src/tc-rep.cc (TC_REP::string_value): Call error() and return 0 + instead of crashing if not string_constant. + + * src/file-io.cc (fopen_file_for_user): Take string as first arg, + not tree_constant. Change callers. + (fgets_internal, fseek_internal): Correct check for int arg. + (process_scanf_format): Use isspace instead of checking directly + (and incorrectly) for white space characters. + + * src/tree-expr.cc (tree_matrix::eval, tree_unary_expression::eval, + tree_binary_expression::eval, tree_colon_expression::eval, + tree_simple_assignment_expression::eval ): Eliminate uneccesary + conversions to and from Octave_object/tree_constant. + +Mon Aug 22 18:35:05 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/data.cc (Fatan2): New function. + + * src/data.cc (get_dimensions): Don't call make_numeric for args. + Check error state after attempting to extract values. + +Fri Aug 19 08:28:24 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-misc.h (tree_parameter_list::tree_parameter_list)): + Initialize marked_for_varargs to zero. + + * src/load-save.cc: Add float variants of the conversion routines. + (LS_DO_READ): Add swap parameter and only swap bytes if it is true. + (read_doubles): Pass swap to LS_DO_READ. Handle float data. + (LS_DO_WRITE): Copy data to tmp buffer to avoid destroying data. + (do_double_format_conversion): Rename from do_float_format_conversion. + (do_float_format_conversion): New function to handle conversion + for float data. + (read_mat_binary_data): Use read_doules for all cases. Handle + float data. + (too_large_for_float): New function. + (save_binary_data): Save data format for scalars and ranges too. + (read_binary_data): Read data format for scalars and ranges too. + (do_save, save_vars): New arg, save_as_floats. + (Fsave): New option, -float-binary. + + * src/utils.cc (empty_arg): New function. + * src/f-balance.cc (Fbalance): Use it to simplify handling of + empty arguments. + * src/f-chol.cc (Fchol): Likewise. + * src/f-det.cc (Fdet): Likewise. + * src/f-eig.cc (Feig): Likewise. + * src/f-expm.cc (Fexpm): Likewise. + * src/f-fft.cc (Ffft): Likewise. + * src/f-hess.cc (Fhess): Likewise. + * src/f-ifft.cc (Fifft): Likewise. + * src/f-inv.cc (Finv): Likewise. + * src/f-log.cc (Flogm, Fsqrtm): Likewise. + * src/f-lu.cc (Flu): Likewise. + * src/f-qr.cc (Fqr): Likewise. + * src/f-schur.cc (Fschur): Likewise. + * src/f-svd.cc (Fsvd): Likewise. + + * src/tc-rep.cc (tupe_as_string): Move here. + * src/tree-const.cc: From here. + + * src/gripes.cc (gripe_invalid_conversion): New function. + +Thu Aug 18 21:02:19 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/(print_empty_matrix): New function. + * src/pr-output.cc (octave_print_internal): Use it to print empty + matrices. + * src/tc-rep.cc (TC_REP::print_code, TC_REP::print): Rely on + octave_print_internal() to handle printing empty matrices. + + * src/pr-output.cc (octave_print_internal (all variants)): + New arg, pr_as_read_syntax. If nonzero, print the value in a form + that Octave can parse. Declare os as ostream&, not ostrstream&. + * src/tc-rep.cc (TC_REP::print_code): Handle all types, not just + real and imaginary constants. + * src/help.cc (Ftype): Also print values of variables. + +Wed Aug 17 08:46:44 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/octave.cc (Fshell_cmd): Return output if nargout > 0 or + nargin > 2, otherwise, just send output to the pager. + + * src/mappers.cc (xerf, xerfc, xgamma, xlgamma): New functions. + Put preprocessor conditionals here. + (install_mapper_functions): Not here. + +Tue Aug 16 09:55:25 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check for erf, erfc, and lgamma. + * src/mappers.cc (erf, erfc, lgamma): New mappers. + * src/mappers.h (Mapper_fcn): Add new field `name'. + * src/variables.cc (install_builtin_mapper): Save the name. + * src/tc-rep.cc (TC_REP::mapper): Don't crash if a mapper function + is missing. + + * src/tc-rep-1.cc (warn_invalid_conversion): New function. + * src/gripes.cc (gripe_invalid_conversion): New function. + + * src/parse.y (list1, parse_error): New non-terminals. + (list): Use them. + * src/lex.l: Return LEXICAL_ERROR instead of calling + jump_to_top_level. + + * liboctave/Range.cc (matrix_value): New function. + * src/tc-rep.cc (TC_REP::matrix_value): Use it. + + * src/tree-const.h (to_matrix, to_vector, to_scalar): Delete + unecessary functions. + * src/tc-rep.cc (TC_REP::to_matrix, TC_REP::to_vector, + TC_REP::to_scalar): Likewise. Change all callers to use + matrix_value, vector_value, and scalar_value instead. + + * src/tree-const.cc (TC_REP::matrix_value): If at all possible, + produce a matrix from the current constant. Otherwise, print an + error message. Don't abort or jump to the top level. + (TC_REP::scalar_value, TC_REP::complex_scalar_value, + TC_REP::vector_value, TC_REP::complex_vector_value, + TC_REP::complex_matrix_value): Likewise, for appropriate types. + + * src/utils.cc (empty_arg): New function. + * src/f-svd.cc (Fsvd): Use it. Don't call make_numeric; rely on + value functions to do conversion. + + * src/load-save.cc (Fload): Handle -list and -verbose. + +Mon Aug 15 09:32:57 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-rep.cc (TC_REP): New define, so we don't have to write + tree_constant::tree_constant_rep:: everywhere. + * src/tree-const.h (class tree_constant): Nest tree_constant_rep + class inside tree_constant class by including tc-rep.h here. + * src/tc-rep.h: Don't include any other files, delete forward + class declarations. + + * src/tc-rep.h (constant_type): Make private. + + * src/parse.y (arg_list): Use tree_constant::magic_colon in + constructor call, not tree_constant_rep::magic_colon. + * src/tree-const.h (tree_constant::tree_constant + (tree_constant::magic_colon)): Convert arg from + tree_constant_rep::constant_type. + + * src/f-svd.cc (Fsvd): Simplify. + + * src/tree-expr.cc (any_arg_is_magic_colon): Don't use values from + tree_constant_rep::constant_type enum. + (tree_matrix::eval): Likewise. + * src/tree-misc.cc (tree_parameter_list::define_from_arg_vector, + tree_if_clause::eval): Likewise. + * src/tree-cmd.cc (tree_while_command::eval, + tree_for_command::eval): Likewise. + * src/symtab.cc (symbol_record_info::symbol_record_info): Likewise. + * src/f-colloc.cc (Fcolloc): Likewise. + * src/f-npsol.cc (npsol_objective_function): Likewise. + * src/f-chol.cc (Fchol): Likewise. + * src/f-det.cc (Fdet): Likewise. + * src/f-eig.cc (Feig): Likewise. + * src/f-expm.cc (Fexpm): Likewise. + * src/f-fft.cc (Ffft): Likewise. + * src/f-find.cc (Ffind): Likewise. + * src/f-hess.cc (Fhess): Likewise. + * src/f-ifft.cc (Fifft): Likewise. + * src/f-inv.cc (Finv): Likewise. + * src/f-log.cc (Flog): Likewise. + * src/f-lu.cc (Flu): Likewise. + * src/f-minmax.cc (Fmin, Fmax): Likewise. + * src/f-qr.cc (Fqr): Likewise. + * src/f-rand.cc (rand): Likewise. + * src/f-schur.cc (schur): Likewise. + * src/f-sort.cc (Fsort): Likewise. + * src/f-svd.cc (Fsvd): Likewise. + + * src/f-lu.cc (Flu): Handle case of nargout == 0 the same as + nargout == 1. + + * src/tree-const.h (force_numeric): Don't return type info. + * src/tc-rep.cc (tree_matrix::eval): Ditto. + * src/tree-expr.cc (tree_matrix::eval): Don't use return value + from tree_constant::force_numeric(). + + * src/tree-const.h (is_magic_colon): New function. + * src/tc-rep.h (is_magic_colon): New function. + + * src/load-save.cc (ascii_save_type): New function. + (save_binary_data, save_ascii_data, save_three_d): Don't use + values from tree_constant_rep::constant_type enum. Fail if write + is unsuccessful. Fail but don't panic if type is unrecognized. + (save_vars): Check error state after call to do_save(). + + * src/tc-rep.cc (isstr): Delete, since we have is_string. + * src/tree-const.h (isstr): Ditto. + * src/data.cc (Fisstr): Use is_string(), not isstr(). + +Sun Aug 14 16:12:10 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/load-save.cc (save_type): Add LS_U_INT, LS_CHAR and LS_FLOAT. + (get_save_type): Handle them. + (read_doubles, write_doubles): Likewise. + + * src/load-save.cc (get_floating_point_format): New function. + (read_mat_binary_data, read_binary_file_header): Use it. + + * src/lex.l: Combine {D}+\.{D}*{EXPON}?{Im} and {D}+{EXPON}?{Im} + patterns into the single pattern {D}+\.?{D}*{EXPON}?{Im} + Likewise, combine {D}+\.{D}*{EXPON}? and {D}+{EXPON}? into the + single pattern {D}+\.?{D}*{EXPON}? + ({D}+/\.[\*/\\^']): New pattern to force expressions like `1./m' + to be parsed the same as `1 ./ m'. + + * src/tree-expr.cc (do_lookup): Correctly set script_file_executed. + + * src/octave.cc (long_opts): Add --silent as an alias for --quiet, + and --ignore-init-file as an alias for --norc. + + * src/octave.cc (verbose_usage): Exit successfully to conform to + the GNU coding standards. + +Sat Aug 13 11:06:23 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/dirfns.cc (chdir): New alias for cd. + + * src/lex.l (")"): Set convert_spaces_to_comma. + + * src/*.cc: Use tree_constant::is_string(), not + tree_constant::is_string_type(). + + * src/f-balance.cc (Fbalance): Use is_string() rather than + checking const_type() against tree_constant_rep::string_constant. + + * src/tc-rep.h (tree_constant_rep::is_string_type): Delete. + * src/tree-const.h (tree_constant::is_string_type): Delete. + + * src/Makefile.in (%.def : %.cc): Complain if generated file is + empty. + + * configure.in (gcc_version): Set LDFLAGS to -g, not "-g -O". + + * src/lex.l (looks_like_bin_op): Also return true for things like + [ 1+ 2 ]. + + * src/data.cc (Feye, Fones): With no args, return 1.0. + (Fzeros): With no args, return 0.0. + + * src/Makefile.in (XALL_CXXFLAGS): ALL_CXXFLAGS without + -fextternal-templates. + (%.def : %.cc): Use it instead of ALL_CXXFLAGS. + + * configure.in: Don't use -O for compiling float-type.c. + + * libcruft/misc/Makefile.in (XCC): Use patsubst to delete any -O# + flags, not just -O. + +Fri Aug 12 18:20:35 1994 John Eaton (jwe@schoch.che.utexas.edu) + + Changes for binary load/save, and reading .mat files: + + * src/variables.cc (is_globally_visible): Declare extern, not + static. + + * src/user-prefs.cc (sv_default_save_format): New function. + * src/user-prefs.h (default_save_format): New field in + user_preferences struct. + src/variables.cc (install_builtin_variables): Add DEFVAR for + default_save_format. + + * src/tc-rep.h (tree_constant_rep::is_unknown, + tree_constant_rep::is_scalar, tree_constant_rep::is_matrix, + tree_constant_rep::is_complex_scalar, + tree_constant_rep::is_complex_matrix, + tree_constant_rep::is_string, tree_constant_rep::is_range): + New functions. + + * src/tree-const.h (tree_constant::is_unknown, + tree_constant::is_scalar, tree_constant::is_matrix, + tree_constant::is_complex_scalar, tree_constant::is_complex_matrix, + tree_constant::is_string, tree_constant::is_range): + New functions. + + * src/tc-rep.cc (tree_constant_rep::save, + tree_constant_rep::save_three_d): Move to load-save.cc and convert + to nonmember functions. + + * src/tree-const.h (tree_constant::save, + tree_constant::save_three_d): Delete functions. + + * src/tree-plot.cc (save_in_tmp_file): Call nonmember functions + save_ascii_file and save_three_d instead of tree_constant class + member functions. + + * src/symtab.cc (symbol_table::glob): New function. + (symbol_table::save, symbol_record::save, symbol_def::save): + Delete unneeded functions. + + * src/load-save.cc: New file, for load/save related functions + extracted from src/variables.cc and src/tc-rep.cc. + + * src/error.cc (verror): Don't print name if it is null. + +Tue Aug 9 14:31:43 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/file-io.cc (process_printf_format): Use + tree_constant::is_scalar_type() and is_string_type() functions + instead of comparing directly with elements of the + tree_constant_rep::constant_type enum. + * src/variables.cc (builtin_real_scalar_variable): Likewise. + (install_loaded_variable): Likewise. + + * src/tree-plot.cc (open_plot_stream): New function. + (send_to_plot_stream): Use it. Do our own check for replot with + nothing to plot. + (tree_plot_command::eval): Open plot stream before doing anything. + + * src/data.cc (check_dimensions): When changing negative + dimensions to zero, handle nr and nc separately. + +Mon Aug 8 20:18:17 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * variables.cc (is_valid_fcn): Use lookup_by_name() instead of + looking in the global symbol table directly. + + * variables.cc (load_variable): Move code here. + * src/tc-rep.cc (tree_constant_rep::load): From here. + * src/tree-const.h (tree_constant::load): Delete. + + * src/tree-plot.cc: Derive classes from tree_print_code and + implement print_code() member functions. + + * src/tree-plot.cc (subplot_list::print): New function. + (tree_plot_command::print): Use it, and don't crash if plot_list + is null. + + * scripts/axis.m: New function file. + +Sun Aug 7 17:06:16 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check for size of short, int, and long. + + * float-type.c: New file. + * configure.in: Use it to determine the native floating point + format. + * Makefile.in: Add it to the list of files to distribute. + * acconfig.h (IEEE_BIG_ENDIAN, IEEE_LITTLE_ENDIAN, VAX_D_FLOAT, + VAX_G_FLOAT): Add #undefs. + +Sat Aug 6 18:23:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * config.guess: Update with new copy from gcc 2.6.0. + + * src/*.cc, src/*.h, src/*.l, src/*.y: Eliminate need for tree.h. + * src/Makefile.in (INCLUDES): Delete it from the list. + + * src/token.cc (token::token (double)): Handle saving original + text of constants for later use by print_code() functions. + (token::~token): Delete original text. + (token::text_rep): New function. + * src/lex.l: Save original text for NUM and IMAG_NUM tokens. + * src/parse.y: Likewise. + + * src/parse.y (yyerror): Use the pager. + + * src/tree-base.h (tree_print_code): New base class for trees and + lists of trees. + (tree): Derive from tree_print_code. + * src/tree-base.cc: New file, for tree_print_code functions, and + for initializing tree_print_code static members. + * src/tree-const.cc, src/tc-rep.cc, src/tree-plot.cc, + src/tree-expr.cc, src/tree-cmd.cc (all tree classes): + Provide print_code() member function. + * src/tree-misc.cc: Also derive list classes from tree-base.h and + provide print_code() member functions. + + * src/help.cc (Ftype, Fwhich): New functions. + + * src/octave-hist (do_history): Send history output through the + pager. + + * src/variables.cc (do_who, Fwhos): New functions. + + * src/tree-expr.h (tree_expression::in_parens): Declare here. + (tree_simple_assignment_expression::in_parens): Not here. + * src/parse.y (maybe_warn_assign_as_truth_value): Eliminate cast. + + * src/variables.cc (load_fcn_from_file, lookup, lookup_by_name): + New functions, extracted from tree_identifier class. + (gobble_leading_whitespace, is_function_file, parse_fcn_file): + Move here from tree-expr.cc. + * src/help.cc (Fhelp): Use lookup_by_name so that looking up + symbols is handled in a consistent way. + + * tree-expr.cc (tree_unary_expression::oper, + tree_binary_expression::oper, tree_prefix_expression::oper, + tree_postfix_expression::oper): New functions. + + * tc-rep.cc (valid_scalar_indices): Define here. + * tc-inlines.cc: Not here. + + * src/tree-const.h (tree_constant::stash_original_text): New + function. + * src/tc-rep.cc (tree_constant_rep::stash_original_text): Ditto. + (undo_string_escapes): Ditto. + + * src/tc-rep (tree_constant_rep::do_matrix_index): Don't just + return *this. + * src/tree-const.h (tree_constant::tree_constant (tree_constant_re&)): + Delete. + + * src/pager.cc (open_diary_file, close_diary_file, + maybe_write_to_diary_file, Fdiary): New functions. + (flush_output_to_pager): Call maybe_write_to_diary_file before + sending output to the screen. + * src/input.cc (octave_gets): Call maybe_write_to_diary file to + save the prompt and the user input. + * src/error.cc (verror): Use C++ streams, not C I/O functions. + Call maybe_write_to_diary file to save error messges too. + * src/octave.cc (clean_up_and_exit): Close diary file here. + + * src/octave.cc (main): Initialize pager first. + + * src/input.cc (get_user_input): Return empty matrix for no input. + + * src/tree-plot.cc: Include readline/tilde.h instead of declaring + tilde_expand() directly. + * src/utils.cc: Likewise. + + * src/tree-plot.cc (tree_plot_command::print_code): New function. + * src/tree-const.h (tree_constant::print_code): Likewise. + + * src/tree-expr.h (tree_simple_assignment_expression::ans_ass): + New data member to flag assignments to ans. + * src/tree-expr.cc (tree_identifier::eval): Set it when + constructing assignments to ans. + * src/parse.y (maybe_convert_to_ans_assign): Likewise. + + * src/tree-expr.h (tree_simple_assignment_expression::preserve): + New data member to allow preserving left hand side args that + shouldn't be deleted in some cases (ugh). + * src/tree-expr.cc (tree_multi_assignment_expression::eval): + Create assignment with preserve flag set. + +Wed Aug 3 14:27:25 1994 John Eaton (jwe@schoch.che.utexas.edu) + + Yet another massive reorganization of sources, once again + hopefully for the better. A fair amount of work is not detailed + here, but these are the major points. The grammar file and the + derivation of the tree classes are somewhat cleaner now. + + * src/parse.y: Cope with changes to derivation scheme. + + * src/tree-misc.cc: New file. + (tree_statement, tree_global): New classes. + (tree_global_init_list): New class, derived from SLList for the + list of expressions in a global command. + * src/tree-cmd.cc (tree_global_command): Use tree_global_init_list. + + * src/tree-misc.cc (tree_argument_list): Move here from + tree-expr.cc, and derive from SLList instead of tree. + (tree_parameter_list): Likewise. + (tree_return_list): Likewise. + + * src/tree-cmd.cc (tree_command_list): Delete class. + * src/tree-misc.cc (tree_statement_list): New class for keeping a + list of commands or expressions to evaluate. Derive from SLList, + not tree. + + * src/tree-plot.cc (subplot_list, plot_limits, plot_range, + subplot_using, subplot_style): Rename from tree_*, and + don't derive from tree class. + + * src/tree-plot.cc: Eliminate eval member function for classes not + derived from tree class. + + * src/tree-plot.cc, src/tree-cmd.cc: For classes derived from + tree-command, the eval() member function is now void eval (void). + + * src/tree-base.h (tree::tree): New constructor, to initialize the + line and column info. For all classes that are derived from the + tree class, use it instead of manipulating the data directly. + (line_num, column_num): Make private. + + * src/tree-expr.cc (tree_simple_assignment_expression::preserve): + New data member, set in constructors and used by the destructor + when the left-hand side of the expression should not be deleted + (as for some temporary assignments not constructed in the parser). + + * src/tree-expr.h (tree_expression::type) Rename and move here from + tree-base.h. Change all uses. + (tree_matrix::dir): Likewise. Change all uses. + + * src/utils.cc (make_argv): Stash function name in argv[0]. + + * src/octave.cc (global_command): Declare as tree_statement_list, + not tree. + + * src/parse.y (make_binary_op, make_unary_op, make_prefix_op, + make_postfix_op): New functions. + + * src/parse.y (GLOBAL): Make it a tok_val type. + * src/lex.l (is_keyword): Give GLOBAL a value. + +Mon Aug 1 22:37:22 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.l (grab_help_text): Unput the last character read. + +Sun Jul 31 21:17:07 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/pr-output.cc (set_format (double, int&)): Avoid calling + log10 for Inf and NaN. + +Fri Jul 29 16:08:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/octave.cc (reading_startup_message_printed): New flag. + (parse_and_execute): New arg, verbose. If true, print name of + file as it is read. + (execute_startup_files): Don't print message if + inhibit_startup_message is true. + (main): Move startup message before reading init files. + +Thu Jul 28 00:25:42 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Makefile.in (MATRIX_INC): Delete CmplxColVec.h from list. + + * src/symtab.cc (symbol_table::rename): New function. + * src/parse.y (func_def2): Use it instead of tree_identifier::rename. + * src/tree-expr.cc (tree_identifier::rename): Delete unused function. + + * src/tree-expr.cc (tree_identifier::load_fcn_from_file): New function. + (tree_identifier::do_lookup): Use it instead of parse_fcn_file. + * src/variables.cc (is_valid_function): Ditto. + * src/help.cc (Fhelp): Ditto. + + * src/utils.cc (oct_file_in_path): New function. + +Wed Jul 27 08:59:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-expr.cc (tree_identifier::parse_fcn_file): Combine + three functions into one. + + * src/utils.cc: Delete uneeded declaration of ioctl(). + * src/sysdep.cc: Likewise. + + * install.sh: New file, from autoconf distribution. + * Makefile.in (DISTFILES): Distribute it. + +Tue Jul 26 16:08:58 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/Makefile.in (DISTDIRS): New variable, for directories + below scripts to distribute. + (dist): Handle distributing whole directories named by $(DISTDIRS). + (local-dist): Ditto. + +Mon Jul 25 12:57:09 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/CmplxQRP.cc: Provide declaration for zungqr. + * liboctave/dbleQRP.cc: Provide declaration for dorgqr. + + * src/Makefile.in (dist): Also remove y.output and defaults.h. + (local-dist): Ditto. + (realclean): Ditto. + + * src/oct-obj.h (Octave_object::Octave_object (int)): Make + private, to avoid problems with different meanings of + Octave_object (int) and Octave_object (double) constructors. + + * scripts/amr-image: New files for image processing from Tony + Richardson. These are not in the default octave LOADPATH yet. + See the README file in the amr-image directory for more info on + how to use them. + + * src/octave.cc (Fshell_cmd): Restore accidentally deleted + function. + + * scripts/conv-amr.m, scripts/deconv-amr.m, scripts/roots-amr.m, + scripts/poly-amr.m, scripts/roots-tuwien.m, scripts/conv-tuwien.m, + scripts/deconv-tuwien.m, scripts/poly-tuwien.m: + New files. + XXX FIXME XXX -- For each of these functions, either one of the + versions will need to be selected, or they will need to be merged + before the next release. + + * scripts/null.m, scripts/orth.m, scripts/fft2.m, scripts/ifft2.m, + scripts/filter.m, scripts/compan.m, scripts/polyderiv.m, + scripts/polyinteg.m, scripts/polyreduce.m, scripts/polyval.m, + scripts/polyvalm.m, scripts/postpad.m, scripts/prepad.m, + scripts/residue.m, scripts/sinc.m, scripts/freqz.m, + scripts/complement.m, scripts/intersection.m, + scripts/create_set.m, scripts/union.m: + New files. + + * scripts/hilb.m: Eliminate inner loop, for speed. From + romolo@URSAMAJOR.ENG.UNIPR.IT (Romolo Manfredini). + +Sun Jul 24 22:08:48 1994 Castor Fu (castor@drizzle.stanford.edu) + + * libcruft/ranlib/genf.f (genf): Use 1.2E-38 instead of 1.0E-38 + when checking to see if generated numbers will cause overflow. + This helps DEC's f77 compiler on the Alpha, which refuses to + generate denormalized constants. + * libcruft/ranlib/gennf.f (gennf): Likewise. + +Fri Jul 22 10:27:00 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/Makefile.in (DEF_FILES): Depend on defun header files too. + +Thu Jul 21 14:40:30 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/NLFunc.h (nonlinear_fcn): Declare as pointer to + function taking const ColumnVector arg. + (jacobian_fcn): Ditto. + + * src/defun-int.h (DEFINE_ARGV): Declare and define save_argc and + save_argv for functions that mess with argc and argv directly. + (DELETE_ARGV): Use save_argc and save_argv instead of argc and argv. + + * src/f-lsode.cc (ODE_OPTIONS): Add const qualifier for string elts. + (print_lsode_option_list): Declare keyword as const char *. + * src/f-npsol.cc, src/f-qpsol.cc, src/f-dassl.cc, src/f-quad.cc: + Likewise, for corresponding structs and functions. + + * liboctave/dbleSVD.h (SVD::type): New enum, for choosing type of + factorization. + * liboctave/CmplxSVD.cc (SVD::SVD): Add new optional arg for type. + (init): Handle case of type == SVD::economy. + * liboctave/dbleSVD.cc: Likewise. + + QR changes from R. Bruce Tenison (btenison@eng.auburn.edu) adapted + for new way of defining builtin functions: + + * doc/linalg.texi: Changed QR description to include QRP + factorization + + * src/f-qr.cc (Fqr): Handle permuted and economy QR + factorizations. Handle case of 1 output arg. + + * liboctave/Makefile.in (MATRIX_INC, MATRIX_SRC): Add new QRP files. + + * liboctave/dbleQRP.h, liboctave/dbleQRP.cc, liboctave/CmplxQRP.h, + liboctave/CmplxQRP.h: New files, for QR with pivoting. + + * liboctave/dbleQR.h (QR::type): New enum, for choosing type of + factorization. + * liboctave/CmplxQR.cc (QR): Add new optional arg for type. + Handle case of type == SVD::economy and SVD::raw. + * liboctave/dbleQR.cc (QR): Likewise. + + * libcruft/lapack/dgeqpf.f: New file. + * libcruft/lapack/zgeqpf.f: Ditto. + +Wed Jul 20 13:12:55 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/*.cc, liboctave/*.h: Various cleanups to remove use of + NULL. Only mention default argument values in function + declarations, not in their definitions (required for gcc 2.6.x). + + * configure.in: If configuring for alpha-dec-osf, check for sgtty + first. If not found, go ahead and check for Posix terminal driver. + +Tue Jul 19 09:25:45 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/mx-defs.h (FILE): Don't declare as struct FILE just to + avoid including stdio.h. + * liboctave/dMatrix.cc: Do include stdio.h here. + + * liboctave matrix classes: Declare operator>> correctly, and + return istream object. Get friend stuff right. + + * liboctave/DAE.cc (DAE::integrate): To see if the user provided a + Jacobian function, call DAEFunc::jacobian_function (). + + * liboctave/DAE.cc (user_fun, user_jac): Qualify with class name. + * liboctave/ODE.cc (user_fun, user_jac): Ditto. + + * liboctave/DAFunc.h (DAEJac): Declare inside class. + (DAERHSFunc, DAEJacFunc): Define types inside class. + * liboctave/ODEFunc.h (ODERHSFunc, ODEJacFunc) Likewise. + + Massive reorganization of sources, hopefully for the better. + A fair amount of work is not detailed here, but these are the + major points... + + * src/symtab.h (symbol_def::TYPE) Add new elements for recording + whether a symbol is a text function or mapper function. + * src/symtab.cc (symbol_def::is_text_function, + symbol_record::is_text_function, symbol_def::is_mapper_function, + symbol_record::is_mapper_function): New functions. + Modify existing is_* functions to cope with these changes. + (symbol_def::symbol_def (tree_builtin*, unsigned)): New 2nd arg. + (symbol_def::symbol_def (tree_function*, unsigned)): Ditto + (symbol_def::define (tree_builtin*, unsigned)): Ditto. + (symbol_def::define (tree_function*, unsigned)): Ditto. + * src/variables.cc (is_text_function_name): Use the new symbol + table functions, since we can no longer tell by looking in a + simple list. + + * tree-expr.cc (class tree_builtin): Text functions are no longer + handled as a special case here. + + * src/sysdep.cc (octave_ieee_init): Special case Alpha for + initializing Inf and NaN. + + * src/tc-rep.cc: Use const in more places. + + * src/data.cc src/timefns.cc, src/dirfns.cc, src/dirfns.h: New + files. + + * src/*.cc, src/*.y, src/*.l, src/*.h: Various cleanups to remove + use of NULL. Only mention default argument values in function + declarations, not in their definitions (required for gcc 2.6.x). + + * src/g-builtins.cc, src/g-builtins.h, src/t-builtins.cc + src/t-builtins.h: Removed. Functions moved to various other + files, where they more logically belong. + * src/utils.cc: Likewise, various functions moved to other files, + where they more logically belong. + * src/mappers.cc (install_mapper_functions): Declare all mapper + functions here with the new DEFUN_MAPPER() macro. + * src/variables.cc (install_builtin_variables): Declare all + builtin variables here, with the new DEFVAR() macro. + + * src/f-*.h: Deleted. + * src/f-*.cc: Delete #ifdef WITH_DLD code and use DEFUN_DLD() + instead to declare builtin functions that will be dynamically + loaded. Give all functions a uniform return type and argument + list. + + * src/mkdefs, src/mkbuiltins: New scripts. + * src/Makefile.in: Use them to generate builtins.cc automatically + from source files that use DEFUN. + + * src/defun.h, src/defun-dld.h, src/defun-int.h: New files, to + define DEFUN() and DEFVAR() macros to make it possible to define + functions together with their help strings in one place. The code + to install functions in the symbol table is now generated by + mkbuiltins. + + * configure.in (LIBOCTDLD): New variable to define. + Only call AC_VERBOSE() for DYNAMIC_LD_OBJ, DLD_DIR, LIBDLD, + LIBOCTDLD, and LD_STATIC_FLAG if they are set. + * move-if-change: Move here, from src/move-if-change. + * Makeconf.in (%.d: %.cc): Echo simple message instead of the + commands actually executed. + (%.d: %.c): Likewise. + + * src/unwind-prot.h: Include stddef.h, for size_t. + +Tue Jul 12 12:51:25 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/f-eval.cc, src/f-fill.cc, src/f-find.cc, src/f-input.cc, + src/f-minmax.cc, src/f-log.cc, src/f-sort.cc, src/f-eval.h, + src/f-fill.h, src/f-find.h, src/f-input.h, src/f-log.h, + src/f-minmax.h, src/f-sort.h: New files, for functions extracted + from tree-const.cc. + * src/Makefile.in: Add them to the list of INCLUDES, SOURCES, and + OBJECTS. + + * src/f-*.cc: Clean up things a bit by letting the compiler + generate the tree_constant constructor calls. + + * src/unwind-prot.h: Include stddef.h, for size_t. + + * src/oct-obj.h (Octave_object (int, const tree_constant&)): + New constructor form. + * src/tree-const.cc (find_nonzero_elem_idx): Rewrite to handle 2 + and 3 return values. + + * src/g-builtins.cc (builtin_find): Check nargout too. + * src/builtins.cc (general_functions): Fix help message for find. + +Mon Jul 11 13:36:15 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-rep.cc (tree_constant_rep::convert_to_row_or_column_vector): + If already have a row or column vector, return without doing + anything. + +Sat Jul 9 01:02:51 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/oct-obj.h (Octave_object): Make it a class, not just a + typedef. + + * src/tree-expr.h (tree_function::curr_va_arg_number): Rename from + curr_arg_number. + (tree_function::varargs_ok): Delete unused member variable. + * src/tree-expr.cc (tree_function::octave_va_arg): Increment + cur_va_arg_number before indexing args_passed. + (tree_function::octave_va_start): Set curr_va_arg_number to + num_args_passed, not num_args_passed + 1. + (tree_function::takes_varargs): Call param_list::takes_varargs, + don't just return varargs_ok. + (tree_function::define_param_list): If param_list is not NULL, set + num_named_args and curr_va_arg_number even if function doesn't + take varargs. + + * src/tree-expr.cc (tree_identifier::eval (int)): Only pass empty + arg list if evaluating a constant. + (tree_function::eval (int)): Always pass least one arg. + + * Makeconf.in (TMP_IF_1): Add `-I../src'. + (TMP_IF_2): Add `-I$(TOPDIR)/src' and `-I$(top_srcdir)/src'. + + * src/t-builtins.h, src/variables.h, src/file-io.h, src/f-syl.h, + src/f-svd.h, src/f-schur.h, src/f-rand.h, src/f-qzval.h, + src/f-quad.h, src/f-qpsol.h, src/f-npsol.h, src/f-lsode.h, + src/f-lpsolve.h, src/f-hess.h, src/f-givens.h, src/f-fsqp.h, + src/f-fsolve.h, src/f-eig.h, src/f-dassl.h, src/f-colloc.h, + src/f-balance.h, src/dynamic-ld.h, src/builtins.cc, + src/tree-const.cc, src/file-io.cc, src/f-syl.cc, src/f-svd.cc, + src/f-schur.cc, src/f-rand.cc, src/f-qzval.cc, src/f-qr.cc, + src/f-qpsol.cc, src/f-lu.cc, src/f-lpsolve.cc, src/f-inv.cc, + src/f-ifft.cc, src/f-hess.cc, src/f-givens.cc, src/f-fsqp.cc, + src/f-fft.cc, src/f-expm.cc, src/f-eig.cc, src/f-det.cc, + src/f-colloc.cc, src/f-chol.cc, src/f-balance.cc, + src/dynamic-ld.cc, src/f-dassl.cc, src/f-fsolve.cc, + src/f-lsode.cc, src/f-npsol.cc, src/f-quad.cc, src/tree-expr.h, + src/tc-rep.cc, src/tc-inlines.cc, src/tc-rep.h, src/tree-const.h, + src/g-builtins.cc, src/g-builtins.h, src/tree-expr.cc, + src/variables.cc: Delete nargin in favor of using args.length(). + + * configure.in: Check for struct exception in math.h. + * src/sysdep.cc (matherr): New function. + +Fri Jul 8 15:31:53 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-rep.cc: Include arith-ops.h. + (tree_constant_rep::do_scalar_index): Use `invalid', not `illegal' + in messages. + + * src/oct-obj.h: Protect contents from multiple inclusion. + + * src/tree-const.h, src/tree-expr.h: Don't include Array.h. + + * src/parse.y (param_list): Allow ELLIPSIS by itself. + * src/tree-expr.cc (tree_identifier::mark_varargs_only, + tree_identifier::vararg_only): New functions. + (tree_function::eval): Only call define_from_arg_vector if + param_list is non-null and not marked as varargs_only. + + * src/f-balance.h, src/f-chol.h, src/f-colloc.h, src/f-dassl.h, + src/f-eig.h, src/f-fsolve.h, src/f-fsqp.h, src/f-givens.h, + src/f-hess.h, src/f-lpsolve.h, src/f-lsode.h, src/f-lu.h, + src/f-npsol.h, src/f-qpsol.h, src/f-qr.h, src/f-quad.h, + src/f-qzval.h, src/f-rand.h, src/f-schur.h, src/f-svd.h, + src/f-syl.h: Include oct-obj.h, not tree-const.h to get + declaration of Octave_object. + + * src/f-givens.cc (givens): Handle case of nargout == 0. + Use `invalid', not `illegal' in messages. + * src/f-balance.cc (balance): Likewise. + + * src/f-balance.cc (balance): Print warning about two output + arguments for complex-valued case too. + + * src/tc-rep.cc: Include arith-ops.h. + +Thu Jul 7 20:54:12 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/parse.y (identifier): Add missing semicolon. + (param_list): Ditto. + + * src/f-svd.cc (svd): Handle nargout == 0 the same as nargout == 1. + * src/f-schur.cc (schur): Likewise. + * src/f-hess.cc (hess): Likewise. + * src/f-eig.cc (eig): Likewise. + * src/f-syl.cc (syl): Likewise. + * src/f-qzval.cc (qzvalue): Likewise. + * src/f-npsol.cc (npsol): Likewise. + * src/f-qpsol.cc (qpsol): Likewise. + * src/f-givens.cc (givens): Likewise. + * src/f-fsolve.cc (fsolve): Likewise. + * src/f-balance.cc (balance): Likewise. + * src/file-io.cc (process_scanf_format): Likewise. + * src/g-builtins.cc (builtin_balance, builtin_chol, builtin_dassl, + builtin_eig, builtin_fsolve, builtin_fsqp, builtin_lsode, + builtin_max, builtin_min, builtin_npsol, builtin_qpsol, + builtin_quad, builtin_rand, builtin_size, builtin_sort, + builtin_svd, builtin_schur, builtin_syl, builtin_givens, + builtin_hess): Likewise. + * src/tree-const.cc (vector_of_empties, column_max, column_min): + Likewise. + + * src/variables.h, src/symtab.h: Include builtins.h for typedefs. + + * src/tree-expr.cc(tree_multi_assignment_expression::eval): Rework + handling of undefined values returned from functions. + + * src/tree-expr.cc (tree_identifier::is_defined): New function. + (tree_parameter_list::is_defined): New function. + (tree_parameter_list::convert_to_const_vector): Use it to avoid + evaluating undefined objects. + + * src/f-balance.cc, src/f-eig.h, src/f-hess.cc, src/f-lu.h, + src/f-rand.cc, src/f-balance.h, src/f-expm.cc, src/f-hess.h, + src/f-npsol.cc, src/f-rand.h, src/f-chol.cc, src/f-expm.h, + src/f-ifft.cc, src/f-npsol.h, src/f-schur.cc, src/f-chol.h, + src/f-fft.cc, src/f-ifft.h, src/f-qpsol.cc, src/f-schur.h, + src/f-colloc.cc, src/f-fft.h, src/f-inv.cc, src/f-qpsol.h, + src/f-svd.cc, src/f-colloc.h, src/f-fsolve.cc, src/f-inv.h, + src/f-qr.cc, src/f-svd.h, src/f-dassl.cc, src/f-fsolve.h, + src/f-lpsolve.cc, src/f-qr.h, src/f-syl.cc, src/f-dassl.h, + src/f-fsqp.cc, src/f-lpsolve.h, src/f-quad.cc, src/f-syl.h, + src/f-det.cc, src/f-fsqp.h, src/f-lsode.cc, src/f-quad.h, + src/f-det.h, src/f-givens.cc, src/f-lsode.h, src/f-qzval.cc, + src/f-eig.cc, src/f-givens.h, src/f-lu.cc, src/f-qzval.h, + src/dynamic-ld.cc, src/dynamic-ld.h, src/file-io.cc, + src/file-io.h, src/t-biultins.cc, src/t-builtins.h, + src/tree-expr.cc, src/tree-expr.h, src/tree-const.cc, + src/tree-const.h, src/tc-inlines.cc, src/tc-rep.cc, src/tc-rep.h, + src/g-builtins.cc, src/g-builtins.h: + Cope with inital round of Octave_object changes. + + * src/oct-obj.h: New file for Octave_object typedef. + * src/dynamic-ld.h, src/file-io.h, src/tree-const.h, + src/tree-expr.h: Include it. + * src/Makefile.in (INCLUDES): Add it to the list. + +Wed Jul 6 09:28:28 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * libocsrc/tree-const.h: + + * src/parse.y (maybe_convert_to_ans_assign, + maybe_warn_assign_as_truth_value): Pass tree_expression*, not tree*. + (ans_expression, expression, simple_expr, simple_expr1, title): + Declare as tree_expression_type, not tree_type. + (opt_list): Add missing semicolon. + + * src/tc-rep.h, src/tc-rep.cc: New files, extracted from + tree-const.h and tree-const.cc, for the tree_constant_rep class. + Leave most friend functions behind, in tree-const.h. + Don't declare do_binary_op or do_unary_op as friends. + + * src/lex.l: Include tree-plot.h and tree-const.h. + + * src/variables.cc (takes_correct_nargs): Pass tree_fvc* not tree*. + * src/variables.cc (is_valid_function): Return tree_fvc* not tree*. + Change all callers. + + * src/symtab.h, symtab.cc: Change declaration of symbol definition to + be tree_fvc* instead of tree*. Change all callers. + + * src/f-dassl.cc (dassl_fcn): Declare as tree_fvc*, not tree*. + * src/f-quad.cc (quad_fcn): Likewise. + * src/f-lsode.cc (lsode_fcn): Likewise. + * src/f-fsolve.cc (fsolve_fcn): Likewise. + * src/f-npsol.cc (npsol_fcn, npsol_constraints): Likewise. + + * src/tree-plot.cc: All operations are now on tree_expression types, + not tree types. + + * src/tree-expr.h (tree_matrix): Derive from tree_expression, not tree. + + * src/tree-expr.h (tree_builtin, tree_function, tree_identifier): + Derive from tree_fvc, not tree. + * src/tree-const.h (class tree_constant): Likewise. + + * src/tree-expr.h (is_identifier, is_index_expression, + is_assignment_expression, is_prefix_expression, + mark_for_possible_ans_assign, eval (with args)): Declare in + tree_expression class, not tree class. + + * src/tree-expr.h (tree_fvc): New class, derived from + tree_expression, to provide a connection between functions, + variables, and constants. + (is_constant, assign, name, bump_value, max_expected_args, + fcn_file_name, time_parsed, is_system_fcn_file, save): Declare + in tree_fvc class, not in tree class. + + * src/tree.h: Simply include tree-expr.h and tree-cmd.h. + * src/tree-expr.h, tree-expr.cc: New files, extracted from tree.h + and tree.cc for classes derived from tree_expression, plus some + helper classes. + * src/tree-cmd.h, tree-cmd.cc: Likewise, for classes derived from + tree_command. + + * src/tree.cc (eval (int, int)): Merge with eval (int, + tree_constant*, int, int) by rearranging order of args and using + default arg values. Change all callers. + +Tue Jul 5 14:33:33 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * doc/Makefile.in (refcard.dvi): Run TeX on $(srcdir)/refcard.tex, + not just refcard.tex. + (refcard-local.tex): Likewise, for the local version. + + * src/tree-const.cc (tree_constant_rep::do_index): Check for empty + matrix here. + (tree_constant_rep::do_vector_index) Not here. + +Thu Jun 30 09:41:03 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc (builtin_shell_command): Only take one + argument and return [status, output]. + * src/procstream.cc (procstreambase::close): Return process exit + status. + + * src/tree.cc (tree_builtin::eval (int)): Handle new style of + calling text functions. + (tree_builtin::eval (int, int): Likewise. + (tree_builtin::eval (tree_constant*, int, int, int): Likewise. + (tree_identifier::eval (tree_constant*, int, int, int)): Don't + count the output arguments that we create automatically (ans) when + figuring nargout. + (tree_identifier::eval (int)): Likewise. + + * src/tree-const.cc: Delete text-style eval() functions. + * src/tree.cc: Ditto. + + * src/tree-const.h: Change typedef of Text_fcn to return a pointer + to a tree_constant, and to include the number of output arguments + in the parameter list. + * src/t-builtins.h: Change declarations of all builtin text-style + functions to match. + * src/t-builtins.cc: Change definitions too. + + * src/parse.y (word_list): Build an argument_list, not a word_list. + (word_list_command): Create an index_expression, not a + word_list_command. + * src/tree.cc (tree_word_list): Delete unneeded class. + (tree_word_list_command): Likewise. + + * src/tc-extras.cc (get_dimensions): For one-arg version, expect + 2-element vector or scalar specifying dimensions. Don't simply + use the dimensions of a matrix arg. + +Wed Jun 29 09:52:15 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/f-det.cc (determinant): Return 0 if matrix is singular to + machine precision. + + * liboctave/dMatrix.cc (Matrix::inverse): Declare rcond as + volatile to prevent optimization of the expression + `rcond + 1.0 == 1.0'. + (Matrix::determinant): Ditto. + (Matrix::solve): Ditto. + * liboctave/CMatrix.cc (ComplexMatrix::inverse): Ditto. + (ComplexMatrix::determinant): Ditto. + (ComplexMatrix::solve): Ditto. + +Tue Jun 28 10:53:31 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc (default_info_file): Add directory separator when + appending "octave.info". + + * src/tree-plot.cc (plot_line_count): Make global. + * src/utils.cc (send_to_plot_stream): If the plot stream is not + open, set plot_line_count to zero. + (close_plot_stream): Likewise, set it to zero when closing the + stream. + + * src/parse.y (plot_command): Allow replot without args. + + * src/tree-plot.cc (clear_before_plotting): New global variable. + (tree_plot_command::eval): Use it to handle hold on/off. + * src/t-builtins.cc (builtin_hold): New function. + * src/builtins.cc (text_functions): Add it to the list. + +Fri Jun 24 11:08:36 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/token.h (plot_tok_type): Add new field, replot. + * src/lex.l (is_keyword): Handle replot here. + * src/parse.y (plot_command): And here. + * src/g-builtins.cc (builtin_replot): Not here. + * src/builtins.cc (general_functions): Or here. + +Tue Jun 21 10:47:08 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc (builtin_kbhit): New function. + * src/builtins.cc (general_functions): Add it to the list. + + * src/tree-const.cc (tree_constant_rep::rows (void)): For strings + and ranges, only return 1 if the string or range is not empty. + +Thu Jun 9 20:42:06 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_builtin::eval (int)): Delete ancient code that + eval()'d the return value. + (tree_builtin::eval (int, int)): Likewise. + (tree_builtin::eval (int, char**, int)): Likewise. + (tree_builtin::eval (tree_constant*, int, int, int)): Likewise. + (tree_function::eval (tree_constant*, int, int, int)): Likewise. + (tree_colon_expression::eval (int)): Likewise. + (tree_unary_expression::eval (int)): Likewise. + (tree_binary_expression::eval (int)): Likewise. + +Mon Jun 6 03:48:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/file-io.cc (fread_internal): Make it work. + (fwrite_internal): Likewise. + (num_items_remaining): Renamed from get_whats_left(). Don't pass + nr/nc as last arg, simply return the number of items of size that + are left to read. + (get_size_conv): Delete unnecessary function. + * liboctave/dMatrix.cc (Matrix::read): Make it work. + (Matrix::write): Likewise. + * liboctave/dMatrix.h (conversion): Delete unecessary enum. + + * src/sysdep.cc: Include <math.h>. + (octave_ieee_init): Cast return value of infinity() and + quiet_nan() to double. + +Sun Jun 5 14:35:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Makeconf.in (getversion): Get everything between the double + quotes, not just numbers and periods. + + * src/tree-const.cc (tree_constant_rep::do_scalar_assignment): Correct + typo in last change. + + * src/parse.y: Include tree-plot.h and tree-const.h. + + * src/Makefile.in (SOURCES): Delete tc-assign.cc and tc-index.cc + (INCLUDES): Add tree-plot.h. + + * src/tree-plot.h: New file. Declare plotting classes here. + * src/tree.h: Not here. + + * src/tc-index.cc, tc-assign.cc: Delete unnecessary files. + + * src/tc-extras.cc: Include EIG.h + + * src/tree-const.cc (tree_constant_rep::tree_constant_rep (RowVector&, + int)): Provide default value for int arg. + (tree_constant_rep::tree_constant_rep (ColumnwVector&, int)): Ditto + (tree_constant_rep::tree_constant_rep (ComplexRowVector&, int)): Ditto + (tree_constant_rep::tree_constant_rep (ComplexColumnwVector&, int)): + Ditto. + (tree_constant_rep::tree_constant_rep (RowVector&)): Delete, now + handled by corresponding two arg constructor. + (tree_constant_rep::tree_constant_rep (ColumnwVector&)): Likewise. + (tree_constant_rep::tree_constant_rep (ComplexRowVector&)): Likewise. + (tree_constant_rep::tree_constant_rep (ComplexColumnwVector&)): + Likewise. + + * src/tree-const.cc: Add pragma implementation. Merge in contents of + tc-index.cc and tc-assign.cc so that the pragma interface/pragma + implementation hack will do some good. + * src/tree-const.h: Include mx-base.h, not Matrix.h. Add pragma + interface. Delete unnecessary constructor declarations. + + * src/unwind-prot.h, src/unwind-prot.cc (unwind_elem_tag): Rename + from _tag. + (unwind_elem_fptr): Rename from _fptr. + (unwind_elem_ptr): Rename from _ptr. + + * NLConst.cc (NLConst::NLConst): Pass vector args by reference. + + * src/procstream.h, src/procstream.cc, src/idx-vector.h, + src/idx-vector.cc, src/token.h, src/token.cc, src/unwind-prot.h, + src/unwind-prot.cc, src/symtab.h, src/symtab.cc, src/tree.h, + src/tree.cc, liboctave/Range.h, liboctave/Range.cc, + liboctave/QLD.h, liboctave/QLD.cc, liboctave/ODE.h, + liboctave/ODE.cc, liboctave/Quad.h, liboctave/Quad.cc, + liboctave/Objective.h, liboctave/Objective.cc, liboctave/NPSOL.h, + liboctave/NPSOl.cc, liboctave/NLFunc.h, liboctave/NLFunc.cc, + liboctave/Bounds.h, liboctave/Bounds.cc, liboctave/QP.h, + liboctave/QP.cc, liboctave/NLConst.cc, liboctave/LinConst.cc, + liboctave/LPsolve.cc, liboctave/LP.cc, liboctave/FSQP.cc, + liboctave/FEGrid.cc, liboctave/QPSOL.cc, liboctave/CollocWt.cc, + liboctave/DAEFunc.cc, liboctave/DAEFunc.h, liboctave/DAE.cc, + liboctave/NLEqn.cc, liboctave/ODEFunc.cc, liboctave/QPSOL.h, + liboctave/ODEFunc.h, liboctave/NLP.h, liboctave/NLEqn.h, + liboctave/NLConst.h, liboctave/LinConst.h, liboctave/LPsolve.h, + liboctave/LP.h, liboctave/FSQP.h, liboctave/FEGrid.h, + liboctave/DAE.h, liboctave/CollocWt.h: + Add pragma interface/implementation. + + * src/f-svd.cc, src/f-schur.cc, src/f-qr.cc, src/f-lu.cc, + src/f-hess.cc, src/f-det.cc, src/f-chol.cc, src/f-qzval.cc, + src/f-inv.cc, src/f-ifft.cc, src/f-givens.cc, src/f-fft.cc, + src/f-balance.cc, src/f-expm.cc, src/f-fsqp.cc, src/f-syl.cc, + src/xdiv.cc, src/xpow.cc, src/idx-vector.cc, src/pr-output.cc, + src/unwind-prot.cc, src/file-io.cc, liboctave/Bounds.h, + liboctave/CollocWt.h, liboctave/DAE.h, liboctave/EIG.h, + liboctave/FEGrid.h, liboctave/LP.h, liboctave/LPsolve.cc, + liboctave/LinConst.h, liboctave/NLEqn.cc, liboctave/NLEqn.h, + liboctave/NLP.h, liboctave/NPSOL.cc, liboctave/NPSOL.h, + liboctave/ODE.h, liboctave/Objective.h, liboctave/QLD.cc, + liboctave/QP.h, liboctave/QPSOL.h, liboctave/Quad.h: + Instead of including Matrix.h, only include the individual + matrix/vector/etc. header files that are needed. + + * liboctave/QLD.cc, liboctave/ODE.cc, liboctave/NLFunc.cc, + liboctave/DAEFunc.cc, liboctave/DAE.cc, liboctave/NLEqn.cc, + liboctave/ODEFunc.cc: + Use 0, not NULL. + + * liboctave/mx-inlines.cc: Include Complex.h. + + * liboctave/mx-kludge.h: Don't enclose contents in extern "C++". + + * liboctave/Matrix.h: Simply include mx-base.h and mx-ext.h. + + * liboctave/mx-base.h: New file, includes all basic matrix/vector + header files. + * liboctave/mx-ext.h: New file, includes all extra matrix/vector + related header files. + * liboctave/mx-defs.h: New file, for matrix/vector related + defines. Also provides forward declarations for all matrix/vector + classes. + + * liboctave/Makefile.in: Cope with new files. + + * liboctave/CmplxAEPBAL.cc, liboctave/CmplxDET.h, + liboctave/CmplxQR.cc, liboctave/CmplxSVD.h, liboctave/dbleDET.cc, + liboctave/dbleHESS.h, liboctave/dbleSCHUR.cc, + liboctave/CmplxAEPBAL.h, liboctave/CmplxHESS.cc, + liboctave/CmplxQR.h, liboctave/dbleAEPBAL.cc, liboctave/dbleDET.h, + liboctave/dbleLU.cc, liboctave/dbleSCHUR.h, + liboctave/CmplxCHOL.cc, liboctave/CmplxHESS.h, + liboctave/CmplxSCHUR.cc, liboctave/dbleAEPBAL.h, + liboctave/dbleGEPBAL.cc, liboctave/dbleLU.h, liboctave/dbleSVD.cc, + liboctave/CmplxCHOL.h, liboctave/CmplxLU.cc, + liboctave/CmplxSCHUR.h, liboctave/dbleCHOL.cc + liboctave/dbleGEPBAL.h, liboctave/dbleQR.cc, liboctave/dbleSVD.h, + liboctave/CmplxDET.cc, liboctave/CmplxLU.h, liboctave/CmplxSVD.cc, + liboctave/dbleCHOL.h, liboctave/dbleHESS.cc, liboctave/dbleQR.h, + liboctave/EIG.h, liboctave/EIG.cc: + New files, extracted from Matrix-ext.cc, in an attempt to allow + effective use of pragma interface/implementation and make + generated code somewhat smaller. + * liboctave/dColVector.cc liboctave/CColVector.cc: Likewise, from + ColVector.{cc,h}. + * liboctave/dRowVector.cc liboctave/CRowVector.cc: Likewise, from + RowVector.{cc,h}. + * liboctave/dMatrix.cc liboctave/CMatrix.cc: Likewise, from + Matrix.{cc,h}. + * liboctave/dDiagMatrix.cc liboctave/CDiagMatrix.cc: Likewise, + from DiagMatrix.{cc,h}. + +Fri Jun 3 15:32:53 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Array.h: Include assert.h. + (DiagArray<T>::operator T ()): [! _AIX] Only call get() if i is + also equal to j. + + * scripts/rem.m: Allow mixing of scalar/matrix args, but complain + if both args are matrices and the dimensions don't agree. + + * src/lex.l (grab_help_text): Correct previous change. + +Thu Jun 2 12:08:18 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.h (conversion): New enum, for binary read/write + functions. + * Matrix.cc (read, write) New functions. + * file-io.cc (feof_internal, ferror_internal, fread_internal, + fwrite_internal, get_size_conv, get_whats_left): New functions. + * g-builtins.cc (builtin_feof, builtin_ferror, builtin_fread, + builtin_fwrite): New functions. + * builtins.cc (general_functions): Add them to the list. + + * configure.in: Check for infinity() and quiet_nan(). + * sysdep.h (octave_Inf, octave_NaN): New global variables. + * sysdep.cc (octave_ieee_init): New function. Initialize + octave_Inf and octave_NaN. + (sysdep_init): Call it. + * builtins.cc (initialize_builtins): Don't compute Inf and NaN + values here. + +Tue May 31 20:06:27 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/variables.cc (identifier_exists): Only return 1 for + variables if they are also defined. + +Sun May 29 20:40:55 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.l: Don't declare beginning_of_function as static. + (COMMENT): Delete unnecessary exclusive start state. + (\#, \%): Handle comments directly. Try to be smart about not + returning a newline character when reading a matrix list. + (grab_help_text): Don't put a newline back on the input stream. + * src/parse.y (list1): Set beginning_of_function to zero here. + +Wed May 25 03:34:17 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/error.cc (error): If error_state is -2, don't do anything. + If the format string ends in a new line character, strip it, print + the error message, and set the error state to -2. + * src/tree.cc (tree_function::traceback_error): Don't set the + error_state if it is already negative. + + * src/tree-const.cc (convert_to_row_or_column_vector): New function. + * src/idx-vector.cc (idx_vector::shorten): New function. + * src/tc-assign.cc (fortran_style_matrix_assignment + (tree_constant&, tree_constant&)): Handle deleting elements by + assignment of `[]'. Use convert_to_row_or_column_vector to handle + conversion to a vector in the case of deleting some elements from + a matrix. Use idx_vector::shorten() to remove unnecessary index + vector elements. + (do_scalar_assignment (tree_constant&, tree_constant*, int)): + Handle assignment of empty matrix. + If converting complex to real, delete old complex value. + (delete_rows (idx_vector&)): If deleting all rows of a column + vector, convert to empty matrix. + (delete_rows (Range&)): Ditto. + (delete_columns (idx_vector&)): If deleting all columns of a row + vector, convert to empty matrix. + (delete_columns (Range&)): Ditto. + + * src/tc-extras.cc (column_max (tree_constant*, int, int)): + Use MAX, not MIN when trying to find the biggest scalar. + Likewise, find the complex scalar with the largest, not the + smallest absolute value. + + * src/tc-assign.cc (do_matrix_assignment (tree_constant&, + tree_constant_rep::constant_type, tree_constant&): For case of + j_arg == matrix constant, don't negate return value of + indexed_assign_conforms(). + + * src/user-prefs.cc (commas_in_literal_matrix): New function. + Put functions in alphabetical order. + * src/user-prefs.h (commas_in_literal_matrix): New structure element. + Alphabetize structure elements and lists of functions. + * src/builtins.cc (string_variables): Add commas_in_literal_matrix + to the list. + * src/lex.l (<MATRIX>{SN}*\]{S}*): Pay attention to the value of + usre_pref.commas_in_literal_matrix when deciding whether to insert + a comma after seeing a ']' character. + (handle_identifier): Likewise. + (<MATRIX>{S}+): If commas are required, just eat the spaces. + +Tue May 24 19:49:51 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-assign.cc (tree_constant_rep::do_matrix_assignment + (tree_constant&, tree_constant*, int)): Handle empty arguments + for two index values. + (tree_constant_rep::do_matrix_assignment + (tree_constant&, tree_constant&)): + Likewise, for single index values. + +Mon May 23 01:43:23 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Makefile.in (snapshot, snapshot-version): New targets. + + * configure.in: Handle --enable-run-in-place (was easier than + doing the work to parse --run-in-place like Emacs uses). + + * acconfig.h: Add #undef for RUN_IN_PLACE. + + * Makeconf.in (OCTAVE_HOME): New macro. + * src/Makefile.in (defaults.h): Use it instead of ${prefix}. + + * Makeconf.in (OCTAVE_INFO_DIR, OCTAVE_LIB_DIR): New macros. + * src/Makefile.in (defaults.h): Substitute them too. + + * src/defaults.h.in (OCTAVE_INFO_DIR): New macro, used if + RUN_IN_PLACE is defined. + (OCTAVE_LIB_DIR): Likewise. + + * src/utils.cc (octave_home): Handle RUN_IN_PLACE + (octave_info_dir): Ditto. + (octave_lib_dir): Ditto. + + * src/tree-const.cc (tree_constant_rep::diag (void)): For empty + matrix, return empty matrix. + (tree_constant_rep::diag (tree_constant &)): Likewise, regardless + of value of arg. + + * scripts/int2str.m: Format as integer, not float. + Don't add trailing new line character. + +Sun May 22 22:13:01 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/plot_int.m: When looking for imaginary arguments, check + if any element has an imaginary component, not if all elements + have imaginary components. + +Thu May 19 19:46:23 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/parse.y (EXPR_AND_AND, EXPR_OR_OR): New tokens, for + short-circuit logical AND and OR operators. + (simple_expression): Handle new tokens. + * src/lex.l (&&) [SHORT_CIRCUIT_LOGICALS]: Return EXPR_AND_AND. + (||) [SHORT_CIRCUIT_LOGICALS]: Return EXPR_OR_OR. + * src/tree.cc (tree_binary_expression::eval): Handle short-circuit + boolean operators. + (tree_binary_expression::eval_error): Print different messages for + or_or/or and and_and/and. + * src/tree-base.h (tree_expression_type): Add new structure + elements and_and and or_or. + * src/tree-const.cc (tree_constant_rep::is_true): New function. + +Tue May 17 17:04:00 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/idx-vector.cc (idx_vector::sort_uniq ()): New function. + * src/tc-assign.cc (tree_constant_rep::delete_rows ()): Use it. + (tree_constant_rep::delete_columns ()): Likewise. + +Mon May 16 13:31:33 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/linspace.m: Replace for loop with range operation. + * scripts/logspace.m: Replace for loop with element by element + exponentiation. + +Sun May 8 00:49:38 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/lqe.m: Correct comment. + Transpose k before returning. + +Fri May 6 00:47:24 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (quit_loop_now): New function. + (tree_while_command::eval): Use it. + (tree_for_command::eval): Ditto. + + * src/tree.cc (tree_for_command::do_for_loop_once): New function. + (tree_for_command::eval): Use it. + +Mon May 2 19:45:39 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_for_command::eval): Handle returning, + breaking, and continuing for case of scalar expression in loop + control statement. + +Wed Apr 20 00:38:26 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.l (\[{S}*): Don't return ',' for this match when + convert_spaces_to_comma is true, since that can never be the right + thing to do. + + * All Makefile.in files: Set top_srcdir here. + * Makeconf.in: Not here. + + * Makeconf.in: Use top_srcdir instead of root_srcdir + + * configure.in: Update for autoconf-1.8. Use AC_VERBOSE for + verbose messages. Use AC_WARN and AC_ERROR instead of echo for + warning and error messages. Organize feature tests a bit better. + Use new autoconf macros to check for C++ compiler. Add copyright + notice. Recognize --enable-dld instead of --with-dld since that + seems to be more in line with the intent of the --enable/--with + options for configure scripts. Use new autoconf macros + AC_REVISION and AC_PREREQ. Don't add -Wall to CFLAGS and CXXFLAGS + until after all feature tests are done. Etc. + +Fri Apr 15 01:56:20 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * acconfig.h: Add #undefs for HAVE_FINITE, HAVE_ISINF, and + HAVE_ISNAN. + * configure.in: Check for floatingpoint.h. + * src/sysdep.cc (sysdep_init): Disable trapping on common + exceptions for 386BSD systems that have floatingpoint.h. + + * src/utils.cc: Don't declare ioctl() with prototype. + +Sat Apr 9 17:48:07 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-assign.cc (tree_constant_rep::fortran_style_matrix_assignment + (tree_constant&, tree_constant&)): + Handle case of M (X) = scalar, where X is a zero-one vector with + only one nonzero element. + + * src/tc-assign.cc (tree_constant_rep::do_vector_assign + (tree_constant&, Range&): + Handle case of right hand side being a scalar. + (tree_constant_rep::do_vector_assign (tree_constant&, idx_vector&): + Ditto. + + * src/tc-assign.cc (tree_constant_rep::do_matrix_assignment + (int,tree_constant_rep::constant_type)): + Allow assignment of complex scalar too. + (tree_constant_rep::do_matrix_assignment + (tree_constant_rep::constant_type, int)): + Ditto. + + * src/tree-const.h (REP_RHS_MATRIX): Initialize nr and nc. + Abort if rhs is not a real or complex matrix. + +Wed Apr 6 13:59:37 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Range.cc (Range::nelem_internal): Use an integer, not + a double, for the number of intervals. Avoid possible problems + with extended precision registers on some systems (e.g. x86/Linux). + +Mon Mar 28 17:23:18 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc (raw_mode): For OCRNL, ONOCR, and ONLRET, check to + see if they are defined before using them instead of checking to + see if NeXT is defined. + + * info/terminal.c (terminal_prep_terminal): Check to see if OCRNL + is defined before using it instead of checking to see if NeXT is + defined. + +Thu Mar 24 03:21:01 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_parameter_list::define_from_arg_vector): + New function. + (tree_parameter_list::convert_to_const_vector): Ditto. + (tree_function::eval): Use them instead of trying to do this + in-line. + + * src/symtab.h (symbol_record::global_link_context): New stack for + saving linked_to_global flag. + * src/symtab.cc (symbol_record::push_context): Save + linked_to_global too. + (symbol_record::pop_context): And restore it. + +Wed Mar 23 16:18:19 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * doc/refcard.tex.in: New file. + * doc/Makefile.in: Create refcard.* and refcard-local.* from + refcard.tex.in. + +Tue Mar 22 15:23:55 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * octave.sh: exec $OCTAVE_HOME/bin/octave.bin, not just + octave.bin. + +Thu Mar 17 01:06:10 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/arith-ops.cc (do_binary_op (ComplexMatrix&, Matrix& b)): + Correctly handle element by element left division. + + * src/g-builtins.cc (builtin_error): Return without calling error + (and setting error_state) if the message is empty. + + * src/help.cc (operators): Correct help message for `.^'. + + * src/tc-index.cc (tree_contant_rep::fortran_style_matrix_index): + Preserve vector orientation when indexing with a zero-one vector. + + * src/tc-index.cc (tree_constant_rep::do_scalar_index): Handle + indexing a scalar with `0'. + + * src/tc-index.cc (tree_constant_rep::do_scalar_index): Handle the + index `:' the same as the index `1'. + +Tue Mar 15 17:22:00 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Array.cc: Fix typo in comments about compiler flags. + +Wed Mar 9 15:08:21 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 1.0.1. + + * src/*.h: Use the macro octave_FOO_h instead of _FOO_h to protect + against multiple inclusion. + * liboctave/*.h: Likewise. + + * liboctave/*.h: Surround contents of files in extern "C++" { }. + +Tue Mar 8 18:06:54 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-index.cc (tree_constant_rep::do_vector_index (const + tree_constant&) const): Don't crash if matrix is empty. + + * scripts/norm.m: Return empty matrix for empty argument. + +Mon Mar 7 23:34:44 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * doinstall.sh: chmod new directories to 755. + +Sat Mar 5 13:15:10 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * bsd-math/log1p.c: Declare finite as returning int, not double. + * bsd-math/finite.c (finite): Add return type. + +Thu Mar 3 14:42:00 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/DiagMatrix.cc (operator *): Provide definitions for + DiagMatrix * DiagMatrix, ComplexDiagMatrix * ComplexDiagMatrix, + ComplexDiagMatrix * DiagMatrix, and DiagMatrix * ComplexDiagMatrix. + + * liboctave/ColVector.cc (operator >>): Provide definitions for + real and complex column vectors. + + * liboctave/RowVector.cc (operator >>): Provide definitions for + real and complex row vectors. + +Wed Mar 2 18:00:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Array.h (DiagArray::Proxy::operator & ()): Provide + function body. + +Tue Mar 1 13:18:35 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-const.cc (tree_constant::load (istream&)): Don't skip + past first type keyword if not global. + (tree_constant::load (istream&, tree_constant_rep::constant_type)): + Allocate storage for reading complex scalar. + +Sun Feb 20 14:17:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/menu.m: Don't fail on input that is empty or not a + scalar. + + * Makefile.in (DISTFILES): Distribute ChangeLog.[0-9]. + + * src/lex.l (reset_parser): Don't resynch line number to command + history number if reading a script file. + +Thu Feb 17 01:36:19 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 1.0 released. + + * src/file-io.cc (fopen_file_for_user): Improve error message. + (fopen_internal): Likewise. + +Wed Feb 16 02:21:05 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Try harder to find finite, isnan, and isinf. + Use m4 `dnl' comments, not shell `#' comments. + + * src/file-io.cc (file_io_get_file): New function. + (fgets_internal): Use it instead of trying to do this in line. + (frewind_internal, fseek_internal, ftell_internal, do_printf, + do_scanf): Likewise. + * (do_scanf): Allow file name as string for fscanf. + * (procss_scanf_format): Delete unused argument `args'. Delete + unused local variable `arg_type'. Don't complain if we can't + store the result of a requested conversion. Only return + successfully if a conversion actually occurs, even if we are not + storing the value. + +Sun Feb 13 13:32:03 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.83 released. + + * Array.h (DiagArray): Move inline definitions of get() and set() + before use by other inline functions. + +Sat Feb 12 14:15:45 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check for g77 last. Even if it is ever actually + released, it probably won't be stable for quite a while. + + * MAKEINFO.PATCH: New file. + * Makefile.in (DISTFILES): Distribute it. + + * liboctave/Matrix.cc (operator + (Complex, const Matrix&)): + Make it work. + (operator - (Complex, const Matrix&)): Ditto. + (operator * (Complex, const Matrix&)): Ditto. + (operator / (Complex, const Matrix&)): Ditto. + +Fri Feb 11 00:03:39 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check for strerror too. + + * configure.in: When saving CFLAGS as XCFLAGS and then restoring + the value, quote the RHS. + + * src/g-builtins.cc (builtin_clc): Do the dirty work to clear the + screen here instead of using rl_clear_screen to avoid printing + prompt unnecessarily. + +Thu Feb 10 00:26:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc: Add all the cruft that the autoconf manual + suggests for including dirent.h. + + * info/terminal.c (terminal_prep_terminal): [HAVE_TERMIOS_H && + NeXT]: Don't use OCRNL, as someone says NeXT's termios.h doesn't + have it. + + * configure.in (GCC_IEEE_FP_FLAG): Correct check for ix86 Linux. + Don't try to check for CC == gcc. + Add GCC_IEEE_FP_FLAG to CFLAGS while checking for IEEE FP + functions finite, isnan, and isinf. + + * readline/rldefs.h: Make definition of HAVE_POSIX_SIGNALS + conditional on definition of _POSIX_VERSION, not HAVE_TERMIOS_H. + +Wed Feb 9 02:41:32 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_function::octave_va_start): Rename from + va_start to avoid conflict with va_start macro. + (tree_function::octave_var_arg): Likewise, rename from va_arg. + * src/g-builtins.cc (builtin_va_arg): Call octave_va_arg for the + current function instead of va_arg. + (builtin_va_start): Likewise, for octave_va_start. + + * Version 0.82.1. + + * doc/Makefile.in (clean): Also remove octave.in, octave.rd, + octave.ins, and octave.rds. + + * src/t-builtins.cc (load_variable): Make it work for all + combinations of loading global or local variables when the + variable to be loaded is already a global variable, local + variable, a function, or even undefined. + +Tue Feb 8 00:33:09 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.82 released. + + * liboctave/mx-kludge.cc (operator + (KL_MAT_TYPE, KL_MAT_TYPE)): + For an empty matrix with one nonzero dimension, be sure to return + a result of the same size. + (operator - (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto. + (product (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto. + (quotient (KL_MAT_TYPE, KL_MAT_TYPE)): Ditto. + +Mon Feb 7 01:30:19 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Array.h, liboctave/array.cc (DiagArray): Back off on + indexing via Proxy class changes for AIX systems to avoid gcc (or + possibly AIX assembler?) bug. + + * src/tree-const.cc (tree_constant_rep::maybe_resize (int, + force_orient)): Don't abort for a max index of zero. + + * liboctave/Matrix.h (class RowVector, friend double operator * + (const RowVector&, const ColumnVector&)): Add missing const in + declaration. + + * liboctave/Matrix.cc (Matrix::fill (val, r1, c1, r2, c2)): Set nc + to cols(), not rows(). + (ComplexMatrix::fill (double val, r1, c1, r2, c2)): Likewise. + (ComplexMatrix::fill (Complex val, r1, c1, r2, c2)): Likewise. + + * All source files: To match the documenation, refer to function + files, not M-files. Rename functions and variables that refer to + _m_file_, mfile, or mf to refer to _fcn_file, ffile, or ff. + +Sun Feb 6 19:08:26 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/parse.y (yyerror): Don't crash if a parse error happens and + the current input line is NULL. + +Sat Feb 5 18:53:04 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/file-io.cc (initialize_file_io): Don't use variable names + that start with `_'. + * src/file-io.cc (class file_info): Likewise. + +Fri Feb 4 01:15:59 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/builtins.cc (general_functions): In usage message for fopen, + use `Valid' instead of `Legal'. + + * src/file-io.cc (do_printf): Use `invalid' instead of `illegal' + in error message. + (do_scanf): Likewise. + + * src/mappers.cc (atanh): Use correct formula. + +Thu Feb 3 22:08:40 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * doc/refcard.tex: New file. + * doc/Makefile.in (all): Make refcard.ps. + (DISTFILES): Distribute refcard.tex, refcard.dvi, and refcard.ps. + + * src/tree-const.cc (any_element_is_negative): Delete function. + (any_element_less_than): New function. + (any_element_greater_than): Ditto. + (tree_constant_rep::mapper): Use struct elements lower_limit, + upper_limit, and can_return_complex_for_real_arg to properly + handle functions like acos, asin, atanh, and acosh. + + * src/builins.h (struct Mapper_fcn): Rename neg_arg_complex to + can_return_complex_for_real_arg. New elements, lower_limit and + upper_limit. + (struct builtin mappers functions): Rename neg_arg_complex to + can_return_complex_for_real_arg. New elements, lower_limit and + upper_limit. Delete elements nargin_max and nargout_max. + * src/variables.cc (install_builtin_mapper_function): Handle new + struct elements can_return_complex_for_real_arg, lower_limit, and + upper_limit. Don't use nargin_max and nargout_max -- they are + the same for all mapper functions. + +Wed Feb 2 05:06:56 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Matrix.h: Don't include values.h. + * liboctave/Matrix-ext.cc: Include float.h + (DET::value_will_overflow): Use DBL_MAX, not MAXDOUBLE. + (ComplexDET::value_will_overflow): Likewise. + (DET::value_will_underflow): Use DBL_MIN, not MINDOUBLE. + (ComplexDET::value_will_underflow): Likewise. + * src/tree.cc: Include limits.h, not values.h. + (tree_builtin::max_expected_args): Use INT_MAX, not MAXINT. + + * configure.in: If compiling on an ix86, set GCC_IEEE_FP_FLAG to + -mieee-fp. We should no longer require the modified crt0 code on + Linux systems in order to get IEEE functions. + * Makeconf.in (GCC_IEEE_FP_FLAG): Substitute value. + (ALL_CFLAGS, UGLY_ALL_CFLAGS, ALL_CXX_FLAGS, UGLY_ALL_CXX_FLAGS, + ALL_LDFLAGS): Use it. + +Tue Feb 1 22:30:46 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/builtins.cc (install_builtins): Make SEEK_SET, SEEK_CUR, and + SEEK_END constants. + + * src/tree-plot.cc (tree_subplot_using::print): Only check column + number against max if max is greater than 0. + +Mon Jan 31 15:59:31 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/strcmp.m: Correctly handle empty strings. + + * src/parse.y (input): Recognize lone simple_list and simple_list + followed by error and '\n'. + +Fri Jan 28 00:20:30 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.81 released. + + * src/octave.cc (clean_up_and_exit): Call cleanup_tmp_files() here + too. + + * configure.in: Check for atexit and on_exit. + * src/octave.cc: Use HAVE_ATEXIT and HAVE_ON_EXIT (instead of + just checking to see if sun is defined) to decide whether to + define atexit as on_exit. + (main): Don't try to call atexit if it's missing and we don't have + on_exit either. + +Thu Jan 27 22:16:48 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check for gethostname and sys/utsname.h. + * utils.cc (gethostname): Steal replacement from bash. Provide + definition if it looks like it's missing and we have + sys/utsname.h. + + * liboctave/Array.h (DiagArray): Define non-const indexing + functions here. + * liboctave/Array.cc (DiagArray): Not here. + + * liboctave/Array.h (DiagArray::Proxy): New class to handle + non-const reference indexing. Allows different action if indexing + on left side of assignment operator. + + * src/octave.cc (main): Call initialize_pager(), + initialize_readline(), and install_signal_handlers() before trying + to read startup files. + + * src/octave.cc (input_from_startup_file): New global flag. + (execute_startup_files): Set it to 1 before reading startup files. + * src/parse.y (func_def_2): If input_from_startup_file, don't try + to compare file name and function name. + +Wed Jan 26 14:39:27 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * readline/rldefs.h: Make better use of autoconf defines. + +Tue Jan 25 17:19:19 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Matrix.cc (ComplexMatrix (DiagMatrix)): Make sure off + diagonal elements are zero. + (ComplexMatrix (ComplexDiagMatrix): Likewise. + (Matrix (DiagMatrix): Likewise. + +Fri Jan 21 17:43:11 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * flibs.sh: Recognize libraries that match `/*.a'. + +Thu Jan 20 18:12:01 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.80.1. + +Wed Jan 19 14:48:27 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * libcruft/odepack/stode.f: Don't try to `RETURN 0'. This causes + lsode to fail, at least with Sun's f77. + + * src/tree-const.cc (tree_constant_rep::load): Delete string + returned from extract_keyword. + * src/t-builtins.cc (builtin_load): Likewise. + * src/variables.cc (extract_keyword): Return new storage, not + static buffer. + + * src/t-builtins.cc (builtin_save): If saving a named list of + variables, use is_globally_visible to decide whether to mark + variables in the current symbol table as global. + +Tue Jan 18 11:57:03 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.80 released. + + * doc/Makefile.in (install): Delete commands for installing + liboctave.info instead of trying to comment them out. + + * liboctave/Array.cc: Allow users to compile with + -fexternal-stemplates and USE_EXTERNAL_TEMPLATES defined to + generate their own .o files with new types. + + * Makeconf.in (includedir): Install include files in + $prefix/include/octave by default. + + * liboctave/Makefile.in (TEMPLATE_SRC): New macro. + (install): Install files listed in $(TEMPLATE_SRC) too. + + * info/search.h: Conditionally declare stricmp and strnicmp. + * info/search.c: Conditionally define stricmp and strnicmp. + * config.h.in: Add undefs for HAVE_STRICMP and HAVE_STRNICMP. + + * configure.in: Check for stricmp and strnicmp too. + + * doc/Makefile.in: For now, don't format or try to install the + liboctave manual. + Don't distribute formatted copies of liboctave manual. + +Mon Jan 17 01:10:54 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * doc/Makefile.in (clean): Remove all index files. + + * src/Makefile.in (defaults.h): Depend on Makefile too. + * doc/Makefile.in (conf.texi): New rule for making conf.texi from + conf.texi.in. + + * doc/conf.texi.in: New file. + * doc/octave.texi: Include conf.texi to get VERSION, OCTAVE_HOME, + and other variables that need to be set depending on the + configuration. + + * Makefile.in (DISTFILES): Don't distribute PLOTTING. Current + plotting info is in the Texinfo docs. + +Sat Jan 15 15:43:34 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * config.sub: New file, from libg++-2.5.2. + * Makefile.in: Distribute config.sub. + * configure.in: Use config.sub to validate system types. If it + fails, continue with target_host_type and canonical_host_type set + to unknown. Leave target_host_type set to any alias given as the + TARGET argument to configure. + + * readline/rldefs.h: If ultrix and HAVE_SGTTY_H, avoid Posix + terminal driver. + * configure.in: If configuring for ultrix, check for sgtty first. + If not found, go ahead and check for Posix terminal driver. + + * configure.in: Don't try to do anything special for readline on + NeXT systems. + + * Makeconf.in: Define rules for making .d files here. + liboctave/Makefile.in: Not here. + src/Makefile.in: Or here. + + * liboctave/Matrix.h (all Matrix/Vector operator = functions): + Simply call the base class operator =, then return *this. + (class ColumnVector): Declare RowVector a friend class, so it can + access the private constructor for the transpose operator. + (class RowVector): Likewise, for ColumnVector. + (class ComplexColumnVector): Likewise, for CommplexRowVector. + (class ComplexRowVector): Likewise, for ComplexColumnVector. + Numerous formatting cleanups. + +Thu Jan 13 13:17:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.79.90. + + * builtins.cc: Include missing-math.h. + + * src/missing-math.h: Provide declarations for acosh, asinh, + atanh, and gamma whether they are actually missing or not, because + they are not part of the standard math.h, and the g++/libg++ + installation no longer provides declarations for them. + + * src/sighandlers.h (RETSIGTYPE): Define here. + (BADSIG): Likewise. + (sig_handler): Likewise. + + * src/g-builtins.cc: Include sighandlers.h + Don't define RETSIGTYPE, BADSIG, or sig_handler here. + * src/octave.cc: Or here. + +Wed Jan 12 16:12:27 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc: Don't check nargin/nargout in *_options + functions. + + * src/f-qpsol.cc, src/f-quad.cc, src/f-lsode.cc, src/f-fsolve.cc, + src/f-dassl.cc, liboctave/QPSOL.cc, liboctave/Quad.cc, + liboctave/ODE.cc, liboctave/NLEqn.cc, liboctave/DAE.cc: + Similar changes for these classes/functions as the following + changes for src/f-npsol.cc and liboctave/NPSOL.cc: + + * src/f-npsol.cc (npsol_opts): New static variable to hold Octave's + current idea of npsol options. + (npsol): Call nlp.copy (npsol_opts) after creating NPSOL object. + (npsol_option_table): New static list of options for npsol. + (print_npsol_option_list): New function. + (do_npsol_option): New function. + (npsol_options): Make it work. + + * liboctave/NPSOL.cc (NPSOL_options): New class. + * (NPSOL): Also derive from NPSOL_options. + * (minimize): Call pass_options_to_npsol before calling npsol. + * (NPSOL::option): No longer works. Print error message instead. + * (NPSOL::set_default_options): Now a member of NPSOL_options class. + + * src/utils.cc: If missing, declare strcasecmp, strncasecmp. + * (almost_match): Add new argument to do case-insensitive matches. + * (keyword_almost_match): New function to match a string against a + list of keywords. + + * liboctave/NLP.h (NLP): Add destructor and copy constructor. + + * configure.in: Check for strcasecmp and strncasecmp. + * config.h.in: Add #undefs for HAVE_STRCASECMP and STRNCASECMP. + * src/strcasecmp.c, src/strncase.c: New files, from glibc. + * src/Makefile.in (SOURCES, OBJECTS): List them. + + * src/builtins.cc (general_functions): Improve usage message for + the *_options functions. + (print_usage): New arg, just_usage with default value of 0. + If nonzero, don't print info about where to find additional help. + + * src/Makefile.in (INCLUDES): Add error.h. + (SOURCES): Add error.h. + + * src/tree.cc (tree_identifier::parse_m_file): call reset_parser + before calling yyparse (). + * src/tc-extras.cc (eval_string): Likewise. + Don't save previous symbol table. That is handled by the + unwind protect. + + * src/lex.l (reset_parser): Don't unconditionally call yyreset. + Add a couple of comments. + (yywrap): Always return 1, not 0. + (yy_flex_alloc, yy_flex_realloc, yy_flex_free): #if 0 out. + + * src/utils.cc (raw_mode): Only complain about stdin not being a + tty if we are really interactive. + + * src/octave.cc (main): End startup message with endl to ensure + flushing before other output. + * Turn of readline's blink_matching_paren feature if not + interactive, or if reading from a file specified on the command + line. + + * src/octave.cc (main): Set the symbol table context just before + calling reset_parser in the main loop. + * src/lex.l (reset_parser): Not here. + + * src/input.cc (octave_gets): Declare static. + (octave_read): Also handle echoing input if not using readline. + + * Makefile.in (DISTFILES): Add SENDING-PATCHES to the list. + +Mon Jan 10 14:30:13 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/corrcoef.m, scripts/fortran_vec.m, scripts/kurtosis.m, + scripts/ols.m, scripts/skewness.m, scripts/cov.m, scripts/gls.m, + scripts/mahalanobis.m, scripts/pinv.m: New script files from Kurt + Hornik (hornik@neuro.tuwien.ac.at) and the Department of + Probability Theory and Statistics TU Wien, Austria. + +Sun Jan 9 01:11:05 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc (builtin_fsqp_options): If FSQP_MISSING is + defined, don't call fsqp_options; just print usage message. + (builtin_npsol_options): Likewise, for npsol_options. + (builtin_qpsol_options): Likewise, for qpsol_options. + * src/builtins.cc (general_functions): Provide different usage + message for fsqp_options depending on whether FSQP_MISSING is + defined. Likewise for npsol_options and qpsol_options. + +Sat Jan 8 16:45:57 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * libcruft/misc/dostop.c: Include config.h. + + * src/variables.cc (extract_keyword): Use ostrstream instead of + fixed length buffer. For keywords with string values, return + value in static buffer. + * src/t-builtins.cc (builtin_load): Handle new argument list for + extract_keyword. Handle possiblity of load_variable setting + error_state. + * src/tree-const.cc (tree_constant_rep::load): Handle new argument + list for extract_keyword. + +Fri Jan 7 13:20:47 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/f-eig.cc (builtin_eig_2): Rename from builtin_eig. + * src/f-fsolve.cc (builtin_fsolve_2): Rename from builtin_fsolve. + * src/f-inv.cc (builtin_inv_2): Rename from builtin_inv. + +Thu Jan 6 12:29:41 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-base.h (tree::save): Add optional argument `precision'. + * src/tree-const.cc (tree_constant::save): Ditto. + (tree_constant_rep::save): Ditto. + * src/symtab.cc (symbol_def::save): Ditto. + (symbol_record::save): Ditto. + (symbol_table::save): Ditto. + + * src/t-builtins.cc (builtin_save): Pass user_pref.save_precision + to symbol table save functions. + * src/builtns.cc (string_variables): Add save precision to thelist. + (install_builtins): Initialize it. + * src/user-prefs.cc (set_save_precision): New function. + * src/user-prefs.h (user_pref.save_precision): New data element. + + * liboctave/Matrix-ext.cc: Provide correct prototypes for dgeesx + and zgeesx. + * (SCHUR::init): Don't declare a dummy_select function pointer, + just pass `(void *) 0' instead, since the dummy argument is never + supposed to be used anyway. + + * src/input.cc (initialize_readline): Cast command_completer to + CPPFunction, not Function, now that readline has more than one + function typedef. + * Add extern declaration for free_undo_list (). + + * Replace readline source from GDB with readline source from bash. + This allows paren matching. + +Wed Jan 5 01:20:26 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Also check for sys/select.h. + + * liboctave/RowVector.cc (ComplexRowVector::operator *): Complete + function body. Put code in-line rather than making a call to the + BLAS routine zdotu to avoid having to cope with the various ways + that Fortran compilers might translate this. + + * src/input.cc (operate_and_get_next): New function, from bash. + (initialize_readline): Bind operate_and_get_next to C-O here. + + * src/input.cc (command_completer, command_generator): + Declare static here. + * srs/input.h (command_completer, command_generator): + Not extern here. + + * g-builtins.cc (builtin_warranty): Change copyright info. + * octave.cc (verbose_usage): Likewise. + (main): Likewise. + +Mon Jan 3 15:49:41 1994 John Eaton (jwe@schoch.che.utexas.edu) + + * src/fnmatch.c, src/fnmatch.h: New files for pattern matching + from the GNU C library. + * src/Makefile.in: Add them to the appropriate lists. + * src/t-builtins.cc (builtin_save): Use fnmatch to do pattern + matching instead of using regular expressions. + (builtin_clear): Likewise. + (glob_pattern_p): New function. + (builtin_save): Print error message and return if only given one + argument that contains globbing characters. + + * src/symtab.cc (symbol_record::save): Don't attempt to save + undefined variables. + +Wed Dec 29 02:55:08 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/rank.m: Also need to compute SVD when nargin == 2. + Correct usage message. + +Wed Dec 15 01:44:18 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/f-lpsolve.cc, src/f-fsqp.cc, src/f-npsol.cc, src/f-qpsol.cc, + src/f-lsode.cc, src/f-dassl.cc, src/f-fsolve.cc, src/f-quad.cc: + New stub options functions, XXX_options, and XXX_options_2 (for + future dld use), where XXX is lpsolve, fsqp, npsol, etc. + * src/f-lpsolve.h, src/f-fsqp.h, src/f-npsol.h, src/f-qpsol.h, + src/f-lsode.h, src/f-dassl.h, src/f-fsolve.h, src/f-quad.h: + Declare XXX_options functions. + * src/builtins.cc (builtin_general_functions): Add new XXX_options + functions to the list of builtin functions. + * src/g-builtins.cc: Define builtin_XXX_options functions. + * src/g-builtins.h: Declare them. + + * scripts/tzero.m: Add missing comma in fprintf call. + +Tue Dec 14 00:24:35 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * libcruft/quadpack/*.f: Modify to handle user-requested + termination from inside the user-supplied function. + * src/f-quad.cc (quad_user_function): Set quad_integration_error + if an error is encountered in the user-supplied function. + * liboctave/Quad.h (quad_integration_error): New global variable. + * liboctave/Quad.cc (user_function): Handle + quad_integration_error, and error flag for modified Quadpack + functions. + + * src/tree.cc (tree_simple_assignment_expression::eval): Check + error status after calling convert_to_const_vector () on the + argument list. + (tree_index_expression::eval): Ditto. + + * src/tree.cc (tree_argument_list::convert_to_const_vector): + If an error is encountered while evaluating an element of the + list, print an error message including the element number. + + * liboctave/ODE.cc (integration_error): New private data member. + (ODE constructors): Initialize it to zero. + (ODE::integrate (double)): Reset it to zero before each + integration step. + (lsode_f): Treat empty vector returned from user-supplied function + as an error. + * src/f-lsode.cc (lsode_user_function): Return empty vector if + error is encountered in user-supplied function. Don't jump to top + level on error. + + * libcruft/odepack/lsode.f (lsode): Return with istate = -13 on + error from user supplied subroutine. + * libcruft/odepack/lsode.f (lsode): Handle extra argument returned + from user-supplied function. + * libcruft/odepack/stode.f (stode): Likewise. + * libcruft/odepack/prepj.f (prepj): Likewise. + +Wed Dec 8 01:30:57 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/DAE.cc (integration_error): New private data member. + (DAE constructors): Initialize it to zero. + (DAE::integrate (double)): Reset it to zero before each + integration step. + (dassl_f): Treat empty vector returned from user-supplied function + as an error. + * src/f-dassl.cc (dassl_user_function): Return empty vector if + error is encountered in user-supplied function. Don't jump to top + level on error. + + * liboctave/NPSOL.cc (npsol_objective_error): New global variable. + (npsol_objfun): Set to zero before calling user-supplied function. + Check after calling user-supplied function. + Set mode to -1 on error. + (npsol_confun): Set mode to -1 on error. + (npsol declaration): Declare args for user-supplied functions. + * src/f-npsol.cc (npsol_objective_function): If an error is + encountered in the calculation of the objective function, set + npsol_objective_error to 1. + (npsol_constraint_function): Treat empty vector returned from + user-supplied function as an error. + + * liboctave/Array.cc (*::checkelem): Correct bounds checking. On + error, return uninitialized value of type T. This avoids placing + an extra requirement on the class that can be used as an array + element. + (*::operator ()): Likewise. + +Mon Dec 6 07:24:49 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/NLEqn.cc (hybrd1 declaration): Declare args for + user-supplied fuction. + (hybrj1): Likewise. + (hybrd1_fcn): Treat return of empty vector from user supplied + function as an error by setting iflag to -1. + (hybrj1_fcn): Likewise. + (solve): Handle case of info < 0 returned from hybrd1. + + * src/f-fsolve.cc (fsolve_user_function): Don't jump to top level + on error in user-supplied function. Treat empty vector returned + from user-supplied function as error. + (hybrd_info_to_fsolve_info): Translate -1 (failure in evaluation + of user-supplied function) to -2. + * scripts/perror.m (fsolve case): Handle -2. + + * info/error.c (program_name): Initialize to info, not NULL. + + * info/session.c (initialize_info_session): Don't exit if term is + too dumb or too small to use info. Return int status instead. + * info/info.h (TERM_TOO_SMALL): New macro. + + * src/t-buitlins.cc (try_info): Check return value from + initialize_info_session (). + + * liboctave/Array.cc (DiagArray<T>::DiagArray (int n, const T& val)): + Set number of rows and columns to n, not 0. + +Sat Dec 4 14:01:41 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.h (YY_INPUT): Undefine if defined, then always define + the way we want. + (YY_FATAL_ERROR): Likewise. + + * src/lex.l (yywrap): Declare static. + (yy_flex_alloc): New function, so we don't have to link with + libfl.a when using flex 2.4.x. + (yy_flex_realloc): Ditto. + (yy_flex_free): Ditto. + +Thu Dec 2 19:23:43 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/*.m: Add copying notice to script files. + + * src/input.cc (command_generator): Return copy of matching string. + + * src/input.cc (command_generator): Correctly delete array of + character strings. + * src/symtab.cc (symbol_table::save): Likewise. + * src/utils.cc (pathstring_to_vector): Likewise. + + * src/utils.cc (get_m_file_names): When reallocating vector of + strings, delete original vector of pointers, but not the strings + they point to. + +Tue Nov 30 12:36:41 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/RowVector.cc, liboctave/ColVector.cc, + liboctave/DiagMatrix.cc, liboctave/Matrix.cc, + liboctave/Matrix-ext.cc: Massive rewrite to cope with new + derivation scheme. + + * liboctave/Matrix.h: Include Array.h, and derive Matrix, + ComplexMatrix, etc. from Array<double>. Derive Complex + versions from Array<Complex>. Delete declarations of functions + now inherited from the Array classes. + * Include mx-kludge.h with appropriate #defines in each class that + needs it. + * liboctave/Matrix.cc: Include mx-kludge.cc with appropriate + #defines in each class that needs it. + + * liboctave/Makefile.in (INCLUDES): Add Array.h, MArray.h, and + mx-kludge.h. + (SOURCES): Add Array.cc. + (EXTRAS): Add MArray.cc and mx-kludge.cc. + + * liboctave/mx-kludge.h, liboctave/mx-kludge.cc: New files to + implement the MArray functionality with macros until g++ can + handle the MArray stuff. + + * liboctave/MArray.h, liboctave/MArray.cc: New files for generic + arrays with simple math functions for like-types. This won't + quite work with g++ yet, so it's not used anywhere. + + * liboctave/Array.h, liboctave/Array.cc: New files for generic + arrays. + + * liboctave/mx-inlines.cc: Add const for const arguments. + + * src/file-io.cc (file_info): Rename class from File_info. + (file_info::operator =): Fix memory leak by deleting old name + and mode before saving new. Don't do copy if source and + destination are the same. + + * src/tree.cc (tree_matrix::eval): Plug memory leak. + + * src/tree.cc (tree_builtin::tree_builtin): Check to see that nm, + not my_name, is non-NULL before saving it. + + * src/tree.cc (tree_identifier::eval, tree_gobal_command::eval): + After performing the assignment, delete the identifier created + for temporary asssignment since the destrucotr for + tree_simple_assignment_expression doesn't do it for us. + + * src/tree.cc (tree_function::stash_m_file_name): Delete file_name + before saving it. + (tree_function::stash_function_name): Likewise, for fcn_name. + + * src/lex.l, src/lex.h: Make quote_is_transpose globally visible. + * src/parse.y (param_list): Use it, and recognize empty parameter + lists here. + + * src/parse.y (simple_expr1): Recognize empty matrices here. + (matrix): Not here. + + * src/arith-ops.cc (do_binary_op): The matrix product and quotient + functions aren't class member functions now. + + * src/tc-index.cc, src/tc-assign.cc, src/symtab.cc, + src/tree-plot.cc, src/idx-vector.cc, src/tree-const.cc: + Call ::error, not just error, since g++ now complains about not + being able to find a non-hidden member function by that name. + + * src/tree-const.cc: Call ::real and ::imag, not just real and imag, + since g++ now complains about not being able to find non-hidden + member functions by those names. + + * src/tree-const.cc (tree_constant_rep::force_numeric): Handle case + of zero-length strings. + + * src/tree-const.cc (tree_constant_rep::convert_to_str): Null + terminate strings created from scalars. + + * src/tc-index.cc (tree_constant_rep::fortran_style_matrix_index): Use + data(), not fortran_vec(). + * src/idx-vector.cc (idx_vector::idx_vector): Likewise. + + * src/SLStack.cc: Move function definitions here. + * src/SLStack.h: From here. Include SLStack.cc if not using + external templates. + + * src/unwind-prot.h: Move class declaration here. + * src/unwind-prot.cc: From here. + + * src/xdiv.h, src/xpow.h, src/variables.h, src/utils.h, + src/user-prefs.h, src/t-builtins.h, src/sighandlers.h, + src/pr-output.h, src/pager.h, src/octave-hist.h, src/mappers.h, + src/input.h, src/help.h, src/gripes.h, src/g-builtins.h, + src/f-syl.h, src/f-svd.h, src/f-schur.h, src/f-rand.h, + src/f-qzval.h, src/f-quad.h, src/f-qr.h, src/f-qpsol.h, + src/f-npsol.h, src/f-lu.h, src/f-lsode.h, src/f-lpsolve.h, + src/f-inv.h, src/f-ifft.h, src/f-hess.h, src/f-givens.h, + src/f-fsqp.h, src/f-fsolve.h, src/f-fft.h, src/f-expm.h, + src/f-eig.h, src/f-det.h, src/f-dassl.h, src/f-colloc.h, + src/f-chol.h, src/f-balance.h, src/error.h, src/dynamic-ld.h, + src/builtins.h, src/arith-ops.h, src/tree-const.h, src/tree.h, + src/token.h, src/symtab.h, src/procstream.h, src/idx-vector.h, + src/file-io.h, src/tree-base.h, src/unwind-prot.h, src/Stack.h, + liboctave/LinConst.h, liboctave/FEGrid.h, liboctave/NLEqn.h, + liboctave/NLConst.h, liboctave/LPsolve.h, liboctave/LP.h, + liboctave/FSQP.h, liboctave/DAEFunc.h, liboctave/DAE.h, + liboctave/CollocWt.h, liboctave/Bounds.h, liboctave/Objective.h, + liboctave/ODEFunc.h, liboctave/NLFunc.h, liboctave/Range.h, + liboctave/Quad.h, liboctave/QP.h, liboctave/QPSOL.h, + liboctave/QLD.h, liboctave/NPSOL.h, liboctave/NLP.h, + liboctave/f77-uscore.h, liboctave/lo-error.h, + liboctave/Matrix.h: + Don't use #pragma interface. + + * src/tc-index.cc, src/tc-assign.cc, src/symtab.cc, + src/procstream.cc, src/gripes.cc, src/f-syl.cc, src/f-svd.cc, + src/f-schur.cc, src/f-rand.cc, src/f-quad.cc, src/f-qr.cc, + src/f-qpsol.cc, src/f-npsol.cc, src/f-lu.cc, src/f-lsode.cc, + src/f-lpsolve.cc, src/f-inv.cc, src/f-ifft.cc, src/f-hess.cc, + src/f-givens.cc, src/f-fsqp.cc, src/f-fsolve.cc, src/f-fft.cc, + src/f-eig.cc, src/f-det.cc, src/f-dassl.cc, src/f-colloc.cc, + src/f-chol.cc, src/f-balance.cc, src/t-builtins.cc, + src/octave-hist.cc, src/input.cc, src/g-builtins.cc, + src/xdiv.cc, src/xpow.cc, src/user-prefs.cc, src/unwind-prot.cc, + src/tree-plot.cc, src/token.cc, src/tc-extras.cc, src/sysdep.cc, + src/sighandlers.cc, src/pr-output.cc, src/pager.cc, + src/mappers.cc, src/idx-vector.cc, src/help.cc, src/f-qzval.cc, + src/f-expm.cc, src/error.cc, src/dynamic-ld.cc, src/builtins.cc, + src/arith-ops.cc, src/variables.cc, src/utils.cc, + src/tree-const.cc, src/file-io.cc, src/tree.cc, + liboctave/sun-utils.cc, liboctave/mx-inlines.cc, + liboctave/RowVector.cc, liboctave/ColVector.cc, + liboctave/DiagMatrix.cc, liboctave/Matrix.cc, + liboctave/Matrix-ext.cc, liboctave/Quad.cc, liboctave/ODE.cc, + liboctave/LPsolve.cc, liboctave/FSQP.cc, liboctave/DAE.cc, + liboctave/DAEFunc.cc, liboctave/QP.cc, liboctave/Objective.cc, + liboctave/ODEFunc.cc, liboctave/NLFunc.cc, liboctave/NLConst.cc, + liboctave/LP.cc, liboctave/lo-error.cc, liboctave/Range.cc, + liboctave/QPSOL.cc, liboctave/NPSOL.cc, liboctave/NLEqn.cc, + liboctave/Matrix.cc, liboctave/Matrix-ext.cc, + liboctave/LinConst.cc, liboctave/FEGrid.cc, + liboctave/DiagMatrix.cc, liboctave/CollocWt.cc, + liboctave/ColVector.cc, liboctave/Bounds.cc: + Don't use #pragma implementation. + + * src/lex.l, src/parse.y, src/procstream.cc, src/gripes.cc, + src/f-syl.cc, src/f-svd.cc, src/f-schur.cc, src/f-rand.cc, + src/f-quad.cc, src/f-qr.cc, src/f-qpsol.cc, src/f-npsol.cc, + src/f-lu.cc, src/f-lsode.cc, src/f-lpsolve.cc, src/f-inv.cc, + src/f-ifft.cc, src/f-hess.cc, src/f-givens.cc, src/f-fsqp.cc, + src/f-fsolve.cc, src/f-fft.cc, src/f-eig.cc, src/f-det.cc, + src/f-dassl.cc, src/f-colloc.cc, src/f-chol.cc, + src/f-balance.cc, src/t-builtins.cc, src/octave-hist.cc, + src/input.cc, src/g-builtins.cc, src/xdiv.cc, src/xpow.cc, + src/user-prefs.cc, src/unwind-prot.cc, src/tree-plot.cc, + src/token.cc, src/tc-extras.cc, src/sysdep.cc, + src/sighandlers.cc, src/pr-output.cc, src/pager.cc, + src/mappers.cc, src/idx-vector.cc, src/help.cc, src/f-qzval.cc, + src/f-expm.cc, src/error.cc, src/dynamic-ld.cc, src/builtins.cc, + src/arith-ops.cc, src/variables.cc, src/utils.cc, + src/tree-const.cc, src/file-io.cc, src/tree.cc: If HAVE_CONFIG_H + is defined, include config.h. + + * config.h.in, acconfig.h: New files + * Makefile.in (DISTFILES): Add them to the list. + + * Makeconf.in (root_srcdir): Define. + (INCFLAGS): Clean up. + (UGLY_ALL_CFLAGS): New macro. + (UGLY_ALL_CXXFLAGS): Likewise. + (UGLY_ALL_LDFLAGS): Likewise. + + * configure.in: Convert to generate config.h. + Substitute root_srcdir in Makefiles. + Use AC_DEFINE(foo, 1) instead of DEFS="$DEFS -Dfoo=1". + If using g++ 2.5 or later, define USE_EXTERNAL_TEMPLATES. + Use UGLY_DEFS for what would have been substited in DEFS, for + those cases when we need DEFS instead of config.h. + +Tue Nov 16 04:59:19 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/f-expm.cc, src/f-givens.cc, src/f-qzval.cc, src/f-syl.cc: + Include f77-uscore.h here. + + * liboctave/ColVector.cc, liboctave/Matrix.cc, + liboctave/Matrix-ext.cc, liboctave/RowVector.cc: Move declarations + for Fortran functions here. + * liboctave/Matrix.h: From here. Don't include f77-uscore.h here. + +Mon Nov 15 04:03:34 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-extras.cc (min): For two-arg versions, use error(), not + FAIL. + (max): Likewise. + * src/idx-vector.cc (checkelem): Likewise. + + * liboctave/Matrix.h, liboctave/Matrix.cc, liboctave/RowVector.cc, + liboctave/ColVector.cc, liboctave/DiagMatrix.cc, + liboctave/Matrix-ext.cc, liboctave/Bounds.cc, liboctave/DAE.cc, + liboctave/CollocWt.cc, liboctave/FEGrid.cc, liboctave/LinConst.cc, + liboctave/ODE.cc, liboctave/NLEqn.cc: Don't abort or exit on + errors. Instead print some message by calling the function + pointed to by current_liboctave_error_handler and then return. + + * liboctave/lo-error.cc: New file, for liboctave error handling + stuff. + +Sun Nov 14 23:28:12 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc (default_path): Handle OCTAVE_PATH from the + environment like TeX handles TEXINPUTS. If the path starts with + `:', prepend the standard path. If it ends with `:' append the + standard path. If it begins and ends with `:', do both (which is + useless, but the luser asked for it...). + (octave_lib_dir): Plug memory leak. + +Sat Nov 13 02:41:24 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/symtab.h (symbol_record::context): New data member, to allow + recursive functions to work. + * src/symtab.cc (symbol_record::push_context): New function + (symbol_record::pop_context): Ditto. + (symbol_table::pop_context): Ditto. + (symbol_table::push_context): Ditto. + + * src/tree.cc (tree_function::eval): If call_depth is > 1, push + symbol table context and add unwind protect to pop it on exit or + error. + (pop_symbol_table_context): New function for unwind protect. + + * configure.in: Use AC_HAVE_HEADERS(unistd.h) instead of + AC_UNISTD_H. + + * src/lex.l, src/f-quad.cc, src/f-rand.cc, src/f-lpsolve.cc, + src/f-fsqp.cc, src/f-fsolve.cc, src/f-det.cc, src/f-dassl.cc, + src/f-colloc.cc, src/utils.cc, src/variables.cc, src/tree.cc, + src/tree-const.cc, src/tc-extras.cc, src/sysdep.cc, src/symtab.cc, + src/octave-hist.cc, src/pr-output.cc, src/input.cc, + src/g-builtins.cc, src/f-det.cc, src/f-inv.cc, src/file-io.cc: + Convert most calls to message() to calls to warning() or error() + instead. + + * src/f-npsol.cc (npsol): Don't try to create the linear + constraint object before checking array sizes. + +Fri Nov 12 04:36:12 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tc-inlines.cc (is_one_zero): New function. + * src/tc-assign.cc: Everywhere we check for is_zero_one, also + check for is_one_zero. Some people write ranges that go in + decreasing order... + * src/tc-index.cc: Likewise. + + * src/tc-inlines (index_check (Range&, int&, char*)): Eliminate + second arg -- there is no need to return the max value of the + range. Correctly compute and check the minimum value. + * src/tc-index.cc: Change all callers, and check the max value + there. + * src/tc-assign.cc: Likewise. + + * src/tc-assign.cc (do_vector_assign): Handle assignment of empty + matrix for int, idx_vector, and Range cases. + (do_matrix_assign): Likewise, for cases when one of the indices is + a colon and the other is an int, idx_vector, or Range. + + * liboctave/Range.h (Range): Rename private data members rng_foo + instead of just _foo. + * liboctave/Range.cc: Change names where used. + + * liboctave/Range.cc (max): Return correct value even when the + elements in the range don't line up exactly with the limit. + (min): Likewise. + (sort): New function. + + * src/tc-assign.cc (delete_row (int)): New function. + (delete_rows (idx_vector&)): Ditto. + (delete_rows (Range&)): Ditto. + (delete_column (int)): New function. + (delete_columns (idx_vector&)): Ditto. + (delete_columns (Range&)): Ditto. + + * src/tree-const.h (is_empty): Don't try checking rows and columns + if type is magic_colon or unknown. Return false instead. + (is_zero_by_zero): New function. + + * src/idx-vector.cc (sort): New function. + (intcmp): New static function, for sorting. + +Thu Nov 11 02:31:13 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * scripts/menu.m: Update to use new va_start() and va_arg() + functions. + + * src/g-builtins.cc (builtin_va_arg): Rename from + builtin_get_next_arg. + (builtin_va_start): New function. + * src/builtins.cc (builtin_general_functions): Fix up list. + + * src/tree.cc (tree_function::va_arg): Rename from get_next_arg. + (tree_function::va_start): New function. + + * src/tree.h (tree_function::num_named_args): New data member. + * src/tree.cc (tree_function::define_param_list): Set it. + (tree_function::eval): Unwind-protect it. + +Wed Nov 10 03:37:44 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_identifier::assign): Also check to make sure + that the symbol record is defined since symbol_record::is_variable + may return true even if the record is undefined. + * src/variables.cc (link_to_global_variable): Don't try to copy a + NULL_TREE_CONST. + + * src/tree-const.cc (tree_constant_rep::matrix_value): If the + current value is a scalar, return 1x1 matrix. + * src/tc-assign.cc (tree_constant_rep::check_vector_assign): + Handle case of zero size LHS. + Clean up formatting of some error messages. + + * src/lex.l ({EL}): Recognize ... when not at end of line. + * src/octave.cc (curr_function): New global variable. + * src/g-buitlins.cc (builtin_get_next_arg): New function. + * src/builtins.cc (builtin_general_functions): Add it to the list. + * src/parse.y (param_list1): Handle ... at end of parameter list. + Abort parse on error. + (ELLIPSIS): New token, for variable argument lists. + * src/tree.h (tree_function): Add varargs_ok, args_passed, + num_args_passed, and curr_arg_number data members to handle + variable argument lists. + (tree_parameter_list::marked_for_varargs): New data member. + * src/tree.cc (tree_function::takes_varargs): New function. + (tree_function::get_next_arg): New function. + (tree_parameter_list::mark_varargs): New function. + (tree_parameter_list::takes_varargs): New function. + (tree_function::eval): Set curr_function, args_passed, and + num_args_passed for use by get_next_arg. + +Mon Nov 8 14:22:34 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.79 released. + + * src/builtins.cc (builtin_text_functions): Correct usage message + for who. + + * scripts/dgram.m: New function, from R. Bruce Tenison + (btenison@eng.auburn.edu). + * scripts/dlqe.m: Ditto. + * scripts/dlqr.m: Ditto. + * scripts/c2d.m: Ditto. + + * src/tree.cc (tree_identifier::name): Make it const. + (tree_builtin::name): Ditto. + (tree_parameter_list::name): Ditto. + (tree_word_list::name): Ditto. + + * src/symtab.cc (symbol_table::save): Delete list of names after + saving. + + * src/symtab.h (symbol_table): Move #defines outside of class + declaration. + +Sun Nov 7 07:03:12 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Makeconf.in (CXX): Don't set from C++. Do set from @CXX@, which + is determined by configure. Don't set C++FLAGS. + + * src/tree.cc: (tree_function::eval (int, int)): Simply call + eval (tree_constant *, int, int, int) with nargin = 1 and args = + NULL_TREE_CONST instead of duplicating most of that function in place. + + * src/parse.y (func_def2): Reset id_name after renaming identifier. + Clear id_name from top level symbol table before defining identifier. + +Sat Nov 6 04:38:57 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: When checking for g++, set CXX, not GXX. + + Merge min changes from Bruce Tenison (btenison@eng.auburn.edu) and + make the corresponding changes for max. + + * src/tc-extras.cc (min (ComplexMatrix&, ComplexMatrix&)): New + function. + (max (ComplexMatrix&, ComplexMatrix&)): Ditto. + (column_min): Handle complex args and two return values. + (column_max): Likewise. + + * liboctave/Matrix.cc (row_min_loc): New function. + (row_max_loc): New function. + (column_min_loc): Ditto. + (column_max_loc): Ditto. + +Fri Nov 5 03:12:55 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.78. + + * src/octave.h (clean_up_and_exit): Change form of declaration for + GCC 2.5.x and beyond. + + * src/tree.cc (tree_identifier::eval): Correctly handle printing + of identifier tags and conversion to assignment to `ans'. + * src/parse.y (maybe_convert_to_ans_assign): Simplify. + For identifiers, defer decision about making an ans assignment + until evaluation time since identifiers can be undefined at parse + time, and we can't tell what to do until we know what the def is. + * src/tree.cc (tree_identifier::mark_for_possible_ans_assgin): New + function. + * src/tree.cc (tree_index_expression::mark_for_possible_ans_assign): + New function. + * src/tree.h (tree_identifier): Add new private data, + maybe_do_ans_assign. + + * src/t-builtins.cc (builtin_who): Major overhaul. Support long + listings. + (print_symbol_info_line): New function. + (print_long_listing): Ditto. + (maybe_list): Ditto. + + * src/user-prefs.cc (sv_editor): New function for builtin variable + EDITOR. + * src/octave-hist.cc (do_edit_history): Use user_pref.editor, not + just the EDITOR environment variable. + + * src/user-prefs.cc (ignore_function_time_stamp): New function for + new builtin variable ignore_function_time_stamp. + * src/variables.cc (symbol_out_of_date): Use value of new + user_pref.ignore_function_time_stamp to decide whether to check to + see if a file has changed. + * src/tree.h (tree_function): Add new private data, system_m_file. + + * src/builtins.cc (string_variables): Add EDITOR and + ignore_function_time_stamp EDITOR to the list. + (bultin_general_functions): Add is_global to the list. + + * src/t-builtins.cc (builtin_clear): Make it work with new + variable scoping rules. + (builtin_document): Likewise, using new document_symbol() + function. + (builtin_save): Likewise. Allow regular expression arguments. + Don't save builtin variables that are read-only. + + * src/utils.cc (octave_home): Don't declare static. + (octave_lib_dir): Likewise. + (octave_info_dir): Likewise. + (default_editor): New function. + + * src/tree.cc (tree_builtin::def): Delete function. + (tree_identifier::def): Likewise. + (tree_identifier::symrec): Likewise. + + * src/tree.h (tree_builtin): Store name of function, not pointer + to symbol record. + + * src/user-prefs.cc (warn_assign_as_truth_value): Lookup + "warn_assign_as_truth_value", not "user_pref.warn...". + + * src/tree-base.h (def): Delete unused virtual function. + (is_prefix_expression): New virtual function. + (mark_for_possible_ans_assign): Likewise. + (is_system_m_file): Likewise. + (stash_m_file_name): No longer needs to be virtual. + (stash_m_file_time): Likewise. + + * src/octave.cc (octave_Complex_error_handler): Define, to keep + errors in the Complex class from aborting Octave. This is only a + temporary fix, I hope. + (main): Install it. + (initialize_globals): Get default editor. + (main): Call initialize_symbol_tables to do that instead of + creating them directly in main. + + * src/variables.cc (document_symbol): New function. + (initialize_symbol_tables): Likewise. + (install_builtin_mapper_function): Likewise. + (install_builtin_text_function): Likewise. + (install_builtin_general_function): Likewise. + (install_builtin_variable): Likewise. + (install_builtin_variable_as_function): Likewise. + (bind_nargin_and_nargout): Likewise. + (bind_builtin_variable): Likewise. + (link_to_global_variable): Likewise. + (link_to_builtin_variable): Likewise. + (link_to_builtin_or_function): Likewise. + (force_link_to_function): Likewise. + (is_globally_visible): Likewise. + (is_builtin_variable): Likewise. + + * src/tree.cc (print_as_scalar): Avoid trying to print row vectors + on one line. + + * src/builtins.cc (install_buitlins): Simplify installation of + builtin functions using new install_builtin_*_function functions. + Ditto for using bind_builtin_variable for installing variables. + + * src/tree.h (tree_global_command): New class. + * src/tree.cc (tree_global_command::*): Implement new class to + make global command executable. + * src/parse.y (global_decl): Make global an executable statement. + + * src/parse.y (func_def2): Rework to match new way of handling + global variables and function names in the symbol table. + Mark functions as `system' or not. + Don't use id_to_define. + If m-file and function names disagree, rename function to match + m-file name. + * src/tree.cc (tree_identifier::rename): New function. + * src/parse.cc, src/parse.h (id_to_define): Delete unused global + variable. + + * src/varables.cc (builtin_string_variable): Fix to match new + rules for global and builtin variables. + (builtin_real_scalar_variable): Likewise. + + * src/tree.cc (tree_identifier::assign): Make it work with new + rules for global variables. + (tree_identifier::parse_m_file): Likewise. + (tree_identifier::do_lookup): Likewise. + + * src/tree.cc (mark_as_system_m_file): New function. + (is_system_m_file): Ditto. + + * src/tree.cc (clear_symbol_table): New function, to be used in an + unwined_protect element for clearing function symbol tables on + exit or error. + + * src/tree.cc (tree_function::eval): Simplify using + bind_nargin_and_nargout. + Clear symbol table on exit or error with unwind_protect. + + * src/tree.cc (tree_prefix_expression::is_prefix_expression): New + function. + + * src/g-builtins.cc (builtin_is_global): New function. + + * src/lex.l (lookup_identifier): Now that global variable binding + has been fixed, only look for symbols in the current symbol table. + Really. I mean it this time. + + * src/symtab.cc: Complete overhaul, to make global variables work + a bit more reasonably. + +Mon Nov 1 15:03:39 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/Matrix.h (DiagMatrix::rows): Return nr, not len. + (ComplexDiagMatrix::rows): Ditto. + * src/Matrix.h (DiagMatrix::cols): Return nc, not len. + (ComplexDiagMatrix::cols): Ditto. + (DiagMatrix::columns): Ditto. + (ComplexDiagMatrix::columns): Ditto. + + * liboctave/DiagMatrix.cc (DiagMatrix::row): Make it work for + square case. + (DiagMatrix::column): Likewise. + (ComplexDiagMatrix::row): Likewise. + (ComplexDiagMatrix::column): Likewise. + + * liboctave/DiagMatrix.cc (DiagMatrix::operator <<): Print spaces + between elements. + (ComplexDiagMatrix::operator <<): Likewise. + +Fri Oct 29 15:32:12 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.77.1. + + * src/symtab.cc (symbol_record::alias): Don't copy formal_param or + forced_global attribute. + + * src/symtabl.cc (symbol_table::bind_globals): Don't bind to + global symbol unless it has forced_global attribute set. + + * src/tree.cc (print_as_scalar): New function. + (tree_identifier::eval): Use it. + (tree_simple_assignment_expression::eval): Likewise. + (tree_multi_assignment_expression::eval): Likewise. + + * src/lex.l (is_keyword): Give better error message for attempts + to define nested functions. + + * src/parse.y (global_decl): Return a command_list to execute + (this makes assignments in global declarations executable). + + * src/tree.cc (tree_for_command): Handle line and column info in + constructors and for error messages. + (tree_while_command): Ditto. + (tree_if_command): Ditto. + (tree_break_command): Ditto. + (tree_continue_command): Ditto. + (tree_return_command): Ditto. + (*::eval_error): Only print messages if error_state > 0. + (various): Only need to check that error_state is non-zero before + calling eval_error(). + + * src/parse.y: Handle line and column information for FOR WHILE IF + ELSEIF ELSE BREAK CONTINUE and FUNC_RET tokens. + * src/lex.l: Likewise. + + * src/octave.cc (parse_and_execute): Reset parser before starting + new parse. + + * src/tree-plot.cc (various): Check error_state in many more + places, and issue more meaningful error messages. + + * src/tree-const.cc (maybe_resize): Don't call + jump_to_top_level() on errors. + (tree_constant_rep (Range)): Likewise. + + * src/g-builtins.cc (builtin_error): Use error(), not + print_if_string() to print error messages. + * src/tree-const.cc (print_if_string): Delete unused function. + + * src/tc-assign.cc (various): Check error_state after calls to + maybe_resize(). + + * src/tc-index.cc (various): Always check the state of idx_vectors + after trying to create them. + * src/tc-assign.cc (various): Likewise. + + * src/idx-vector.cc: Use 0, not NULL. + Don't include stdlib.h. + (initialized): New data member, set nonzero if the idx_vector has + been properly initialized. + Never call jump_to_top_level () if initialization fails. + Add operator void *(), so we can test the state of an idx_vector + with `if (vector)'. + + * src/pager.cc: Explicitly initialize pager_buf to NULL. + + * src/tree-base.h: Move includes ahead of other definitions. + + * liboctave/NLEqn.cc (NLEqn::NLEqn (const Vector&, const NLFunc)): + Initialize n from xvec, not x. + +Mon Oct 25 18:01:12 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/user-prefs.cc (sv_info_file): New function. + * src/user-prefs.h (user_pref): Add info_file to the list. + * src/t-builtins.cc (try_info): Use it instead of + DEFAULT_INFO_FILE. + + * src/utils.cc (default_info_file): New function. + (octave_info_dir): Likewise. + + * src/defaults.h.in (DEFAULT_INFO_FILE): Delete unnecessary + definition since we figure out what it should be in utils.cc now. + * src/Makefile.in (defaults.h): Don't substitute DEFAULT_INFO_FILE. + * src/Makeconf.in (DEFAULT_INFO_FILE): Delete definition. + + * src/octave.cc (info_file): New global variable. + (initialize_globals): Call default_info_file () to initialize it. + (--info-file): New command line option. + + * src/builtins.cc (string_variables): Add INFO_FILE to the list. + (install_builtins): Define it. + + * info/filesys.c (compress_suffixes): Choose gunzip for .gz files. + +Sat Oct 23 17:46:09 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.77 released. + + * src/Makefile.in (INCFLAGS): Don't include info or dld + directories. + * dynamic-ld.cc: Include dld/dld.h, not just dld.h. + * t-buitlins.cc: Include info/info.h, info/dribble.h, and + info/terminal.h, not just info.h, dribble.h, and terminal.h. + + * src/t-builtins.cc (builtin_help): New option, -i, for invoking + info browser. If -i is not given, just do what we used to do, but + point to help -i as a way to get additional information. + + * builtins.cc (print_usage): New function. + + * g-builtins.cc (all builtins): Call print_usage to get usage message. + * t-builtins.cc (all builtins): Likewise. + +Fri Oct 22 15:56:16 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * Cholesky changes from R. Bruce Tenison (btenison@eng.auburn.edu): + + * src/f-chol.cc, src/f-chol.h: New files for the Cholesky + Factorization. + * src/Makefile.in (SOURCES, OBJECTS, DLD_OBJECTS): Add to lists. + * src/g-builtins.cc (builtin_chol): New function. + * src/g-builtins.h: Declare it. + + * liboctave/Matrix-ext.cc (CHOL, ComplexCHOL): New classes. + + * libcruft/lapack: dpotrf.f, zpotrf.f, dpotf2.f, zpotf2.f: New + files. + + * libcruft/blas: dsyrk.f, zherk.f: New files. + +Fri Oct 22 14:04:16 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc (builtin_schur): Fourth arg for DLD_BUILTIN is + schur, not hess. + + * scripts/dare.m: Correct usage of fprintf. + + * src/utils.cc (raw_mode): Only complain about stdin not a tty if + interactive or forced interactive. + +Thu Oct 21 17:00:57 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/builtins.cc (install_builtins): Try harder to make + initialization of NaN work. Make note about possible fixes if it + still doesn't work. + + * src/utils.cc (raw_mode): [HAVE_TERMIOS_H] and [HAVE_TERMIO_H] + Don't set TAB3 since it doesn't seem necessary and some systems + don't have it by this name. + [HAVE_SGTTY_H] To be consistent, don't set XTABS here either. + + * src/error.c (error): Call flush_output_to_pager before printing + error message. + (panic): Likewise, before aborting. + + * src/symtab.cc (symbol_record::undefine): Delete unused function. + (symbol_table::undefine): Likewise. + + * src/symtab.cc (clear): Never delete symbol records from the + table. Only delete the definitions. This makes clear and + undefine equivalent, so we don't need them + * src/tree.cc (tree_function::eval): Call symbol_table::clear, not + symbol_table::undefine. + + * src/t-builtins.cc (builtin_clear): Only clear global symbols if + we are at the top level. + * src/parse.y (CLEAR): Delete token. + (word_list_command): Remove code to handle CLEAR as special case. + (expect): Only 19 now. + * src/lex.l (handle_identifier): Remove special code for clear. + It's ok to use it in a function body now. + + * src/t-builtins.cc: Include extern "C" declarations for Info stuff. + (builtin_help): If given an argument, try to get help directly + from info file first. If that fails, do as before. + (help_syms_list): New function: + (simple_help): New function. + (try_info): New function. + (help_from_list): New function. + + * src/defaults.h.in (DEFAULT_INFO_FILE): Define new macro. + * Makeconf.in: Set value of DEFAULT_INFO_FILE. + * Makeconf.in (INSTALL_PROGRAM): Add definition. + * Makefile.in (SUBDIRS): Add info directory. + (info): New target. + * configure.in: Add autoconf macros to handle info configuration. + + * info/Makefile.in: Major changes to make it work with Octave's + Makeconf file, etc. The default action is now to build a + libinfo.a file. + + * info/error.c: New file. Move error functions here from info.c. + + * info/signals.c (clear_info_signal_handler): New function, useful + if info is used directly in another program. + + * info/termdep.h: Handle termios too. + * info/terminal.c (terminal_prep_terminal): Handle termios. + * (terminal_unprep_terminal): Likewise + + * info/session.c (initialize_info_session): Add arg to make + clearing the screen conditional. Useful if we want to call + index_entry_exists() first before displaying anything. + Change all callers. + + * info/session.c (finish_info_session): New function. + + * info/session.c (dispatch_error): Change message to include info + about how to get help and how to quit. + + * info/info.c (index_search_p): New flag. + (--index-search): New option, like apropos, but search the indices + and display the first node found. + + * info/indices.c (do_info_index_search): New function, modified + from info_index_search to allow searching the index for a string + without prompting for it. + (info_index_search): Just call do_info_index_search. + (index_entry_exists): New function, to allow us to find out if + there is an index entry for a given string without actually + displaying anything. + + * info: New directory, containing source for GNU info browser. + +Tue Oct 19 00:14:33 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/octave-hist.cc (input_from_tmp_history_file): New global flag. + (do_edit_history): Protect and set it. + (do_run_history): Likewise. + * src/parse.y (func_def2): Use it to see that input is coming from + a temporary file. This means that we shouldn't exit when we're + done reading it, and we should treat it just as if the input were + coming from the keyboard. + + * variables.cc (force_global): Force aliasing so it will happen + even if the symbol record is undefined. + + * src/lex.l (lookup_identifier): Simplify + + * src/lex.l (reset_parser): Reset error_state here. + * src/octave.cc (main): Not here. + +Mon Oct 18 14:27:02 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-const.cc: Delete constructor for tree_constant from + String. + + * In src: tree.h, mappers.h, unwind-prot.h, parse.h, file-io.h, + arith-ops.h, tree-base.h, tree-const.h, g-builtins.h, + idx-vector.h, builtins.h, dynamic-ld.h, xdiv.h, xpow.h, + pr-output.h, input.h, symtab.h, utils.h: Avoid including files + unnecessarily. + + * In src: tc-inlines.cc, mappers.cc, variables.cc, arith-ops.cc, + tree.cc, tree-const.cc, g-builtins.cc, file-io.cc, idx-vector.cc, + tc-assign.cc, tc-index.cc, builtins.cc, dynamic-ld.cc, xdiv.cc, + xpow.cc, pr-output.cc, tc-extras.cc, input.cc, symtab.cc, + utils.cc: Sprinkle liberally with const. + + * In src: f-syl.cc, f-svd.cc, f-schur.cc, f-rand.cc, f-qzval.cc, + f-quad.cc, f-qr.cc, f-qpsol.cc, f-npsol.cc, f-lu.cc, + f-lsode.cc, f-lpsolve.cc, f-inv.cc, f-ifft.cc, f-hess.cc, + f-givens.cc, f-fsqp.cc, f-fsolve.cc, f-fft.cc, f-expm.cc, + f-eig.cc, f-det.cc, f-dassl.cc, f-colloc.cc, f-balance.cc: + Add const qualifier to tree-constant arg. + +Sat Oct 16 12:22:24 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-const.h, src/tree-const.cc: Add const qualifier to + constructor arguments passed by reference. + Pass Complex arguments by const reference instead of by value. + + * liboctave/Matrix.h, liboctave/Matrix.cc, liboctave/ColVector.cc, + liboctave/RowVector.cc liboctave/DiagMatrix.cc: Pass Complex + arguments by const reference instead of by value. + +Wed Oct 13 14:13:29 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc (decode_prompt_string): ctime returns time_t, which + might not be a long. + + * src/variables.cc (identifier_exists): Only return non-zero if + the name has a definition. + + * src/f-npsol.cc (npsol): Call error(), not message(), to print + error messages. + (linear_constraints_ok): Likewise. + (nonlinear_constraints_ok): Likewise. + + * src/f-qpsol.cc (qpsol): Don't try to create the linear + constraint object before checking array sizes. Wouldn't exception + handling be nice? + Call error(), not message(), to print error messages. + Check to ensure that the bounds on linear constraints are + vectors. + + * src/lex.l (lookup_identifier): Don't bind global variables + immediately in loops or conditionals, even at the top level. + +Sun Oct 10 8:48:00 1993 John Eaton (jwe@schoch.che.utexas.edu) + + * README.doc: New file. + * Makefile.in (doc-dist): New target. + * doc/Makefile.in (FORMATTED): New macro. + (doc-dist): New target. + + * src/tree.cc (tree_identifier::eval): Don't print anything if an + error is encountered. + (tree_simple_assignment_expression::eval): Likewise. + + * src/tc-assign.cc (do_matrix_assignment): Handle resizing + correctly when indices are (:,range), (:,matrix), (range,:), or + (matrix,:) and the lhs is empty or undefined. + +Tue Oct 5 04:02:37 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.76 released. + + * src/octave.cc (main): Print usage message if we are given more + than one extra argument on the command line. + Delay printing startup message until just before setting the toplevel + jump context. + + * src/lex.h (DO_COMMA_INSERT_CHECK): Delete unused macro. + + * src/lex.l (handle_identifier): New function. + ({IDENT}/{S}*=, {IDENT}{S}*): Use it instead of duplicating code. + (do_comma_insert_check): Use yyunput instad of returning original + character count. + Call directly instead of using DO_COMMA_INSERT_CHECK macro. + +Mon Oct 4 08:06:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.75.4. + + * src/tree-const.cc (tree_constant_rep::eval ()): Avoid calling + rows() and columns() for things like magic_colon. + +Sun Oct 3 19:39:33 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + Changes to add line and column info to run-time error messages: + + * src/tree.cc (tree_identifier, tree_prefix_expression, + tree_postfix_expression, tree_simple_assignment_expression, + tree_multi_assignment_expression, tree_colon_expression, + tree_index_expression): Modify constructors to allow line and + column information to be stored. + (abort_on_undefined): Delete (now) unnecessary static variable. + (all eval() functions): If error_state, return immediately. + (tree_matrix::eval ()): Call error and return tree_constant() + instead of jumping to top level on error. + (tree_identifier::parse_m_file ()): When starting to read an + M-file, initialize current_input_column to 1, not 0. + (tree_identifier::eval_undefined_error ()): Improve error message + with line and column info if it is available. Don't abort to top + level on errors. + (tree_function::traceback_error ()): New function. + (tree_function::eval ()): Don't jump to top level on errors. + Call traceback_error if there is an error evaluating the command + list. + + * src/tree.cc (tree_prefix_expression::eval_error ()): New function. + (tree_postfix_expression::eval_error ()): Ditto. + (tree_unary_expression::eval_error ()): Ditto. + (tree_binary_expression::eval_error ()): Ditto. + (tree_simple_assignment_expression::eval_error ()): Ditto. + (tree_multi_assignment_expression::eval_error ()): Ditto. + (tree_colon_expression::eval_error ()): Ditto. + (tree_index_expression::eval_error ()): Ditto. + + * src/tree.cc (tree_function::stash_function_name ()): New function. + * src/parse.y (FCN): Use it. + + * src/lex.l: Return line and column info for many (but not all) + tokens. + + * src/parse.y: Handle token values with the token class defined in + token.cc. + (check_end ()): New function. + (end_error ()): Improve error messages by including line and + column info. + + * src/arith-ops.cc (lots of functions): Don't jump to top level on + errors. + * src/tree.cc (tree_unary_expression::eval ()), + tree_binary_expression::eval ()): Handle error condition here. + + * src/gripes.cc (gripe_nonconformant): Add additional form of this + function to allow message to include dimensions. Change most + callers to use new form + + * src/octave.cc: Initialize column counter to 1, not 0. + (main): Reset error_state before evaluating each top level + command. + + * src/tree-plot.cc (tree_plot_command::eval ()): If error_state, + return immediately. + + * src/tree-const.cc (do_binary_op ()): Return tree_constant() instead + of jumping to top level on errors. + (do_unary_op): Likewise. + (tree_constant_rep::eval ()): If error_state, return immediately. + Convert 1x1 matrices to scalars. + + * src/tc-assign.cc (tree_constant_rep::do_scalar_assignment ()): + Don't jump to top level on error. + If there is an error while attempting to convert an undefined + variable to a matrix, don't suddenly create an empty matrix. + (tree_constant_rep::fortran_style_matrix_assignment ()): Check + return value of range_max_check() and don't jumpt to top level on + errors. + (tree_constant_rep::vector_assignment ()): Check return value of + index_check and don't jump to top level on errors. + (tree_constant_rep::check_vector_assign ()): Don't jump to top + level on errors. + (tree_constant_rep::do_matrix_assignment ()): Check return value + of index_check and don't jump to top level on errors. + + * src/tc-extras.cc (get_dimensions ()): Call error (sets error state) + but don't jump to top level on errors. + (fill_matrix): Return tree_constant() on error. + (identity_matrix): Likewise. + + * src/error.cc (error_state): New global variable, initialize to zero. + (error): Set it to one. + + * src/tc-index.cc (tree_constant_rep::valid_as_scalar_index ()): + Don't declare unused variable retval. + (tree_constant_rep::do_scalar_index ()): Return tree_constant() + instead of jumping to top level on error. + (tree_constant_rep::fortran_style_matrix_index): Don't jump to top + level on indexing or range errors. + (tree_constant_rep::do_vector_index ()): Likewise. + (tree_constant_rep::do_matrix_index ()): Likewise. + + * src/tc-inlines (range_max_check): Return -1 instead of jumping + to top level on error. + (index_check): Likewise. + + * src/utils.cc (check_dimensions): Call error, not warning, and + don't jump to top level. + + * src/tree-base.h (line_num, column_num): New data members for all + tree classes. + (line (), column ()): New virtual functions to access line and + column info. + + * src/lex.l (enum end_tok_type, enum plot_tok_type): Delete + declarations (now in token.h). + + * src/lex.h (YY_INPUT, YY_FATAL_ERROR, DO_COMMA_INSERT_CHECK, + TOK_RETURN, BIN_OP_RETURN): Move macro definition here, from + lex.l. Rename RETURN TOK_RETURN. + + * src/token.cc, token.h: New files that define a class for tokens + that includes line and column information. + +Wed Sep 29 11:15:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/octave.cc: Use GNU getopt to handle option parsing. + * src/getopt.h src/getopt.c src/getopt1.c: New files for GNU + getopt. + * src/Makefile.in: Add them to the appropriate lists. + + * src/utils.cc (raw_mode): Use the termios.h terminal driver + interface if it is available. + * configure.in: Check for termios.h + + * src/tree-plot.cc (tree_subplot_list::print (int, ostrstream&)): + If the data to be plotted is a string but it doesn't name a file, + try sending it to gnuplot directly. + +Tue Sep 28 16:06:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/QPSOL.cc (QPSOL::minimize (double&, int&, Vector&)): + Correct dimensions of work arrays, based on QPSOL source. + Pass ncon, which is max (1, nclin), not n, as the row dimension of + clin. + + * src/f-npsol.cc (linear_constraints_ok): Improve warning for the + case of constraints with zero dimensions. + (nonlinear_constraints_ok): Likewise. + +Mon Sep 27 01:20:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.75.3. + + * Makefile.in (dist): Make file permissions for distribution rw. + (binary-dist): Ditto. + (local-dist): Ditto. + +Sat Sep 25 15:29:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/pr-output.cc: Include stdio.h, for sprintf. + + * src/input.cc (octave_gets): Set octave_gets_line to NULL after + freeing it. + + * Version 0.75.2. + + * liboctave/Matrix.cc (Matrix::operator * (const ColumnVector&): + Correct dimension of return value. + (ComplexMatrix::operator * (const ComplexColumnVector&)): Ditto. + +Tue Sep 21 20:42:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/tree.cc (tree_identifier::assign (tree_constant&)): + Correctly handle case of hiding a function with a variable when + the variable has not been flagged as global. + tree_identifier::assign (tree_constant&, tree_constant*, int)): + Likewise. + + * src/variables.cc (force_global): When a variable is moved to the + global symbol table, mark it as global. + + * src/symtab.cc (symbol_record::symbol_record ()): Initialize + forced_global. + (symbol_record::clear_visible ()): Reset forced_global to zero. + (symbol_record::clear_all ()): Ditto. + (symbol_record::mark_as_forced_global ()): New function. + (symbol_record::is_forced_global ()): New function. + (symbol_record::alias ()): Also copy forced_global attribute. + + * src/symtab.h (symbol_record::forced_global): New private data + member, used to record when a variable has been explicitly + declared global. + + * src/lex.l (lookup_identifier): Look in current scope first. + +Mon Sep 20 03:15:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/parse.y, src/tree.cc, src/tree.h: Allow `for' command to + assign to an index expression, not just an identifier. + + * src/t-builtins.cc (builtin_clear (int, char **)): Don't delete + g_names twice. + + * src/symtab.cc (symbol_table::list (int&)): Make sure count is + initialized to zero. + (symbol_table::var_list (int&)): Ditto. + (symbol_table::fcn_list (int&)): Ditto. + +Sat Sep 18 04:06:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/lex.l, src/parse.y, src/parse.h: Use new global variable + past_plot_range to make gplot and gsplot smarter about + distinguishing plot ranges and literal matrices. + +Fri Sep 17 01:06:30 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.75.1 released. + + * src/f-qzval.cc: Include <float.h> for DBL_EPSILON. + + * src/symtab.cc (symbol_record::save (ostream&, int)): Don't print + a warning for ans being undefined. Call warning to print the + message, and change the text to make it clearer. + (symbol_table::save (ostream&, int)): Don't crash if there aren't + any symbols to save. + +Thu Sep 16 00:21:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/t-builtins.cc (builtin_help): When trying harder to find + help for M-files, only insert the symbol into the global symbol + table if there really is an M-file of the given name in the path. + +Wed Sep 15 02:08:27 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.75. + + * src/Makefile.in (INCLUDES): Distribute defaults.h + (%.d: %.cc): Don't fail if we can't determine dependencies. + (DISTFILES): Include move-if-change. + +Tue Sep 14 21:23:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * scripts/perror.m: Use err, not info for fsolve section. + +Mon Sep 13 19:29:26 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/utils.cc (get_m_file_names): Call closedir(), not free(), to + dispose of directory structure. + +Sun Sep 12 19:07:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-const.cc (tree_constant_rep::double_value): Rearrange + to avoid warning about reaching end of non-void function. + (tree_constant_rep::matrix_value): Ditto. + + * src/error.cc (panic): Declare volatile. + * src/utils.cc (jump_to_top_level): Declare as `void volatile', + not `volatile void'. + + * src/tree-const.cc (tree_constant_rep::complex_matrix_value): + Make it work even if the internal representation is really a real + or complex scalar or a real matrix. + (tree_constant_rep::complex_scalar_value): Make it work even if + the internal representation is really a real scalar. + + * src/f-syl.cc (syl): Delete ComplexMatrixLoad(). + Use complex_matrix_value(), not ComplexMatrixLoad(). + + * src/tree-const.cc (vector_of_empties): Renamed from empty_tree, + moved from f-syl.cc. + + * src/f-syl.cc (syl): Call vector_of_empties() instead of empty_tree(). + * src/f-qzval.cc (qzvalue): Ditto. + + * src/tree-const.h (tree_constant::is_empty): New inline function. + + * src/f-syl.cc (syl): Call is_empty instead of empty_arg. + * src/f-qzval.cc (qzvalue): Ditto. + * src/f-expm.cc (matrix_exp): Ditto. + +Thu Sep 9 22:40:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/Matrix.cc (Matrix::transpose): Make it work for empty + matrices. + (ComplexMatrix::transpose): Ditto. + +Mon Sep 6 04:56:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/tree-plot.cc (tree_subplot_list::print): If the plot data + is a string and it names a file, plot the data in the file. + + * src/octave.cc (execute_startup_files): Try harder to avoid + executing $HOME/.octaverc twice. + + * liboctave/DAE.cc (DAE::integrate (Vector&, Matrix&, Vector&)): + Add missing parameter in call to integrate() if no critical points + are specified. + +Sat Sep 4 16:18:49 1993 John W. Eaton (jwe@ward.che.utexas.edu) + + * src/octave.cc (execute_startup_files): Don't execute + $HOME/.octaverc twice. + +Mon Aug 30 11:25:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/t-builtins.cc (builtin_clear): Handle regular expressions. + +Fri Aug 27 07:25:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/RowVector.cc: + (RowVector::operator * (const ColumnVector& a) const): Fix brain-o. + +Wed Aug 18 00:29:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * list_primes.m: New M-file. + + * src/tc-index.cc (do_scalar_index): Handle two vector args of all + ones. + +Tue Aug 17 06:26:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/file-io.cc (process_printf_format): Use NINT for * modifier + argument. + +Mon Aug 16 19:30:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/mappers.cc: (arg (double)): Return pi for negative real values. + +Sun Aug 15 05:08:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/octave-hist.cc (mk_tmp_hist_file): New function, extracted + from do_edit_history. + (do_edit_history): Simplify using mk_tmp_hist_file. + (do_run_history): New function. + (edit_history_repl_hist): New function. + + * src/t-builtins.cc (builtin_run_history): New function. + + * src/builtins.cc (text_functions): Add run_history to the list. + +Fri Aug 13 16:04:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tzero.m: New M-file. + * abcdchk.m: New M-file. + * is_symmetric.m: Use tol and norm (A) to decide if A' is close + enough to A to be considered the same. + +Wed Aug 11 15:50:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.74.1. + + Merge in expm changes from A. S. Hodel <scotte@eng.auburn.edu>: + + * f-expm.{h,cc}: New files. + * src/Makefile.in: Include them in the usual places. + * src/g-builtins.cc (builtin_expm): The new matrix_exp returns a + tree_constant by value. + Include f-expm.h + * src/tc-extras.cc (matrix_exp): Delete function. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + Merge in qzval changes from A. S. Hodel <scotte@eng.auburn.edu>: + + * f-qzval.{h,cc}: New files. + * src/Makefile.in: Include them in the usual places. + * src/g-builtins.cc (builtin_qzval): New function. + Include f-qzval.h + * src/g-builtins.h: Declare builtin_qzval. + * src/builtins.cc (general_functions): Add qzval to the list. + + * libcruft/eispack: New directory. + * libcruft/Makefile.in (SUBDIRS): Include it. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Add libcruft/balgen/Makefile and + libcruft/eispack/Makefile to the list of files to frob. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + Merge in syl changes from A. S. Hodel <scotte@eng.auburn.edu>: + + * lyap.m: New M-file. + + * f-syl.{h,cc}: New files. + * src/Makefile.in: Include them in the usual places. + * src/g-builtins.cc (builtin_syl): New function. + Include f-syl.h + * src/g-builtins.h: Declare builtin_syl. + * src/builtins.cc (general_functions): Add syl to the list. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/g-builtins.cc (builtin_balance): Fix typo in doc string. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + Merge in givens changes from A. S. Hodel <scotte@eng.auburn.edu>: + + * f-givens.{h,cc}: New files. + * src/Makefile.in: Include them in the usual places. + * src/g-builtins.cc (builtin_givens): New function. + Include f-givens.h + * src/g-builtins.h: Declare builtin_givens. + * src/builtins.cc (general_functions): Add givens to the list. + + * src/Makefile.in: (defaults.h) Quote substitutions. + Use %foo%, not @foo@ to mark substitution. + * src/defaults.h.in: Use %foo%, no @foo@ to do mark things to + substitute. + + * qzhess.m: New M-file. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + Merge in balance changes from A. S. Hodel <scotte@eng.auburn.edu>: + + * are, is_controllable.m, is_observable.m, is_square.m, + is_symmetric.m: New M-files. + + * Matrix.h (AEPBALANCE): New class. + (ComplexAEPBALANCE): New class. + (GEPBALANCE): New class. + * Matrix-ext.cc: Add init functions for balancing classes. + + * src/f-balance.{h,cc}: New files. + * src/Makefile.in: Include them in the usual places. + * src/g-builtins.cc (builtin_balance): New function. + Include f-givens.h + * src/g-builtins.h: Declare builtin_balance. + * src/builtins.cc (general_functions): Add balance to the list. + + * libcruft/balgen: New directory. + * libcruft/Makefile.in (SUBDIRS): Include it. + +Tue Aug 10 20:06:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Use AC_HAVE_LIBRARY to check for -lm. + + * src/Makefile.in (defaults.h): Quote substitutions. + +Mon Aug 9 13:30:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * README.NLP: New file. + * Makefile.in (DISTFILES): Distribute it. + +Sun Aug 8 19:05:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/move-if-change: New file. + * src/Makefile.in (DISTFILES): Distribute it. + (defaults.h): New rule. + (utils.o): Delete rule, since extra defines are no longer needed. + (INCLUDES): Distribute defaults.h.in. + * src/utils.cc: Include defaults.h to get DEFAULT_PAGER and + OCTAVE_HOME instead of depending on having them defined by the + compile command. + + * configure.in (DEFAULT_PAGER): Use AC_PROGRAMS_CHECK. + If we find less, add `-e' flag, so users won't have to type q to + quit paging. + +Sat Aug 7 13:34:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * f-*.cc: Renamed from tc-*.cc. (Use f- as the file prefix + because most of these functions are ultimately implemented in + Fortran, and, most importantly, it keeps them grouped together.) + * f-*.h: New files, for external declarations of visible functions + defined in f-*.cc. + * g-builtins.cc: Include them all. + * tree-const.h: Don't declare these functions as friends. + * Makefile.in: Cope with new names. + + * octave.cc (parse_and_execute (char *, int)): Don't declare static. + * octave.h: Declare it extern here. + * octave-hist.cc (do_edit_history): Use it here. + + * octave-hist.cc (do_edit_history): New function. + * t-builtins.cc (builtin_edit_history): Use it. + + * t-builtins.cc, t-builtins.h, builtins.cc: Rename edit to + edit_history. + + * octave-hist.cc (do_history): Print line numbers by default. + Allow quieter output with -q option. + + * g-builtins.cc (builtin_hess): Use DLD_BUILTIN macro to call hess. + * g-builtins.cc (builtin_schur): Likewise + + * tc-hess.cc (builtin_hess_2): Call hess with corrrect args. + * tc-schur.cc (builtin_schur_2): Likewise, for schur dude :-). + + * tc-fsqp.cc (builtin_fsqp_2): Fix typo. + +Thu Aug 5 23:14:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * input.cc (octave_read): Ensure that the last character in the + buffer is a new line. + +Wed Aug 4 19:25:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y (func_def2): Also warn if we encounter a function + definition with the same name as the script file we are reading. + + * tree.cc (tree_identifier::do_lookup): Always return NULL_TREE if + a script file was executed. + +Tue Aug 3 23:25:45 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * file-io.cc: Delete useless static keyword from File_info class + declaration. + * unwind-prot.cc: Likewise, for unwind_elem and saved_variable + classes. + * tc-rand.cc: Likewise, for enum rand_dist declaration. + * arith-ops.cc: Likewise, for enum Matrix_bool_op declaration. + * tree.cc: Likewise, for struct const_matrix_list declaration. + +Fri Jul 23 01:40:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * sysdep.cc (malloc_handler): Add missing arg to call to message(). + +Tue Jul 20 04:09:32 1993 John W. Eaton (jwe@june.che.utexas.edu) + + * Version 0.74 released. + + * doinstall.sh (version): Run `./octave -v' to get the version + number instead of grabbing it from version.h. + * Fail if we can't get a version number. + * Install ./octave, not src/octave. + + * Makefile.in (binary-dist): Don't depend on all. + * Link src/octave to ./octave. (Now that there's no source in + binary distributions, why have a src directory?) + + * file-io.cc (process_scanf_format): Rename local variable `i' to + `chars_from_fmt_str'. + * (process_printf_format): Likewise. + + * sighandlers.cc (can_interrupt): New global variable. + * (sigint_handler): Use it to decide whether to jump to top level. + * octave.cc (main): Set it after calling setjmp. + + * octave.cc (main): Declare saved_sigint_handler to be volatile. + + * tree.cc, tree-plot.cc, t-builtins.cc, pager.cc, g-builtins.cc, + file-io.cc: Terminate strstream strings with ends instead of just + using '\0'. + + * file-io.cc (process_scanf_format): Skip leading white space for + %s conversions. + * (fopen_file_for_user): Pass tree_constant arg by reference. + * (do_scanf): If doing fprintf, don't fail if first arg is a + string. + +Mon Jul 19 16:00:22 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (pstrcmp): Declare to take char** args, not char*. + +Sun Jul 18 13:02:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * file-io.cc (return_valid_file): Pass arg by reference. + + * file-io.cc (fclose_internal, fgets_internal, fseek_internal): + Eliminate unnecessary casts to double. + + * file-io.cc (return_valid_file, fgets_internal, fopen_internal, + do_printf, do_scanf): Use is_string_type instead of doing the + comparison ourselves. + * g-builtins.cc (builtin_exist, builtin_getenv, + builtin_shell_command): Ditto. + * tc-colloc.cc (collocation_weights): Ditto. + * tc-extras.cc (eval_string, get_user_input): Ditto. + * tc-rand.cc (rand_internal): Ditto. + * tree-plot.cc (tree_subplot_list::print): Ditto. + * variables.cc (is_valid_function, octave_string_variable): Ditto. + +Thu Jul 15 02:29:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * doc/Makefile.in (TEXINFO): Distribute texinfo.tex too. + + * t-builtins.cc (load_variable): Warn if replacing local symbol + with global from file. + * Warn if variable is not marked as global in a file, but already + exists as a global symbol, then go ahead and load it as a global. + +Tue Jul 13 01:47:48 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (lookup_identifier): Never alias to global here. + * tree.cc (do_lookup): Don't alias formal parameters to global. + * variables.cc (force_global): Likewise. + * symtab.cc (symbol_table::bind_globals): Likewise. + + * symtab.h (symbol_record::formal_param): New field. + * symtab.cc (symbol_record::mark_as_global_parameter): New function. + * (symbol_record::is_formal_parameter): Ditto. + * tree.cc (tree_identifier::mark_as_formal_parameter): Ditto. + * (tree_parameter_list::mark_as_formal_parameters): Ditto. + * parse.y (param_list): Use it to tag formal parameters. + * (func_def1): Ditto. + + * arith-ops.cc (DIVIDE_BY_ZERO_ERROR): On IEEE machines, allow + divide by zero errors to be suppressed. + * user-prefs.h (warn_divide_by_zero): New user preference. + * user-prefs.cc (warn_divide_by_zero): New function. + * builtins.cc (builtin_string_variables): Install it with default + value of true. + + * tree.cc (tree_multi_assignemnt_expression): Use tree_return_list + instead of tree_param_list. + * (tree_multi_assignment_expression:eval): Make it work. + + * tree.cc (tree_return_list): New class. Allow index expressions + and identifiers in return lists. + * (tree_matrix::to_return_list): Rename from to_param_list. + * parse.y (expression): Use it. + + * parse.y: Increment and decrement maybe_screwed_again instead of + just setting it to zero or one. + +Mon Jul 12 03:23:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-assign.cc (tree_constant_rep::do_matrix_assignment): Handle + case of lhs being of unknown type. + + * lex.l (check_for_garbage_after_fcn_def): Also ignore trailing + commas and semicolons. + +Sun Jul 11 00:08:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.73.1 released. + + * symtab.cc (symbol_record::alias): Also copy pointer to sv_fcn. + +Sat Jul 10 14:34:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_function::eval (int, char **, int): New function. + + * symtab.cc (symbol_table::bind_globals): New function. + * tree.cc (tree_function::eval): Use it to associate local symbols + with global data. + + * symtab.cc (alias): Add optional parameter `force'. + + * Version 0.73 released. + + * pr-output.cc: Use D_NINT instead of NINT in some cases to avoid + overflow problems on systems that don't have IEEE Inf. + * mappers.cc (round): Likewise. Also avoids conversion of Inf to + INT_MAX on systems that do have IEEE Inf. + + * builtins.h: Remove definition of NINT. + * tree.h: Likewise. + * tree-const.h: Likewise. + + * utils.cc (NINT): Move function here and improve handling of + extreme values. + * (D_NINT): New function. + + * scripts/isempty.m: Don't require the number of rows and columns + to both be zero. + +Thu Jul 8 16:25:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.72.2. + + * configure.in: Do a better job of grabbing the last argument as + the target_host_type and avoiding setting it to things like + --prefix=/foo/bar + + * tree-const.cc (tree_constant_rep::save): Add default case for + mark_as_global switch to avoid warnings from gcc. + + * variables.cc (force_global): Cope with symbol table changes. + * tree.cc: (tree_identifier::do_lookup): Likewise. + * lex.l (lookup_identifier): Likewise. + * builtins.cc (install_builtins): Likewise. + + * symtab.cc, symtab.h: Massive internal rewrite. + +Wed Jul 7 02:18:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-assign.cc (tree_constant_rep::do_scalar_assignment): If rhs + is a scalar type, also handle case of lhs being of unknown type. + * Be sure to set the new type of the lhs. + + * tree-base.h: Don't include symtab.h. + * tree-const.h: Ditto. + +Tue Jul 6 22:47:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y (func_def2): Remove the function name from the top-level + symbol table if defining on command line (an M-file would never be + parsed if there was already an entry with the same name in the top + level symbol table). + + * parse.y (word_list_command): Allow clear without any arguments. + * tree.cc (word_list_command::eval): Handle word list commands + with no arguments. + +Mon Jul 5 14:43:30 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.72.1. + + * help.cc (operators): Document the double quote character. + + * lex.l (getting_help): Delete unused variable. + * (HELP_FCN): New exclusive start state. + * ({IDENT}{S}*): Set start state to HELP_FCN instead of setting + getting_help. + * ({IDENT}/{S}*=): Likewise. + + * symtab.cc (symbol_table::load): Delete unused function. + + * tree-const.cc (tree_constant::load): Return flag telling whether + the constant is global. + * t-builtins.cc (builtin_load): Handle global variables. + * (builtin_save): Likewise. + + * symtab.cc (symbol_record::save): Don't save builtin variables + (variables marked as eternal are assumed to be builtin). + + * symtab.cc (symbol_record::mark_from_global): New function. + * (symbol_def::undefine): Add optional argument to prevent + deleting symbol's definition. + * (symbol_table::undefine): If this variable has been marked as + defined from a global, call symbol_def::undefine with arg = 1. + * tree.cc (tree_identifier::do_lookup): If a local symbol is + defined from a global, mark it as such. + + * symtab.cc (symbol_record::define (symbol_record*)): Delete + unused function. + + * tree.cc (tree_identifier::do_lookup (int&)): Use operator= + instead of symbol_record::define(). + * variables.cc (force_global (char*)): Likewise. + +Sun Jul 4 01:27:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (symbol_record): Define copy constructor and operator=. + + * builtins.cc (install_builtins): Make `i' and `j' read-only + functions. + + * symtab.cc (symbol_record::define): Respect read-only status of + variables and functions. + +Sat Jul 3 19:11:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * user-prefs.h (print_empty_dimensions): New user preference variable. + * user-prefs.cc (print_empty_dimensions): New function. + * builtins.cc (print_empty_dimesions): Make default value true. + * tree-const.cc (tree_constant_rep::eval): Use value here. + + * cond.m: Handle empty matrices. + * tc-det.m (determinant): Likewise. + * tc-inv.m (inverse): Likewise. + + * tc-hess.cc (hess): Use gripe_square_matrix_required instead of + calling error. + * tc-schur.cc (schur): Likewise. + + * builtins.cc (propagate_empty_matrices): Change default value to + true. + + * tree-const.cc (tree_constant_rep::eval): If a matrix has zero + rows or columns, also print the dimension along with the `[]' + symbol. + + * tree-const.cc (do_binary_op): If ok to propagate empty matrices, + go ahead and do the binary operation so that the result will have + consistent dimensions. + * (do_unary_op): Likewyse. + + * tc-extras.cc (get_dimensions): Don't force both nr and nc to + zero if one is. + * Matrix.cc, DiagMatrix.cc, ColVector.cc, RowVector.cc: Handle + matrices with zero dimensions in a more consistent fashion. + +Thu Jul 1 00:27:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * perror.m: New M-file. + + * LP.h, LP.cc: New interface for linear programmming. + * LPsolve.h LPsolve.cc: New files to implement linear programming + using lp_solve. + + * NPSOL.cc (minimize): Also return the vector of Lagrange + multipliers. + * tc-npsol.cc (npsol): Optionally return them. + + * QPSOL.cc (minimize): Also return the vector of Lagrange + multipliers. + * tc-qpsol.cc (qpsol): Optionally return them. + + * tc-qpsol.cc (qpsol): Make it work. + +Wed Jun 30 02:19:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_lpsolve): New function. + * (builtin_qpsol): Ditto. + * builtins.cc (general_functions): Add them to the list. + + * tc-lpsolve.cc: New file. + * tc-qpsol.cc: Ditto. + * src/Makefile.in: Add them to the list of SOURCES and DLD_OBJECTS. + +Tue Jun 29 15:02:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/DAE.cc (integrate): If stop_time_set is false, reset + default value for info[3]. + * liboctave/ODE.cc (integrate): Likewise, reset default values of + iopt and itask. + + From Thorsten Ohl <ohl@physics.harvard.edu>: + * config.guess: Add check for NeXT. + * configure.in: Add check for NeXT so that readline is configured + properly (really need to improve readline's configuration scheme). + * sysdep.cc (malloc_handler): New function for handling malloc + errors on NeXT systems. + + * octave.cc (main): Call sysdep_init before anything else. + + * sysdep.cc: New file for system dependent things. + + * octave.cc (initialize_globals): Only pass argv[0] since that's + the only thing that's used. + +Sat Jun 26 13:00:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_builtin::eval (int, char**, int)): Don't panic if + called for something other than a text_fcn. + + * t-builtins.cc (builtin_cd): Rewrite to fix bogus memory + problems. + +Fri Jun 25 15:23:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.cc (builtin_cd): Don't delete value returned by + get_working_directory. + * g-builtins.cc (builtin_pwd): Likewise, and simplify. + + * utils.cc (make_absolute): Always create a new copy to return. + * utils.cc (change_to_directory): Don't delete pointer returned + from get_working_directory(). + * (file_in_path): Likewise. + +Thu Jun 24 16:48:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l ({IDENT}{S}*): Always insert a comma if the next token + doesn't look like some sort of operator, not just if + convert_spaces_to_comma is also true (it may have been turned off + by BIN_OP_RETURN). + + * tree-const.h (matrix_ptr): Delete function. + * tc-extras.cc (frobit): Delete function. + * (get_dimensions): New function. + * (identity_matrix): Completely rewrite. + * (fill_matrix): Likewise. + +Wed Jun 23 13:50:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix-ext.cc (SCHUR::init): Also allow ord flag to be lowercase. + * (ComplexSCHUR::init): Ditto. + * tc-schur.cc (schur): Likewise. + + * Matrix-ext.cc (SCHUR::init): Declare sort as char, not char*, + and pass its address to Lapack. + * (ComplexSCHUR::init): Ditto. + + * Matrix-ext.cc (SCHUR::select_dig): Make static, and move ahead + of first reference in file. + * (SCHUR::select_ana): Likewise. + * (ComplexSCHUR::select_complex_dig): Likewise. + * (ComplexSCHUR::select_complex_ana): Likewise. + + * builtins.cc (install_builtins): Add `J' as an alias for `I'. + + * builtins.cc (install_builtins): Always create a new + tree_constant for each variable, since the symbol table doesn't + know how to share them. + + * tc-schur.cc (schur): Use warning and error functions instead of + writing directly to cerr. + * tc-hess.cc (hess): Ditto. + + * src/Makefile.in (DLD_OBJECTS): Include tc-schur.o and tc-hess.o. + * (SOURCES): Add tc-schur.cc tc-hess.cc. + + * Merge Schur and Hessenberg changes: + + Fri Mar 19 11:01:19 1993 R. Bruce Tenison (btenison@eng.auburn.edu) + + * src/builtins.cc: Changed schur definition to include one more + input. Also changed the help line description + * src/g-builtins.cc: Changed builtin_schur to accept two inputs + Also changed the information to explain ordered schur operation. + * src/tc-schur.cc Added extensions to the SCHUR and ComplexSCHUR + calls to pass extra paramater. Also added check for proper param. + * liboctave/Matrix.h: Modified declarations dgeesx and zgeesx to + accept address of select function. Modified class structures for + SCHUR and ComplexSCHUR to accept extra ordered schur param. + * liboctave/Matrix-ext.cc: Added extensions for the extra ordered + schur paramater. + + Wed Mar 17 15:23:14 1993 R. Bruce Tenison (btenison@eng.auburn.edu) + + * liboctave/Matrix-ext.cc (HESS and ComplexHESS): Added the + Hessenburg decomposition routines. + * liboctave/Matrix.h Added fortran lapack functions definitions + used in the Hessenburg procedure. + * src/g-builtins.cc (builtin_hess): Hessenburg Decomposition routine + added + * src/g-builtins.h (builtin_hess): Added extern definition. + * liboctave/Matrix.h Added classed HESS and ComplexHESS + * src/tree_const.h added defs for hess. + * src/tc-hess.cc (hess): New file for hess function. + + Tue Mar 16 10:46:32 1993 R. Bruce Tenison (btenison@eng.auburn.edu) + + * src/g-builtins.cc (builtin_schur): Schur Decomposition routine + added. + * src/g-builtins.h (builtin_schur): Added extern definition. + * liboctave/Matrix.h Added Classes SCHUR and Complex SCHUR, and + added defs for zgeesx and dgeesx (lapack schur decomp) + * liboctave/Matrix-ext.cc (SCHUR and Complex SCHUR): Ditto. + * src/tree-const.h added defs for schur. + * src/tc-schur.cc (schur): New file for schur function. + +Tue Jun 22 20:18:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (check_for_garbage_after_fcn_def): New function + * parse.y (fcn_end_or_eof): If reading from an M-file, use it to + print warning about trailing garbage after the end of a function + has been found. + +Mon Jun 21 20:21:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-assign.cc (tree_constant_rep::assign): Handle case of + assignment to unknown constant too. + * (tree_constant_rep::do_scalar_assignment): Don't fail for + unknown_constant type. + * (tree_constant_rep::do_matrix_assignment): Likewise. + + * tree-const.cc (rows): Return 0 for unknown_constant type. + * (columns): Likewise. + + * tree.cc (tree_identifier::assign): Defer defining symbol until + assignment is successful. + * When creating a new dummy tree_constant to assign a value to, + leave it an unknown_constant type. + + * tc-assign.cc (do_scalar_assignment): If the right hand side + isn't a scalar, maybe try to resize instead. + * (do_matrix_assignment): For A(:,int) and A(int,:) cases, also + resize if left hand side is a scalar. + + * norm.m: Allow "fro" to work for scalars and vectors too. + +Sun Jun 20 01:17:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * NLConst.cc: New file. Move inline function definitions here + from NLConst.h. + + * Objective.cc: New file. Move inline function definitions here + from Objective.h + + * tree.cc (tree_word_list_command::eval): Call strsave for argv[0] + too, and delete argv before returning. + * (tree_builtin::eval): Likewise, for text functions with no + arguments. + +Sat Jun 19 01:37:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (parse_and_execute): Delete calls to delete_buffer + and switch_to_buffer, since that is taken care of by unwinding the + frame. + +Fri Jun 18 00:08:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_matrix::eval): Delete useless direct = ptr->direct + and ptr = ptr->next statements from size-determining loop. + + * parse.y (opt_list): New rule. Replace all occurrences of list + with opt_list. + + * tree.cc: (tree_index_expression::eval (int, int)): Don't + complain if the index expression has an empty argument list. + + * octave.cc (initialize_globals): Check return value of + getenv ("HOME") against NULL, not the global variable + home_directory that we are trying to initialize. + + * tree.cc (tree_function::eval): Quick return if command list + is empty. + * parse.y (func_def3): Allow empty function bodies. + +Thu Jun 17 02:08:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_while_command): Add constructor for case of + expression only. + * parse.y (statement): Allow empty command list for while commands. + + * parse.y (list): Allow empty commands in more places. This ups + the shift/reduce error count by 6, to 19. + + * octave.cc (execute_startup_files): Don't delete sd. + + * octave.cc (initialize_globals): Make copies of all strings. + * Store more humorous messages if things fail. + +Tue Jun 15 11:03:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-extras.cc (get_user_input): Finish incomplete change to get + input using readline. + + * tc-extras.cc (match_sans_spaces): New function. + * (get_user_input): Use it when checking to see if the user + entered a `quit' command. + + * liboctave/Makefile.in: Don't distribute Makedeps.in or include + Makedeps since we generate dependencies automatically now. + * configure.in: Don't create liboctave/Makedeps. + +Sun Jun 13 18:31:17 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/xdiv.cc (xdiv): Solve least-squares problem if system of + equations is not square, or if it is singular. + * (xleftdiv): Likewise. + + * liboctave/Matrix.h (Matrix::lssolve): New functions for + least-squares solutions of linear systems. + * (ComplexMatrix::lssove): Ditto. + +Sat Jun 12 19:07:07 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * libcruft/misc/xstopx.f (xstopx): Call dostop, not do_stop. + * libcruft/misc/dostop.c: Rename from do_stop.c + * (dostop): Likewise. + + * src/mappers.cc (xisnan (double)): Define even for systems that + don't have xisnan by always returning false. + * (xisnan (const Complex&)): Likewise. + +Fri Jun 11 19:54:58 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * doc/Makefile.in (install): Try harder to install info files. + + * libcruft/Makefile.in (install): Run ranlib on installed library. + * liboctave/Makefile.in (install): Ditto. + * readline/Makefile.in (install): Ditto. + +Thu Jun 10 00:15:41 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.72 released. + + * libcruft/*/*.f: Don't call xstopx with '' since some Fortran + compilers object to zero-length strings. + * libcruft/misc/xstopx.f (xstopx): Don't print empty strings or + single blanks. + * libcruft/misc/gen-d1mach.c (main): Likewise, for generated code. + + * test/Makefile.in (check): Set the Tcl variable OCTAVE_PATH. + * test/config/unix-octave.exp: Pass OCTAVE_PATH to OCTAVE using + the new -p flag. + + * builtins.cc (install_builtins): Use load_path instead of calling + default_path(). + + * octave.cc (load_path): New global variable. + * (initialize_globals): Initialize it here by calling default_path(). + * (main): Call initialize_globals() before getting command line + arguments. + * Accept new argument, -p PATH. + + * octave.cc (clean_up_and_exit): Don't print a message when Octave + exits. + + * doinstall.sh: Install M-files in $(libsubdir), not $(libdir). + * Use mkpath to create directories. + * Extract version from version.h. + + * Makeconf.in (version): Compute version just once. + + * (libsubdir): New directory that includes version number, for + installing M-files in (old versions of Octave may not be able to + understand new M-files). + + * src/Makefile.in, libcruft/Makefile.in, liboctave/Makefile.in, + doc/Makefile.in, readline/Makefile.in, scripts/Makefile.in + (install): Use mkpath to create directories. + * scripts/Makefile.in (install): Install M-files in $(libsubdir), + not $(libdir). + + * mkpath.c: New file, from Emacs-19. + * Makefile.in (mkpath): New rule. + * (all): Depend on mkpath + * (binary-dist): Distribute it. + + * config.guess: Update from bothner@cygnus.com. + + * lex.l (<STRING>{QSTR}*[\n\']): Set start state to 0 or MATRIX, + depending on value of braceflag. + * (<DQSTRING>{DQSTR}*[\n\"]): Ditto. + + * tree.cc (tree_matrix::eval): Make sure that strings are nul + terminated. + +Tue Jun 8 16:08:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (clean_up_and_exit): Print `bye-bye' here. + * g-builtins.cc (builtin_quit): Not here. + + * pager.cc (terminal_columns): If screenwidth <= 0, return a + default value of 80 columns. + * (terminal_rows): Likewise for screenheight and a default of 24 + rows. + + * octave.cc (parse_and_execute): Don't fiddle with interactive + states since that screws paging output. + * tree.cc (parse_m_file): Likewise. + + * parse.y (input): For `simple_list error END_OF_INPUT' and + `error END_OF_INPUT' use ABORT_PARSE. + * Always accept `simple_list END_OF_INPUT'. + * Always abort for `END_OF_INPUT'. + +Mon Jun 8 13:55:41 1993 John C. Campbell (jcc@schoch.che.utexas.edu) + + * file-io.h (fopen_file_for_user): New function declaration. + + * file-io.cc (fopen_file_for_user): New function. + * (fgets_internal): If file doesn't exist open it for user, + also return (double) -1 on EOF + * (fseek_internal), (ftell_internal), (frewind_internal), + (do_printf): Ditto. + * (fopen_internal): Remove warn_on_not_open flag, limit warns. + +Mon Jun 7 00:28:13 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * file-io.cc (do_scanf): Use `type' wherever possible instead of + hardcoding name in messages. + * (do_printf): Ditto. + + * file-io.cc (fflush_internal): If flushing stdout, flush output + to the pager instead of calling fflush on a stream. + * (do_printf): Make fprintf (stdout, ...) exactly the same as + printf (...). + * (do_scanf): Make fscanf (stdin, ...) exactly the same as + scanf (...). + + * tc-extras.cc (get_user_input): Flush output to pager before + prompting for input. + + * libcruft/Makefile.in (DISTFILES): Distribute STOP.patch to show + the changes made to the Fortran sources. + + * libcruft/*/*.f: Replace STOP statements with calls to xstopx, so + that Fortran programs won't just quit on us. + + * libcruft/misc/xstopx.f: New file. + * libcruft/misc/do_stop.c: New file. + * libcruft/misc/Makefile.in (SPECIAL): Add do_stop.c to the list. + * (SPECIAL_DEPEND): Likewise, for do_stop.o. + * libcruft/Makefile.in (CRUFT_OBJ): Ditto. + + * lex.l (")"): Don't pop the top of the in_brace_or_paren stack if + it's empty. + +Sun Jun 6 00:41:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * liboctave/CollocWt.cc (init): Always compute Gaussian quadrature + weights instead of trying to compute Radau or Lobatto weights if + the endpoints are included. + * Really do compute roots and derivative weights corresponding to + Legendre polynomials if alpha and beta are zero, even if the + endpoints are included. + +Sat Jun 5 22:19:55 1993 John C. Campbell (jcc@schoch.che.utexas.edu) + + * builtins.cc (builtin_general_functions): Correct max arg counts + for fscanf, scanf, and sscanf. + + * g-builtins.cc (builtin_fscanf): Correct argument checks. + * (builtin_sscanf): Likewise. + + * file-io.cc (fopen_internal): Don't warn for opening new file. + + * file-io.cc (process_printf_format): Handle * for field width and + precision. + * Pass array of arguments and nargin instead of just one arg. + * (do_printf): Call process_printf_format() with new args. + + * file-io.cc (process_scanf_format): New function to handle scanf + dirty work. + * (do_scanf): New function. + +Sat Jun 5 14:09:41 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (YY_FATAL_ERROR): Redefine here to keep from exiting on + fatal scanner errors. + +Fri Jun 4 16:35:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_multi_assignment_expression::eval (int)): Check to + see if result is NULL before trying to use it. + + * tc-extras.cc (get_user_input): Call gnu_readline() to get input. + +Thu Jun 3 00:30:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * scripts/*.m: Convert single-quoted strings to use double quotes + since the manual says they are better. + + * Version 0.71.10. + + * doc/Makefile.in (DISTFILES): Distribute octave.info*. + + * Makefile.in (.fname): Delete target and move actions back to the + individual dist targets because this always needs to be done. + * (binary-dist): Strip src/octave. + + * doinstall.sh: New file, for binary distributions. + +Wed Jun 2 15:11:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Makefile.in (binary-dist): New target, just like dist, except + also distribute libcruft.a, liboctave.a, libreadline.a and + src/octave. + + * Makefile.in (.fname): New target. + * (links-for-dist): New target. + * (local-dist): Depend on .fname. + * (dist): Depend on .fname and use links-for-dist. + + * octave.cc: Move code to print startup message to just after + option processing so that any messages from startup files will + appear after the normal startup message. + + * utils.cc (get_site_defaults): New function. + * (OCTAVE_HOME): Provide default definition. + + * (SITE_DEFAULTS): Delete definition. + * octave.cc (execute_startup_files): Use get_site_defaults instead. + + * src/Makefile.in (utils.o): Define OCTAVE_HOME to be $(prefix) + here. + + * Makeconf.in: Don't define SITE_DEFAULTS or OCTAVE_M_FILE_DIR. + + * lex.l (do_string_escapes): Recognize `\"'. + +Tue Jun 1 01:28:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.71.9. + + * parse.y (maybe_convert_to_ans_assign): Greatly simplify. + + * file-io.cc (File_info): Convert from struct to proper class. + * (valid_mode): New function. + + * parse.y, parse.h, lex.l, tree-extras.cc (convert_to_ans_assign): + Delete unused variable. + + * builtins.cc (SEEK_CUR): Set to 1 to match (normal) system values. + * (SEEK_END): Likewise, set to 2. + + * statdefs.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * octave-hist.cc: Include it. + * variables.cc (identifier_exists): Likewise. + * utils.cc (is_newer): Likewise. + + * builtins.cc (SEEK_SET): New builtin varible. + * (SEEK_CUR): Ditto. + * (SEEK_END): Ditto. + * (stdin): Ditto. + * (stdout): Ditto. + * (stderr): Ditto. + + * lex.l (strip_trailing_whitespace): New function. + * ({IDENT}{S}*): Use it. + * (<TEXT_FCN>[^ \t\n\;\,]*): Fix to grab trailing spaces. + Use strip_trailing_whitespce() to delete it before returning. + +Mon May 31 21:00:00 1993 John C. Campbell (jcc@june.che.utexas.edu) + + * file-io.cc, file-io.h: New files to implement C-style file + handling and I/O functions. + * (do_printf): Move here from tc-extras.cc. + * (process_printf_format): Likewise. Also renamed from + process_format. + +Mon May 31 00:52:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * (tree_function::eval): Now that we can restore values, enable + code to give error for attempts to call functions recursively. + + * octave.cc (parse_and_execute): Use unwind-protect functions to + save and restore state. + * tree.cc (parse_m_file): Likewise. + * (tree_function::eval): Likewise. + * tc-extras (eval_string): Likewise. + + * unwind-prot.cc (saved_variable): New class to hold values of and + pointers to variables we want to restore. + * (restore_saved_variable): New function. + + * unwind-prot.cc (unwind_protect_int_internal): New function. + * (unwind_protect_ptr_internal): Ditto. + * (unwind_protect_var_internal): Ditto. + + * unwind-prot.h (unwind_prot_int): New macro. + * unwind-prot.h (unwind_prot_ptr): Ditto. + * unwind-prot.h (unwind_prot_var): Ditto. + + * variables.cc (symbol_out_of_date ()): Move here from tree.cc. + * (is_valid_function): Fix logic for finding a function + definition, including checking to see if the current symbol + definition is out of date. + + * tree-const.h (is_numeric_or_range_type): New function. + * tree-const.h (is_string_type): New function. + * tree.cc (tree_matrix::eval): Use !is_string_type() instead of + is_numeric_type() to decide that we've seen something other than + a string. + + * parse.y (maybe_warn_assign_as_truth_value ()): New function. + * user-prefs.h (warn_assign_as_truth_value): New preference. + * user-prefs.cc (warn_assign_as_truth_value ()): New function. + * builtins.cc (string_variables): Add it to the list. + + * tree.h (tree_simple_assignment_expression): Rename class from + tree_assignment_expression. + * (tree_assignment_expression): New class, derived from + tree_expression. + * (tree_simple_assignment_expression): Derive from new + tree_assignment_expression class, not tree_expression class. + * (tree_multi_assignment_expression): Ditto. + +Sun May 30 22:40:58 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/Makefile.in (%.d: %.cc): First remove target file, then + redirect into tmp file, and finally move tmp file to target file + only if creating tmp file was successful. + * liboctave/Makefile.in (%.d: %.cc): Ditto. + +Sat May 29 18:18:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_constant *tree_multi_assignment_expression + ::eval (int print, int nargout)): New function. + * (tree_constant tree_multi_assignment_expression::eval (int print)): + Use it to do the real work. + + * tree.cc (tree_matrix::to_param_list ()): Also allow index + expressions as long as the argument list is missing. + + * parse.y (ans_expression): Now that assignments are just + expressions, don't convert expressions to assignemnts to `ans' if + they already are assignments. + * maybe_convert_to_ans_assign (tree *expr): New function to do the + real work. + + * tree.cc (tree_multi_assignment_expression:: + is_assignement_expression ()): Return 1. + + * tree-base.h (tree::is_index_expression ()): New virtual + function, returns 0. + * tree.cc (tree_index_expression::is_index_expression ()): Return 1. + + * tree.cc (tree_assignment): Construct from tree_index_expression + and a tree. + * (tree_index_expression::ident ()): New function. + * (tree_index_expression::arg_list ()): New function. + + * parse.y (variable): New rule, returns tree_index_expression. + + * parse.y: Rewrite assignment rules so that they are simply + expressions, not special cases. + * Rearrange fact and expression rules into expression (assignement + or simple expression), simple_expr (binary and postfix expressions + or secondary simple expression), and simple_expr1 (constants and + prefix expressions) rules. + * Delete fact rules. + + * parse.y: Make EXPR_EQ and EXPR_NE have the same precedence as + the other relational operators. + +Fri May 28 10:14:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * unix-octave.exp: Delete use of OCTAVEFLAGS. + + * test/config: New directory. + * test/config/Makefile.in: New file. + * test/config/unix-octave.exp: Rename from test/octave-init.exp. + * test/Makefile.in (SOURCES): Delete octave-init.exp from list. + * configure.in: Add test/config/Makefile to the list of Makefiles + to build. + + * utils.cc (send_to_plot_stream): Plot lines by default. + +Thu May 27 08:03:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (\]): Don't pop the top of the in_brace_or_paren stack if + it's empty. + + * tree.cc (tree_matrix::eval): Make it work for single element + strings as well. + + * Version 0.71.8. + + * lex.l (next_token_is_postfix_unary_op): New function. + * (<MATRIX>{SN}*\]{S}*): Use it as well, to decide whether to + insert a comma. + * (<MATRIX>{S}+): Likewise. + * ({IDENT}{S}*): Likewise. + +Wed May 26 15:37:27 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * pr-otput.cc (pr_any_float): Use form() now that iostream + formatting bug has been fixed (libg++-2.3.1). + +Mon May 24 15:36:22 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (any_arg_is_magic_colon): New function. + * (tree_builtin::eval) Use it to avoid calling builtin functions + with `:' arguments. + +Sun May 23 14:07:19 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_fprintf): Correct usage message. + +Fri May 21 10:35:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.71.7. + + * octave.cc (main): Always reset_parser() before every call to + yyparse(), not just on a longjmp return. + + * doc/Makefile.in (install): For now, don't try to install + anything. + + * lex.l (<MATRIX>{S}+): Call next_token_is_bin_op() instead of + making the check in line. + * (<MATRIX>{SN}*\]{S}*): Likewise. + * (<MATRIX>{S}+): Likewise. + + * lex.l (looks_like_bin_op): New function. + * (next_char_is_space): Ditto. + * (next_token_is_bin_op): Ditto. + + * lex.l ({IDENT}{S}*): If we're in a brace context and the next + character is an open paren, set convert_spaces_to_comma to 0. + * tree-const.cc (convert_to_str): New function. + * g-builtins.cc (builtin_setstr): New function. + * builtins.cc (builtin_general_functions): Add it to the list. + +Thu May 20 17:56:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * doc/Makefile.in (SOURCES): Define to be all .texi files. + * (octave.info): Depend on $(SOURCES). + * (octave.dvi): New target. + * Don't distribute the man page. + + * lex.l (<MATRIX>{S}+): If the next character is a plus or minus + followed by a space or tab, don't insert a comma. This makes + input like [1 + 1] == 2 and input like [1 +1] == [1 1]. + * (<MATRIX>{SN}*\]{S}*): Likewise. + + * lex.l (<MATRIX>{S}+): Use in_brace_or_paren and + convert_spaces_to_comma to decide whether to convert spaces to a + comma. + + * lex.l ({IDENT}{S}*): If we're in a brace context and the next + character is an open paren, set convert_spaces_to_comma to 0. + + * lex.l (<MATRIX>{SN}*\]{S}*): Even if we're still inside some braces, + don't always push a comma onto the input. + + * lex.l (<MATRIX>{SN}*\]): Also grab trailing spaces. + * ({IDENT}): Ditto. + + * lex.l (in_brace_or_paren): New stack to keep track of whether + the closest enclosing scope is a pair of braces or parens. When + we see a `[' or a `(', push a flag on the stack. When we see a + `]' or a `)', pop the top of the stack. + + * lex.l (convert_spaces_to_comma): New flag to control lexer behavior. + * (RETURN): Reset it to 1. + * (most other returns): Reset it to 1. + + * lex.l (BIN_OP_RETURN): New macro. Set convert_spaces_to_comma to 0. + * (most binary operators): Use it instead of RETURN. + + * lex.l (match_any): New function. + +Wed May 19 12:51:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Range.cc (nelem_internal): Don't allow ranges with more than + INT_MAX elements. Return -1 to indicate failure. + * tree-const.cc (tree_constant_rep::tree_constant_rep (double, + double, double)): Check nelem() to see if the range is valid. + + * pr-output.cc (all_elements_are_ints (Range&)): We only need to + check the base and the increment, not the limit too. + + * Range.cc (nelem_internal): Move function definition here from + Range.h and do a better job of determining the number of elements + in the range. + +Tue May 18 09:06:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.71.6. + + * tc-extras.cc (find_nonzero_elem_idx): Declare inner loop + iteration variables that are used inside later nested loops + in the outer enclosing scope to make this work for old and new + language definitions (see the ARM, chapter 19: "ANSI/ISO + Resolutions", 6.4/6.5: "The statement or statements immediately + controlled by the condition in a selection-statement, or an + iteration-statement introduce an implicit local scope". + * xpow.cc (elem_xpow (Matrix&, Matrix&)): Likewise. + + * tree.cc (tree_identifier::parse_m_file (char*, int)): Set + reading_script_file before calling parse_m_file and restore it + afterward. + +Mon May 17 20:04:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.h (prog_name): Declare extern. + * (raw_prog_name): Ditto. + + * f2c-compat.sh (ctest.c): Also write a dummy MAIN_ since gcc 2.4 + doesn't seem to create an executable now if there are unresolved + externals, and the linker wants to see it on Suns. + +Thu May 13 01:06:18 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Makefile.in (DISTFILES): Include Makeconf.in. + + * configure.in: Set defaults for CFLAGS, CXXFLAGS, LDFLAGS, and + FFLAGS. + * Don't substitute CDEBUG, COPTIMIZE, FOPTIMIZE, or CXXOPTIMIZE. + * Use AC_PROGRAMS_CHECK instead of our own code for checking for a + Fortran compiler. + * Add Makeconf to the list of files to create. + + * src/Makefile.in (octave): Use ALL_LDFLAGS instead of LDFLAGS. + + * Makeconf.in (ALL_CFLAGS, ALL_CXXFLAGS, ALL_LDFLAGS): New macros. + * Allow the user to set CFLAGS, CXXFLAGS, and FFLAGS without + screwing things up. + * (CDEBUG, COPTIMIZE, FOPTIMIZE, CXXOPTIMIZE): Delete. + * Provide rules for making .o from .cc or .c files that use + ALL_CXXFLAGS and ALL_CFLAGS. + + * src/Makefile.in: Generate dependencies automatically using the + method described in the GNU make manual. + * liboctave/Makefile.in: Likewise. + + * All Makefile.in files: Set TOPDIR and include $(TOPDIR)/Makeconf. + * Makeconf.in: New file, for most configuration options. + + * tc-rand.cc (rand_internal): Return an empty matrix for rand (0). + +Wed May 12 01:32:36 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (clean_up_and_exit): Call close_plot_stream before + quitting. + + * Version 0.71.4. + + * pr-output.cc (octave_print_internal (ostrstream&, Matrix&)): + Handle wrapping columns neatly, respecting value of split_long_rows. + * (octave_print_internal (ostrstream&, ComplexMatrix&)): Ditto. + * (octave_print_internal (ostrstream&, Range&)): Ditto. + + * user-prefs.cc (split_long_rows): New preference variable and + function. + * builtins.cc (builtin_string_variables): Add to list with default + value == true. + +Tue May 11 02:20:43 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * pr-output.cc (pr_max_internal): Don't count Inf or NaN when + looking for max value. + * (pr_min_internal): Likewise, for min values. + + * pr-output.cc (pr_any_float): Merge pr_float and pr_imag_float. + + * pr-output.cc (any_element_is_inf_or_nan (Matrix&)): New function. + * (any_element_is_inf_or_nan (ComplexMatrix&)): New function. + * (all set_format functions (except Range)): Consider Inf and NaN + when computing field width (we'll either print "Inf" (possibly + with a sign) or "NaN"). + + * pr-output.cc (pr_float): Handle Inf and NaN. + * (pr_imag_float): Ditto. + + * pr-output.cc (set_format_style): Make format short set precision + to 3 and max field width to 8. + + * pr-output.cc (pr_float): Don't print a sign for -0.0. + * (pr_imag_float): Ditto. + + * pr-output.cc (all set_format functions): Return the actual field + width computed or 0 if free format. For complex, return both real + and imaginary field widths. + * Include pager.h for terminal_rows() and terminal_columns(). + + * pr-output.cc (pr_complex): If imaginary part is -0.0, print a + minus sign but convert the value to 0.0 before printing. + + * octave.cc (parse_and_execute (FILE *, int)): Don't use readline + to read commands from files. + * (parse_and_execute (char *, int)): Set reading_script_file + before calling get_input_from_file. + + * Version 0.71.3. + + * src/Makefile.in (deps): New target. + * Update dependencies using the output from running `make deps'. + + * pr-output.cc (set_output_prec_and_fw): New function. + * (set_format_style): Use it. + * (set_format functions): Use user_pref variables for precision + and field width. + + * variables.cc (octave_real_scalar_variable): New function. + * buitlins.cc (builtin_string_varaibles): Add output_precision and + max_field_width to the list (really need a separate list for + numeric values...). + * user-prefs.cc (set_output_max_field_width): New function to be + called when output_max_field_width changes. + * (output_precision): Likewise, for output_precision. + + * sighandlers.cc (pipe_handler_error_count): New global variable. + * (sigpipe_handler): Use it to keep from printing more than one + broken pipe message between prompts. + * (input.cc): Reset pipe_handler_error_count before printing the + prompt. + +Mon May 10 13:06:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * sighandlers.cc (sigpipe_handler): Issue warning and return + instead of aborting. + + * user-prefs.cc (all sv_* functions): Don't delete previous value + of a preference string if the new value is bogus. + + * user-prefs.cc (all sv_* functions and all functions that handle + user preferences): Return 0 for success, -1 for failure. + * symbtab.cc (symbol_record::define): Check return value of sv_fcn + and restore previous value on failure. + * symtab.h (sv_Function typedef): Change to return int, not void. + * builtins.h (sv_Function typedef): Ditto. + +Sun May 9 18:25:00 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * user-prefs.cc (all sv_* functions): Issue a warning if the user + gives us something that's not a string. + +Sat May 8 23:40:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * ColVector.cc (ColumnVector::min): Upper loop limit is len, not 0. + * (ComplexColumnVector::min): Ditto. + * RowVector.cc (RowVector::min): Ditto. + * (ComplexRowVector::min): Ditto. + +Fri May 7 18:41:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * pr-output.cc (set_format_style): New function, extracted from + builtin_format(). + * t-builtins.cc (builtin_format): Call set_format_style to do real + work. + + * pr-output.cc: New file for special formatted printing funcions. + * tree-const.cc (tree_constant_rep::eval): Use new functions. + + * user-prefs.cc (sv_pager_binary): New function. + * user-prefs.h (user_preferences) Add new field, pager_binary. + * builtins.cc (builtin_string_variables): Add PAGER to the list. + * utils.cc (default_pager): New function. + * Makefile.in: Define DEFAULT_PAGER for utils.cc, not pager.cc. + * pager.cc (get_pager): Delete function. + * Use user_pref.pager_binary instead of calling get_pager(). + +Thu May 6 11:05:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * pager.cc (pager_buf): Declare as static pointer to ostrstream. + * (initialze_pager): Delete old pager_buf and create new one for + each batch of output. This is needed because once str() is called + for pager buf, it will no longer grow. + + * pager.cc (maybe_page_output): Take care of deleting buffer after + str() is called. + * (flush_output_to_pager): Likewise. + * t-builtins.cc (builtin_ls): Likewise. + * (builtin_set): Likewise. + * (builtin_show): Likewise. + * tc-extras.cc (process_format): Likewise. + * (process_format): Likewise. + * tree-plot.cc (tree_plot_command::eval): Likewise. + +Wed May 5 10:45:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_shell_command): Buffer characters with an + ostrstream and call maybe_page_output instead of writing directly + to cout. + * (builtin_warranty): Likewise. + * tc-extras (do_printf): Likewise. + * tree.cc (tree_identifier::eval): Likewise. + * (tree_assignment_expression::eval): Likewise. + * (tree_multi_assignment_expression::eval): Likewise. + * tree-const.cc (tree_constant_rep::eval): Likewise. + * t-builtins.cc (builtin_help): Likewise. + * (builtin_ls): Likewise. + * (builtin_who): Likewise. + + * user-prefs.h user-prefs.cc (page_screen_output): New preference. + * builtins.cc (string_variables): Add to list with default value + of true. + + * input.cc (octave_gets): If interactive, call flush_to_pager() + before prompting. + + * utils.cc (terminal_rows): Move to pager.cc + * (terminal_columns): Likewise. + * (get_pager): Likewise. + + * pager.h, pager.cc: New file to handle pager stuff. + * src/Makefile.in: Fix things to distribute and compile them. + + * libcruft/Makefile.in (CRUFT_OBJ): Strip $(srcdir)/ and convert + from .f to .o in two steps since some versions of GNU make strip + the leading ./ from the output of $(wildcard), causing my pattern + match to fail if compiling in the source tree. + +Tue May 4 09:13:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (symbol_record::define (symbol_record *)): Delete old + name before saving new name. + * (symbol_record::document): Likewise, for var.help and fcn.help. + + * parse.y (ABORT_PARSE): Renamed from DO_ABORT. + +Mon May 3 01:00:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc: Define destructors for every class in tree.h. It + appears that it should always be ok to delete everything in a + command tree once we're done executing it. Function definitions + are still ok because the parser doesn't set global_command to the + tree_function we've built (that's saved somewhere in the symbol + table and shouldn't be deleted until we clear or redefine the + function). + + * utils.cc (pathstring_to_vector): Do memory management here so + callers don't have to. + * (default_path): Likewise. + + * utils.cc (make_absolute): Return current_path (not a copy) since + it is static. + * (get_working_directory): Return the_current_working_directory + (not a copy) since it is global. + + * utils.cc (cleanup_tmp_files): Delete filename when done. + + * parse.y: Replace output to cerr with calls to error() or warning(). + * DO_ABORT: New macro. Use it instead of YYERROR for errors that + we detect, and call yyerror since bison doesn't. + * (param_list1): Detect invalid parameter lists. + * (yyerror): Don't print pointer if it is past the end of the line. + +Sun May 2 13:03:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-extras.cc (process_format): Use ostrstream instead of a + fixed-size character string to buffer the format. + + * utils.cc (terminal_rows): Get info from readline variable + instead of hardcoded constants. + * (terminal_columns): Likewise. + + * utils.cc (maybe_page_output): New function. + * t-builtins.cc (builtin_help): Use it. + * (builtin_who): Ditto. + * Don't include procstream.h anymore since we no longer need it. + + * utils.cc (jump_to_top_level): Call run_all_unwind_protects () + before jumping back to the top level. + +Sat May 1 20:59:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * unwind-prot.cc unwind-prot.h: New files to implement memory + cleanup stuff. + * src/Makefile.in: Distribute them. + + * Version 0.71.2. + + * computer.m: Delete file. + * scripts/Makefile.in (computer.m): Add $(srcdir)/ prefix to + computer.in. + +Fri Apr 30 17:03:04 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.h (<CLASS>::row (int i)): New function for extracting a + row of a matrix where CLASS is one of Matrix, DiagMatrix, + ComplexMatrix, or ComplexDiagMatrix. + * (<CLASS>:: column (int i)): Likewise for columns. + * (<CLASS>::row (char *s)): Likewise, but selection is done with a + character string. Currently we accept anything beginning with `F' + or `f' to mean the first row and anything beginning with `l' or + `L' to mean the last row. + +Wed Apr 28 14:23:49 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * scripts/computer.in: New template file for computer.m. + * scripts/Makefile.in (computer.m): Generate a custom computer.m + file using $target_host_type. + * (clean): Delete computer.m. + + * configure.in: If last argument is not empty, use its value as + the TARGET. + * If we aren't given a TARGET, use config.guess to find one. + * Substitute target_host_type. + + * config.guess: New file, taken from gdb distribution. + * Makefile.in: Distribute it. + + * tree-const.cc (force_numeric): New parameter, force_str_conv to + allow us to ignore user preference on string to numeric + conversion. + * (make_numeric): Likewise. + + * tree.cc (tree_matrix::eval): Allow range constants in matrix + lists by simply converting them to matrices. + * Ditto for string constants. + +Tue Apr 27 17:21:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * utils.cc (smells_like_X11): Delete unneeded function. + * builtins.cc (install_builtins): Don't initialize + graphics_terminal since it's no longer needed. + + * utils.cc (pathstring_to_vector): Call tilde_expand on each + element of the path. + + * mappers.cc: Include float.h for DBL_MAX. + +Wed Apr 21 19:31:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * mappers.cc (xisnan (Complex&)): Rename from isnan. + * builtins.cc (mapper_functions): Use xisnan instead of isnan. + * (install_builtins): Special case for linux for geenerating + infinity and NaN. + +Mon Apr 19 14:10:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.71.1 released. + + * symtab.cc (char **sorted_list (int& count)) New function. + * (char **sorted_var_list (int& count)): Ditto. + * (char **sorted_fcn_list (int& count)): Ditto. + * t-builtins.cc (builtin_who): Check symbol count too. + + * utils.cc (send_to_plot_stream): Check is_open(), not just the + state of the stream. + * (close_plot_stream): Likewise. + + * procstream.cc, procstream.h: Rewrite, taking a hint from the GNU + fstream class. + +Sun Apr 18 17:40:54 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.cc (builtin_help): Don't call list_in_columns if + there isn't anything to list. + +Fri Apr 16 20:57:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Makefile.in (DISTDIRS): List dld here. + * (DISTSUBDIRS): Not here. + +Thu Apr 15 12:17:08 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.71 released. + + * scripts/*.m: Improve help messages for most files. + + * libcruft/Makefile.in: Make libcruft.a here. + * libcruft/Makerules.in: Not here. + + * PLOTTING: New file. + * Makefile.in: Add it to the list of files we distribute. + + * g-builtins.cc (builtin_shell_command): New function. + * builtins.cc (general_functions): Add it to the list. + + * procstream.h, procstream.cc (iprocstream): New class. + + * lex.l (<MATRIX>{SN}*\]): Maybe insert a comma after reading a `]'. + + * t-builtins.cc (builtin_load): Do tilde expansion for the file name. + * (builtin_save): Ditto. + +Wed Apr 14 10:40:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_function::eval): Until we have a proper call frame + unwinding scheme, comment out previous change. + + * tree.cc (tree_matrix::eval): Brain Transplant. + * (tree_matrix::length): New function. + + * tree-base.h (matrix_dir): Delete md_none, md_left, and md_up. + The only valid values are md_unknown, md_right, and md_down. + +Tue Apr 13 20:07:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.h (tree_function::call_depth): New member variable. + * tree.cc (tree_function::eval): Check it to make recursive + function calls fail (waiting for proper symbol table handling). + + * utils.cc (pathstring_to_vector): Don't prepend `.' here. We do + that already in default_path() if the user hasn't given us a + loadpath. + + * t-builtins.cc (builtin_help): Get help for M-files even if they + haven't been compiled yet. + * List M-files we find in the loadpath. + + * utils.cc (get_m_file_names): Split into two functions, add + parameter to specify whether .m suffix is deleted. + + * lex.l (grab_help_text): New function. + * (beginning_of_function): New global variable. + * (%|#): Call grab_help_text() if at beginning of a function. + * tree.cc (tree_identifier::document): New function. + * parse.y (func_def2): Use it. + * (help_buf): New global buffer for help text. + +Mon Apr 12 00:31:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * utils.cc (get_m_file_names): New function. + * variables.cc (make_name_list): Use it. + + * t-builtins.cc (list_in_columns): Put output on an strstream + instead of in a String. + * (builtin_help): Use an strstream instead of a String for buffering. + * (builtin_who): Likewise. + + * g-builtins.cc (builtin_keyboard): New function. + * builtins.cc (general_functions): Add to list. + + * tc-extras.cc (get_user_input): If the user enters `exit', + `quit', or `return', return instead of eval'ing the string. + * Don't abort on empty input. + * Add additional argument to handle debugging via new `keyboard' + function. If doing debugging, keep reading until we see `exit', + `quit', or `return'. + + * menu.m: New M-file. + + * New top level plotting functions: + + plot.m semilogx.m semilogy.m loglog.m polar.m + title.m xlabel.m ylabel.m grid.m bar.m + stairs.m mesh.m meshdom.m contour.m + + * New internal plotting functions: + + plot_int.m plot_2_s_s.m plot_2_v_v.m plot_2_v_m.m + plot_2_m_v.m plot_2_m_m.m polar_int.m + + * New utility functions: + + is_scalar.m is_vector.m is_matrix.m + +Sun Apr 11 11:10:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-buitlins.cc (builtin_ls): New function. + * builtins.cc (text_functions): Add it to the list under the names + `ls' and `dir'. + +Sat Apr 10 15:13:05 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * procstream.cc (oprocstream::close): Set badbit for stream after + it is closed. + + * utils.cc (close_plot_stream): New function. + * g-buitlins.cc (closeplot): New builtin function. + * builtins.cc (general_functions): Add to list. + + * lex.l (cant_be_identifier): New cruft to properly handle the + plot command's `using', `title', and `with' keywords. + +Fri Apr 9 09:38:25 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Warn if it looks like gnuplot isn't installed. + + * utils.cc (send_to_plot_stream): Check the user's preference for + the gnuplot binary. + + * user-prefs.cc (sv_graphics_terminal): Delete function. + * user-prefs.h (graphics_terminal): Delete variable. + + * tree-plot.cc (tree_subplot_using::print): Add argument to allow + checking of columns given in using command and use it. + * (tree_plot_command::eval): Change caller. + + * parse.y (title): Allow plot title to be any expression. + * tree-plot.cc (subplot_list): Likewise. + + * tree-plot.cc (tree_plot_command::eval): Don't let lusers try to + make 2D parametric plots, since that seems to crash gnuplot. + + * tree.cc (tree_identifier::parse_m_file): Don't try to stash + m-file name or time parsed if we were actually executing a script + file. + + * sombrero.m: New M-file to demonstrate 3D plotting. + + * parse.y (plot_options): Allow them to be specified in any order. + + * g-builtins.cc (builtin_purge_tmp_files): New function. + * builtins.cc (general_functions): Add to list. + + * g-builtins.cc, g-builtins.h (builtin_plot): Delete. + * builtins.cc (general_functions): Delete entry for builtin_plot. + + * t-builtins.cc (builtin_set): Check to see if the user is setting + up parametric plotting. + * tree-plot.cc (parametric_plot): New global variable. + * tree_const.cc (save_three_d): New function. + * tree-plot.cc (tree_subplot_list::print): Handle 3D plots. + + * Makefile.in: Delete everything having to do with distributing or + making gnuplot. + * configure.in: Likewise. + +Thu Apr 8 10:02:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * utils.cc (send_to_plot_stream): New function. Move declaration + of plot_stream to utils.cc and make static. + + * t-builtins.cc (builtin_set): New function. + * (builtin_show): Ditto. + + * lex.l: Handle set command. + * (doing_set): Yet another global variable to control behavior of + the lexer. + + * tree-plot.cc (tree_subplot_using::print): Print warning if scanf + format string is given. + + * parse.y (ranges1): Allow lower and upper bounds to be optional. + * tree-plot.cc (tree_plot_range::print): Make it work. + + * tree-plot.cc: New file, extracted from tree.cc. + + * sighandlers.cc (install_signals): New function. + * (*_handler): New set of functions to handle signals that would + otherwise cause us to abort. + * (my_friendly_exit): Call exit from most signal_handlers to clean + up tmp files, etc. + + * lex.l (do_string_escapes): Correctly handle '' quotes. + * Warn about unrecognized escape sequences but convert them to the + escaped character anyway. + * (EXPON): New definition. Use it and ? qualifier to shorten the + expressions for matching numbers. + * (ECHAR): New definition. Use it to correctly match + backslash-escaped characters in strings. + * Definitions: Surround multi-character definitions in ()'s to + avoid potential problems with things like {DEF}*. + * (QQ): Rename from DQ. + * (DQSTR): New definition for strings in double quotes. + * (DQSTRING): New start state. Recognizing a naked " puts us here. + * ("\n"): Turn off quote_is_transpose at the beginning of each line. + * Use error functions instead of writing messages directly. + * Don't include iostream.h -- we don't need it now. + * Do include error.h. + +Wed Apr 7 13:12:17 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * sighandlers.h, sighandlers.cc: New files for signal handling + functions. + * Makefile.in: Include them in the usual places. + * octave.cc (interrupt_handler): Move to sighandlers.cc and rename + to sigint_handler. + + * utils.cc (mark_for_deletion): New function. + * octave.cc (cleanup_tmp_files): New function. + * octave.cc (main): Register cleanup_tmp_files with atexit + (on_exit for sun). + + * Stack.h: Template based stack class converted from libg++ + genclass files. + * SLStack.h: Likewise. + * (SLStack::pop): Avoid apparent bug in SLList::remove_front. + +Tue Apr 6 10:01:52 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (almost_match): New function. + * (plot_style_token): New function. + + * t-buitlins.cc: Include procstream.h instead of procbuf.h. + * (builtin_help): Simplyfy opening of process output stream. + * (builtin_who): Likewise. + +Mon Apr 5 13:48:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-extras.cc (tree_constant_to_scalar): Move to tree-const.cc + and make it a member function called to_scalar. + * (tree_constant_to_vector): Likewise. + * (tree_constant_to_matrix): Likewise. + + * procstream.h, procstream.cc: New files/classes that implement + an ostream to a process. Built on top of procbuf from libg++. + * src/Makefile.in: Add them to the lists of files/objects. + +Sat Apr 3 23:11:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Lots of clean-up changes to parse.y, tree.cc, tree.h, and + tree-base.h. Use more specific types than just <tree *> for + nonterminals. This allows us to have fewer virtual functions in + the base class. Safer. Cleaner. Should have always been this + way... + +Fri Apr 2 10:04:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y, lex.l: Fix grammar to accept plot command very similar + to the gnuplot plot command. + +Wed Mar 31 13:11:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (eval_undefined_error): Until we can figure out how to + clear names without causing problems later on, just remove the + symbol name. + + * tree.h (tree_plot_command): New class. + * (tree_plot_limits): Ditto. + * (tree_plot_range): Ditto. + * (tree_subplot_list): Ditto. + * (tree_subplot_using): Ditto. + * (tree_subplot_style): Ditto. + + * tree-base.h (command_type): Add plot_command to list. + +Mon Mar 29 09:53:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * find_exec.c (ABSOLUTE_FILENAME_P): Also return true if the + given filename begins with `.'. + + * DAE.cc, DAE.h, DAEFunc.h, tc-dassl.cc: Make sure all calls to + dassl and the user-supplied functions have consistent argument + lists. + + * octave.cc (raw_program_name): New global variable to hold the + unprocessed argv[0]. This is to help dld find the absolute path + to the executing program. + * (initialize_globals): Pass in argc and argv from main. + Initialize raw_prog_name. + + * builtins.cc (general_functions): Correct help message for dassl. + * g-builtins.cc (dassl_usage): Likewise. + + * src/Makefile.in: Lots of changes to make things work with or + without dld. + * Makefile.in: Likewise. + * configure.in: Likewise. + + * dld: New directory, containing our copy of the dld sources. + + * dynamic-ld.cc, dynamic-ld.h: New files to implement dynamic + loading functions. + * src/Makefile.in: Add them to the distribution, compile them if + doing dynamic loading. + +Sun Mar 28 11:03:15 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: When looking for Fortran compilers, check for fc + last to avoid confusion with some vendor's /bin/sh fc builtin. + * Handle new argument --with-dld. + + * g-builtins.cc (builtin_warranty): Add 1993 to list of copyright + dates. + +Sat Mar 27 17:58:23 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-extras.cc: Rename from tree-extras.cc. + * tc-colloc.cc, tc-dassl.cc, tc-det.cc tc-eig.cc, tc-fft.cc, + tc-fsolve.cc, tc-fsqp.cc, tc-ifft.cc, tc-inv.cc, tc-lsode.cc, + tc-lu.cc, tc-npsol.cc, tc-qr.cc, tc-quad.cc, tc-rand.cc, + tc-svd.cc: Split individual functions from tree-extras.cc. + + * g-builtins.cc (npsol_usage): Improve message. + * (dassl_usage): Likewise. + * (builtin_lsode): Likewise. + * (builtin_fsolve): Likewise. + * (builtin_quad): Likewise. + * builtins.cc (general_functions): Improve corresponding messages. + + * libcruft/fftpack: New directory for fftpack functions. + * libcrutf/fftpack/*.f: Add implicit double precision (a-h,o-z) at + the top of every subroutine. + + * tree-extras.cc (fft): Allow propagation of empty matrices. + * (ifft): Ditto. + + * Matrix.cc (Matrix::fourier): New function. + * (Matrix::ifourier): Ditto. + * mx-inlines (make_complex): New function. + * tree-extras.cc (fft): Use Matrix::fourier instead of doing real + to complex conversion here and calling ComplexMatrix::fourier. + * (ifft): Likewise, for ifourier. + +Sat Mar 27 17:56:59 1993 Fook Fah Yap (ffy@eng.cam.ac.uk) + + * Matrix.cc (ComplexMatrix::fourier): New function for fft. + * (ComplexMatrix::ifourier): New function for inverse fft. + + * builtins.cc (general_functions): Add fft and ifft to the list of + builtin functions. + + * g-builtins.cc (fft): New function. + * (ifft): Ditto. + + * tree-extras.cc (fft): New function. + * (ifft): Ditto. + +Sat Mar 27 13:53:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (usage_string): New file scope constant. + * (getopt_option_string): Ditto. + + * error.cc: Declare all arguments const since we don't change them. + + * utils.cc (print_str_or_null): Delete unused function. + * utils.h: Delete declaration. + + * tc-assign.cc, tc-index.cc, tc-inlines.cc, tree.cc, + tree-const.cc: More error message cleanups. + + * tree-const.cc (print_if_string): Don't write to cerr + unconditionally. + +Fri Mar 26 22:00:18 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (min): Avoid function calls as arguments for MIN. + * (column_min): Ditto. + * (max): Likewise, for MAX. + * (column_max): Ditto. + + * tree-const.h (NINT): Make it an inline function instead of a + macro. + + * tree-extras.cc (fill_matrix (tree_constant&, double, char*)): + Convert to scalar type for complex values too. + + * error.h (panic_impossible): New macro to be used in place of + assert (0) calls. + * All .cc files: Replace calls to assert (0) and abort () with + panic_impossible (). + + * Many .cc files:: Replace many instances of `cerr << ...' with + calls to gripe() functions. + + * gripes.h, gripes.cc: New functions for reporting common errors. + * Makefile.in: Include them in the usual places. + +Thu Mar 25 18:42:49 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Many .cc files:: Replace many instances of `cerr << ...' with + calls to error() functions. + + * error.h, error.cc: New functions for reporting errors in a + consistent way. + * Makefile.in: Include them in the usual places. + +Wed Mar 17 17:29:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (symbol_table::save): New functions. + * t-buitlins.cc (builtin_save): Use new functions for saving + symbols. Handle case of saving all variables. + + * g-builtins.cc (builtin_pause): If one argument is given, pause + for that many seconds before continuing. Otherwise, wait for user + input. + + * symtab.cc (clear): Actually delete undefined symbol_records and + remove their names from the list. + + * lex.l (lookup_identifier): New function. Avoid putting global + names in the local symbol table. + * ({IDENT}): Use it + * ({IDENT}/{S}*=): Ditto. + + * tc-index.cc (do_scalar_index (tree_constant*, int)): Make + indexing like a([1,1,1,1]) work for scalars. GAG. + +Tue Mar 16 20:08:23 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-buitlins.cc (builtin_cd): Call tilde_expand (from readline) on + the argument. + + * lex.l (discard_until): Delete unused function. + * When reading numbers, abort if scanf fails to read a number that + we think it should. + * (IDENT): New macro to match identifiers. + * ([_a-zA-Z][_a-zA-Z0-9]*): Use the / operator for trailing + context and split into two cases instead of trying to do the + lookahead ourselves. + + * lex.l (do_comma_insert_check): Return the value yyleng had + before yyinput() is called. + * (DO_COMMA_INSERT_CHECK): New macro. This avoids the use of + unput() in do_comma_insert_check() since there seems to be a bug + in flex when calling unput() for '\n'. + + Note that this change is necessary if we want to use yyless() + since we cant call yyless() from outside of yylex(), because + Flex's yyless() is a macro that uses some variables local to + yylex(). + +Mon Mar 15 11:03:43 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_matrix::eval): Undo part of previous change to + make a = [1,2;3,4]; [a,a;a,a] work again. + + * parse.y (input): Don't abort for simple_list followed by EOF. + +Sun Mar 14 14:38:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * RowVector.cc (RowVector::operator << ()): Insert a space between + each element. + * (ComplexRowVector::operator << ()): Ditto. + + * g-buitlins.cc (plot): Don't declare plot_prog or plot_term as + static, and don't delete them. + + * Matrix.h (all checkelem functions): Don't check for range errors + if NO_RANGE_CHECK is defined. + +Sat Mar 13 10:18:51 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.cc (ComplexMatrix::prod): Make it work. + +Thu Mar 11 00:08:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.h (ellum): Delete function. + * Declare and define new const elem, checkelem, and operator() + functions. + + * ColVector.cc, DiagMatrix.cc, RowVector.cc, Matrix.cc, ODE.cc, + LinConst.cc, FEGrid.cc, DAE.cc, Bounds.cc, FEGrid.h: + Change all callers. + * tree-const.cc, tree-extras.cc, xdiv.cc, xpow.cc: Ditto. + + * tree.cc (tree_matrix::eval): Improve row and column mismatch + checking -- [[1,2];[3,4]] works now, and [1,2;3,4,[5,6]] is + rejected. + * Reformat error messages to include `error:' prefix. + +Wed Mar 10 14:02:09 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (do_comma_insert): New global variable. + * (reset_parser): Reset it. + * lex.l (do_comma_insert_check): New function. Call it wherever a + token can be directly followed by '['. + * (\[{S}*): Check the value of do_comma_insert. + + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only look for names in the + current symbol table. + + * parse.y (word_list_cmd): Special case to disallow use of clear + inside a fuction body. + + * parse.y (CLEAR): New %token. + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Return it if token is "clear". + + * t-builtins.cc (builtin_clear): Allow global symbols to be + cleared. + + * symtab.cc (symbol_table::undefine): Clarify comment. + * (symbol_table::clear): Don't actually remove names from the + table, just force them to be undefined. + + * tree.h (tree_function): Delete unused data member `id'. + * tree.cc (tree_function constructors): Don't initialize id. + +Mon Mar 8 15:50:28 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.70 released. + + * src/Makefile.in: Update dependencies. + + * tree.h: Include stdio.h, for FILE. + + * gnuplot-build: For now, always define -DNOGAMMA. + * configure.in: Don't check for gamma(). + + * libcruft/Makerules.in: Don't use lib.a(obj.o) style dependencies + because it's too slow for large archives. + * liboctave/Makefile.in: Ditto. + +Sun Mar 7 16:33:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (parse_and_execute): Save and restore current column + number. Set input line and column number to zero. + * tree.cc (parse_m_file): Likewise. + + * tree.cc (tree_identifier::parse_m_file (FILE*, int*)): New + function. If a parse error occurs, ensure that the symbol is + cleared from the global symbol table. + * (tree_identifier::parse_m_file (char*, int): Use it. + + * tree.cc (tree_identifier::do_lookup): New function. + * (tree_identifier::eval): Use it. + + * utils.cc (decode_prompt_string): Really do use value of PWD. + + * user_prefs.cc (sv_loadpath, sv_ps1, sv_ps2, sv_pwd, + sv_gnuplot_binary, sv_graphics_terminal): New functions. + * (sv_graphics_terminal): Warn if terminal isn't valid, but set it + anyway (it's too late to do anything by the time the function is + called). + * In functions that use these variables: Use the value from the + user_pref structure instead of doing a symbol table lookup. + + * builtins.cc (builtin_string_variables): Add functions to call + for LOADPATH, PS1, PS2, PWD, gnuplot_binary, and graphics_terminal. + + * builtins.cc (PS2): New builtin_string_variables. Set default + value to "> ". + * input.cc (octave_gets): Use it instead of no prompt for + continued input. + + * parse.y (yyerror): Use line, column, file name, and text of + current input line to print better parse error messages. + + * lex.l (NEW_MATRIX): New exclusive start state. Need this to be + able to match \[{SN}* _and_ get secondary prompting right. + + * input.cc (octave_read): Keep track of current input line. + * tree.cc (parse_m_file): Save and restore current line number. + + * lex.l (all patterns): Keep track of current input column. + * (fixup_column_count): New function to deal with patterns that + match more than one line. + + * input.h, input.cc (current_input_line): Global pointer to + the text of the current input line. + + * parse.y, parse.h (input_line_number, current_input_column): New + global variables. + + * Almost all source files: Finish (for now, at least) the + reorganization we started for global variables. + +Wed Mar 3 14:49:59 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tc-assign.cc, tc-index.cc, tc-inlines.cc: New files, split out + from tree-const.cc. + + * Almost all source files: reorganize so that all global data is + declared in some include file or another. It probably wouldn't + hurt to do some more reorganizing to try to eliminate the amount + of global information... + +Tue Mar 2 20:49:35 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * variables.h, variables.cc: New files for handling things that + need symbol table information. Lots of files changed to include + variables.h, which now includes the extern declarations for the + symbol tables. The declarations of the symbol tables are now in + variables.cc, but they are still initialized in octave.cc. + +Mon Mar 1 11:35:03 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * builtins.h (builtin_string_variables): New field, sv_function, + holds a pointer to the function to call when a variable changes. + * builtins.cc (string_variables): Initialize sv_function field. + * (install_builtins): While installing builtin string variables, + stash sv_function and, if it isn't NULL, call it to initialize + global variable user_pref. + + * symtab.h (symbol_record): New field, sv_fcn, holds a pointer to + the function to call when a variable changes. + * symtab.cc (symbol_record::define): Call sv_fcn if it isn't NULL. + * symtab.cc (symbol_record::set_sv_function): New function. + + * utils.cc, parse.y, tree.cc, tree-extras.cc, tree-const.cc, + idx-vector.cc, builtins.cc, symtab.cc: Instead of calling + functions like do_fortran_indexing(), get the user's preference + from the global struct user_pref. + + * utils.h, utils.cc: Delete all functions like do_fortran_indexing() + that lookup user variables to find integer values. + * user-prefs.h, user-prefs.cc: Move them here, but instead of + returning values, set elements of the new global struct user_pref. + + * user-prefs.h, user-prefs.cc: New files for handling global + variables for user preferences. + * Makefile.in: Add them to the SOURCES and INCLUDES macros. + + * bsd-math/{acosh,asinh,atanh,log1p}.c: Declare all external + functions used in each file since they might not be in math.h. + * bsd-math/{scalb,copysign,logb,finite,drem,sqrt}.c: New files + from BSD's support.c. Only using scalb, copysign, logb, and + finite for now. + + * configure.in: Move tests for f77 closer to the top. + * Allow configuration to proceed even if we can't find a Fortran + compiler or f2c. + * Use `here' documents instead of multiple echos for multi-line + messages. + * Imrpoved checking for missing math functions. + +Sun Feb 28 17:45:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * test/Makefile.in (check): Try to avoid errors from cp. + + * mappers.cc (xfinite): Put test for HAVE_FINITE first. + + * libcruft/Makerules.in (LIBCRUFT_DEPEND): Use `=' in assignment + instead of `:='. + + * liboctave/Makefile.in: Make an explicit list of sources instead + of using $(wildcard). + +Thu Feb 25 20:18:12 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * bsd-math/copysign.c: New file. HP's don't have this? + * configure.in (LIBOBJS): Also check for copysign, log1p, and + log__L. For each missing user-level function, add -DFOO_MISSING=1 + to DEFS. + * src/missing-math.h: For each function we declare, check the + corresponding XXX_MISSING macro. Add declarations for copysign + and log1p. + +Wed Feb 24 20:39:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (<MATRIX>{SN}*\]/{S}*==): Change scanning pattern to + <MATRIX>{SN}*\]{S}*/== in order to keep flex from generating any + backtracking code. + * (<MATRIX>{SN}*\]/{S}*=): Likewise. + +Tue Feb 23 02:45:00 1993 John W. Eaton (jwe@ward.che.utexas.edu) + + * Version 0.69 released. + + * mappers.cc [_AIX && __GNUG__] : Provide a definition for + finite(), since whatever version we get from the system when using + g++ doesn't work (note that it does seem to work with gcc, xlc, + and xlC). + + * bugs.texi: Note that the math.h file from libg++ declares + finite() incorrectly for some systems. + +Mon Feb 22 02:04:16 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Look for runtest, but only believe that it exists + if we can also find expect. + * test/Makefile.in (check): Run tests in build directory, not + source directory. + + * tree.cc (reading_script_file): New global variable. + * (parse_m_file): Use it, and properly save and restore state so + that nested script files will work. + + * octave.cc (parse_and_execute): Properly save and restore state + so that nested script files will work. + * Don't close input file here. + + * input.cc (get_input_from (FILE*)): Don't declare mf_instream + static. Set mf_instream if reading and M-file or a script file. + + * parse.y: Minor changes to accomodate new lexer. + + * lex.l: Major overhaul in an attempt to do better string + handling. Looks much simpler and even seems to work. + * (do_string_escapes): New function. + +Sat Feb 20 00:40:32 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_npsol): If npsol is missing, return empty + matrices for x and phi, and -1 for inform. + + * num2str.m: Use %g, not %f. + + * tree.cc (parse_m_file): Save and restor curr_sym_tab, because + yyparse may mess with it if it encounters a function definition. + * tree-extras.cc (eval_string): Ditto + * octave.cc (parse_and_execute): Ditto + + * Makefile.in (DISTDIRS): Add bsd-math to list. + + * src/Makefile.in (LIBOBJS): New macro, value set by configure. + (vpath): Add @srcdir@/../bsd-math for LIBOBJS. + (octave): Add $(LIBOBJS) to deps. + * gnuplot-build/Makefile.in: Likewise, for notgnuplot. + + * configure.in: Use AC_REPLACE_FUNCS to Check for acosh, asinh, + atanh, and gamma. + + * bsd-math: New directory for functions from the BSD math library + to use as replacements for missing functions. + + * parse.y (semi_comma, comma_semi): New rules. + (simple_list, simple_list1): Use them to allow empty statements. + (list, list1): Likewise. This allows empty commands as long as + the empty command doesn't contain any newlines. + + * parse.y (simple_assign): New rule, allows things like a = b = c. + (multi_assign): Extracted from assignment. + (assignment): Split into simple_assign and multi_assign. + (expression): Allow '(' simple_assign ')' to be an expression. + + * tree-extras.cc (eval_string): Return result of last expression + evaluated, to make things like `eval ('1+1;')*2' work. + +Fri Feb 19 19:45:21 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_pwd): Use getcwd, which is defined in + unistd.h, instead of getwd, which seems to be a BSDISM. + * utils.cc (decode_prompt_string): Ditto. + * (get_working_directory): Ditto. + + * arith_ops.cc (DIVIDE_BY_ZERO_ERROR): Don't rely on + HAVE_IEEE_MATH, use HAVE_ISINF, HAVE_FINITE, and HAVE_ISNAN + instead. + * configure.in: Don't define HAVE_IEEE_MATH. + + * tree-extras.cc: Include stdio.h for FILE. + +Thu Feb 18 10:17:38 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (gobble_leading_white_space): New function. + * (is_function_file): New function. + + * (parse_m_file): Handle case of .m file being just a file of + commands to execute. + * Add optional argument to specify whether to execute a script + file. + * Return whether a script file was executed. + * (tree.cc, tree-extras.cc): Change callers. + + * octave.cc (parse_and_execute): new functions. + * (execute_startup_files): Use them. + + * lex.l (<COMMENT>\n): Don't gobble new line. + + * num2str.m: Don't print '\n'. + +Wed Feb 17 21:59:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * mappers.cc: Simplify and correct finite, isinf, isnan functions. + * test/octave/t7.oct: New test for finite, isinf, and isnan + functions. + + * configure.in: Define HAVE_IEEE_MATH if isnan and either finite + or isinf is available. + + * builtins.cc (mapper_functions): Check HAVE_ISNAN instead of + HAVE_IEEE_MATH to determine whether or not to define isnan(). + + * mappers.cc: Don't check for HAVE_IEEE_MATH. Just check for + individual functions directly. + + * g-builtins.cc (npsol_usage): Correct usage message. + + * g-builtins.cc: Don't include unistd.h unless HAVE_UNISTD_H is + defined. + * t-builtins.cc: Ditto. + * utils.cc: Ditto. + +Tue Feb 16 00:35:44 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.68 released. + + * tree.cc (parse_m_file): Set reading_m_file before calling + get_input_from_file. + * Don't mess with current_infile. + + * input.cc (get_input_from_file): Set mf_instream if we are + reading an M-file. Otherwise, set rl_instream, (even if we aren't + really using readline -- this is just the `normal' input stream). + * Don't use current_infile. + * (octave_read): If not interactive, check reading_m_file to + determine where to look for input. + + * octave.cc (main): Don't use readline if we aren't interactive. + + * libcruft/misc/Makefile.in (local-dist): Make sure we don't + distribute a bogus d1mach.f. + (dist): Ditto. + + * tree-extras.cc (convert_to_ans_assign): New global variable. + (eval_string): Conditionally turn off assignment to `ans', for + get_user_input (). + * parse.y (ans_expression): Use it. + * lex.l (reset_parser): Reset it. + + * g-builtins.cc (builtin_input): New function. + * builtins.cc (general_fucntions): Add it to the list. + * tree-extras.cc (get_user_input): Do most of the real work. + +Mon Feb 15 01:14:40 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.cc (load_variable): New function. + (builtin_load): Use it. + + * Makefile.in (SUBDIRS): Add the test directory. + (check): Don't depend on all. + +Sat Feb 13 05:17:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (determinant, lu, matrix_exp, matrix_log, + matrix_sqrt): Handle empty matrix argument. + + * Matrix.h: Add constructors of the form Matrix (double a) and + ColumnVector (double a) to make it even easier to form single + element vectors. + +Fri Feb 12 03:27:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (main): Add -v option that will print the version + string and quit with a successful exit status. + +Thu Feb 11 00:46:34 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (eig): If given an empty argument, return enough + empty matrices to fill all possible LHS variables. + (qr): Likewise. + (svd): Likewise. + + * tree-const.cc (fortran_style_matrix_assignment): Do the right + thing if LHS is an empty matrix. + + * tree-extras.cc (qr): Handle empty matrix argument. + + * Matrix-ext.cc (QR): Make it work (really!). + (ComplexQR): Ditto. + +Wed Feb 10 00:56:31 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * xdiv.cc (xdiv (ComplexMatrix& a, ComplexMatrix& b)): Do + btmp.solve (atmp), like the other three xdiv's. Argh! + + * tree-extras.cc (eval_string): New function. Mostly works but + could be very fragile. We desperately need some sort of + `unwind-protect' scheme to avoid disaster when octave is + interrupted. + + * g-builtins.cc (builtin_eval): Instead of just aborting, call + eval_string if given one argument. + + * input.cc (octave_read): If get_input_from_eval_string is + nonzero, stuff current_eval_string into buf for flex to read. + + * tree-extras.cc (char *current_eval_string): New global variable + for eval(). + * (int get_input_from_eval_string): Ditto. + + * Update copyright notices to include 1993 (now that it's + February...). + +Tue Feb 9 14:35:08 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.67 released. + + * tree-extras.cc, tree-const.cc: Check the value of the variable + `propagate_empty_matrices' to decide what to do about empty + matrices in binary and unary operations and some function calls. + + * builtins.cc (builtin_string_variables): New global variable + `propagate_empty_matrices' with initial value `warn'. + * utils.cc (propagate_empty_matrices): New function. + +Mon Feb 8 19:46:51 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-const.cc: Finish changes required to make zero-one indexing + work for indexing and assignment. + +Sat Feb 6 15:54:10 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * builtins.cc (builtin_string_variables): New global variable + `prefer_zero_one_indexing' with initial value `false'. + * utils.c (prefer_zero_one_indexing): New function. + +Fri Feb 5 13:03:14 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * idx-vector.h, idx-vector.cc: Major overhaul to help with + zero-one style indexing. + * tree-const.cc (matrix_to_index_vector): Delete functions. + * (functions that use idx_vectors): Update for new idx-vector + stuff. + + * arith-ops.cc: Don't declare matrix_to_fortran_indices. + + * tree-const.cc (matrix_to_index_vector): Add new argument, + allow_neg_one, with default value of false. + * (matrix_to_fortran_indices): Add new argument, allow_zero, with + default value of false. + + * g-builtins.cc (builtin_find): New function. + * builtins.cc (general_fucntions): Add it to the list. + * tree-extras.cc (find_nonzero_elem_idx (tree_constant)): Do + most of the real work. + * tree-extras.cc (find_nonzero_elem_idx (const Matrix&): Do the rest. + * (find_nonzero_elem_idx (const ComplexMatrix&): Ditto, for complex. + +Wed Feb 3 00:54:01 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in (DEFAULT_DOT_O_FROM_DOT_F): If using f2c, quote + with single quotes instead of double quotes to avoid problems on + systems (like the NeXT) that strip \'s from double quoted strings. + + * utils.c (empty_list_elements_ok): New function. + * tree.cc (matrix_list::eval): Use it. + * builtins.cc (builtin_string_variables): New global variable + `empty_list_elements_ok' with initial value `warn'. + + * utils.cc (check_str_pref): New function. + * (resize_on_range_error, prefer_column_vectors, + warn_comma_in_global_decl, do_fortran_indexing, + implicit_str_to_num_ok, treat_neg_dim_as_zero, + ok_to_lose_imaginary_part, return_last_computed_value, + silent_functions, print_answer_id_name): Use it instead of + needlessly duplicating code. + +Tue Feb 2 16:58:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l ("'"): If it looks like we're defining a matrix, don't set + the start condition to be MAYBE_QSTRING. GAK. There has to be a + better way... + + * lex.l: Increment and decrement promptflag instead of just + setting its value. This should help get prompting right for + things like if [1,2;3,4] NL ... + * input.cc (octave_gets): In order to issue a prompt, Require + propmtflag to be greater than zero, not just nonzero. + + * tree.cc (tree_if_command): Allow matrices as the expression to + test. Unlike Matlab, a complex value is false only if both the + real and imaginary parts are 0. + * tree.cc (tree_while_command): Ditto. + + * tree.cc (tree_for_command): Allow matrices and complex values + in the expression. For matrices, assign each column in turn to + the dummy variable. + + * Matrix-ext.cc (qr): Make it work. The LAPACK book gags me again! + + * xdiv.cc: When computing right division with complex matrices, + use hermitian() instead of transpose(). + + * lex.l: Return IMAG_NUM for a numeric constant followed by + [iIjJ], but don't allow spaces between the numeric constant and + the letter (it causes problems inside `[]' where spaces matter... + +Mon Feb 1 17:15:19 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree_extras.cc (rand_internal): Make the random number generator + give us a different sequence every time we start octave unless we + specifically set the seed. + +Thu Jan 28 00:10:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.66 released. + + * configure.in: Define PLOTLIB in addition to adding -DUNIXPLOT to + DEFS if we find -lplot, and call AC_SUBST for PLOTLIB. + + * QP.cc: Define constructors here. + * QP.h: Not here. + + * QP.cc (All constructors that are given H): Force H to be + symmetric. + * (make_h_symmetric): New function. + +Wed Jan 27 01:35:53 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * arith-ops.cc (do_unary_op): Do the right thing for complex + logical not operator. + * Matrix.cc (ComplexMatrix::operator ! (void)): Return Matrix + instead of ComplexMatrix. + * mx-inlines.cc (not (Complex *d, int len)): For each element of + d, return (d[i] == 0.0), not (d[i] != 0.0), and return it as a + pointer to double, not Complex. + + * configure.in: Check for libcruft/qpsol/qpsol.f. + * Create Makefile in libcruft/qpsol. + + * libcruft/qpsol: New directory. Copy QPSOL sources here. + * libcruft/qpsol/Makefile.in: New file. + * libcruft/qpsol/README.MISSING: New file. + * libcuft/Makefile.in: Include qpsol in list of directories to + make. + + * QPSOL.h, QPSOL.cc: New file for solving QPs with Gill and + Murray's QPSOL. + + * QLD.h, QLD.cc: Delete all minimize functions except + Vector minimize (double&, int&). + + * QP.h: Declare minimize functions virtual. + * (Vector minimize (double&, int&): Declare as a pure virtual + function. + + * QP.cc: New file to implement generic minimize functions. + +Tue Jan 26 00:27:13 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l: Recognize numbers of the form .{digits}E{digits} and + .{digits}E[+-]{digits} + + * lex.l: Recognize .\ as ELEFTDIV. + * parse.y: Handle ELEFTDIV. + * tree.cc (tree_binary_expression::eval): Handle el_leftdiv. + + * arith-ops.cc (do_binary_op): Handle element by element left + division. Fix some errors in element by element right division. + + * tree-base.h (enum expression_type): Add el_leftdiv. + + * Version 0.65 released. + + * tree-const.cc (tree_constant_rep::eval (tree_constant *args, int + nargin, int nargout, int print)): Fix another brain-o in making + recursive call.s + + * src/Makefile.in: Complete changes for CXX instead of C++ make + variables. + + * tree-const.cc: For assignment and indexing functions, treat + complex scalars and matrices in the same branch of the switch as + real scalars and matrices -- the double_value() and matrix_value() + functions take care of checking to see if it's ok to lose the + imaginary part. + + * tree-const.h (tree_constant_rep::is_numeric_type): New function. + * tree-const.h (tree_constant::make_numeric functions): Use it. + + * tree-const.h (tree_constant::make_numeric functions): Return + *this for complex constants too. + +Mon Jan 25 18:31:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (Matrix min (Matrix&, Matrix&)): Loop over nc and + nr, not nr and nr. + * (Matrix max (Matrix&, Matrix&)): Ditto. + + * tree-const.cc (tree_constant_rep::mapper): Fix brain-o in making + recursive call. + +Sun Jan 24 20:05:39 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: If using f2c, explicitly check for -lf2c. If it's + not found, look for -lF77 and -lI77. If a suitable combination + isn't found, print a warning. + + * src/Makefile.in liboctave/Makefile.in: GNU Make 3.63 uses CXX + and CXXFLAGS instead of C++ and C++FLAGS. Fix things so that 3.63 + will work without sacrificing compatibility with earlier versions. + + * tree-const.cc (tree_constant_rep::diag (tree_constant&)): Fix + brain-o in forcing argument to be numeric. + +Fri Jan 22 15:03:42 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (interrupt_handler): Declare to take int argument. + + * NPSOL.cc (npsol_objfun): Delete leftover debugging message. + +Thu Jan 21 14:28:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Check version of gcc and issue a warning if it + looks like 1.something. + * Check for g++. Issue a warning if it is missing or if it is + there but it looks like verion 1.something. + + * flibs.sh, f2c-compat.sh: Change file permission to 755 to avoid + problems if the uid of the installer is different from the uid of + the owner of the files. + +Wed Jan 20 04:18:49 1993 John W. Eaton (jwe@june.che.utexas.edu) + + * libcruft/Makerules.in (@DOT_O_DOT_F_C[1234]@): Patterns deleted. + * configure.in: Do multiple line sed substitutions the right way. + +Tue Jan 19 14:50:50 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Use new AC_WITH to accept --with-f2c instead of + --use-f2c. + * Use new AC_HAVE_LIBRARY to find -lplot. + + * flibs.sh: Actually avoid including duplicate -lflags. + * Use test, not `['. + +Sun Jan 17 16:57:02 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.h: Declare operator+ and operator- functions for vectors. + * RowVector.cc: Define half of them. + * ColVector.cc: Define the other half. + +Fri Jan 15 03:00:46 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/Makefile.in (install): Include version number in name of + installed binary and make a link to $(bindir)/octave. + + * Version 0.64 released. + + * t-builtins.cc (builtin_clear): Don't allow the user to clear + global symbols by name. If he tries, issue a warning. + + * tree.cc (tree_identifier::eval_undefined_error): Don't clear + undefined symbols from the global or local (function) symbol + tables. + +Thu Jan 14 02:10:20 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_function::eval): Save old and set current symbol + table context, so eval_undefined_error() doesn't wipe out top + level symbols. + + * Version 0.63 released. + +Wed Jan 13 13:16:56 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Nearly every .h and .cc file: Add interface and implementation + #pragmas for G++ in hopes of making smaller objects with -g. + + * tree-const: Properly handle assignments like A(:) = RHS when + do_fortran_indexing is true. + + * g-builtins.cc (builtin_eig): Correct usage message. + + * tree-const.cc (tree_constant_rep (ComplexDiagMatrix&)): Create + and initialize a new complex_scalar. Don't just try to copy the + value... + + * Matrix.h: Declare new fill functions for diagonal matrices. + * DiagMatrix.cc: Define them. + + * Matrix.h: Declare map functions for row and column vectors. + * RowVector.cc: Define them. + * ColumnVector.cc: Likewise. + + * CollocWt.h: Declare data protected instead of private. + * CollocWt.cc (CollocWt::CollocWt (const CollocWt&)): Fix brain-o. + + * lex.l: Return IMAG_NUM for a numeric constant followed by + [ \t]*[iIjJ]. + + * parse.y (IMAG_NUM): New token. + * (fact): Recogize IMAG_NUM and convert its value to a complex + constant. + + * Version 0.62 released. + + * Makefile.in (local-dist): Include -local in tar.Z filename. + * (split-local-dist): New target. + * (dist): Don't depend on newversion. + * (local-dist): Ditto. + + * tree-extras.cc (npsol): If the first argument isn't a vector, + print an error message and return. + + * tree.cc (tree_matrix::eval): Always set prev_row_total and + prev_column_total when starting out. + + * octave.cc (main): Don't try to detect signal handler failures, + but do call signal() to set up the interrupt handler. + +Tue Jan 12 19:59:33 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (npsol): Fix brain-o in checking length of bounds + vectors. + +Mon Jan 11 20:32:24 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (set_rand_seed): New function. + (force_to_fit_range): New function. + (current_seed): Really return current seed. + (rand_internal): Allow the user to actually set the seed for the + random number generator. + +Sun Jan 10 16:46:06 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.61 released. + + * builtins.h, builtins.cc: Rename from builtin-fcns.h, + builtin-fcns.cc (too long for Linux/SysV). + + * mappers.cc (xisinf): For non-IEEE machines, consider DBL_MAX to + be infinite. + +Fri Jan 8 09:15:57 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * gnuplot-build/Makefile.in (x11targets): Don't worry about + checking HAVE_X11_X_H. + + * configure.in: Check for gamma and lgamma for gnuplot. + + * gnuplot-build/Makefile.in (Makefile.X11): Only move Makefile to + ../Makefile.X11 if xmkmf succeeds. + + * gnuplot-build/Makefile.in (x11targets): Check to see that XMKMF + is set *and* that Makefile.X11 exists. + * If making notgnuplot_x11 with Makefile.X11 fails, try again with + Makefile. + + * gnuplot-build/Makefile.in: Use @PLOTLIB@ in definintion of LIBS. + * Don't define UNIXPLOT in TERMFLAGS. + * Don't define LN_S; it isn't used anywhere, and configure doesn't + give it a value. + + * configure.in: Check for closepl(). If found, define UNIXPLOT, + and substitute -lplot for @PLOTLIB@. + + * arith-ops.cc (DIVIDE_BY_ZERO_ERROR): New macro. On systems that + have IEEE math, give a warning but also go ahead and divide by + zero. On systems that don't have IEEE math, just give an error + message and return an undefined tree_constant (it would probably + be possible to handle this so that it works the same everywhere, + but I'm not sure it's worth the effort...). + + * builtin-fcns.cc (install_builtins): On systems that don't have + IEEE_MATH, define Inf to be MAX_DBL, but don't define NaN at all. + + * configure.in: Check for finite, isnan, and isinf. + * Set HAVE_IEEE_MATH if we find finite and isnan. + + * builtin-fcns.cc (install_builtins): Use HAVE_IEEE_MATH instead + of IEEE_MATH. + * mappers.cc: Check HAVE_IEEE_MATH and HAVE_ISINF macros rather + than checking system type. + + * graph3d.c (hidden_line_plot): Declare dy and y as double, not + float, since VERYLARGE can be DBL_MAX. + + * lsoda.f, lsodar.f, lsodes.f, lsodi.f, lsoibt.f, stoda.f, + stodi.f, zrotg.f, sdot.f: Remove unused files. + + * texas_lotto.m: Renamed from win_texas_lotto.m to keep the + filename less than 14 characters. + +Thu Jan 7 15:45:29 1993 John W. Eaton (jwe@june.che.utexas.edu) + + * utils.cc: Declare ioctl extern "C". + + * tree.cc: Include stdio.h to be sure FILE is defined (apparently + not required by older versions of GNU iostream library). + * t-builtins.cc: Likewise. + * g-builtins.cc: Likewise, but for tmpnam. + + * tree-const.h (rand_internal): Rename from rand to avoid + conflict with standard library rand (a macro in Linux). + * tree-extras.cc (rand_internal): Fix function definition. + * g-builtins.cc (builtin_rand): Call rand_internal instead of rand. + + * octave.cc (main): Don't try to detect signal handler failures. + What's the proper way to do this if RETSIGTYPE is void? + +Tue Jan 5 08:14:29 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_matrix::eval): When adding a matrix down or to the + right, column or row dimension mismatches are always errors. + +Mon Jan 4 04:58:55 1993 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.60 released. + + * xdiv.h, xdiv.cc: New files for Octave-specific matrix division + stuff. + * src/Makefile.in (INCLUDES, SOURCES, OBJECTS): Add xdiv stuff. + + * arith-ops.cc: Include xdiv.h. + +Sun Jan 3 12:24:04 1993 John W. Eaton (jwe@ward.che.utexas.edu) + + * gnuplot-build/Imakefile.in (notgnuplot_x11): In the compile + command, put source file before libraries. + + * libcruft/misc/Makefile.in: Don't use -O to compile gen-dimach.c. + +Thu Dec 31 00:45:50 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (matrix_sqrt): Don't create D until it is really + needed. + * (matrix_log): Ditto. + * (matrix_exp): Ditto. + [this should really be just one function instead of three...] + + * g-builtins.cc (builtin_sqrtm): New function. + * builtin-fcns.cc (general_fucntions): Add it to the list. + * tree-extras.cc (matrix_sqrt): Do the real work. + + * Makefile.in: Distribute INSTALL.OCTAVE and configure.in. + * (INSTALL.info): Make ../INSTALL.OCTAVE, not ../INSTALL. + + * doc/Makefile.in: Make ../INSTALL.OCTAVE, not ../INSTALL. + + * INSTALL.OCTAVE: Rename from INSTALL. + Refer to INSTALL for more info. + + * INSTALL: Copy from autoconf distribution. + Refer to INSTALL.OCTAVE for more info. + + * octave.cc (main): Remove leading blank line from startup message. + * Don't print it everytime the user types C-c... + + * xpow.cc: Finish off remaining cases. + + * tree-extras.cc (process_format): New function. + (do_printf): Use it. + +Wed Dec 30 00:43:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.56. + + * g-builtins.cc (builtin_logm): New function. + * builtin-fcns.cc (general_fucntions): Add it to the list. + * tree-extras.cc (matrix_log): Do the real work. + + * g-builtins.cc (builtin_expm): New function. + * builtin-fcns.cc (general_fucntions): Add it to the list. + * tree-extras.cc (matrix_exp): Do the real work. + + * Matrix-ext.cc (LU): Construct LU decomp. here, not in Matrix class. + (ComplexLU): Likewise. + * Matrix.cc (lu): Deleted. Use LU constructor instead. + Change all uses in octave sources. + + * Matrix-ext.cc (EIG): Construct EIG object here, not in Matrix class. + * Matrix.cc (eig): Deleted. Use EIG constructor instead. + Change all uses in octave sources. + + * Matrix-ext.cc (SVD): Construct SVD here, not in Matrix class. + (ComplexSVD): Likewise. + * Matrix.cc (svd): Deleted. Use SVD constructor instead. + Change all uses in octave sources. + + * Makefile.in: Update for new Matrix file organization. + Don't compile mx-inlines separately -- it's included where needed. + * Matrix.h: Declare Fortran routines we call here, not in Matrix.cc. + Don't declare every class to be a friend of every other class. + * mx-inlines.cc: New file, included by all Matrix-related .cc files. + * Matrix.cc: Split into several files. + * ColVector.cc: New file, from Matrix.cc + * RowVector.cc: Ditto. + * DiagMatrix.cc: Ditto. + * Matrix-ext.cc: Ditto. + + * tree-extras.cc (svd): Take advantage of new constructors and + diag functions. + + * Matrix.cc (DiagMatrix::diag) New function. + (ComplexDiagMatrix::diag) Ditto. + + * tree-extras.cc (eig): Take advantage of new constructors. + + * tree-const.cc (tree_constant (DiagMatrix)): New constructor. + (tree_constant (ComplexDiagMatrix)): Ditto. + + * Matrix.cc (Matrix (const DiagMatrix)): New constructor. + (ComplexMatrix (const DiagMatrix)): Ditto. + (ComplexMatrix (const ComplexDiagMatrix)): Ditto. + +Tue Dec 29 01:14:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (main): Print message at startup by default. + Don't print it until just before main loop. + * New -q option (inhibit_startup_message) turns it off. + * New -f option (read_init_files) inhibits reading of startup files. + * Delete -v option. + * (verbose_usage): Reflect changes in arguments, document -d. + + * win_texas_lotto.m: Sort picks before returning. + + * tree-extras.cc (eig): Return [v,d], not [l,v], where d is a + diagonal matrix made from l. + + * builtin-fcns.cc (mapper_functions): Fix last element of + initialization list to have correct number of elements. + + * Version 0.55. + + * Quad.h: Move all inline functions to Quad.cc to avoid apparent + g++ bug on the RS/6000. + + * configure.in: If we find flex, don't define LEXLIB. + + * COPYING.LIB: Deleted -- we're not actually distributing anything + under these terms. + * Makefile.in: Don't distribute COPYING.LIB. + +Mon Dec 28 00:46:21 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * xpow.h, xpow.cc: New files for safer pow() interface for octave. + * src/Makefile.in (INCLUDES, SOURCES, OBJECTS): Add xpow stuff. + + * arith-ops.cc: Include xpow.h. + * Don't declare toplevel jmp_buf. + + * t-builtins.cc (builtin_save): Make file and stream static to + avoid dumping core on return (is this a bug in libg++ or g++?). + * (builtin_load): Ditto. + + * symtab.cc (load): Make it work again. Yikes! This hasn't + worked since the big symbol table overhaul... + + * tree-const.cc (tree_constant_rep::save): Handle complex scalars + and matrices. + + * (symbol_def::undefine): Delete previous symbol definition before + defining. This should be ok now, after the parse_m_file fix of + 27 Dec. + + * getting_help: New global flag. + * ([_a-zA-Z][_a-zA-Z0-9]*): Set it if looking at "help". + * (reset_parser): Clear it. + * lex.l (STRING): Use it to determine what to do with ' ; and , . + + * lex.l (QSTRING): Handle the following (C-style) backslash escape + sequences correctly(?). + + \a bell \r carriage return + \b backspace \t horizontal tab + \f formfeed \v vertical tab + \n newline \\ backslash + + * median.m: New M-file. + + * g-builtins.cc (builtin_sort): New function. + * builtin-fcns.cc (general_fucntions): Add it to the list. + * tree-extras.cc (sort): Do most of the real work. + * tree-extras.cc (mx_sort): Do the rest. + +Sun Dec 27 17:40:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.cc (builtin_casesen): New function. + * builtin-fcns.cc (text_functions): Add it to the list. + + * strcmp.m: Temporarily allow string to numeric conversions. + Maybe strcmp() should be built in to the interpreter? + + * norm.m: New M-file. + + * builtin-fcns.cc (install_builtins): Treat i and j as functions, + not variables. + * Install inf as an alias for Inf. + * Install nan as an alias for NaN. + + * tree.cc (tree_identifier::parse_m_file (char*)): Force new + global symbol to be a function, not a variable. + +Tue Dec 22 14:15:57 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_function::eval): Check with silent_functions() + and return_last_value_computed() to determine proper behavoir. + + * builtin-fcns.cc (silent_functions): New builtin variable. + * (return_last_value_computed) Ditto. + + * utils.cc (silent_functions): New function. + * (return_last_value_computed) Ditto. + [This scheme for determining preferences needs to be reworked...] + + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only force yytext[len] to be the + end of the identifier if we gobbled some whitespace. + * Always unput the last character read. + + * tree.cc (tree_function::eval) Always turn on printing for + commands inside functions. + +Sat Dec 19 14:03:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.54. + +Fri Dec 18 16:02:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * (symbol_def::undefine): Undo previous change. Someone is + calling this function when they shouldn't be... + + * tree.cc (parse_m_file): If the script file is successfully + parsed, Ensure that the new symbol is defined in the global + symbol table. + + * lex.l: Handle continuation lines with the pattern + {EL}{S}*\n { promptflag = 0; } // Line continuation. + +Thu Dec 17 01:47:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (symbol_def::define): Delete previous symbol + definition before defining. + (symbol_def::undefine): Ditto, but new definition is always NULL. + + * readline/Makefile.in: Don't compile emacs_keymap.c and + vi_keymap.c since they are included by keymaps.c. + + * configure.in: If RETSIGTYPE isn't int, then define + VOID_SIGHANDLER="-DVOID_SIGHANDLER=1". + Substitute VOID_SIGHANDLER. + + * readline/Makefile.in (CFLAGS): Add -DVOID_SIGHANDLER if + appropriate. + + * tilde.c: Declare xmalloc, not malloc. + + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only call unput if we've + actually read something. + + * Version 0.53. + +Wed Dec 16 01:35:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Look in the global symbol table + for names, but ignore functions. + + * tree.cc (tree_identifier::eval): Use symbol_out_of_date() to + simplify logic for re-parsing M-files. + Always look in global symbol table for functions in case the + definition has changed (shouldn't the local symbols be undefined + anyway??). + + * tree.cc (symbol_out_of_date): New function. + + * symtab.cc (symbol_table::undefine): Actually do something. + * (symbol_table::remove_name): Ditto. + * (symbol_table::clear): And so on. + + * Matrix.cc (ComplexMatrix::svd): Use complex conjugate transpose, + not simple transpose, for V. + + * Version 0.52. + + * gnuplot-build/Imakefile (notgnuplot_x11): In the compile + command, put source file before libraries. + + * parse.y (assignment): If trying to warn against assignment to a + function, check is_function() instead of !is_variable(). + + * src/Makefile.in: Distribute input.h. + +Tue Dec 15 10:48:22 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (main): Call initialize_readline to set up completion + functions. + + * input.cc (make_name_list, command_generator, command_completer, + initialize_readline): New functions. + + * input.h: New file. + * lex.l: Include it instead of input.cc. + * src/Makefile.in: Create input.o rather than including it + directly in lex.l. + + * builtin-fcns.cc: do_fortran_indexing is now initially false. + prefer_column_vectors is now initially true. + + * builtin-fcns.cc (install_builtins): Install i and j + (== sqrt(-1)) as permanent global variables. + + * g-builtins.cc (MAXPATHLEN) Provide default definition here. + * t-builtins.cc: Not here. + + * g-builtins.cc (quitting_gracefully, interactive, + clean_up_and_exit, verbatim_pwd, getwd) Declare here. + * t-builtins.cc: Not here. + + * g-builtins.cc: Also include readline.h and history.h. + + * g-builtins.cc: Include version.h and sys/param.h here. + * t-builtins.cc: Not here. + + * g-builtins.cc: Move builtin_clc, builtin_clock, builtin_date, + builtin_pause, builtin_quit, builtin_warranty here from + t-builtins.cc. + + * builtin-fcns.cc (general_functions): Move builtin_clc, + builtin_clock, builtin_date, builtin_pause, builtin_quit, + builtin_warranty here from text_functions to limit the number of + reserved words. + + * scripts/*.m: Check for correct number of input arguments before + proceeding. + + * configure.in (DEFAULT_PAGER): Look for less, more, page, and pg. + + * t-buitlins.cc (builtin_help): If no arguments are given, list + all the known operators, keywords, functions, and variables. + + * t-builtins.cc (builtin_help) Pass the output through PAGER using + a libg++ procbuf. + (builtin_who): Ditto. + + * utils.cc (get_pager): New function. + + * help.h, help.cc: New files to manage lists of help info for + keywords and operators. + + * symtab.cc (symbol_record): Implement the Matlab-style semantics + of functions using two symbol_def objects. + * (symbol_table): Store identifier names in a hash table instead + of a linear list. + * symtab.cc (symbol_def): New class. + +Sat Dec 12 00:00:00 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y (yyerror): Change error text to be more accurate. + + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Only look in the current symbol + table for names. Function names and other global symbols are now + resolved at execution time. + + * symtab.cc (sorted_var_list): New function. + * (sorted_fcn_list): Ditto. + * (var_list): Ditto. + * (fcn_list): Ditto. + These should probably not all be separate functions... + + * t-functions.cc (builtin_who): Call sorted_var_list for each + symbol table to print variable names only. + * Accept -fcn, -fcns, or -functions to also list function names. + * Make -all list function names, but under a separate heading from + other symbols. + + * builtin-fcns.cc (is_text_function_name): New function. + * lex.l ([_a-zA-Z][_a-zA-Z0-9]*): Use is_text_function_name to + find if a name is a text function name instead of relying on the + symbol tables. + + * lex.l (is_keyword): New function. + ([_a-zA-Z][_a-zA-Z0-9]*): Use is_keyword instead of having a + special lex pattern for each keyword. + +Thu Dec 10 12:25:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.cc: Declare top_level_sym_tab extern. + + * Version 0.51. + +Wed Dec 9 02:00:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (all user_functions): If the return value from a + user's function is bogus, print an error message and abort to the + top level. + + * tree-const.cc (all do_matrix_index functions): Major overhaul to + simplify and apply range checking before doing the indexing. + + * tree-const.cc (fortran_row, fortran_column, valid_scalar_indices, + matrix_to_fortran_indices): Move here from arith-ops.cc and + declare as `static inline'. Delete declarations from arith-ops.h. + + * arith-ops.cc (gripe_nonconformant_assignment): Delete function. + + * tree-const.h (TREE_TO_MAT_IDX): Delete macro. + * tree-const.cc (tree_to_mat_idx): Make it an inline function. + + * tree-const.cc (all do_matrix_assignment functions): Major + overhaul to simplify resizing and range checking. + + * tree-const.cc (): Move here from arith-ops.cc. + Jump to top level on errors. + Return max value. + (indexed_assign_conforms) New function. + (index_check (int)): New function. + (index_check (Range)): New function. + +Tue Dec 8 21:07:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-const.cc (tree_constant_rep::tree_constant_rep (Range): + Don't create range constants that have less than 2 elements. + + * utils.cc (jump_to_top_level): New function. + * All: Replace calls to longjmp with calls to jump_to_top_level(). + Don't include <setjmp.h>, except in octave.cc, and utils.cc. + +Mon Dec 7 01:57:30 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in: Create Imakefile in gnuplot-build directory. + Look for xmkmf, then X11/X.h. + * gnuplot-build/Makefile.in: Try harder to get notgnuplot_x11 to + build correctly. + * gnuplot-build/Imakefile.in: New file, for building + notgnuplot_x11 if xmkmf is available. + + * Version 0.50. + + * gnuplot-build/Makefile.in (SUBDIRS): Add docs. + + * tree-const.h (make_numeric_or_range_or_magic): New function. + * tree-const.cc (do_matrix_index): Use it instead of make_numeric + so that we actually take advantage of all the special cases we + have for range types as matrix indices. + + * tree-const.cc (tree_constant_rep::do_matrix_index (int, Matrix)): + Fix typo. + + * DAE.cc (integrate): If returning a matrix of values, don't mix + time with the states. + * ODE.cc (integrate): Likewise. + +Sun Dec 6 16:58:41 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (dassl): New function. + * g-builtins.cc (builtin_dassl): Make it work. + * doc/octave.1: Document it. + + * DAEFunc.h, DAEFunc.cc, DAE.h, DAE.cc: New files. + + * tree-extras.cc (lsode): Clean up. Use available functions + instead of doing everything in line. + + * tree.cc (tree_multi_assignment_expression::eval): Don't define + constants that are of unknown type. + Try to be smarter about padding after last value. + + * tree-extras.cc (lu): Don't bother trying to return the LU + factorization in a single matrix since this isn't really useful + and isn't compatible with Matlab anyway (they use Linpack, we use + Lapack). + + * tree.cc (tree_identifier::assign (rhs, args, nargs)): Only try + to do assignment if rhs is defined. + +Sat Dec 5 18:23:55 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (qr): New function. + * g-builtins.cc (builtin_qr): New function. + * builtins.cc: Add builtin_qr to list of builtin functions. + * doc/octave.1: Document it. + + * Matrix.cc (Matrix::lu): Use dgesv from Lapack instead of dgefa + since it returns L and U, not some factors that need decoding. + (ComplexMatrix:lu): Likewise. + +Fri Dec 4 01:51:05 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * configure.in (INCDIRS): Don't include /usr/local/include. + (LIBDIRS): Don't include /usr/local/lib. + + * tree-extras.cc (lu): New function. + * g-builtins.cc (builtin_lu): New function. + * builtins.cc: Add builtin_lu to list of builtin functions. + * doc/octave.1: Document it. + + * Matrix.cc (Matrix:lu, ComplexMatrix:lu): New functions. + * Matrix.h, Matrix.cc (LU, ComplexLU): New classes. + + * tree-extras.cc (do_quad): New function. + * g-builtins.cc (builtin_quad): New function. + * builtins.cc: Add builtin_quad to list of builtin functions. + * doc/octave.1: Document it. + + * doc/Makefile.in (install): Edit the manpage to substitute + correct values in the FILES section. + (dist) Depend on octave.info. + (local-dist): Ditto. + + * Quad.h, Quad.cc: New files to implement quadrature. + + * NPSOL.cc (npsol_objfun): If compiling with GCC on a Sun, assign + to objf via assign_double(). + + * sun-utils.h, sun-utils.cc: New files. + * sun-utils.cc: Move declaration and definition of MAIN_ here from + utils.cc. + (access_double): New function, from GCC manual. + (assign_double): New function, after access_double. + +Thu Dec 3 03:16:03 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * NEWS: New file. + * Makefile.in: Distribute it. + + * scripts/*.m: Change to use new end feature. + + * lex.l: Recognize `endif', `endfor', `endfunction', `endif', and + `endwhile', in addtion to `end'. + * parse.y: Check for command/end mismatches. + (end_error): New function. + * doc/octave.1: Document it. + +Wed Dec 2 11:57:18 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * libcruft/villad: New directory. Move and split villad.f here + from libcruft/misc. + * configure.in: Create Makefile in libcruft/villad. + * libcruft/Makefile.in: Add libcruft/villad to list of dirs to make. + + * All Makefile.in (uninstall): New target. + (distclean): Likewise. + (check): Ditto. + * Try to make clean targets conform with GNU coding standards. + + * utils.cc (smells_like_X11): New function. + * builtin-fcns.cc (install_builtins): Don't set graphics terminal + to x11 unless it looks like we're running X11. + + * win_texas_lotto.m: New M-file. + * octave.1: Document it. + + * arith-ops.h: New file. + * src/Makefile.in: Build arith-ops.o, distribute arith-ops.cc, + arith-ops.h. Maybe this will at least speed up recompiles. + + * THANKS: New file + * Makefile.in: Distribute it. + + * configure.in: Create Makefile in gnuplot-build/docs. + * gnuplot-build/docs/Makefile.in: New file. + * Create and install notgnuplot.gih. + +Tue Dec 1 00:15:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_identifier::eval (int)): Only pad after if printing. + (tree_multi_assignment_expression::eval (int)): Ditto. + (tree_assignment_expression::eval (int)): Ditto. + + * hankel.m: Use disp to print message. + * toeplitz.m: Ditto. + + * lex.l (<MATRIX>{SN}*\]/{S}*=): Check maybe_screwed_again to + decide whether to return SCREW_TWO or ']'. + + * doc/Makefile.in (install): Really install the manpage. + + * Version 0.49. + + * Matrix.cc (ComplexMatrix::operator !): New function. + * arith-ops.cc (do_unar_op): Use it. + + * tree-extras.cc (inverse, svd, eig): Don't try to operate on + empty matrices. + + * Matrix.h, Matrix.cc: (EIG): New class. + (Matrix::eig): New functions. + (ComplexMatrix::eig): Ditto. + * tree-extras (eig): Use them. + * g-builtins.cc (builtin_eig): New function. + * builtin-fcns.cc (general_functions): Add eig to list. + * dococtave.1: Document it. + + * Matrix.h, Matrix.cc: (ComplexDET): New class. + * tree-extras (determinant): Use it. + +Mon Nov 30 04:02:29 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.h, Matrix.cc (ComplexSVD): New class. + * tree-extras (svd): Use it. + + * Matrix.cc (svd): Use lapack instead of linpack to compute SVD. + + * libcruft/Makefile.in: Replace eispack with lapack in + subdirectory list. + * libcruft/eispack: Delete directory. + * libcruft/lapack/Makefile.in: New file. + * configure.in: Create Makefile in libcruft/lapack, not + libcruft/eispack. + + * libcruft/lapack: New directory. + * Copy files for SVD and Eigenvalue computation here. + + * lex.l (<MATRIX>{SN}*\]/{S}*=): Only return SCREW_TWO if not + defining a function. + + * arith-ops.cc (do_binary_op (double, double)): For pow operator, + don't create complex value if exponent is really an int. + + * configure.in: Check for f77 last. + * Print warnings if bison or lex is not found. + * Reformat fatal no f2c/f77 error message. + + * flib.sh: Make it work even if xlf is called f77. + +Sun Nov 29 01:55:41 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc: Include f77-uscore.h. + * Use F77_FCN macro when declaring or calling Fortran functions. + + * configure.in: After checking to see that it's not garbage, add + the output of f2c-compat.sh to DEFS. + + * f2c-compat.sh: Figure out whether or not we need to append an + underscore to Fortran function names. + + * flibs.sh: Handle xlf -v output as special case. + + * octave.cc: Only define BADSIG if it isn't already defined. + * g-builtins.cc: Ditto. + + * configure.in: Don't create man/Makefile. + * man: Directory deleted. + * doc/Makefile.in: Distribute and install octave.1. + * doc/octave.1: Renamed from man/octave.1. + +Sat Nov 28 15:54:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * man/Makefile.in (install): Install manpage. + * octave.1: rename from octave.man + * octave.1: Document builtin variables and command line editing + (stolen from bash man page). + + * tree-const.cc (eval (int print)): Convert complex values to real + if imaginary part is zero. + + * octave.cc (log_usage): Deleted. + (main): Don't call log_usage. + + * g-builtins.cc (builtin_sqrt): Delete. + (builtin_log): Ditto. + (builtin_log10): Ditto. + + * tree-const.h, tree-const.cc (sqrt_internal): Delete. + (log_internal): Ditto. + (log10_internal): Ditto. + + * tree-const.cc (mapper): Handle neg_arg_complex. + + * builtin-fcns.h (Mapper_fcn): New field neg_arg_complex. + * builtin-fcns.cc: (mapper_functions[]): Initialize it for list of + mapper functions. + * builtin-fcns.cc: (mapper_functions[]): Move log, log10, and sqrt + back here from general_functions[]. + +Fri Nov 27 17:05:21 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (tree_constant_to_vector): Handle complex scalars + and matrices. + +Wed Nov 25 17:32:42 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * man/octave.man: New file, very incomplete. + * man/Makefile.in: Include octave.man in list of files to + distribute. + + * g-buitlins.cc (builtin_rand): Handle nargin == 1. + * tree-extras.cc (rand): Likewise. + + * rem.m: New M-file. Implemented as M-file because it's much + simpler! + + * configure.in (DEFAULT_DOT_C_FROM_DOT_F): Escape % characters in + rule to avoid problems with autoconf, which uses % for sed command + delimeters. + (DEFAULT_DOT_O_FROM_DOT_F): Ditto. + +Tue Nov 24 00:21:34 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (fill_matrix): Don't try to create matrices with + negative dimensions. + (frobit): Likewise. + + * utils.cc (check_dimensions): New function. + + * utils.cc (treat_neg_dim_as_zero): New function. + * builtin-fcns.cc (treat_neg_dim_as_zero): New builtin variable, + default value is false. + + * tree-const.h (tree_constant::bump_value): Like, assign, check + reference count and possibly make a new copy before changing + anything. + + * tree-base.h (is_builtin): New virtual function. + * tree.cc (tree_builtin::is_builtin): New function. + + * parse.y (ans_expression): Also check to see if the lone + expression is a builtin text-style function invoked without any + arguments. + + * octave.cc, t-builtins.cc: Print copyright and other normal + (non-error) message on cout instead of cerr. + + * t-builtins.cc (builtin_warranty): Don't return message in + retval. + (builtin_history): Likewise. + (builtin_help): Also. + (builtin_who): Ditto. + + * Version 0.48. + + * tree-extras.cc: Fix most functions to handle complex arguments. + Still need to finish SVD and DET (waiting for these functions in + the Matrix class). + + * tree.cc (tree_multi_assignment::eval): Optionally print names + for result variables. + + * tree-const.h (tree_constant::eval (int print, int nargout)): + New function. Simply ignore nargout. + * tree.cc (tree_matrix::eval (int print, int nargout)): Ditto. + + * tree.cc (tree_parameter_list::name): New function. + + * lex.l (<NEWMAT>): Delete rules, start condition because they are + unecessary. + + * lex.l (<MATRIX>{SN}*\]): Split into three rules. Use trailing + context instead of home-brew lookahead. + +Mon Nov 23 00:51:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * utils.cc (ok_to_lose_imaginary_part): New function. + * builtin-fcns.cc (ok_to_lose_imaginary_part): New builtin + variable, default value is warn. + + * tree-const.h (double_value): Maybe return real part if invoked + for complex tree_constant. + * tree-const.h (matrix_value): Ditto. + + * Version 0.47. This one wasn't tested, but there have been a lot + of significant changes and I wanted a backup. + + * tree-const.cc (sqrt_internal): New function. Sqrt isn't + implemented as a mapper function since negative real arguments + give complex results. + (log_internal): Ditto. + (log10_internal): Ditto. + * builtin-fcns.cc: Move sqrt, log, and log10 from mapper struct + initializer to general function struct initializer. + + * rot90.m: New M-file. Still needs rem() to be complete. + + * tree-const.cc (mapper): Handle mapper functions for complex + variables. + + * mappers.h, mappers.cc: New file for mapper functions. + + * builtin-fcns.h, builtin-fcns.cc: Rename from builtins.h + builtins.cc. + + * flipud.m: Don't do indexing on lhs. + * fliplr.m: Likewise. + +Sun Nov 22 17:09:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * arith-ops.cc (do_binary_op (double, double)): Handle a^b for + a < 0. + + * builtins.cc: Make sqrt a general builtin function instead of a + mapper function. + * g-builtins.cc (builtin_sqrt): New function. + * tree-const.cc (sqrt_internal): New function. + +Sat Nov 21 16:41:02 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-const.h, tree-const.cc: Complete most changes required to + handle complex types. There are lots of details, most will be + omitted here. + + * tree-const.h (is_real_type) New function. + (is_complex_type): Ditto. + (is_scalar_type): Ditto. + (is_matrix_type): Ditto. + + * tree-const.h (REP_RHS_MATRIX, REP_ELEM_ASSIGN, CRMATRIX, + ASSIGN_CRMATRIX_TO, CRMATRIX_ASSIGN_REP_ELEM, + CRMATRIX_ASSIGN_ELEM): New macro for dealing with real and complex + matrices in the same tree_constant_rep function. + + * tree-const.cc: Include arith-ops.cc. + + * arith-op.cc: New file for functions that implement unary and + binary operations for the tree_constat classes. + * Mark all operations that aren't implemented yet with a + XXX FIXME XXX comment. There are about 35-40 things left to fix + in this file. + +Thu Nov 19 00:25:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.46. + [ This one wasn't tested, but there have been a lot of significant + changes and I wanted a backup. ] + + * tree-const.cc (tree_constant_rep::do_unary_op): Handle Complex. + (do_unary_op (Complex&, tree::expression_type)): New function. + (do_unary_op (ComplexMatrix&, tree_expression_type): Ditto. + + * tree-const.cc (tree_constant_rep::assign): Handle Complex + (still needs updated support functions in order to work). + + * tree.cc (tree_matrix::eval): Handle Complex. + (tree_identifier::eval): Ditto. + (tree_for_command::eval): Ditto. + +Wed Nov 18 23:33:13 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree_const.cc (tree_constant_rep::rows): Handle Complex. + (tree_constant_rep::columns): Ditto. + (tree_constant_rep::all): Ditto. + (tree_constant_rep::any): Ditto. + (tree_constant_rep::cumprod): Ditto. + (tree_constant_rep::cumsum): Ditto. + (tree_constant_rep::prod): Ditto. + (tree_constant_rep::sum): Ditto. + (tree_constant_rep::sumsq): Ditto. + + * tree_const.h, tree_const.cc (tree_constant::complex_value): New + function. + (tree_constant_rep::complex_value): Ditto + (tree_constant::complex_matrix_value): New + (tree_constant_rep::complex_matrix_value): New + + * tree_const.cc (tree_constant_rep::~tree_constant_rep): Handle + complex scalars and matrices. + (tree_constant_rep::force_numeric): Ditto. + (tree_constant_rep::make_numeric): Ditto. + (tree_constant_rep::eval): Ditto. + (tree_constant_rep::bump_value): Ditto. C++, for C == a + complex value is C = C + 1. Should I even do this? Hmmm. + + * tree-const.h, tree-const.cc: Begin adding support for Compelex. + * Add complex_scalar and complex_matrix to value union. + * Add complex_scalar_constant and complex_matrix_constant to type + tag enum. + * New constructors. + + * Matrix.h, Matrix.cc: Major changes to add Complex support. + +Tue Nov 17 14:40:45 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Matrix.cc (RowVector::operator (const Matrix&)): New function. + + * Matrix.cc (ColumnVector::transpose): New function. + Eliminate friend function that served the same purpose. + (RowVector::transpose): Ditto. + +Mon Nov 16 09:57:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (QSTRING): Fix to allow '' inside a string to represent a + single quote. Makes computer.m a little funnier. + +Fri Nov 13 18:46:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.45. + + * computer.m: New M-file. + * tril.m: Ditto. + * triu.m: Ditto. + + * doc (*.texi): Can now produce BUGS, INSTALL, and octave.info + files without generating errors, though the organization is + probably till very wrong. + + * Makefile.in (newversion): Add magic to handle major versions + other than 0, and major/minor versions of any length. + +Thu Nov 12 01:37:45 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.h, tree-const.h, builtins.cc, g-builtins.cc, + tree-extras.cc: Conditionally compile code for NPSOL and FSQP + based on FSQP_MISSING and NPSOL_MISSING. + * g-builtins.cc (builtin_npsol): If NPSOL is missing, always call + npsol_usage() to print out message indicating why NPSOL doesn't + work. + * g-builtins.cc (builtin_fsqp): Likewise for FSQP. + + * configure.in: Check for srcdir/libcruft/npsol/npsol.f and + srcdir/libcruft/fsqp/fsqp.f. If missing, define NPSOL_MISSING or + FSQP_MISSING and add them to DEFS. + + * libcruft/npsol/README.MISSING: New file. + * libcruft/fsqp/README.MISSING: Ditto. + + * libcruft/npsol/Makefile.in (dist): Don't distribute sources + because of license restriction. Do distribute Makefile.in and + README.MISSING. + * libcruft/fsqp/Makefile.in (dist): Ditto. + + * All Makefile.in files (local-dist): New target, usually the same + as dist. + + * parse.y (ans_expression): Check to see that the RHS isn't just + an identifier. + * tree.cc (tree_identifier::eval (int)): Maybe print id name. + * tree.cc (tree_assignment::eval (int)): Ditto. + * buitlins.cc (print_answer_id_name): New builtin variable. + * utils.cc (print_answer_id_name): New function. + +Tue Nov 10 10:58:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (log_usage): Surround with #if 0/#endif. + +Mon Nov 9 13:42:54 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * symtab.cc (load): Only issue error mesasge if attempt to find + _first_ name keyword fails. + + * tree-const.cc (make_numeric_or_magic): New function. Like + make_numeric except also pass magic_colons. + * tree-const.cc (all do_matrix_index functions): Matrix ndices can + be naked colons, so use make_numeric_or_magic on index arguments + instead of make_numeric. + + * liboctave/Makefie.in (install): Install .h files in $(includedir). + (includedir): New macro, default value $(prefix)/include. + + * tree.cc (tree_function::eval (int print)): Force arguments to be + undefined. + + * tree-const.h (tree_constant::assign (rhs, args, nargs)): Check + reference count before assigning. + * tree.cc (tree_identifier::assign (rhs, args, nargs)): Don't eval + lhs before doing assignment. + + * tree.cc (parse_m_file): Gobble leading white space, including + comments. + +Fri Nov 6 16:52:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.44. + + * g-builtins.cc (builtin_getenv): New function. + + * isempty.m: New M-file. + + * g-builtins.cc (builtin_exist): New function. + * utils.cc (identifier_exists): Handle the dirty details. + + * utils.cc (warn_comma_in_global_decl): New function. + * builtins.cc (warn_comma_in_global_decl): New builtin variable. + Initial value is true. + * parse.y (global_decl): Handle global declarations here, + including optional initialization. + * t-builtins.cc (builtin_global): Deleted. + +Thu Nov 5 23:59:39 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_feval): New function. + * tree-extras.cc (feval): Handle the dirty details. + + * g-builtins.cc (builtin_rand): New function. + * tree-extras.cc (rand): Handle the dirty details. + +Wed Nov 4 14:54:17 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * num2str.m: New M-file. + * int2str.m: Ditto. + + * g-builtins.cc (builtin_disp): New function. + + * g-builtins.cc (builtin_fprintf, builtin_printf, + builtin_sprintf): New functions. + * tree-extras.cc (do_printf): New function to handle the gory + details. + + * g-builtins.cc (builtin_flops): Implement here because we may + actually want to count operations at some point. + +Tue Nov 3 17:06:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-const.cc (do_binary_op): Detect and give error message for + optations on empty matrices. + (do_unary_op): Likewise. + + * parse.y (matrix): Convert `[]' and `[;]' to empty matrices + instead of (tree_matrix *) NULL. + +Mon Nov 2 11:23:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * src/Makefile.in: Update dependencies. + * liboctave/Makefile.in: Ditto. + + * tree-const.cc (force_numeric): Consult matlab_strings() + before doing string to number conversion. + * builtins.cc (matlab_strings): New builtin variable. + * utils.cc (matlab_strings): New function. + + * tree-extras.cc (linear_constraints_ok): New function. + (linear_constraints_ok): Ditto. + (npsol): Use them to avoid creating inconsistent sets of + constraints and crashing. It would really be nice to have + exception handling. + + * symtab.cc (load): Issue error mesasges if attempt to find + name keyword fails. + + * Version 0.43. + + * tree-extras.cc (npsol): Use new minimize (phi, inform). + Handle nargout == 3. + + * g-builtins.cc (builtin_npsol): Allow nargout == 3. + + * NPSOL.cc (set_default_options): New function. + (all constructors): Use it. + (operator =): Use it and print warning message (setting default + options doesn't represent a true copy and it would be somewhat + difficult to fix this...). + + * npchkd.f (npchkd): Only write message if msglvl > 0. + +Sun Nov 1 00:58:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * gnuplot-build/Makefile.in (LIBDIRS): Set correctly. + (notgnuplot): Use it. + + * libcruft/misc/gen-d1mach.c: Generate d1mach.f at build time + instead of depending on the installer to get it right. + * libcruft/Makefile.in (gen-d1mach): New target. + + * libcruft/Makerules.in (SPECIAL): New macro. + (DISTFILES): Include it. + + * libcruft/Makerules.in (SPECIAL_DEPEND): Ditto. + (../../libcruft.a): Use it. + +Mon Oct 26 02:25:11 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (is_valid_function): Try harder to find M-files + that may not have been parsed yet. + + * symtab.cc (define (symbol_record*)): New function. Make it + simple to copy all fields of a symbol_record if we already have + one. + * utils.cc (force_global): Use it. + + * utils.cc (valid_identifier): Allow underscores in names. + + * tree-extras.cc (npsol): Force column vector to be returned. + (fsolve): Ditto. + + * Version 0.42. + + * tree-extras.cc (fsolve): New function for solving nonlinear + algebraic equations. This needs much more work if it is to + provide all the functionality of Matlab's fsolve. + + * tree-extras.cc (fsolve_user_function): New function. + + * libcruft/minpack: Import needed functions. + + * tree-extras.cc: (npsol (tree_constant*, int, int): Completely + rewrite to handle all of the follwing: + + 1. npsol (x, phi) + 2. npsol (x, phi, lb, ub) + 3. npsol (x, phi, lb, ub, llb, c, lub) + 4. npsol (x, phi, lb, ub, llb, c, lub, nllb, g, nlub) + 5. npsol (x, phi, lb, ub, nllb, g, nlub) + 6. npsol (x, phi, llb, c, lub, nllb, g, nlub) + 7. npsol (x, phi, llb, c, lub) + 8. npsol (x, phi, nllb, g, nlub) + + * tree-extras.cc (npsol_constraint_function): New function. + + * tree-extras.cc (tree_constant_to_vector): New function. + (tree_constant_to_matrix): Ditto. + (takes_correct_nargs): Ditto. + +Fri Oct 23 10:19:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (is_valid_function): New function. + (npsol): Use it. + + * utils.cc (s_plural): New function. + (es_plural): Ditto. + + * tree-extras.cc (npsol): Improve checks for valid objective + function. + + * tree.cc (tree_function::max_expected_args): New function. + +Thu Oct 22 18:42:07 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_lsode): Quick check of arguments, then + call lsode (tree_constant *, int, int). + * Move rest of code for implementing builtin_lsode to + tree-extras.cc. + + * g-builtins.cc (builtin_npsol: Quick check of arguments, then + call npsol (tree_constant *, int, int). + * Move rest of code for implementing builtin_npsol to + tree-extras.cc. + + * tree-const.cc: Simplify functions that require numeric arguments + by always calling make_numeric for them instead of doing it + conditionally. + * tree.cc: Ditto. + * tree-extras.cc: Ditto. + + * tree-const.h (tree_constant::make_numeric): Return *this if + already a numeric type. + + * NLP.cc: In constructors, don't try to assign NULL to bounds + objects. + + * tree-const.cc (tree_constant_rep::valid_as_scalar_index (void)): + New function. + * tree-const.cc (valid_scalar_indices (tree_constant*, int): + New function. + * tree-const.cc (tree_constant_rep::do_scalar_index): Simplify by + using functions to determine if arguments are valid as indices. + (tree_constant_rep::do_scalar_assignment): Likewise. + +Wed Oct 21 14:11:58 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-extras.cc (determinant): Make it work again. + + * tree.cc (tree_identifier::eval (tree_constant*, int, int, int): + Simplify logic. Only have one ans->eval() call. + + * tree-const.cc (tree_constant_rep::eval (tree_constant*, int, + int, int): Properly handle indexing of range constants. + + * tree-const.cc (stupid_fortran_style_matrix_index): Preserve row + or column orientation for vectors. + + * toeplitz.m: New M-file. + * invhilb.m: Ditto. + * hankel.m: Ditto. + + * tree-extras.cc (max): Handle two arg case. + tree-extras.cc (max): Likewise. + (min (Matrix&, Matrix&): New function. + (max (Matrix&, Matrix&): Ditto. + +Tue Oct 20 15:13:57 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.41. + +Mon Oct 19 16:46:35 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * rows.m: New M-file. + * g-builtins.cc (builtin_rows): Delete function. + * g-builtins.h (builtin_rows): Delete declaration. + * builtins.cc (general_functions): Delete from initialization list. + + * columns.m: New M-file. + * g-builtins.cc (builtin_columns): Delete function. + * g-builtins.h (builtin_columns): Delete declaration. + * builtins.cc (general_functions): Delete from initialization list. + + * length.m: New M-file. + * g-builtins.cc (builtin_length): Delete function. + * g-builtins.h (builtin_length): Delete declaration. + * builtins.cc (general_functions): Delete from initialization list. + + * g-builtins.cc (builtin_size): If two values are expected to be + returned, put nr and nc in separate registers. + +Sun Oct 18 13:37:17 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree-base.h: Extract base tree class declarations from tree.h. + * tree-const.cc, tree-const.h: Extract tree_constant class from + from tree.cc, tree.h. + Change all uses of tree.h to use either or both of tree-base.h and + tree-const.h. + + * Matrix.cc (solve): Replaces LinEqn class. + tree.cc (do_binary_op) Use it. + + * g-builtins.cc (builtin_max): New function. + tree.cc (tree_constant::max): New friend. + + * g-builtins.cc (builtin_min): New function. + tree.cc (tree_constant::min): New friend. + + * cond.m: New M-file. + + * rank.m: New M-file. + + * g-builtins.cc (builtin_svd): New function. + tree.cc (tree_constant::svd): New friend function. + + * g-builtins.cc (builtin_svd): New function. + tree.cc (tree_constant::svd): New friend function. + + * t-builtins.cc (builtin_format): New function. Implement some of + the Matlab options (sort of). + + * Major changes to liboctave source. A new Matrix.cc/Matrix.h + completely replaces the old Matrix/Vec/AVec code. All other + classes that use Matrix/Vector objects have been updated (or + deleted, if they are no longer needed). All callers changed in + octave sources. + +Sun Oct 11 21:22:16 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_function::eval): Don't define more function + parameters than are expected. If fewer arguments than expected + are actually supplied, force them to be undefined. + + * parse.y (fact): Give warning and abort for identifiers followed + by '['. This should catch most improper uses of [] instead of () + for indexing operators. + + * tree.cc (do_binary_op (Matrix&, Matrix&, tree::expression_type): + Handle element by element exponentiation. + +Tue Sep 22 10:09:06 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.40. + +Mon Sep 21 13:09:06 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l: Accept ** and .** as well as ^ and .^ as exponentiation + operators. + +Fri Sep 18 15:19:51 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.h tree.cc utils.cc g-builtins.cc: Elimitate need for + overloaded operator-> in the tree_constant class. Also eliminate + uses of ->string, ->scalar, etc. Instead, always call + .string_value(), .double_value(), etc. + + * builtins.cc (install_builtins): Reserve `ans' as an + uninitialized global variable (should it really be global?). + + * parse.y (ans_expression): Handle default assignemnt to builtin + variable ans. + (command): Use it. + +Tue Sep 15 14:06:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.39. + + * tree.cc (tree_identifier::bump_value): Don't try to increment + undefined symbols or values. + (tree_prefix_expression::eval): Don't call bump_value if id is a + NULL_TREE. + (tree_prefix_expression::eval): Likewise. + + * g-builtins.cc (lsode_builtin): Handle extra arguments. + liboctave/ODE.cc (integ): Add template for handling bad returns + from lsode. + + * tree.cc (class tree_return_command): Implementation is just like + break and continue. Something seems wrong about this... + lex.l (return): Recognize return statement. + parse.y (statement): Handle function returns. + tree.cc (various eval functions): Check to see if we are returning + from a function. + + * tree.cc (tree_for_command::eval): Set abort_on_undefined when + evaluating the loop body. + (tree_while_command::eval): Ditto. + + * tree.cc (class tree_idenfier): Improve searching/parsing M-files + when handling undefined names. + tree.cc (tree_identifier::parse_m_file (char*)): New function. + (tree_identifier::parse_m_file (void)): Use it. + + * utils.cc (force_global): New function. + * symtab.cc (symbol_table::remove_name(char *)): New function. + + * tree.h, tree.cc (class tree_constant): Split into two classes, + tree_constant (handle) and tree_constant_rep (body) to enable use + of `smart pointers' and reference counted memory management. + (Lots of things are different with this change.) + +Sat Aug 22 11:58:27 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.38. + + * lex.l (COMMA_KLUDGE): Delete production, all uses. This doesn't + seem to be necessary anymore, and the mystery output lines + disappear without it. + + * builtins.cc (make_eternal (char *)): New function. + (install_builtins): Make LOADPATH, eps, pi, Inf, and NaN eternal. + + * New M-files: mean.m, std.m, hadamard.m, vander.m, hilb.m, + linspace.m, logspace.m. + + * tree.cc (tree_function::eval): Don't check number of arguments + supplied against total number possible (previously thought to be + `expected') so that user-defined functions can have variable + numbers of arguments. + + * tree.cc (tree_identifier::eval_undefined_error): New function. + (tree_identifier::eval): Use it. + + * octave.cc (abort_on_undefined): New global symbol to control + whether we should jump to top level after an undefined symbol has + been encountered. + tree.cc (tree_function::eval) Set it before evaluating function + body, restore to previous value after successful completion. + tree.cc (tree_identifier::eval_undefined_error): Use it + +Fri Aug 20 09:31:14 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc: New mapper functions: + isnan: Uses xisnan, which calls IEEE function isnan. + isinf: Uses xisinf which calls IEEE functions finite and isnan, + or isinf if available. + finite: Uses xfinite, which calls IEEE function finite. + abs: Uses fabs. + + * g-builtins.cc (sumsq): New function. + (diag): New function. + + * tree.cc (tree_constant::sumsq): New function + (tree_constant::diag): New function + + * Matrix.cc (sumsq): New function. + (diag): Ditto. + +Thu Aug 20 00:36:44 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_error): New function. + + * gnuplot-build/Makefile.in (dist): Actually create `term' + subdirectory. + + * Lots of changes to tree.cc tree_assignment_expression::eval and + tree_index_expression::eval to make matrix indexing work like + Matlab. + (do_fortran_indexing): New user-level variable to control this + behavior. If this variable is false, things like + + a([1,2;3,4], [1,2;3,4]) = b + + become syntax errors. Otherwise, Matlab braindamage prevails. + +Tue Aug 18 13:15:46 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.37. + + * tree.cc (do_matrix_assignment): Conditionally allow single + indices for Matrix assignments. + (do_matrix_index): Ditto. + + * utils.cc (do_fortran_indexing): New function. + utils.h: Declare it. + builtins.cc (install_builtins): Default value for new + do_fortran_indexing variable. + + * builtins.cc (install_builtins): Bind eps to the value + DBL_EPSILON from float.h. Make it read only (will this cause + trouble)? + * Bind Inf to 1/0 (will only work for IEEE machines. + * Bind NaN to 0/0 (will only work for IEEE machines. + * Add round, fix, floor, ceil, and sign to builtin mapper functions. + (round): New function. + (fix): Ditto. + (signum): Ditto. + * Add clc (clear screen function). + * Add home (clear screen function). To be just like Matlab, this + wouldn't clear the screen. + + * New M-files: fliplr.m, flipud.m, trace.m, reshape.m. + + * utils.cc (bind_variable): Revise bind_string_variable so that it + takes a tree_constant as an argument. + (bind_protected_variable): Likewise for the function + bind_protected_string_variable. + (bind_string_variable): Delete. + (bind_protected_string_variable): Ditto. + utils.h: Fix declarations. + builtins.cc t-builtins.cc: Fix callers. + + * builtins.cc (install_builtins): Bind LOADPATH here. + octave.cc (initialize_globals): Not here. + + * Makefile.in (SOURCES): Add new scripts directory. + (scripts): New target. + libcruft/Makefile.in (install): Don't depend on all. + + * utils.cc (m_file_in_path): Get path from LOADPATH variable. + tree.cc (tree_identifier::parse_m_file): Modify caller. + + * src/Makefile.in (OCTAVE_M_FILE_DIR): New variable. + (utils.o): Use it. + utils.cc (default_path): Use it. + + * utils.cc (pathstring_to_vector): New function. + (default_path): Return colon separated path instead of vector of + paths. + * octave.cc (initialize_globals): Use pathstring_to_vector here. + Bind output of default_path to LOADPATH variable. + Eliminate octave_path global variable. + + * tree.cc (isstr): New function. + (all): Ditto. + (any): Ditto. + (cumprod): Ditto. + (cumsum): Ditto. + (prod): Ditto. + (sum): Ditto. + + * g-builtins.cc (builtin_isstr): New function. + (builtin_all): Ditto. + (builtin_any): Ditto. + (builtin_cumprod): Ditto. + (builtin_cumsum): Ditto. + (builtin_prod): Ditto. + (builtin_sum): Ditto. + + * Matrix.cc (all): New function. + (any): Ditto. + (cumprod): Ditto. + (cumsum): Ditto. + (prod): Ditto. + (sum): Ditto. + + * scripts: New directory. + scripts/strcmp.m: New file (first M-file function in distribution!). + scripts/Makefile.in: New file. + configure.in: Include scripts/Makefile in list of files to create. + +Sat Aug 15 18:32:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.36. + +Fri Aug 14 08:44:10 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (id_to_define): New global variable. + (curr_m_file_name): Ditto. + (current_infile): Ditto. + + * tree.h tree.cc (tree_identifier::parse_m_file): New function. + (tree_identifier::eval): Handle M-files. + + * tree.h (stash_m_file_name): New virtual function. + (stash_m_file_time): Ditto. + (time_parsed): Ditto. + (m_file_name): Ditto. + + * tree.h tree.cc (tree_function::stash_m_file_name) New function. + (tree_function::stash_m_file_time): Ditto. + (tree_function::time_parsed): Ditto. + (tree_function::m_file_name): Ditto. + + * lex.l (reading_m_file): New global variable. + (delete_buffer): New function. + (yywrap): New function. Always return 0 (is this a smart thing to + do?). + + * parse.y (func_def2): Handle input from m-files (sort of). + + * octave.cc (octave_path): New global variable. + (using_readline): Ditto. + (no_line_editing): Ditto. + + * octave.cc (main): Initialize current_command_number before + calling setjmp. + * Increment it in main command loop, not in parse.y. + + * utils.h utils.cc (default_path): New function. + (m_file_in_path): Ditto. + (is_newer): Ditto. + + * octave.cc (main): Execute commands here. + * parse.y (input): Not here. + + * octave.cc (tree *global_command): New global variable that + points to the current command to be executed. + +Thu Aug 13 07:08:11 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y: Make word_list_cmd a fact, not a command, so that + things like `y = who -all' can work. You can't do that in Matlab. + + * t-builtins.cc (builtin_who): Print symbols in columns, sorted. + (list_in_columns) New function, mostly stolen from GNU ls. + + * symtab.h symtab.cc (char **list (void)) New function. + (char **sorted_list (void) New function. + + * tree.cc (various eval functions): Handle printing results of + text and general functions here. Straighten out other printing + stuff, maybe... + + * t-builtins.h t-builtins.cc: Make text functions return + tree_constant* instead of int, delete print flag argument. + + * g-builtins.h g-builtins.cc: Delete print flag argument. + + * Version 0.35. + +Wed Aug 12 15:12:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_builtin::eval): Call mapper function with + print = 0 to avoid getting two answers. + (specific do_matrix_assignment functions): Handle resizing + correctly for `:' indices. + (tree_colon_expression::eval): Don't crash if the evaluation of + an operand yields a NULL_TREE_CONST. + +Mon Aug 10 07:31:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_identifier::define): Return NULL_TREE_CONST if + symbol_record::define fails. + (tree_identifier::assign): Likewise. + + * symtab.h (symbol_lifetime): New attribute for symbol_records. + Can be either temporary or eternal. + (symbol_class): Delete eternal attribute. + * builtins.cc (install_builtins): Mark all builtins as eternal. + + * Version 0.34. + + * tree.h: Delete ttype, enum list of tree types. + + * g-builtins.h g-builtins.cc (builtin_colloc): New function. + + * liboctave (various): Add missing return values, etc. so that + liboctave compiles cleanly. + + * tree.h tree.cc (tree_multi_assignment): New class to implement + assignments to more than one variable. Does it work? Maybe... + + * tree.h (tree_constant **eval (int, int)): New virtual function. + (is_identifier): Another one. + + * symtab.h (eternal): New class for symbol_records. + * symtab.h symtab.cc (make_eternal): New function. + * builtins.cc (install_builtins): Make builtin variables eternal. + + * tree.cc (list_to_vector): Surround by `#if 0/#endif' to avoid + compilation warning. + +Sun Aug 9 03:18:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * t-builtins.h t-builtins.cc (builtin_cd): New function adapted + from bash for changing the current working directory. + (builtin_pwd): New function adapted from bash for printing the + current working directory. + + * utils.h utils.cc: New functions from bash for changing and + printing the current working directory: + + pathname_backup make_absolute + get_working_directory change_to_directory + + * utils.h utils.cc (bind_string_variable): New function. + (bind_protected_string_variable): Likewise. + + * octave.cc (initialze_globals): New function. + + * utils.h utils.cc: New functions from bash, mostly for fancy + prompting: + + polite_directory_format absolute_pathname + absolute_program base_pathname + read_octal sub_append_string + decode_prompt_string + +Thu Aug 6 02:39:31 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * octave.cc (initialize_history): Fix up to + (octave_hist_file) New global variable. + (octave_hist_size) Ditto. + (history_lines_this_session) Ditto. + (history_lines_in_file) Ditto. + + * input.cc (octave_gets): Keep track of number of lines read + during the current session. + + * utils.cc (default_history_file): New function. Look for + OCTAVE_HISTFILE environment variable and use its value if + possible. + (default_history_size): New function. Look for OCTAVE_HISTSIZE + environment variable and use its value if possible. + + * t-builtins.cc (builtin_history): Steal from bash and modify to + work with octave. + + * g-builtins.cc (builtin_det): New function. + + * tree.h tree.cc (determinant): New function + + * g-builtins.cc: Rewrite functions that use fill_matrix, inverse, + and identity_matrix to use new versions implemented as friends of + tree_constant. This is being done in an attempt to get rid of all + calls to tree_constant::const_type() outside of tree.cc. + + * tree.cc (tree_constant): Implement new functions for filling + and inverting tree constants as matrices, and for creating an + identity matrix from a tree_constant. + + * g-builtins.cc (builtin_inv): New function. + builtins.cc: Allow builtin_inv to be called as either inv(A) or + inverse(A). + + * tree.cc (do_binary_op (Matrix, Matrix)): Better handling of + solution of linear equations for square coefficient matrices. + + * LinEqn.cc (solve): Don't exit on singular matrices. Implement + new variations of these functions that will allow status checking. + + * src/Makefile.in: Define GNUPLOT_BINARY and SITE_DEFAULTS. + Specific rules for octave.o and builtins.o to avoid defining + GNUPLOT_BINARY and SITE_DEFAULTS for all .cc targets. + + * builtins.cc: Use macro GNUPLOT_BINARY. + + * octave.cc (execute_startup_files): Use macro SITE_DEFAULTS. + Execute commands from SITE_DEFAULTS file. + + * t-buitlins.cc (builtin_pause): Make it work. + + * configure.in: Check for termio.h and/or sgtty.h. + + * octave.cc (clean_up): Reset terminal state to cooked mode. + (main) Likewise, after return from SIGINT signal handler. + + * utils.h utils.cc (raw_mode): New function (mostly stolen from + less(1)) toggle input processing for stdin to raw/cooked modes. + (kbhit): New function to read one character from cin in raw mode + without echoing it. + + * builtins.cc: Fix expected number of arguments in lists of + builtins. + + * tree.h tree.cc (max_args_expected (void)): New virtual function. + (tree_builtins::) Provide a definition of it. + + * lex.l (identifier): Before gobbling up text function arguments, + check to see that we expect some. + + * symtab.h symtab.cc (max_args_expected): Return max args expected + by a symbol (currently only valid for tree_builtins). + +Wed Aug 5 05:03:59 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * utils.h utils.cc (resize_on_range_error): Decide what to return + based on value of global variable of same name. + (prefer_column_vectors): Likewise. + + * Version 0.33. + + * parse.y (func_def2): Call define (tree *, symbol_type), not + define (tree *), so that the symbol type is set for user-defined + functions. + (assignment): Catch assignments to functions here. + + * tree.h tree.cc (tree_identifier::define (tree *, symbol_type): + New function (be careful out there...). + + * symtab.h (symbol_type): Add new `user_function' enum value. + + * tree.cc (do_matrix_assignment): Call prefer_column_vectors(). + + * tree.h tree.cc (do_matrix_assignment (...)): New functions to + implement assignment to indexed matrices. + (do_scalar_assignment (...)): New function to implement assignment + to an indexed scalar. + + * utils.h utils.cc (resize_on_range_error): New function. Should + eventually decide what to return based on value of global variable + of same name. + (prefer_column_vectors): New function. + +Tue Aug 4 05:37:47 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_constant::save): New function. + (tree_constant::load): New function. + + * symtab.cc (symbol_record::save): New function. + (symbol_table::load): New function. + + * t-builtins.cc (builtin_load): Start implementation. Yikes, this + is probably going to need a lot of work to be very robust... + + * t-builtins.cc (builtin_save): Implement by asking the + symbol_record to save itself. Maybe this should really be done by + asking the symbol table to save a symbol... + + * utils.cc (extract_keyword): New function. + (valid_identifier): New function. + +Fri Jul 31 04:16:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * parse.y (func_def3): Extra error cases for empty function + bodies. + (func_def1, func_def1a, func_def1b): Slighly straighten out some + truly twisted logic, eliminate func_def1a, rename func_def1b to + func_def1a, and make statementss like function [x,y] = foo() end + work properly (I think). + (func_def*): Put function name in global symbol table, not top + level symbold table. This makes them accessible from other + functions, eh? + + * t-builtins.cc (builtin_who): Accept -all, -local, -global, and + -top flags. + +Thu Jul 30 00:39:40 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * lex.l (current_buffer): New function to return current flex + input buffer. Will need this to be able to switch file contexts. + + * Version 0.32. + + * lex.l (create_buffer, switch_to_buffer): New functions to handle + input from various streams. This should be enough to allow us to + implement Matlab-like M-files. + octave.cc (main, execute_startup_files): Use them. + + * octave.cc (execute_startup_files): Execute commands from + $HOME/.octaverc and ./.octaverc. + + * g-builtins.cc (builtin_plot): Delete temporary files. + Ignore SIGINT while gnuplot is executing. + +Wed Jul 29 20:16:25 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (all_args_defined): New function to check a + tree_constant** vector to see if all elements are non-null. + (tree_index_expression::eval (int)): Use it, and abort the + evaluation if test fails. + + * terminals.h, terminals.cc: New files for doing things with + gnuplot graphics terminal names. + src/Makefile.in: Handle new files. + +Tue Jul 28 00:25:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * g-builtins.cc (builtin_plot): Make it work, at least halfway. + + * g-builtins.cc (builtin_save): New function. + + * gnuplot-build/Makefile.in: Add -DREADLINE and remove readline.o + from list of objects to actually enable the GNU command line + editing. + + * configure.in: Use AC_PROG_CHECK macro to search for f2c and f77. + Check for several common Un*x Fortran compilers. + Add extra messages. + + * g-builtins.cc g-builtins.h: New files for builtin general + functions extracted from builtins.cc. + + * t-builtins.cc t-builtins.h: New files for builtin text functions + extracted from builtins.cc. + + * Makefile.in (split-dist): New target. + + * Version 0.31. + +Mon Jul 27 22:01:58 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_constant::do_matrix_index (tree_constant **, int): + Allow single argument to work for matrices that are really row or + column vectors. + + * lex.l: Accept `<>' in addition to `!=' and `~=' as `not equal' + comparison operators. + + * libcruft/Makerules: Allow for compiling the Fortran routines + with the native Fortran compiler instead of translating to C. + + * f2c-compat.sh, flibs.sh: New scripts which try to determine + whether it will be possible for us to use the system's Fortran + compiler directly, and if so, what libraries to add to the loader + command. These scripts are known to work on SPARCstations running + SunOS and DECstations running Ultrix. Not tested elsewhere... + * configure.in: Use them. + * Makefile.in: Distribute them. + +Wed Jul 22 00:04:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * builtins.cc: Begin implementation of NLP solver using NPSOL. + +Tue Jul 21 13:44:13 1992 John W. Eaton (jwe@june.che.utexas.edu) + + * octave.cc: If printing version information, also print pointer + to warranty info. + + * builtins.cc: Implement the Matlab functions ones, zeros, eye, + clock, date, size, length, and global. + Implement warranty builtin. + (builtin_clear): Fix to work with global variables. + + * symtab.cc (clear): Fix to work properly with global variables. + +Mon Jul 20 11:58:23 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc (tree_constant::do_matrix_index (tree_constant**, int)): + Make string indices work. + (tree_constant::force_numeric): Don't special case + single-character strings (this uncovers a flaw in the design of + the constructor for the magic colon operator...). + +Fri Jul 17 16:33:00 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.30. + + * tree.cc: Delete undefined identifiers when trying to eval them. + + * builtins.cc: Add beginnings of builtin who and clear functions. + + * symtab.cc symtab.h (clear): New function. + + * tree.cc, tree.h, parse.y: Implement matrix indexing with colon + expressions, implement the magic colon operator for column and row + selection. + + * tree.cc tree.h: Completely rework colon expressions. + +Thu Jul 16 09:27:48 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * gnuplot-dist: Rename from gnuplot-3.2 so we're not tied to a + version number. + +Tue Jul 14 11:22:35 1992 John W. Eaton (jwe@ward.che.utexas.edu) + + * tree.cc builtins.cc: Make argc/nargs/nargin work like C: + the argument count is the number of command line arguments plus + the function name. This goes for `argument lists' for matrices as + well as functions. It seems a bit awkward but at it's consistent, + and it's like C. Hmm. Maybe this is a bad choice... + + * utils.cc utils.h: New files for utility functions. + +Mon Jul 13 00:29:50 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.29. + + * tree.cc tree_constant::tree_constant (matrix): Automatically + convert 1x1 matrices to scalars. + + * parse.y lex.l: Fix up a bunch of stupid stuff and reduce the + number of shift/reduce conflicts to 16 (all but one because of the + optional separator garbage). + + * parse.y lex.l: Allow for assignments to lists of identifiers to + be partially parsed. This will still require some error checking + in tree.cc to ensure that the list is made up of identifiers only, + since that's not enforced by the grammar (I don't see a way to do + it, do you?) + +Sun Jul 12 11:24:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * tree.cc tree.h parse.y lex.l: Implement logical AND (symbol &), + OR (symbol |), and not (symbol ~). Also provide the C-style + operators &&, ||, and !). + + * Matrix.cc Matrix.h: Provide stupid element-wise logical + operators for matrices. + + * Version 0.28. + + * parse.y lex.l tree.cc tree.h: Implement C-style prefix and + postfix increment and decrement operators (symbols ++ and -- + respectively). + + * parse.y lex.l tree.cc tree.h: Implement break and continue. + + * tree.cc tree.h: Assignment to matrix elements roughed out. + + * gnuplot/tree.cc: Solution of linear equations via the lift + division operator partially implemented. Singular coefficient + matrices aren't handled very well yet... + + * gnuplot-build/Makefile.in: Make this work to build gnuplot for + generic X11/unix environments. + * Remove -Wall from CFLAGS to avoid loads of warnings. + * Use GNU readline instead of the one that comes with gnuplot. + + * gnuplot-build/*.diff: Various patches for various things. + +Sat Jul 11 10:14:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.26 + + * src/Makefile.in: Distribute lex.cc, parse.cc, y.tab.h. + * src/Makefile.in (dist): Depend on lex.cc and parse.cc. + + * gnuplot-build: New directory for patching and building gnuplot. + This is apparenty required because the gnuplot license won't allow + distrubution of modified versions, but will allow patches to be + distributed. + * gnuplot-build/Makefile.in: New file. + + * gnuplot-3.2: New directory. + + * readline: New directory from the bash-1.12 distribution, plus + tilde.c from bash's lib/glob directory and xmalloc.c from bash's + lib/malloc directory. + * readline/Makefile.in, readline/doc/Makefile.in, + readline/examples/Makefile.in: New files. + + * All Makefie.in files: Allow make to work from any directory, not + just the top level one. + +Fri Jul 10 22:20:56 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * SERVICE: Remove, since it seems too specific to GNU products. + +Thu Jul 9 07:48:33 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.20. + + * Solution of ODEs with LSODE partially implemented. It's + possible to solve some simple equations. + + * tree.cc tree.h (tree_constant): Add string constants and make + them work more or less like string constants in Matlab (implicit + conversion to ASCII numbers -- gag. This isn't complete, and it + it assumes that ASCII is the character set for the host + machine/compiler...). + +Tue Jul 7 07:28:35 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.19. + + * User defined function definitions and calls to them mostly work. + Still need to implement multiple return values correctly. + +Mon Jul 6 04:23:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.18. + + * lex.l parse.y tree.cc tree.h: Begin implementation of + user-defined functions. + +Sun Jul 5 19:27:08 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.17. + + * lex.l: Replace SAVE_STRING macro with a function. + + * builtins.cc (builtin_document): New builtin function. + (builtin_help): Make it work. + + * lex.l: More rules for gathering text. These are still not quite + as they should be, but they will work in most cases. I think the + flex generated scanner is either going to have to be reworked or + replaced with a handemade version at some point (probably soon)... + + * tree.cc tree.h: Add tree_word_list and tree_word_list_command + classes for text functions. + +Fri Jul 3 05:13:15 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.16. + + * builtins.h builtins.cc: New files for builtin functions. + Implement a few simple builtin functions. + + * tree.cc tree.h: Add tree_builtin type for builtin functions. + + * tree.cc tree.h: eval (args...) New virtual function. + +Thu Jul 2 01:27:38 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.15. + + * symtab.h, symtab.cc: Allow variables and functions to be tagged + as read-only or read-write. + +Wed Jul 1 15:54:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * input.cc and octave.cc: allow input to come from a file. + + * lex.l: to accept `#' as a comment character (allows one to + use the `#!/bin/octave' style script hack). + + * doc: New directory containing skeleton stuff + * SERVICE: New file from GCC. + * BUGS: New file, now produced from doc/bugs.texi. + * INSTALL: New file, now produced from doc/install.texi. + +Sat Jun 27 15:52:37 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.14. + + * Fixed parser to eliminate reduce/reduce conflicts. + + * Fixed parser to recognize assignment to multiple identifiers + (e.g., [E,V] = eig (A); ). + + * Quickie implementation of indexed array evaluation. Works for + scalar indices, but not range/array indices. + +Fri Jun 26 04:23:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.12. + + * Hooks added for indexed array evaluation and assignment. + * Colon expression implementation improved. + * Implementation of for command eval() improved. + +Thu Jun 25 00:28:12 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.11. + + * Colon expressions added. + * For command added, but the implementation needs work. + +Wed Jun 24 15:09:36 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.10. + + * Cheesy signal handler added to catch interrupts. + + * Matrix input works, even for nested matrices. Some error + checking is done while the matrix is evaluated to ensure that + the number of rows and columns match up. + +Mon Jun 22 00:21:49 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.9. + + * Command line matrix input partially implemented. It's not yet + possible to enter nested matrices, but it is possible to enter + simple matrices (e.g. [1,2;a,b+c], where a, b, and c are scalars. + + * Version 0.8. + + * If commands added. + + * Version 0.7. + + * Command chains added. + * Boolean operations added, tested for scalars. + * While loop added, tested for simple commands. + +Fri Jun 19 05:50:44 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.6. + + At this early stage, while a lot of changes are being made very + quickly, ChangeLog entries will probably just list features added. + + * Variable assignment works for scalars. + * Simple scalar expressions work. + +Thu Jun 18 06:44:24 1992 John W. Eaton (jwe@schoch.che.utexas.edu) + + * Version 0.5. + + * src/version.h: For all the pre-alpha distributions, count + versions as 0.1, etc. instead of 0.01. + + * Makefile: (dist) Automatically update version_string in + src/version.h. + + * symtab.h, symbtab.cc: New files for symbol tables. + + * tree.h, tree.cc: New files for parse trees. + + * Lots of work unrecorded here. Octave is now self-contained, the + tree routines are being redesigned, etc. + +Fri Mar 20 17:03:16 1992 John W. Eaton (jwe@andy.che.utexas.edu) + + * Version 0.02. Octave understands some simple matrix + expressions, but it is not yet possible for matrix elements to + be constructed from expressions. + +Thu Mar 19 06:13:39 1992 John W. Eaton (jwe@andy.che.utexas.edu) + + * Version 0.01. Octave understands simple scalar expressions. + Hey, Hey! It is not yet self contained -- I'm still linking to + the old libraries in /usr/local/c++-classes, and this isn't likely + to change for a while. (Other things are much more important than + making the distribution work on other machines. Sorry...) + +Fri Feb 21 05:06:38 1992 John W. Eaton (jwe@andy.che.utexas.edu) + + * Version 0.00. This includes the basic directory structure, + makefiles, and a lot of the old Fortran source, including a way to + make a libcruft.a. Octave compiles and accepts input (with + history and editing) but doesn't do much else. + +Wed Feb 19 06:20:44 1992 John W. Eaton (jwe@andy.che.utexas.edu) + + * ChangeLog: New file.
new file mode 100644 --- /dev/null +++ b/INSTALL @@ -0,0 +1,114 @@ +This file documents the use of Octave's configuration script and the +command line options it recognizes. + +See the file INSTALL.OCTAVE for information specific to installing +Octave. + + +To compile this package: + +1. Configure the package for your system. In the directory that this +file is in, type `./configure'. If you're using `csh' on an old +version of System V, you might need to type `sh configure' instead to +prevent `csh' from trying to execute `configure' itself. + +The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation, and +creates the Makefile(s) (one in each subdirectory of the source +directory). In some packages it creates a C header file containing +system-dependent definitions. It also creates a file `config.status' +that you can run in the future to recreate the current configuration. + +Running `configure' takes a minute or two. While it is running, it +prints some messages that tell what it is doing. If you don't want to +see the messages, run `configure' with its standard output redirected +to `/dev/null'; for example, `./configure >/dev/null'. + +To compile the package in a different directory from the one +containing the source code, you must use a version of make that +supports the VPATH variable, such as GNU make. `cd' to the directory +where you want the object files and executables to go and run +`configure'. `configure' automatically checks for the source code in +the directory that `configure' is in and in `..'. If for some reason +`configure' is not in the source code directory that you are +configuring, then it will report that it can't find the source code. +In that case, run `configure' with the option `--srcdir=DIR', where +DIR is the directory that contains the source code. + +By default, `make install' will install the package's files in +/usr/local/bin, /usr/local/lib, /usr/local/man, etc. You can specify +an installation prefix other than /usr/local by giving `configure' the +option `--prefix=PATH'. Alternately, you can do so by giving a value +for the `prefix' variable when you run `make', e.g., + make prefix=/usr/gnu + +You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If +you give `configure' the option `--exec_prefix=PATH' or set the +`make' variable `exec_prefix' to PATH, the package will use PATH as +the prefix for installing programs and libraries. Data files and +documentation will still use the regular prefix. Normally, all files +are installed using the regular prefix. + +You can tell `configure' to figure out the configuration for your +system, and record it in `config.status', without actually configuring +the package (creating `Makefile's and perhaps a configuration header +file). To do this, give `configure' the `--no-create' option. Later, +you can run `./config.status' to actually configure the package. This +option is useful mainly in `Makefile' rules for updating `config.status' +and `Makefile'. You can also give `config.status' the `--recheck' +option, which makes it re-run `configure' with the same arguments you +used before. This is useful if you change `configure'. + +`configure' ignores any other arguments that you give it. + +If your system requires unusual options for compilation or linking +that `configure' doesn't know about, you can give `configure' initial +values for some variables by setting them in the environment. In +Bourne-compatible shells, you can do that on the command line like +this: + CC='gcc -traditional' DEFS=-D_POSIX_SOURCE ./configure + +The `make' variables that you might want to override with environment +variables when running `configure' are: + +(For these variables, any value given in the environment overrides the +value that `configure' would choose:) +CC C compiler program. + Default is `cc', or `gcc' if `gcc' is in your PATH. +INSTALL Program to use to install files. + Default is `install' if you have it, `cp' otherwise. + +(For these variables, any value given in the environment is added to +the value that `configure' chooses:) +DEFS Configuration options, in the form `-Dfoo -Dbar ...' +LIBS Libraries to link with, in the form `-lfoo -lbar ...' + +If you need to do unusual things to compile the package, we encourage +you to figure out how `configure' could check whether to do them, and +mail diffs or instructions to the address given in the README so we +can include them in the next release. + +2. Type `make' to compile the package. If you want, you can override +the `make' variables CXXFLAGS, CFLAGS, FFLAGS, and LDFLAGS like this: + + make CXXFLAGS=-O2 CFLAGS=-O2 FFLAGS=-O LDFLAGS=-s + +3. If the package comes with self-tests and you want to run them, +type `make check'. If you're not sure whether there are any, try it; +if `make' responds with something like + make: *** No way to make target `check'. Stop. +then the package does not come with self-tests. + +4. Type `make install' to install programs, data files, and +documentation. + +5. You can remove the program binaries and object files from the +source directory by typing `make clean'. To also remove the +Makefile(s), the header file containing system-dependent definitions +(if the package uses one), and `config.status' (all the files that +`configure' created), type `make distclean'. + +The file `configure.in' is used as a template to create `configure' by +a program called `autoconf'. You will only need it if you want to +regenerate `configure' using a newer version of `autoconf'.
new file mode 100755 --- /dev/null +++ b/MAKEINFO.PATCH @@ -0,0 +1,317 @@ +For the following Texinfo file, + + \input texinfo + @setfilename foo.info + + @ifinfo + @node Top, concept index, (dir), (dir) + @top + @end ifinfo + + Some text here. + + @cindex foo-concept + @findex foo-function + + @defindex xx + @synindex cp xx + @synindex fn xx + + Some more text here. + + @cindex bar-concept + @findex bar-function + + @ifinfo + @menu + * concept index:: + * function index:: + * xx index:: + @end menu + @end ifinfo + + @node concept index, function index, Top, Top + @chapter concept index + + @printindex cp + + @node function index, xx index, concept index, Top + @chapter function index + + @printindex fn + + @node xx index, , function index, Top + @chapter xx index + + @printindex xx + + @bye + +TeX creates three indices with the contents + + concept index + foo-concept + + function index + foo-function + + xx index + bar-concept + bar-function + +but makeinfo version 1.64 (from texinfo-3.7) creates three indices +with the contents: + + concept index + bar-concept + bar-function + + function index + bar-function + + xx index + bar-function + +Here is a patch that will cause makeinfo to behave more like +TeX/texinfo.tex. + +Sat Dec 30 15:57:34 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * makeinfo.c (INDEX_ALIST): Use two indices, read_index and + write_index, instead of just one. + (find_index_offset): If a match is found, return index to the + current INDEX_ALIST struct, not the index pointing to the list of + index entries. + (translate_index): Return read_index from the matching + INDEX_ALIST. + (undefindex): Delete the list of index elements pointed to by + read_index from the INDEX_ALIST that matches name. + (defindex): Initialize read_index and write_index. + (index_add_arg): Add entries to the list pointed to by write_index + from the INDEX_ALIST matching name. + (index_append): Delete unused function. + (cm_synindex): Don't merge indcies, just make the write_index for + redirectee the same as the write_index for redirector. + +*** makeinfo.c.orig Sat Dec 23 16:18:37 1995 +--- makeinfo.c Sat Dec 30 15:51:17 1995 +*************** +*** 7408,7421 **** + int defining_line; /* Line number where this entry was written. */ + } INDEX_ELT; + +! /* A list of short-names for each index, and the index to that index in our +! index array, the_indices. In addition, for each index, it is remembered +! whether that index is a code index or not. Code indices have @code{} +! inserted around the first word when they are printed with printindex. */ + typedef struct + { + char *name; +! int index; + int code; + } INDEX_ALIST; + +--- 7408,7447 ---- + int defining_line; /* Line number where this entry was written. */ + } INDEX_ELT; + +! /* A list of short-names for each index. +! +! There are two indices into the the_indices array. +! +! * read_index is the index that points to the list of index +! entries that we will find if we ask for the list of entries for +! this name. +! +! * write_index is the index that points to the list of index entries +! that we will add new entries to. +! +! Initially, read_index and write index are the same, but the +! @syncodeindex and @synindex commands can change the list we add +! entries to. +! +! For example, after the commands +! +! @cindex foo +! @defindex xx +! @synindex cp xx +! @cindex bar +! +! the cp index will contain the entry `foo', and the new xx +! index will contain the entry `bar'. This is consistent with the +! way texinfo.tex handles the same situation. +! +! In addition, for each index, it is remembered whether that index is +! a code index or not. Code indices have @code{} inserted around the +! first word when they are printed with printindex. */ + typedef struct + { + char *name; +! int read_index; /* index entries for `name' */ +! int write_index; /* store index entries here, @synindex can change it */ + int code; + } INDEX_ALIST; + +*************** +*** 7480,7486 **** + for (i = 0; i < defined_indices; i++) + if (name_index_alist[i] && + strcmp (name, name_index_alist[i]->name) == 0) +! return (name_index_alist[i]->index); + return (-1); + } + +--- 7506,7513 ---- + for (i = 0; i < defined_indices; i++) + if (name_index_alist[i] && + strcmp (name, name_index_alist[i]->name) == 0) +! return i; +! + return (-1); + } + +*************** +*** 7506,7512 **** + INDEX_ALIST *which = find_index (name); + + if (which) +! return (which->index); + else + return (-1); + } +--- 7533,7539 ---- + INDEX_ALIST *which = find_index (name); + + if (which) +! return (which->read_index); + else + return (-1); + } +*************** +*** 7539,7545 **** + } + } + +! /* Flush an index by name. */ + void + undefindex (name) + char *name; +--- 7566,7573 ---- + } + } + +! /* Flush an index by name. This will delete the list of entries that +! would be written by a @printindex command for this index. */ + void + undefindex (name) + char *name; +*************** +*** 7550,7556 **** + if (which < 0) + return; + +! i = name_index_alist[which]->index; + + free_index (the_indices[i]); + the_indices[i] = (INDEX_ELT *) NULL; +--- 7578,7584 ---- + if (which < 0) + return; + +! i = name_index_alist[which]->read_index; + + free_index (the_indices[i]); + the_indices[i] = (INDEX_ELT *) NULL; +*************** +*** 7598,7604 **** + /* We have a slot. Start assigning. */ + name_index_alist[slot] = (INDEX_ALIST *) xmalloc (sizeof (INDEX_ALIST)); + name_index_alist[slot]->name = strdup (name); +! name_index_alist[slot]->index = slot; + name_index_alist[slot]->code = code; + + the_indices[slot] = (INDEX_ELT *) NULL; +--- 7626,7633 ---- + /* We have a slot. Start assigning. */ + name_index_alist[slot] = (INDEX_ALIST *) xmalloc (sizeof (INDEX_ALIST)); + name_index_alist[slot]->name = strdup (name); +! name_index_alist[slot]->read_index = slot; +! name_index_alist[slot]->write_index = slot; + name_index_alist[slot]->code = code; + + the_indices[slot] = (INDEX_ELT *) NULL; +*************** +*** 7615,7621 **** + + tem = find_index (name); + +! which = tem ? tem->index : -1; + + #if defined (HAVE_MACROS) + if (macro_expansion_output_stream) +--- 7644,7650 ---- + + tem = find_index (name); + +! which = tem ? tem->write_index : -1; + + #if defined (HAVE_MACROS) + if (macro_expansion_output_stream) +*************** +*** 7718,7739 **** + } + } + +- /* Append LIST2 to LIST1. Return the head of the list. */ +- INDEX_ELT * +- index_append (head, tail) +- INDEX_ELT *head, *tail; +- { +- register INDEX_ELT *t_head = head; +- +- if (!t_head) +- return (tail); +- +- while (t_head->next) +- t_head = t_head->next; +- t_head->next = tail; +- return (head); +- } +- + /* Expects 2 args, on the same line. Both are index abbreviations. + Make the first one be a synonym for the second one, i.e. make the + first one have the same index as the second one. */ +--- 7747,7752 ---- +*************** +*** 7757,7778 **** + } + else + { +! /* I think that we should let the user make indices synonymous to +! each other without any lossage of info. This means that one can +! say @synindex cp dt anywhere in the file, and things that used to +! be in cp will go into dt. */ +! INDEX_ELT *i1 = the_indices[redirectee], *i2 = the_indices[redirector]; +! +! if (i1 || i2) +! { +! if (i1) +! the_indices[redirectee] = index_append (i1, i2); +! else +! the_indices[redirectee] = index_append (i2, i1); +! } +! +! name_index_alist[redirectee]->index = +! name_index_alist[redirector]->index; + } + } + +--- 7770,7777 ---- + } + else + { +! name_index_alist[redirectee]->write_index = +! name_index_alist[redirector]->write_index; + } + } +
new file mode 100644 --- /dev/null +++ b/NEWS @@ -0,0 +1,1960 @@ +Summary of changes for version 1.2: +---------------------------------- + + * The configure option --enable-bounds-check turns on bounds + checking on element references for Octave's internal array and + matrix classes. It's enabled by default. To disable this + feature, configure Octave with --disable-bounds-check. + + * The C-style I/O functions (fopen, fprintf, etc.) have been + rewritten to be more compatible with Matlab. The fputs function + has also been added. Usage of the *printf functions that was + allowed in previous versions of Octave should still work. + However, there is no way to make the new versions of the *scanf + functions compatible with Matlab *and* previous versions of + Octave. An optional argument to the *scanf functions is now + available to make them behave in a way that is compatible with + previous versions of Octave. + + * The interface to the pager has changed. The new built-in variable + `page_output_immediately' controls when Octave sends output to the + pager. If it is nonzero, Octave sends output to the pager as soon + as it is available. Otherwise, Octave buffers its output and + waits until just before the prompt is printed to flush it to the + pager. + + * Expressions of the form + + A(i,j) = x + + where X is a scalar and the indices i and j define a matrix of + elements now work as you would expect rather than giving an error. + I am told that this is how Matlab 5.0 will behave when it is + released. + + * Indexing of character strings now works. + + * The echo command has been implemented. + + * The document command is now a regular function. + + * New method for handling errors: + + try + BODY + catch + CLEANUP + end_try_catch + + Where BODY and CLEANUP are both optional and may contain any + Octave expressions or commands. The statements in CLEANUP are + only executed if an error occurs in BODY. + + No warnings or error messages are printed while BODY is + executing. If an error does occur during the execution of BODY, + CLEANUP can access the text of the message that would have been + printed in the builtin constant __error_text__. This is the same + as eval (TRY, CATCH) (which may now also use __error_text__) but + it is more efficient since the commands do not need to be parsed + each time the TRY and CATCH statements are evaluated. + + * Octave no longer parses the help command by grabbing everything + after the keyword `help' until a newline character is read. To + get help for `;' or `,', now, you need to use the command + `help semicolon' or `help comma'. + + * Octave's parser now does some simple constant folding. This means + that expressions like 3*i are now evaluated only once, when a + function is compiled, and the right hand side of expressions like + a = [1,2;3,4] are treated as true matrix constants rather than + lists of elements which must be evaluated each time they are + needed. + + * Built-in variables that can take values of "true" and "false" can + now also be set to any nonzero scalar value to indicate "true", + and 0 to indicate "false". + + * New built-in variables `history_file', `history_size', and + `saving_history'. + + * New built-in variable `string_fill_char' specifies the character + to fill with when creating arrays of strings. + + * If the new built-in variable `gnuplot_has_frames' is nonzero, + Octave assumes that your copy of gnuplot includes support for + multiple plot windows when using X11. + + If the new built-in variable `gnuplot_has_multiplot' is nonzero, + Octave assumes that your copy of gnuplot has the multiplot support + that is included in recent 3.6beta releases. + + The initial values of these variables are determined by configure, + but can be changed in your startup script or at the command line + in case configure got it wrong, or if you upgrade your gnuplot + installation. + + * The new plot function `figure' allows multiple plot windows when + using newer versions of gnuplot with X11. + + * Octave now notices when the plotter has exited unexpectedly. + + * New built-in variable `warn_missing_semicolon'. If nonzero, Octave + will warn when statements in function definitions don't end in + semicolons. The default value is 0. + + * Octave now attempts to continue after floating point exceptions + or out-of-memory errors. + + * If Octave crashes, it now attempts to save all user-defined + variables in a file named `octave-core' in the current directory + before exiting. + + * It is now possible to get the values of individual option settings + for the dassl, fsolve, lsode, npsol, qpsol, and quad functions + using commands like + + dassl_reltol = dassl_options ("relative tolerance"); + + * The svd() function no longer computes the left and right singular + matrices unnecessarily. This can significantly improve + performance for large matrices if you are just looking for the + singular values. + + * The filter() function is now a built-in function. + + * New function randn() returns a pseudo-random number from a normal + distribution. The rand() and randn() functions have separate + seeds and generators. + + * Octave's command-line arguments are now available in the built-in + variable `argv'. The program name is also available in the + variables `program_invocation_name' and `program_name'. If + executing a script from the command line (e.g., octave foo.m) or + using the `#! /bin/octave' hack, the program name is set to the + name of the script. + + * New built-in variable `completion_append_char' used as the + character to append to successful command-line completion + attempts. The default is " " (a single space). + + * Octave now uses a modified copy of the readline library from + version 1.14.5 of GNU bash. + + * In prompt strings, `\H' expands to the whole host name. + + * New built-in variable `beep_on_error'. If nonzero, Octave will try + to ring your terminal's bell before printing an error message. + The default value is 0. + + * New command-line argument --traditional sets the following + preference variables for compatibility with Matlab: + + PS1 = ">> " + PS2 = "" + beep_on_error = 1 + default_save_format = "mat-binary" + define_all_return_values = 1 + do_fortran_indexing = 1 + empty_list_elements_ok = 1 + implicit_str_to_num_ok = 1 + ok_to_lose_imaginary_part = 1 + page_screen_output = 0 + prefer_column_vectors = 0 + prefer_zero_one_indexing = 1 + print_empty_dimensions = 0 + treat_neg_dim_as_zero = 1 + warn_function_name_clash = 0 + whitespace_in_literal_matrix = "traditional" + + * New functions: + + readdir -- returns names of files in directory as array of strings + mkdir -- create a directory + rmdir -- remove a directory + rename -- rename a file + unlink -- delete a file + umask -- set permission mask for file creation + stat -- get information about a file + lstat -- get information about a symbolic link + more -- turn the pager on or off + gammaln -- alias for lgamma + + * New audio functions from Andreas Weingessel + <Andreas.Weingessel@ci.tuwien.ac.at>. + + lin2mu -- linear to mu-law encoding + loadaudio -- load an audio file to a vector + mu2lin -- mu-law to linear encoding + playaudio -- play an audio file + record -- record sound and store in vector + saveaudio -- save a vector as an audio file + setaudio -- executes mixer shell command + + * New plotting functions from Vinayak Dutt. Ones dealing with + multiple plots on one page require features from gnuplot 3.6beta + (or later). + + bottom_title -- put title at the bottom of the plot + mplot -- multiplot version of plot + multiplot -- switch multiple-plot mode on or off + oneplot -- return to one plot per page + plot_border -- put a border around plots + subplot -- position multiple plots on a single page + subwindow -- set subwindow position for next plot + top_title -- put title at the top of the plot + zlabel -- put a label on the z-axis + + * New string functions + + bin2dec -- convert a string of ones and zeros to an integer + blanks -- create a string of blanks + deblank -- delete trailing blanks + dec2bin -- convert an integer to a string of ones and zeros + dec2hex -- convert an integer to a hexadecimal string + findstr -- locate occurrences of one string in another + hex2dec -- convert a hexadecimal string to an integer + index -- return position of first occurrence a string in another + rindex -- return position of last occurrence a string in another + split -- divide one string into pieces separated by another + str2mat -- create a string matrix from a list of strings + strrep -- replace substrings in a string + substr -- extract a substring + + The following functions return a matrix of ones and zeros. + Elements that are nonzero indicate that the condition was true for + the corresponding character in the string array. + + isalnum -- letter or a digit + isalpha -- letter + isascii -- ascii + iscntrl -- control character + isdigit -- digit + isgraph -- printable (but not space character) + islower -- lower case + isprint -- printable (including space character) + ispunct -- punctuation + isspace -- whitespace + isupper -- upper case + isxdigit -- hexadecimal digit + + These functions return new strings. + + tolower -- convert to lower case + toupper -- convert to upper case + + * New function, fgetl. Both fgetl and fgets accept an optional + second argument that specifies a maximum number of characters to + read, and the function fgets is now compatible with Matlab. + + * Printing in hexadecimal format now works (format hex). It is also + possible to print the internal bit representation of a value + (format bit). Note that these formats are only implemented for + numeric values. + + * Additional structure features: + + -- Name completion now works for structures. + + -- Values and names of structure elements are now printed by + default. The new built-in variable `struct_levels_to_print' + controls the depth of nested structures to print. The default + value is 2. + + -- New functions: + + struct_contains (S, NAME) -- returns 1 if S is a structure with + element NAME; otherwise returns 0. + + struct_elements (S) -- returns the names of all elements + of structure S in an array of strings. + + * New io/subprocess functions: + + fputs -- write a string to a file with no formatting + popen2 -- start a subprocess with 2-way communication + mkfifo -- create a FIFO special file + popen -- open a pipe to a subprocess + pclose -- close a pipe from a subprocess + waitpid -- check the status of or wait for subprocesses + + * New time functions: + + asctime -- format time structure according to local format + ctime -- equivalent to `asctime (localtime (TMSTRUCT))' + gmtime -- return time structure corresponding to UTC + localtime -- return time structure corresponding to local time zone + strftime -- print given time structure using specified format + time -- return current time + + The `clock' and `date' functions are now implemented in M-files + using these basic functions. + + * Access to additional Unix system calls: + + dup2 -- duplicate a file descriptor + exec -- replace current process with a new process + fcntl -- control open file descriptors + fork -- create a copy of the current process + getpgrp -- return the process group id of the current process + getpid -- return the process id of the current process + getppid -- return the process id of the parent process + pipe -- create an interprocess channel + + * Other new functions: + + atexit -- register functions to be called when Octave exits + putenv -- define an environment variable + meshgrid -- compatible with Matlab's meshgrid function + tilde_expand -- perform tilde expansion on string + completion_matches -- perform command completion on string + + * The New function octave_config_info returns a structure containing + information about how Octave was configured and compiled. + + * New function getrusage returns a structure containing system + resource usage statistics. The `cputime' function is now defined + in an M-file using getrusage. + + * The info reader is now a separate binary that runs as a + subprocess. You still need the info reader distributed with + Octave though, because there are some new command-line arguments + that are not yet available in the public release of Info. + + * There is a new built-in variable, INFO_PROGRAM, which is used as + the name of the info program to run. Its initial value is + $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH/info, but that value can + be overridden by the environment variable OCTAVE_INFO_PROGRAM, or + the command line argument --info-program NAME, or by setting the + value of INFO_PROGRAM in a startup script. + + * There is a new built-in variable, EXEC_PATH, which is used as + the list of directories to search when executing subprograms. Its + initial value is taken from the environment variable + OCTAVE_EXEC_PATH (if it exists) or PATH, but that value can be + overridden by the the command line argument --exec-path PATH, or + by setting the value of EXEC_PATH in a startup script. If the + EXEC_PATH begins (ends) with a colon, the directories + $OCTAVE_HOME/lib/octave/VERSION/exec/ARCH and $OCTAVE_HOME/bin are + prepended (appended) to EXEC_PATH (if you don't specify a value + for EXEC_PATH explicitly, these special directories are prepended + to your PATH). + + * If it is present, Octave will now use an `ls-R' database file to + speed up recursive path searching. Octave looks for a file called + ls-R in the directory specified by the environment variable + OCTAVE_DB_DIR. If that is not set but the environment variable + OCTAVE_HOME is set, Octave looks in $OCTAVE_HOME/lib/octave. + Otherwise, Octave looks in the directory $datadir/octave (normally + /usr/local/lib/octave). + + * New examples directory. + + * There is a new script, mkoctfile, that can be used to create .oct + files suitable for dynamic linking. + + * Many more bug fixes. + + * ChangeLogs are now kept in each subdirectory. + +Summary of changes for version 1.1.1: +------------------------------------ + + * New built-in variables, default_return_value and + define_all_return_values. + + If define_all_return_values is set to "false", Octave does not do + anything special for return values that are left undefined, and + you will get an error message if you try to use them. For + example, if the function + + function [x, y] = f () + y = 1; + endfunction + + is called as + + octave:13> [a, b] = f () + + Octave will print an error message for the attempt to assign an + undefined value to `a'. + + This is incompatible with Matlab, which will define the return + variable `x' to be the empty matrix. To get the Matlab-like + behavior, you can set the variable define_all_return_values to + "true" (the default is "false") and default_return_value to `[]' + (the default). Then, any return values that remain undefined when + the function returns will be initialized to `[]'. + + If the function is called without explicitly asking for an output, + it will succeed. This behavior is compatible and unchanged from + previous versions of Octave. + + * New built-in variable suppress_verbose_help_message. If set to + "true", Octave will not add additional help information to the end + of the output from the help command and usage messages for + built-in commands. The default value is "false". + + * New built-in variable PS4 is used as the prefix of echoed input + (enabled with the --echo-input (-x) option). + + * The function size() now accepts an optional second argument. + + * Output from `save - ...' now goes through the pager. + + * The break statement may also be used to exit a function, for + compatibility with Matlab. + + * The directory tree for installing Octave is now closer to + conforming with the current GNU standards. + + * More bug fixes. + +Summary of changes for version 1.1.0: +------------------------------------ + + * Octave now requires g++ 2.6.3 or later. This change is necessary + to make template instantiations cleaner, and to avoid having to + have special cases in the code for earlier versions of gcc. + + * A new data structure type has been added. The implementation uses + an associative array with indices limited to strings, but the + syntax is more like C-style structures. here are some examples of + using it. + + Elements of structures can be of any type, including structures: + + octave:1> x.a = 1; + octave:2> x.b = [1, 2; 3, 4]; + octave:3> x.c = "string"; + octave:4> x + x = + + <structure: a b c> + + octave:5> x.a + x.a = 1 + octave:6> x.b + x.b = + + 1 2 + 3 4 + + octave:7> x.c + x.c = string + octave:8> x.b.d = 3 + x.b.d = 3 + octave:9> x.b + x.b = + + <structure: d> + + octave:10> x.b.d + x.b.d = 3 + + Functions can return structures: + + octave:1> a = rand (3) + rand (3) * I; + octave:2> function y = f (x) + > y.re = real (x); + > y.im = imag (x); + > endfunction + octave:3> f (a) + ans = + + <structure: im re> + + octave:4> ans.im + ans.im = + + 0.093411 0.229690 0.627585 + 0.415128 0.221706 0.850341 + 0.894990 0.343265 0.384018 + + octave:5> ans.re + ans.re = + + 0.56234 0.14797 0.26416 + 0.72120 0.62691 0.20910 + 0.89211 0.25175 0.21081 + + Return lists can include structure elements: + + octave:1> [x.u, x.s, x.v] = svd ([1, 2; 3, 4]) + x.u = + + -0.40455 -0.91451 + -0.91451 0.40455 + + x.s = + + 5.46499 0.00000 + 0.00000 0.36597 + + x.v = + + -0.57605 0.81742 + -0.81742 -0.57605 + + octave:8> x + x = + + <structure: s u v> + + This feature should be considered experimental, but it seems to + work ok. Suggestions for ways to improve it are welcome. + + * Octave now supports a limited form of exception handling modelled + after the unwind-protect form of Lisp: + + unwind_protect + BODY + unwind_protect_cleanup + CLEANUP + end_unwind_protect + + Where BODY and CLEANUP are both optional and may contain any + Octave expressions or commands. The statements in CLEANUP are + guaranteed to be executed regardless of how control exits BODY. + + This is useful to protect temporary changes to global variables + from possible errors. For example, the following code will always + restore the original value of the built-in variable + do_fortran_indexing even if an error occurs while performing the + indexing operation. + + save_do_fortran_indexing = do_fortran_indexing; + unwind_protect + do_fortran_indexing = "true"; + elt = a (idx) + unwind_protect_cleanup + do_fortran_indexing = save_do_fortran_indexing; + end_unwind_protect + + Without unwind_protect, the value of do_fortran_indexing would not + be restored if an error occurs while performing the indexing + operation because evaluation would stop at the point of the error + and the statement to restore the value would not be executed. + + * Recursive directory searching has been implemented using Karl + Berry's kpathsea library. Directories below path elements that + end in // are searched recursively for .m files. + + * Octave now waits for additional input when a pair of parentheses + is `open' instead of giving an error. This allows one to write + statements like this + + if (big_long_variable_name == other_long_variable_name + || not_so_short_variable_name > 4 + && y > x) + some (code, here); + + without having to clutter up the if statement with continuation + characters. + + * Continuation lines are now allowed in string constants and are + handled correctly inside matrix constants. + + * Both `...{whitespace}\n' and `\{whitespace}\n' can be used to + introduce continuation lines, where {whitespace} may include + spaces, tabs and comemnts. + + * The script directory has been split up by topic. + + * Dynamic linking mostly works with dld. The following limitations + are known problems: + + -- Clearing dynamically linked functions doesn't work. + + -- Dynamic linking only works with dld, which has not been ported + to very many systems yet. + + -- Configuring with --enable-lite-kernel seems to mostly work to + make nonessential built-in functions dynamically loaded, but + there also seem to be some problems. For example, fsolve seems + to always return info == 3. This is difficult to debug since + gdb won't seem to allow breakpoints to be set inside + dynamically loaded functions. + + -- Octave uses a lot of memory if the dynamically linked functions + are compiled with -g. This appears to be a limitation with + dld, and can be avoided by not using -g to compile functions + that will be linked dynamically. + + * fft2 and ifft2 are now built-in functions. + + * The `&&' and `||' logical operators are now evaluated in a + short-circuit fashion and work differently than the element by + element operators `&' and `|'. See the Octave manual for more + details. + + * Expressions like 1./m are now parsed as 1 ./ m, not 1. / m. + + * The replot command now takes the same arguments as gplot or + gsplot (except ranges, which cannot be respecified with replot + (yet)) so you can add additional lines to existing plots. + + * The hold command has been implemented. + + * New function `clearplot' clears the plot window. The name `clg' + is aliased to `clearplot' for compatibility with Matlab. + + * The commands `gplot clear' and `gsplot clear' are equivalent to + `clearplot'. (Previously, `gplot clear' would evaluate `clear' as + an ordinary expression and clear all the visible variables.) + + * The Matlab-style plotting commands have been improved. They now + accept line-style arguments, multiple x-y pairs, and other plot + option flags. For example, + + plot (x, y, "@12", x, y2, x, y3, "4", x, y4, "+") + + results in a plot with + + y plotted with points of type 2 ("+") and color 1 (red). + y2 plotted with lines. + y3 plotted with lines of color 4. + y4 plotted with points which are "+"s. + + the help message for `plot' and `plot_opt' provide full + descriptions of the options. + + * NaN is now dropped from plot data, and Inf is converted to a + very large value before calling gnuplot. + + * Improved load and save commands: + + -- The save and load commands can now read and write a new binary + file format. Conversion to and from IEEE big and little endian + formats is handled automatically. Conversion for other formats + has not yet been implemented. + + -- The load command can now read Matlab .mat files, though it is + not yet able to read sparse matrices or handle conversion for + all data formats. + + -- The save command can write Matlab .mat files. + + -- The load command automatically determines the save format + (binary, ascii, or Matlab binary). + + -- The default format for the save command is taken from the + built-in variable `default_save_format'. + + -- The save and load commands now both accept a list of globbing + patterns so you can easily load a list of variables from a + file. + + -- The load command now accepts the option -list, for listing the + variable names without actually loading the data. With + -verbose, it prints a long listing. + + -- The load command now accepts the option -float-binary, for + saving floating point data in binary files in single precision. + + * who and whos now accept a list of globbing patterns so you can + limit the lists of variables and functions to those that match a + given set of patterns. + + * New functions for manipulating polynomials + + compan -- companion matrix corresponding to polynomial coefficients + conv -- convolve two vectors + deconv -- deconvolve two vectors + roots -- find the roots of a polynomial + poly -- characteristic polynomial of a matrix + polyderiv -- differentiate a polynomial + polyinteg -- integrate a polynomial + polyreduce -- reduce a polynomial to minimum number of terms + polyval -- evaluate a polynomial at a point + polyvalm -- evaluate a polynomial in the matrix sense + residue -- partial fraction expansion corresponding to the ratio + of two polynomials + + * New functions for manipulating sets + + create_set -- create a set of unique values + complement -- find the complement of two sets + intersection -- find the intersection of two sets + union -- find the union of two sets + + * New elementary functions: + + acot acoth acsc acsch + asec asech cot coth + csc csch log2 sec + sech + + * New special functions: + + beta -- beta function + betai -- incomplete beta function + gammai -- incomplete gamma function + + * New image processing functions: + + colormap -- set and return current colormap + gray -- set a gray colormap + gray2ind -- image format conversion + image -- display an image + imagesc -- scale and display an image + imshow -- display images + ind2gray -- image format conversion + ind2rgb -- image format conversion + loadimage -- load an image from a file + ntsc2rgb -- image format conversion + ocean -- set a color colormap + rgb2ind -- image format conversion + rgb2ntsc -- image format conversion + saveimage -- save an image to a file + + * New time and date funcitons: + + tic -- set wall-clock timer + toc -- get elapsed wall-clock time, since timer last set + etime -- another way to get elapsed wall-clock time + cputime -- get CPU time used since Octave started + is_leap_year -- is the given year a leap year? + + * Other new functions: + + bug_report -- submit a bug report to the bug-octave mailing list + + toascii -- convert a string to a matrix of ASCII character codes + + octave_tmp_file -- generate a unique temporary file name + + undo_string_escapes -- replace special characters in a string by + their backslash forms + + is_struct -- determine whether something is a structure data type + + feof -- check EOF condition for a specified file + ferror -- check error state for a specified file + fread -- read binary data from a file + fwrite -- write binary data to a file + + file_in_path -- check to see if named file exists in given path + + kbhit -- get a single character from the terminal + + axis -- change plot ranges + hist -- plot histograms + + diary -- save commands and output to a file + + type -- show the definition of a function + which -- print the type of an identifier or the location of a + function file + + isieee -- Returns 1 if host uses IEEE floating point + realmax -- Returns largest floating point number + realmin -- Returns smallest floating point number + + gcd -- greatest common divisor + lcm -- least common multiple + + null -- orthonormal basis of the null space of a matrix + orth -- orthonormal basis of the range space of a matrix + + fft2 -- two-dimensional fast fourier transform + ifft2 -- two-dimensional inverse fast fourier transform + filter -- digital filter + fftfilt -- filter using fft + fftconv -- convolve to vectors using fft + sinc -- returns sin(pi*x)/(pi*x) + freqz -- compute the frequency response of a filter + + * The meaning of nargin (== args.length ()) in built-in functions + has been changed to match the meaning of nargin in user-defined + functions. + + * Variable return lists. Octave now has a real mechanism for + handling functions that return an unspecified number of values, + so it is no longer necessary to place an upper bound on the number + of outputs that a function can produce. + + Here is an example of a function that uses the new syntax to + produce n values: + + function [...] = foo (n) + for i = 1:n + vr_val (i * x); + endfor + endfunction + + * New keyword, all_va_args, that allows the entire list of va_args + to be passed to another function. For example, given the functions + + function f (...) + while (nargin--) + disp (va_arg ()) + endwhile + endfunction + function g (...) + f ("begin", all_va_args, "end") + endfunction + + the statement + + g (1, 2, 3) + + prints + + begin + 1 + 2 + 3 + end + + all_va_args may be used more than once, but can only be used + within functions that take a variable number of arguments. + + * If given a second argument, svd now returns an economy-sized + decomposition, eliminating the unecessary rows or columns of U or + V. + + * The max and min functions correctly handle complex matrices in + which some columns contain real values only. + + * The find function now handles 2 and 3 output arguments. + + * The qr function now allows computation of QR with pivoting. + + * hilb() is much faster for large matrices. + + * computer() is now a built-in function. + + * pinv() is now a built-in function. + + * The output from the history command now goes through the pager. + + * If a function is called without assigning the result, nargout is + now correctly set to 0. + + * It is now possible to write functions that only set some return + values. For example, calling the function + + function [x, y, z] = f () x = 1; z = 2; endfunction + + as + + [a, b, c] = f () + + produces: + + a = 1 + + b = [](0x0) + + c = 2 + + * The shell_cmd function has been renamed to system (the name + shell_cmd remains for compatibility). It now returns [output, status]. + + * New built-in variable `OCTAVE_VERSION'. Also a new function, + version, for compatibility with Matlab. + + * New built-in variable `automatic_replot'. If it is "true", Octave + will automatically send a replot command to gnuplot each time the + plot changes. Since this is fairly inefficient, the default value + is "false". + + * New built-in variable `whitespace_in_literal_matrix' allows some + control over how Octave decides to convert spaces to commas in + matrix expressions like `[m (1)]'. + + If the value of `whitespace_in_literal_matrix' is "ignore", Octave + will never insert a comma or a semicolon in a literal matrix list. + For example, the expression `[1 2]' will result in an error + instead of being treated the same as `[1, 2]', and the expression + + [ 1, 2, + 3, 4 ] + + will result in the vector [1 2 3 4] instead of a matrix. + + If the value of `whitespace_in_literal_matrix' is "traditional", + Octave will convert spaces to a comma between identifiers and `('. + For example, given the matrix + + m = [3 2] + + the expression + + [m (1)] + + will be parsed as + + [m, (1)] + + and will result in + + [3 2 1] + + and the expression + + [ 1, 2, + 3, 4 ] + + will result in a matrix because the newline character is converted + to a semicolon (row separator) even though there is a comma at the + end of the first line (trailing commas or semicolons are ignored). + This is apparently how Matlab behaves. + + Any other value for `whitespace_in_literal_matrix' results in + behavior that is the same as traditional, except that Octave does + not convert spaces to a comma between identifiers and `('. + For example, the expression + + [m (1)] + + will produce 3. This is the way Octave has always behaved. + + * Line numbers in error messages for functions defined in files and + for script files now correspond to the file line number, not the + number of lines after the function keyword appeared. + + * Octave now extracts help from script files. The comments must + come before any other statements in the file. + + * In function files, the first block of comments in the file will + now be interpreted as the help text if it doesn't look like the + Octave copyright notice. Otherwise, Octave extracts the first set + of comments after the function keyword. + + * The function clock is more accurate on systems that have the + gettimeofday() function. + + * The standard output stream is now automatically flushed before + reading from stdin with any of the *scanf() functions. + + * Expanded reference card. + + * The Octave distribution now includes a frequently asked questions + file, with answers. Better answers and more questions (with + answers!) are welcome. + + * New option --verbose. If Octave is invoked with --verbose and not + --silent, a message is printed if an octaverc file is read while + Octave is starting. + + * An improved configure script generated by Autoconf 2.0. + + * Lots of bug fixes. + +Summary of changes for version 1.0: +---------------------------------- + + * C-style I/O functions now handle files referenced by name or by + number more consistently. + +Summary of changes for version 0.83: +----------------------------------- + + * Loading global symbols should work now. + + * Clearing the screen doesn't reprint the prompt unnecessarily. + + * The operations <complex scalar> OP <real matrix> for OP == +, -, + *, or ./ no longer crash Octave. + + * More portability and configuration fixes. + +Summary of changes for version 0.82: +----------------------------------- + + * Octave now comes with a reference card. + + * The manual has been improved, but more work remains to be done. + + * The atanh function now works for complex arguments. + + * The asin, acos, acosh, and atanh functions now work properly when + given real-valued arguments that produce complex results. + + * SEEK_SET, SEEK_CUR, and SEEK_END are now constants. + + * The `using' qualifier now works with gplot and gsplot when the + data to plot is coming directly from a file. + + * The strcmp function now works correctly for empty strings. + + * Eliminated bogus parse error for M-files that don't end with `end' + or `endfunction'. + + * For empty matrices with one nonzero dimension, the +, -, .*, and + ./ operators now correctly preserve the dimension. + + * Octave no longer crashes if you type ^D at the beginning of a line + in the middle of defining a loop or if statement. + + * On AIX systems, Back off on indexing DiagArray via Proxy class to + avoid gcc (or possibly AIX assembler?) bug. + + * Various other bug and portability fixes. + +Summary of changes for version 0.81: +----------------------------------- + + * Octave no longer dumps core if you try to define a function in + your .octaverc file. + + * Fixed bug in Array class that resulted in bogus off-diagonal + elements when computing eigenvalue and singular value + decompositions. + + * Fixed bug that prevented lsode from working on the SPARCstation, + at least with some versions of Sun's f77. This bug was introduced + in 0.80, when I changed LSODE to allow the user to abort the + integration from within the RHS function. + + * Fixed bug that prevented global attribute of variables from being + saved with save(), and another that prevented load() from working + at all. + +Summary of changes for version 0.80: +----------------------------------- + + * I have started working on a manual for the C++ classes. At this + point, it is little more than a list of function names. If you + would like to volunteer to help work on this, please contact + bug-octave@bevo.che.wisc.edu. + + * The patterns accepted by the save and clear commands now work like + file name globbing patterns instead of regular expressions. I + apologize for any inconvenience this change may cause, but file + name globbing seems like a more reasonable style of pattern + matching for this purpose. + + * It is now possible to specify tolerances and other optional inputs + for dassl, fsolve, lsode, npsol, qpsol, and quad. For each of + these functions, there is a corresponding function X_options, + which takes a keyword and value arguments. If invoked without any + arguments, the X_options functions print a list of possible + keywords and current values. For example, + + npsol_options () + + prints a list of possible options with values, and + + npsol_options ("major print level", 10) + + sets the major print level to 10. + + The keyword match is not case sensitive, and the keywords may be + abbreviated to the shortest unique match. For example, + + npsol_options ("ma p", 10) + + is equivalent to the statement shown above. + + * The new built-in variable save_precision can be used to set the + number of digits preserved by the ASCII save command. + + * Assignment of [] now works in most cases to allow you to delete + rows or columns of matrices and vectors. For example, given a + 4x5 matrix A, the assignment + + A (3, :) = [] + + deletes the third row of A, and the assignment + + A (:, 1:2:5) = [] + + deletes the first, third, and fifth columns. + + * Variable argument lists. Octave now has a real mechanism for + handling functions that take an unspecified number of arguments, + so it is no longer necessary to place an upper bound on the number + of optional arguments that a function can accept. + + Here is an example of a function that uses the new syntax to print + a header followed by an unspecified number of values: + + function foo (heading, ...) + disp (heading); + va_start (); + while (--nargin) + disp (va_arg ()); + endwhile + endfunction + + Note that the argument list must contain at least one named + argument (this restriction may eventually be removed), and the + ellipsis must appear as the last element of the argument list. + + Calling va_start() positions an internal pointer to the first + unnamed argument and allows you to cycle through the arguments + more than once. It is not necessary to call va_start() if you + do not plan to cycle through the arguments more than once. + + * Recursive functions should work now. + + * The environment variable OCTAVE_PATH is now handled in the same + way as TeX handles TEXINPUTS. If the path starts with `:', the + standard path is prepended to the value obtained from the + environment. If it ends with `:' the standard path is appended to + the value obtained from the environment. + + * New functions, from Kurt Hornik (hornik@neuro.tuwien.ac.at) and + the Department of Probability Theory and Statistics TU Wien, + Austria: + + corrcoef -- corrcoef (X, Y) is the correlation between the i-th + variable in X and the j-th variable in Y + corrcoef (X) is corrcoef (X, X) + cov -- cov (X, Y) is the covariance between the i-th + variable in X and the j-th variable in Y + cov (X) is cov (X, X) + gls -- generalized least squares estimation + kurtosis -- kurtosis(x) = N^(-1) std(x)^(-4) SUM_i (x(i)-mean(x))^4 - 3 + If x is a matrix, return the row vector containing + the kurtosis of each column + mahalanobis -- returns Mahalanobis' D-square distance between the + multivariate samples X and Y, which must have the + same number of components (columns), but may have + a different number of observations (rows) + ols -- ordinary least squares estimation + pinv -- returns the pseudoinverse of X; singular values + less than tol are ignored + skewness -- skewness (x) = N^(-1) std(x)^(-3) SUM_i (x(i)-mean(x))^3 + if x is a matrix, return the row vector containing + the skewness of each column + + * Errors in user-supplied functions called from dassl, fsolve, + lsode, npsol, and quad are handled more gracefully. + + * Programming errors in the use of the C++ classes within Octave + should no longer cause Octave to abort. Instead, Octave's error + handler function is called and execution continues as best as is + possible. This should result in eventually returning control to + the top-level Octave prompt. (It would be nice to have a real + exception handling mechanism...) + + * A number of memory leaks have been eliminated. Thanks to + Fong Kin Fui <fui@ee.nus.sg> for reporting them. + + * The C++ matrix classes are now derived from a generic + template-based array class. + + * The readline function operate-and-get-next (from bash) is now + available and bound to C-O by default. + + * Octave now uses the version of readline currently distributed with + bash-1.13. On some systems, interactive invocations of Octave + will now blink the cursor to show matching parens. + + * By default, include files are now installed in + $prefix/include/octave instead of $prefix/include. + + * Octave now uses a config.h file instead of putting all defines on + the compiler command line. + +Summary of changes for version 0.79: +----------------------------------- + + * New control systems functions: + + dgram -- Returns the discrete controllability and observability gramian. + dlqr -- Discrete linear quadratic regulator design. + dlqe -- Discrete linear quadratic estimator (Kalman Filter) design. + c2d -- Convert continuous system description to discrete time + description assuming zero-order hold and given sample time. + + * The max (min) functions can now return the index of the max (min) + value as a second return value. + +Summary of changes for version 0.78: +----------------------------------- + + * Octave's handling of global variables has been completely + rewritten. To access global variables inside a function, you must + now declare them to be global within the function body. Likewise, + if you do not declare a variable as global at the command line, + you will not have access to it within a function, even if it is + declared global there. For example, given the function + + function f () + global x = 1; + y = 2; + endfunction + + the global variable `x' is not visible at the top level until the + command + + octave:13> global x + + has been evaluated, and the variable `y' remains local to the + function f() even if it is declared global at the top level. + + Clearing a global variable at the top level will remove its global + scope and leave it undefined. For example, + + octave:1> function f () # Define a function that accesses + > global x; # the global variable `x'. + > x + > endfunction + octave:2> global x = 1 # Give the variable `x' a value. + octave:3> f () # Evaluating the function accesses the + x = 1 # global `x'. + octave:4> clear x # Remove `x' from global scope, clear value. + octave:5> x = 2 # Define new local `x' at the top level + x = 2 + octave:6> f # The global `x' is no longer defined. + error: `x' undefined near line 1 column 25 + error: evaluating expression near line 1, column 25 + error: called from `f' + octave:7> x # But the local one is. + x = 2 + + * The new function, `is_global (string)' returns 1 if the variable + named by string is globally visible. Otherwise, returns 0. + + * The implementation of `who' has changed. It now accepts the + following options: + + -b -builtins -- display info for built-in variables and functions + -f -functions -- display info for currently compiled functions + -v -variables -- display info for user variables + -l -long -- display long info + + The long output looks like this: + + octave:5> who -l + + *** currently compiled functions: + + prot type rows cols name + ==== ==== ==== ==== ==== + wd user function - - f + + *** local user variables: + + prot type rows cols name + ==== ==== ==== ==== ==== + wd real scalar 1 1 y + + *** globally visible user variables: + + prot type rows cols name + ==== ==== ==== ==== ==== + wd complex matrix 13 13 x + + where the first character of the `protection' field is `w' if the + symbol can be redefined, and `-' if it has read-only access. The + second character may be `d' if the symbol can be deleted, or `-' + if the symbol cannot be cleared. + + * The new built-in variable ignore_function_time_stamp can be used + to prevent Octave from calling stat() each time it looks up + functions defined in M-files. If set to "system", Octave will not + automatically recompile M-files in subdirectories of + $OCTAVE_HOME/lib/VERSION if they have changed since they were last + compiled, but will recompile other M-files in the LOADPATH if they + change. If set to "all", Octave will not recompile any M-files + unless their definitions are removed with clear. For any other + value of ignore_function_time_stamp, Octave will always check to + see if functions defined in M-files need to recompiled. The + default value of ignore_function_time_stamp is "system". + + * The new built-in variable EDITOR can be used to specify the editor + for the edit_history command. It is set to the value of the + environment variable EDITOR, or `vi' if EDITOR is not set, or is + empty. + + * There is a new built-in variable, INFO_FILE, which is used as the + location of the info file. Its initial value is + $OCTAVE_HOME/info/octave.info, so `help -i' should now work + provided that OCTAVE_HOME is set correctly, even if Octave is + installed in a directory different from that specified at compile + time. + + * There is a new command line option, --info-file FILE, that may be + used to set Octave's idea of the location of the info file. It + will override any value of OCTAVE_INFO_FILE found in the + environment, but not any INFO_FILE="filename" commands found in + the system or user startup files. + + * Octave's Info reader will now recognize gzipped files that have + names ending in `.gz'. + + * The save command now accepts regular expressions as arguments. + Note that these patterns are regular expressions, and do not work + like filename globbing. For example, given the variables `a', + `aa', and `a1', the command `save a*' saves `a' and `aa' but not + `a1'. To match all variables beginning with `a', you must use an + expression like `a.*' (match all sequences beginning with `a' + followed by zero or more characters). + + * Line and column information is included in more error messages. + +Summary of changes for version 0.77: +----------------------------------- + + * Improved help. The command `help -i topic' now uses the GNU Info + browser to display help for the given topic directly from the + Texinfo documenation. + + * New function: chol -- Cholesky factorization. + +Summary of changes for version 0.76: +----------------------------------- + + * Better run-time error messages. Many now include line and column + information indicating where the error occurred. Octave will also + print a traceback for errors occurring inside functions. If you + find error messages that could use improvement, or errors that + Octave fails to catch, please send a bug report to + bug-octave@bevo.che.wisc.edu. + + * If gplot (or gsplot) is given a string to plot, and the string + does not name a file, Octave will pass the string along to gnuplot + directly. This allows commands like + + gplot "sin (x)" w l, data w p + + to work (assuming that data is a variable containing a matrix of + values). + + * Long options (--help, --version, etc.) are supported. + +Summary of changes for version 0.75: +----------------------------------- + + * The documentation is much more complete, but still could use a lot + of work. + + * The history function now prints line numbers by default. The + command `history -q' will omit them. + + * The clear function now accepts regular expressions. + + * If gplot (or gsplot) is given a string to plot, and the string + names a file, Octave attempts to plot the contents of the file. + + * New functions: + + history: + + run_history -- run commands from the history list. + edit_history -- edit commands from the history list with your + favorite editor. + + linear algebra: + + balance -- Balancing for algebraic and generalized + eigenvalue problems. + givens -- Givens rotation. + is_square -- Check to see if a matrix is square. + qzhess -- QZ decomposition of the matrix pencil (a - lambda b). + qzval -- Generalized eigenvalues for real matrices. + syl -- Sylvester equation solver. + + control systems: + + is_symmetric -- Check to see if a matrix is symmetric. + abcddim -- Check dimensions of linear dynamic system [A,B,C,D]. + is_controllable -- Check to see if [A,B,C,D] is controllable. + is_observable -- Check to see if [A,B,C,D] is observable. + are -- Solve algebraic Ricatti equation. + dare -- Solve discrete-time algebraic Ricatti equation. + lqe -- Kalman filter design for continuous linear system. + lqr -- Linear Quadratic Regulator design. + lyap -- Solve Lyapunov equation. + dlyap -- Solve discrete Lyapunov equation. + tzero -- Compute the transmission zeros of [A,B,C,D]. + +Summary of changes for version 0.74: +----------------------------------- + + * Formal parameters to functions are now always considered to be + local variables, so things like + + global x = 0 + global y = 0 + function y = f (x) x = 1; y = x; end + f (x) + + result in the function returning 1, with the global values of x + and y unchanged. + + * Multiple assignment expressions are now allowed to take indices, + so things like + + octave:13> [a([1,2],[3,4]), b([5,6],[7,8])] = lu ([1,2;3,4]) + + will work correctly. + +Summary of changes for version 0.73: +----------------------------------- + + * Saving and loading global variables works correctly now. + + * The save command no longer saves built-in variables. + + * Global variables are more reliable. + + * Matrices may now have one or both dimensions zero, so that + operations on empty matrices are now handled more consistently. + + By default, dimensions of the empty matrix are now printed along + with the empty matrix symbol, `[]'. For example: + + octave:13> zeros (3, 0) + ans = + + [](3x0) + + The new variable `print_empty_dimensions' controls this behavior. + + See also Carl de Boor, An Empty Exercise, SIGNUM, Volume 25, + pages 2--6, 1990, or C. N. Nett and W. M. Haddad, A + System-Theoretic Appropriate Realization of the Empty Matrix + Concept, IEEE Transactions on Automatic Control, Volume 38, + Number 5, May 1993. + + * The right and left division operators `/' and `\' will now find a + minimum norm solution if the system is not square, or if the + coefficient matrix is singular. + + * New functions: + + hess -- Hessenberg decomposition + schur -- Ordered Schur factorization + perror -- print error messages corresponding to error codes + returned from the functions fsolve, npsol, and qpsol + (with others to possibly be added later). + + * Octave now prints a warning if it finds anything other than + whitespace or comments after the final `end' or `endfunction' + statement. + + * The bodies of functions, and the for, while, and if commands are + now allowed to be empty. + + * Support for Gill and Murray's QPSOL has been added. Like NPSOL, + QPSOL is not freely redistributable either, so you must obtain + your own copy to be able to use this feature. More information + about where to find QPSOL and NPSOL are in the file README.NLP. + +Summary of changes for version 0.72: +----------------------------------- + + * For numeric output, columns are now lined up on the decimal point. + (This requires libg++-2.3.1 or later to work correctly). + + * If octave is running interactively and the output intended for the + screen is longer than one page and a pager is available, it is + sent to the pager through a pipe. You may specify the program to + use as the pager by setting the variable PAGER. PAGER may also + specify a command pipeline. + + * Spaces are not always significant inside square brackets now, so + commands like + + [ linspace (1, 2) ] + + will work. However, some possible sources of confusion remain + because Octave tries (possibly too hard) to determine exactly what + operation is intended from the context surrounding an operator. + For example: + + -- In the command + + [ 1 - 1 ] + + the `-' is treated as a binary operator and the result is the + scalar 0, but in the command + + [ 1 -1 ] + + the `-' is treated as a unary operator and the result is the + vector [ 1 -1 ]. + + -- In the command + + a = 1; [ 1 a' ] + + the single quote character `'' is treated as a transpose operator + and the result is the vector [ 1 1 ], but in the command + + a = 1; [ 1 a ' ] + + an error message indicating an unterminated string constant is + printed. + + * Assignments are just expressions now, so they are valid anywhere + other expressions are. This means that things like + + if (a = n < m) ... endif + + are valid. This is parsed as: compare `n < m', assign the result + to the variable `a', and use it as the test expression in the if + statement. + + To help avoid errors where `=' has been used but `==' was + intended, Octave issues a warning suggesting parenthesis around + assignments used as truth values. You can suppress this warning + by adding parenthesis, or by setting the value of the new built-in + variable `warn_assign_as_truth_value' to 'false' (the default + value is 'true'). + + This is also true for multiple assignments, so expressions like + + [a, b, c] = [u, s, v] = expression + + are now possible. If the expression is a function, nargout is set + to the number of arguments for the right-most assignment. The + other assignments need not contain the same number of elements. + Extra left hand side variables in an assignment become undefined. + + * The default line style for plots is now `lines' instead of + `points'. To change it, use the `set data style STYLE' command. + + * New file handling and I/O functions: + + fopen -- open a file for reading or writing + fclose -- close a file + fflush -- flush output to a file + fgets -- read characters from a file + frewind -- set file position to the beginning of a file + fseek -- set file position + ftell -- tell file position + freport -- print a report for all open files + fscanf -- read from a file + sscanf -- read from a string + scanf -- read from the standard input + + * New built-in variables for file and I/O functions: + + stdin -- file number corresponding to the standard input stream. + stdout -- file number corresponding to the standard output stream. + stderr -- file number corresponding to the standard error stream. + + The following may be used as the final (optional) argument for + fseek: + + SEEK_SET -- set position relative to the beginning of the file. + SEEK_CUR -- set position relative to the current position. + SEEK_END -- set position relative to the end of the file. + + * New function: setstr -- convert vectors or scalars to strings + (doesn't work for matrices yet). + + * If possible, computer now prints the system type instead of + always printing `Hi Dave, I'm a HAL-9000'. + + * Octave now properly saves and restores its internal state + correctly in more places. Interrupting Octave while it is + executing a script file no longer causes it to exit. + + * Octave now does tilde expansion on each element of the LOADPATH. + + * A number of memory leaks have been plugged. + + * Dependencies for C++ source files are now generated automatically + by g++. + + * There is a new command line option, -p PATH, that may be used to + set Octave's loadpath from the command line. It will override any + value of OCTAVE_PATH found in the environment, but not any + LOADPATH="path" commands found in the system or user startup files. + + * It is now possible to override Octave's default idea of the + location of the system-wide startup file (usually stored in + $(prefix)/lib/octave/octaverc) using the environment variable + OCTAVE_HOME. If OCTAVE_HOME has a value, Octave will look for + octaverc and its M-files in the directory $OCTAVE_HOME/lib/octave. + + This allows people who are using binary distributions (as is + common with systems like Linux) to install the real octave binary + in any directory (using a name like octave.bin) and then install + a simple script like this + + #!/bin/sh + OCTAVE_HOME=/foo/bar/baz + export OCTAVE_HOME + exec octave.bin + + to be invoked as octave. + + +Summary of changes for version 0.71: +----------------------------------- + + * Much improved plotting facility. With this release, Octave does + not require a specially modified version of gnuplot, so gnuplot + sources are no longer distributed with Octave. For a more + detailed description of the new plotting features, see the file + PLOTTING. + + * New plotting commands: + + plot -- 2D plots + semilogx -- 2D semilog plot with logscale on the x axis + semilogy -- 2D semilog plot with logscale on the y axis + loglog -- 2D log-log plot + mesh -- 3D mesh plot + meshdom -- create matrices for 3D plotting from two vectors + contour -- contour plots of 3D data + bar -- create bar graphs + stairs -- create stairstep plots + polar -- 2D plots from theta-R data + grid -- turn plot grid lines on or off + xlabel, ylabel -- place labels on the x and y axes of 2D plots + sombrero -- demonstrate 3D plotting + gplot -- 2D plot command with gnuplot-like syntax + gsplot -- 3D plot command with gnuplot-like syntax + set -- set plot options with gnuplot syntax + show -- show plot options with gnuplot syntax + closeplot -- close stream to gnuplot process + purge_tmp_files -- delete temporary files created by plot command + + * Other new commands: + + ls, dir -- print a directory listing + shell_cmd -- execute shell commands + keyboard -- get input from keyboard, useful for debugging + menu -- display a menu of options and ask for input + fft -- fast fourier transform + ifft -- inverse fast fourier transform + + * Strings may be enclosed in either single or double quote + characters. Double quote characters are not special within single + quote strings, and single quotes are not special within double + quote strings. + + * Command name completion now works for M-file names too. + + * Better help and usage messages for many functions. + + * Help is now available for functions defined in M-files. The first + block of comments is taken as the text of the help message. + + * Numerous changes in preparation to support dynamic loading of + object files with dld. + + * Bug fixes to make solving DAEs with dassl actually work. + + * The command `save file' now saves all variables in the named file. + + * If do_fortran_indexing is 'true', indexing a scalar with + [1,1,1,...] (n times) replicates its value n times. The + orientation of the resulting vector depends on the value of + prefer_column_vectors. + + * Things like [[1,2][3,4]] no longer cause core dumps, and invalid + input like [1,2;3,4,[5,6]] now produces a diagnositic message. + + * The cd, save, and load commands now do tilde expansion. + + * It's now possible to clear global variables and functions by name. + + * Use of clear inside functions is now a parse error. + +Summary of changes for version 0.70: +----------------------------------- + + * Better parse error diagnostics. For interactive input, you get + messages like + + octave:1> a = 3 + * 4; + + parse error: + + a = 3 + * 4; + ^ + + and for script files, the message includes the file name and input + line number: + + octave:1> foo + + parse error near line 4 of file foo.m: + + a = 3 + * 4; + ^ + + * New built-in variable PS2 which is used as the secondary prompt. + The default value is '> '. + + * New file, octave-mode.el, for editing Octave code with GNU Emacs. + This is a modified version of Matthew R. Wette's matlab-mode.el. + + * Better support for missing math functions. + + * User preferences are now cached in a global struct so we don't + have to do a symbol table lookup each time we need to know what + they are. This should mean slightly improved performance for + evaluating expressions. + +Summary of changes for version 0.69: +----------------------------------- + + * Multiple assignments are now possible, so statements like + + a = b = c = 3; + a = b = c = [1,2;3,4]; + + or + + c = (a = (b = 2) * 3 + 4) * 5 + + are legal, as are things that have even more bizarre effects, like + + a(4:6,4:6) = b(2:3,2:3) = [1,2;3,4]; + + (try it). + + * Improved parsing of strings (but they still don't work as matrix + elements). + + * An M-file may now either define a function or be a list of + commands to execute. + + * Better detection and conditional compilation of IEEE functions + isinf, finite, and isnan. + + * Replacements for acosh, asinh, atanh, and gamma from the BSD math + library for those systems that don't have them. + +Summary of changes for version 0.68: +----------------------------------- + + * New functions: + + eval -- evaluate a string as a sequence of Octave commands. + input -- print a prompt and get user input. + +Summary of changes for version 0.67: +----------------------------------- + + * New functions: + + find -- return the indices of nonzero elements. + + * Zero-one style indexing now works. For example, + + a = [1,2,3,4]; + b = a([1,0,0,1]) + + sets b to the first and fourth elememnts of a. + + Zero-one style indexing also works for indexing the left hand side + of an assignment. For example, + + a = rand (1,2;3,4); + a([0,1],:) = [-1,-2] + + sets the second row of a to [-1 -2] + + The behavior for the ambiguous case + + a = [1,2,3,4]; + b = a([1,1,1,1]); + + is controlled by the new global variable `prefer_zero_one_indexing'. + If this variable is equal to 'true', b will be set to [1 2 3 4]. + If it is false, b will be set to [1 1 1 1]. The default value is + 'false'. + + * Using the new global variable `propagate_empty_matrices', it is + possible to have unary andy binary operations on empty matrices + return an empty matrix. The default value of this variable is + 'warn', so that empty matrices are propagated but you get a + warning. Some functions, like eig and svd have also been changed + to handle this. + + * Empty matrices can be used in conditionals, but they always + evaluate to `false'. With propagate_empty_matrices = 'true', both + of the following expressions print 0: + + if [], 1, else 0, end + if ~[], 1, else 0, end + + * Octave no longer converts input like `3.2 i' or `3 I' to complex + constants directly because that causes problems inside square + brackets, where spaces are important. This abbreviated notation + *does* work if there isn't a space between the number and the i, + I, j, or J. + +Summary of changes for version 0.66: +----------------------------------- + + * Logical unary not operator (~ or !) now works for complex. + + * Left division works. + + * Right and left element by element division should work correctly + now. + + * Numbers like .3e+2 are no longer errors. + + * Indexing a matrix with a complex value doesn't cause a core dump. + + * The min and max functions should work correctly for two arguments. + + * Improved (I hope!) configuration checks. + + * Octave is now installed as octave-M.N, where M and N are version + numbers, and octave is a link to that file. This makes it + possible to have more than one version of the interpreter installed. + +Summary of changes for version 0.63: +----------------------------------- + + * The reshape function works again. + + * Octave now converts input like `3.2i' or `3 I' or `2.3e5 j' to be + complex constants directly, rather than requiring an expression + like `3.3 * i' to be evaluated. + +Summary of changes for version 0.61: +----------------------------------- + + * Octave has been successfully compiled using gcc 2.3.3 and libg++ 2.3. + on a 486 system running Linux. + + * The win_texas_lotto function is now called texas_lotto (it's a + script file, and win_texas_lotto.m is too long for some Linux and + System V systems). + +Summary of changes for version 0.57: +------------------------------------ + + * The C-like formatted print functions printf, fprintf, and sprintf + finally work. + +Summary of changes for version 0.56: +------------------------------------ + + * By default, octave prints a short disclaimer when it starts. + (You can suppress it by invoking octave with -q). + + * You can keep octave from reading your ~/.octaverc and .octaverc + files by invoking it with -f. + + * When returning two values, eig now returns [v, d] instead of + [lambda, v], where d is a diagonal matrix made from lambda. + + * The win_texas_lotto function now produces a sorted list. + + * New functions: + + expm -- matrix exponential. + logm -- matrix logarithm. + +Summary of changes for version 0.55: +------------------------------------ + + * The following (C-style) backslash escape sequences work in quoted + strings (useful(?) with printf()): + + \a bell \r carriage return + \b backspace \t horizontal tab + \f formfeed \v vertical tab + \n newline \\ backslash + + * Use of `...' at the end of a line will allow a statement to + continue over more than one line. + + * The names `inf' and `nan' are now aliases for `Inf' and `NaN', + respectively. + + * New functions: + + casesen -- print a warning if the luser tries to turn off case + sensitivity. + median -- find median value. + norm -- compute the norm of a matrix. + sort -- sort columns. + + * New variable, `silent_functions'. If silent_functions == 'true', + the results of expressions are not printed even if they are not + followed by a semicolon. The disp() and printf() functions still + result in output. The default value for this variable is 'false'. + + * New variable `return_last_value_computed'. If it is 'true', + functions defined in script files return the last value computed + if a return value has not been explicitly declared. The default + value for this variable is 'false'. + +Summary of changes for version 0.52: +------------------------------------ + + * Name completion works for function and variable names currently in + the symbol tables. Coming soon: completion for names of functions + defined in script files but not yet compiled. + + * The initial value of do_fortran_indexing is now false, and the + initial value of prefer_column_vectors is now true. Swap the + values of these variables if you want behavior that is more like + Matlab. + + * All script files check the number of input arguments before doing + much real work. + + * The identifiers `i' and `j' are now also names for sqrt(-1). + These symbols may be used for other purposes, but their original + definition will reappear if they are cleared. + + * The symbol tables are now implemented with hash tables for faster + searching. + + * A small amount of help is now available for most built-in + operators, keywords and functions. Coming soon: help for script + files. + + * Without any arguments, the help command now lists all known + built-in operators, keywords and functions. + + * Generic parse errors are now signalled by `Eh, what's up doc?', + which is closer to what Bugs actually says. + + * The who command now only prints variable names by default. + Use the -fcn (or -fcns, or -functions) switch to print the names of + built-in or currently compiled functions. + +Summary of changes for version 0.51: +------------------------------------ + + * Major overhaul of array indexing. + + * The colloc function actually works now. + +Summary of changes for version 0.50: +------------------------------------ + + * The lsode and dassl functions now return the states only, + instead of the time and the states, so you must keep track of + the corresponding times (this is easy though, because you have + to specify a vector of desired output times anyway). + + * Solution of NLPs with NPSOL now works on the SPARC. + + * New keywords `endif', `endfor', `endfunction', `endif', and + `endwhile', which allow for better diagnostics. The `end' keyword + is still recognized. All script files have been changed to use + these new keywords in place of `end'. + + * It is now possible to uninstall Octave by doing a `make uninstall' + in the top level directory. + + * The Makefiles are much closer to conforming with GNU coding standards. + + * New functions: + + win_texas_lotto -- produce six unique random numbers between 1 and 50. + quad -- numerical integration. + lu -- LU factorization + qr -- QR factorization + dassl -- Solution of DAEs using DASSL. + + * New files: + + THANKS -- A list of people and organazations who have supported + the development of Octave. + + NEWS -- This file, listing recent changes. + + * Help is now available at the gnuplot prompt.
new file mode 100644 --- /dev/null +++ b/PROJECTS @@ -0,0 +1,540 @@ +Octave PROJECTS -*- text -*- +=============== + +Check with bug-octave@bevo.che.wisc.edu for a possibly more current +copy. Also, if you start working steadily on a project, please let +bug-octave@bevo.che.wisc.edu know. We might have information that +could help you; we'd also like to send you the GNU coding standards. + +This list is not exclusive -- there are many other things that might +be good projects, but it might instead be something we already have, +so check with bug-octave@bevo.che.wisc.edu before you start. + +--------- +Numerical: +--------- + + * Merge control stuff. + + * Improve logm, and sqrtm. + + * Improve complex mapper functions. + + * Make functions like gamma() return the right IEEE Inf or NaN + values for extreme args or other undefined cases. + + * Handle complex values in fread and fwrite. + + * Support for lp_solve for linear programming problems. + + * Free QP solver. + + * Free NLP solver. + + * Support for sparse matrices. + + * Fix CollocWt to handle Laguerre polynomials. Make it easy to + extend it to other polynomial types. + + * Add optional arguments to colloc so that it's not restricted to + Legendre polynomials. + + * Fix eig to also be able to solve the generalized eigenvalue + problem, and to solve for eigenvalues and eigenvectors without + performing a balancing step first. + + * Move rand, eye, xpow, xdiv, etc., functions to the matrix classes. + + * Implement the following functions: + -- ppval -- cross -- dot + + * Allow user-supplied gradient information to be passed to NPSOL. + + * Support for FSQP. + + * Convert FSQP style NLP statement to NPSOL style. + + * Convert NPSOL style NLP statement to FSQP style. + - Look for linear equality constraints, extract corresponding rows + of C. The rest are inequality constraints. + - Look for Nonlinear equality constraints and set up a vector of + pointers for shuffling. + - Transform lb <= C*x <= ub, lb != ub, to C*x - ub <= 0 and + lb - C*x <= 0. Likewise for lb <= g(x) <= ub. + - Call FSQP. + + * Optional inputs for fsqp. + + * If possible, make economy QR factorization actually take advantage + of the form of the result instead of just dropping columns. + Lapack doesn't appear to do this yet. + + * Check matrix classes for proper handling of empty matrices. + + * Improve design of ODE, DAE, classes. + + * Extend meaning of .* to include v .* M or M .* v (where v is a + column vector with the same number of rows as M) to scale rows of + M by elements of v. Similarly, if w is a row vector with as many + columns as M, then either w .* M or M .* w scales the columns of + M. + +-------- +Graphics: +-------- + + * Make plotting with plplot work. + + * Fix interface with gnuplot to wait for gnuplot to output any text + before octave returns a prompt. Possible by implementing two + way communication between gnuplot and Octave. + + * Make gsave (and possibly gload) work. Implement gsave by having it + also alter the plot command to not use temporary files (perhaps + with some user-specified template for naming them) and then + sending a `save' command to gnuplot. + + * It would be nice to be able to check that a plot is currently + being displayed. + + * Implement figure, clf, gcf, get, set, orient, print, close, + etc. in Matlab-compatible ways. + + * Make it possible to check the current graphics terminal type. + + * Merge patch that allows more than one gnuplot window to be open. + +------- +Strings: +------- + + * Convert string functions to work on string arrays. + + * Make find work for strings. + +---------------- +Other Data Types: +---------------- + + * New types (char, short, etc.). + + * 3d matrix stuff. + + * Template functions for mixed-type ops. + + * Stuff for arithmetic using charMatrix, intMatrix, etc. + +------------------------ +Graphical User Interface: +------------------------ + + * In an X11 or other windowing environment, allow the user to pop up + windows for menus and other purposes. A good place to start might + be Tk, as long as Tcl is avoided. + + * Add a way to handle events, like alarms, mouse clicks, etc. + +------------ +Input/Output: +------------ + + * Make fread and fwrite work for complex data. Iostreams based + versions of these functions would also be nice, and if you are + working on them, it would be good to support other size + specifications (integer*2, etc.). + + * Make load work to read files that contain numbers only, and put + the values in a matrix named after the file. + + * Make load and save work for structures. + + * Make load and save look for <file>.mat if only given <file>. + + * Move some pr-output stuff to liboctave. + + * Make the cutoff point for changing to packed storage a + user-preference variable with default value 8192. + + * Save image data in binary format to save space. + + * Use HDF for binary data. + + * Make ascii load and save work for Inf and NaN. + + * Complain if there is not enough disk space available (I think + there is simply not enough error checking in the code that handles + writing data). + + * Make it possible to tie arbitrary input and output streams + together, similar to the way iostreams can be tied together. + +----------- +Interpreter: +----------- + + * Consider grouping all preference variables in a structure instead + of further polluting the namespace. Maybe `Octave_options.xxx'? + + * Rewrite functions in input.cc to do the right thing in all cases + of using readline, forced interactive behavior, echoing of input, + etc. + + * Make it possible to redefine built-in variables and functions. + (Fix whatever it is that is happening with clear for built-in + variables.) + + * Make it possible to check if a variable is complex. + + * Consider making linspace() and logspace() return the value + corresponding to the first argument if the number of requested + points is 1. + + * 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'. + + * Allow more command line options to be accessible as built-in + variables (--echo-commands, etc.). + + * Allow `octave -c STRING' to execute commands from STRING then + exit. + + * Handle DOS style CRLFs in M files. This should probably be + optional. + + * Make the interpreter run faster. + + * Make it possible to disable or enable all warnings on an + individual basis from the command line or via some built-in + structure variable. + + * Consider making it possible to have arrays of structures, and some + way of indexing them. + + * Allow arbitrary lower bounds for array indexing. (Watch out for + the additional conflict with zero-one style indexing.) + + * Recursive problems. + + * Improve the way ignore_function_time_stamp works to allow + selecting by individual directories or functions. Also, + optionally allow checking only once between each prompt instead of + every time the function is called. + + * Make it possible to ask exist() to only look for certain classes + of variables, functions, files, etc. rather than always looking for + everything. + + * Add a command-line option to tell Octave to just do syntax + checking and not execute statements. + + * Is it necessary for do_binary_op and do_unary_op to be friends of + the tree_constant class. + + * Clean up symtab and variable stuff. + + * Input stream class for parser files -- must manage buffers for + flex and context for global variable settings. + + * Make LEXICAL_ERROR have a value that is the error message for + parse_error() to print? + + * Make it possible to clear dynamically loaded functions. + + * Add a run-time alias mechanism that would allow things like + + alias fun function_with_a_very_long_name + + so that `function_with_a_very_long_name' could be invoked as + `fun'. + + * What should is_global() return when called for built-in variables? + + * Make it possible to have `static' variables inside functions that + retain their values across calls. + + * Allow local changes to variables to be written more compactly than + is currently possible with unwind_protect. For example, + + function f () + local prefer_column_vectors = something; + ... + endfunction + + would be equivalent to + + function f () + unwind_protect + save_prefer_column_vectors = prefer_column_vectors; + prefer_column_vectors = something; + ... + unwind_protect_cleanup + prefer_column_vectors = save_prefer_column_vectors; + end_unwind_protect + endfunction + + * Fix all function files to check for bogus inputs (wrong number or + types of input arguments, wrong number of output arguments). + + * Handle options for built-in functions more consistently. + + * Too much time is spent allocating and freeing memory. What can be + done to improve performance? + + * Error output from Fortran code is ugly. Something should be done to + make it look better. + + * It would be nice if output from the Fortran routines could be + passed through the pager. + + * Attempt to recognize common subexpressions in the parser. + + * Remove the buffer size limit in octave_read() in input.cc. + + * Handle arrays with more than two dimensions. + + * Consider making assignment statements like + + M (i_idx, j_idx) = RHS + + produce the value of RHS instead of the value of M. + + * Consider making it possible to specify an empty matrix with a + syntax like [](e1, e2). Of course at least one of the expressions + must be zero... + + * Eliminate force_numeric and make_numeric functions. + + * Is Matrix::fortran_vec() really necessary? + + * 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 + + turn into function calls like this: + + foo ("bar", "baz") + + 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. + + * Clean up eye, eval, feval, keyboard, input, ones, zeros. + + * It would be nice to have an interactive debugger. + +------- +History: +------- + + * Add an option to allow saving input from script files in the + history list. + + * Fix history problems -- core dump if multiple processes are + writing to the same history file? + +------------------------------ +Configuration and Installation: +------------------------------ + + * Handle USE_READLINE. + + * Make Octave as independent of the particular readline version as + possible. + + * Should --enable-lite-kernel imply --enable-shared? + + * Make it possible to configure without readline. + + * Make it possible to configure without kpathsea. + + * Makefile changes: + -- eliminate for loops + -- define shell commands or eliminate them + -- verify distclean + -- consolidate targets + + * Make it possible to configure so that installed binaries and + shared libraries are stripped. + + * Make installation of the static libraries optional. + +------------------------------ +Documentation and On-Line Help: +------------------------------ + + * Document new features. + -- history-search-{back,for}ward. + -- try/catch. + -- Other stuff mentioned in the NEWS file. + + * Improve the Texinfo Documentation for the interpreter. It would + be useful to have lots more examples, to not have so many forward + references, and to not have very many simple lists of functions. + + * The docs should mention something about efficiency and that using + array operations is almost always a good idea for speed. + + * Texinfo documentation for the C++ classes. + + * Support multiple info files, perhaps allowing one or more in each + directory in the LOADPATH, so that local collections of M-files + could be documented with Info. + + * Figure out a good way to have functions and variables documented + in only one place. + + * Improve help messages for operators and keywords in help.cc. + + * Make index entries more consistent to improve behavior of `help -i'. + + * Make `help -i' try to find a whole word match first. + + * Allow help for local additions to be accessible with help -i. + + * Make the arrow keys work in the info reader. + + * Update Info to be based on the current Texinfo release. + + * Clean up help stuff. + + * Demo files. + + * As the number of m-files with octave grows perhaps a 'Contents.m' + file for each toolbox (directory) would be appropriate so one + knows exactly what functions are in a toolbox with a quick look. + It would be best to generate information for each function directly + from the M-files, so that the information doesn't have to be + duplicated, and will remain current if the M-files change. It + would also be best to do as much of this as possible in an M-file, + though I wouldn't mind adding some basic support for listing the + names of all the directories in the LOADPATH, and the names of all + the M-files in a given directory if that is needed. + + * Some sort of blurb (2-3 pages) describing Octave in a reasonably + coherent way, where to get it etc., perhaps formatted pretty, + i.e. not just text. Maybe start with the latest Announce file. + +----- +Tests: +----- + + * Improved set of tests: + + -- Tests for various functions. Would be nice to have a test file + corresponding to every function. + + -- Tests for element by element operators: + + - .* ./ .\ .^ | & < <= == >= > != ! + + -- Tests for boolean operators: && || + + -- Tests for other operators: * / \ ' .' + + -- Tests from bug reports. + + -- Tests for indexed assignment. Need to consider the following: + o fortran-style indexing + o zero-one indexing + o assignment of empty matrix as well as values + o resizing + + * Tests for all internal functions. + +----------- +Programming: +----------- + + * Move toward using more stuff from standard C++ library. + + * More C++/Fortran cleanups. + + * It is likely that there are still some memory leaks. Hunt then down + and plug them. + + * Only include config.h in files that actually need it, instead of + including it in every .cc file. Unfortunately, this might not be + so easy to figure out. + + * GNU coding standards: + + -- Add a `Makefile' target to the Makefiles. + -- Comments on #else and #endif preprocessor commands. + -- Change error message format to match standards everywhere. + + * Use STL stuff instead of libg++ lists, maps, and stacks. + + * Eliminate more global variables. + + * Encapsulate readline in a class. Include interface to stuff like + blink_matching_paren. + + * Encapsulate resource stuff in a class. + + * Move procstream to liboctave. + + * Replace more C-style vectors with Array<T> stuff. + + * Use references and classes in more places. + + * Share more code among the various *_options functions. + +------------- +Miscellaneous: +------------- + + * Implement some functions for interprocess communication: bind, + accept, connect, gethostbyname, etc. + + * The ability to transparently handle very large files: + + Juhana K Kouhia <kouhia@nic.funet.fi> wrote: + + If I have a one-dimensional signal data with the size 400 + Mbytes, then what are my choices to operate with it: + + * I have to split the data + * Octave has a virtual memory on its own and I don't have to + worry about the splitting. + + If I split the data, then my easily programmed processing + programs will become hard to program. + + If possible, I would like to have the virtual memory system in + Octave i.e. the all big files, the user see as one big array or + such. There could be several user selectable models to do the + virtual memory depending on what kind of data the user have (1d, + 2d) and in what order they are processed (stream or random + access). + + Perhaps this can be done entirely with a library of M-files. + + * Add a function like strptime() which is the opposite of + strftime(). A C version is apparently in recent releases of the + Linux C library. + + * Merge OS/2 changes. + +------ +Always: +------ + + * Squash bugs. + + --30--
new file mode 100644 --- /dev/null +++ b/README @@ -0,0 +1,96 @@ +Octave -- a high-level language for numerical computations. + +Copyright (C) 1996 John W. Eaton + +Last updated: Mon Feb 5 13:27:40 1996 + +Overview +-------- + +Octave is a high-level language, primarily intended for numerical +computations. It provides a convenient command line interface for +solving linear and nonlinear problems numerically. + +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 file COPYING for more +details. + +Availability +------------ + +The latest released version of Octave is always available via +anonymous ftp from ftp.che.wisc.edu in the directory /pub/octave. +Complete source and binaries for several popular systems are +available. + +Installation and Bugs +--------------------- + +Octave requires approximately 50MB of disk storage to unpack and +install (significantly less if you don't compile with debugging +symbols). In order to build Octave, you will need a current version +of g++, libg++, and GNU make. + +YOU MUST HAVE GNU MAKE TO COMPILE OCTAVE. Octave's Makefiles use +features of GNU Make that are not present in other versions of Make. +GNU Make is very portable and easy to install. + +As of version 1.1.x, you must have G++ 2.6.2 or later to compile +Octave. In some cases, you may also need to install a patch for g++ +that is distributed with Octave in order to successfully compile +Octave. + +See the notes in the files INSTALL and INSTALL.OCTAVE for more +specific installation instructions, including directions for +installing Octave from a binary distribution. + +The file BUGS contains a recommended procedure for reporting bugs, as +well as a list of known problems and possible fixes. + +Binary Distributions +-------------------- + +Binary copies of Octave are now distributed for several popular Unix +systems. To save disk space, the complete source code for Octave is +not included in the binary distributions, but should be available in +the same place as the binaries. If not, please contact +bug-octave@bevo.che.wisc.edu. + +The file INSTALL.OCTAVE contains specific installation instructions, +for installing Octave from a binary distribution. + +Implemenation +------------- + +Octave is being developed with the Free Software Foundation's make, +bison (a replacement for YACC), flex (a replacement for lex), gcc/g++, +and libg++ on a SPARCstation II and a DECstation 5000/240. It should +be possible to install it on any machine that runs GCC/G++. It may +also be possible to install it using other implementations of these +tools, but it will most certainly require much more work. Do yourself +a favor and get the GNU development tools, either via anonymous ftp +from prep.ai.mit.edu or by writing the Free Software Foundation, +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +The underlying numerical solvers are currently standard Fortran ones +like Lapack, Linpack, Odepack, the Blas, etc., packaged in a library +of C++ classes (see the files in the libcruft and liboctave +subdirectories). If possible, the Fortran subroutines are compiled +with the system's Fortran compiler, and called directly from the C++ +functions. If that's not possible, they are translated with f2c and +compiled with a C compiler. Better performance is usually achieved if +the intermediate translation to C is avoided. + +The library of C++ classes may also be useful by itself. + +-- +John W. Eaton +jwe@bevo.che.wisc.edu +University of Wisconsin-Madison +Department of Chemical Engineering
new file mode 100644 --- /dev/null +++ b/README.NLP @@ -0,0 +1,19 @@ +If you don't have NPSOL but you still want to be able to solve NLPs, +or if you don't have QPSOL but you still want to solve QPs, you'll +need to find replacements or order them from Stanford. If you know of +a freely redistributable replacement, please let us know--we might be +interested in distributing it with Octave. + +You can get more information about NPSOL and QPSOL from + + Stanford University + Office of Technology Licensing + 857 Serra Street + Stanford CA 94305-6225 + Tel: (415) 723-0651 + Fax: (415) 725-7295 + +Octave may soon support FSQP, an NLP solver from Andre Tits +(andre@src.umd.edu) of the University of Maryland. FSQP is available +free of charge to academic sites, but can not be redistributed to +third parties.
new file mode 100644 --- /dev/null +++ b/README.doc @@ -0,0 +1,7 @@ +This distribution contains the Info, DVI, and PostScript files for the +documentation of the 1.1.0 release of Octave. The program and +documentation sources may be found in the file Octave-1.1.0.tar.gz, +probably available from the same place you got this. + +Octave and its documentation are free. +See the file COPYING for copying conditions.
new file mode 100644 --- /dev/null +++ b/README.ftp @@ -0,0 +1,75 @@ +This file last updated: Thu Jan 12 15:28:50 1995 + +This directory contains the source for Octave, a high-level interactive +language for solving numerical problems. See the files README.octave +and Announce for more general information, and the file NEWS for a +list of recent changes. + +------------------------------------------------------------------ +PLEASE NOTE: We are only distributing gzipped files because we no +longer have room to distribute both compressed and gzipped files. +------------------------------------------------------------------ + +Binary distributions: +-------------------- + +Binaries for several popular systems are distributed along with the +source, and are available in the following subdirectories of +/pub/octave/BINARIES: + + subdirectory binary compiled on + ----------------------------------------------------------------- + alpha-dec-osf1.3 DEC Alpha/OSF1 + mips-dec-ultrix4.2 DECstation running Ultrix 4.2 + rs6000-ibm-aix3.2.5 RS/6000 running AIX 3.2.5 + sparc-sun-sunos4.1.2 Sun SPARC running SunOS 4.1.2 + +Note: + + * Gnuplot binaries are *not* included. For the plotting commands to + work, you will need to install gnuplot on your system. See the + file INSTALL.octave in the top level directory of the distribution + for more details. + + * Octave has been compiled assuming that you have `less' installed. + You can use the environment variable PAGER to choose another pager. + + * We only have a limited amount of time available to devote to + making binaries, so binaries may not be immediately available + for some platforms. Please contact bug-octave@bevo.che.wisc.edu if + you are interested in helping make binary distributions available. + +A note about patches: +-------------------- + +If you are trying to compile Octave with g++ 2.7.x, you should get the +file README-GCC-2.7.0. + +The patch in the file libg++-procbuf-bug fixes a serious problem in +libg++ that can cause Octave to crash when trying to execute commands +like `ls', or display output through the pager. + +The patch in the file libg++-complex-div-bug fixes a problem in libg++ +that can cause division of real numbers by complex numbers to overflow +unnecessarily. + +A note about .gz files: +---------------------- + +Files with names ending in `.gz' have been compressed with `gzip'. + +Unlike the compress utility, gzip is free of any known software +patents and tends to compress better anyway. Gzip can uncompress +`compress'-compressed files too, so you can install it as "uncompress" +and use it to handle both types of files. + +The gzip program is available in the directory /pub/gnu in shar, tar, +or gzipped tar format (for those who already have a prior version of +gzip and want faster data transmission). It works on virtually every +unix system, MSDOS, OS/2, and VMS. + +-- +John W. Eaton +jwe@bevo.che.wisc.edu +University of Wisconsin-Madison +Department of Chemical Engineering
new file mode 100644 --- /dev/null +++ b/README.mirrors @@ -0,0 +1,1 @@ +ftp.univie.ac.at packages/octave
new file mode 100644 --- /dev/null +++ b/README.snapshots @@ -0,0 +1,180 @@ +Octave Snapshots -- general info + +Last updated: Mon May 23 18:58:05 1994 + +This file was adapted from a similar document written by Fred Fish and +used by the GDB developers. + +Snapshots are an "image" of the main Octave development tree, captured +at a particular random instant in time. When you use the snapshots, +you should be able to maintain a local copy of Octave that is +reasonably close to the official source tree used by the Octave +maintainers. + +The primary purpose of providing snapshots is to widen the group of +motivated developers that would like to help test, debug, and enhance +Octave, by providing you with access to the "latest and greatest" +source. This has several advantages, and several disadvantages. + + First the advantages: + + o Once we have a large base of motivated testers using the + snapshots, this should provide good coverage across all + currently supported Octave hosts and targets. If a new bug is + introduced in Octave due to fixing another bug or ongoing + development, it should become obvious much more quickly and + get fixed before the next general net release. This should + help to reduce the chances of Octave being released to the + general public with a major bug that went unnoticed during the + release cycle testing because they are machine dependent. We + hope to greatly improve Octave's stability and reliability by + involving more people and more execution environments in the + prerelease testing. + + o With access to the latest source, any diffs that you send to fix + bugs or add new features should be much easier for the Octave + maintainers to merge into the official source base (after + suitable review of course). This encourages us to merge your + changes quicker, while they are still "fresh". + + o Once your diffs are merged, you can obtain a new copy of Octave + containing your changes almost immediately. Thus you do not + have to maintain local copies of your changes for any longer + than it takes to get them merged into the official source + base. This encourages you to send in changes quicker. + + And the disadvantages: + + o The snapshot you get will be largely untested and of unknown + quality. It may fail to configure or compile. It may have + serious bugs. You should always keep a copy of the last known + working version before updating to the current snapshot, or at + least be able to regenerate a working version if the latest + snapshot is unusable in your environment for some reason. + + If a production version of Octave has a bug and a snapshot has + the fix, and you care about stability, you should put only the + fix for that particular problem into your production version. + Of course, if you are eager to test Octave, you can use the + snapshot versions in your daily work, but users who have not + been consulted about whether they feel like testing Octave should + generally have something which is at least as bug free as the + last released version. + + o Providing timely response to your questions, bug reports, and + submitted patches will require the Octave developers to + allocate time from an already thin time budget. Please try to + help us make this time as productive as possible. See the + section below about how to submit changes. + + +How to get the snapshots +------------------------ + +The current plan is to provide a full snapshot every week or so. For +now, diffs from previous versions will not be available. The files +will be available via anonymous ftp from bevo.che.wisc.edu, in the +directory /private/octave in the form of a tar files compressed with +GNU gzip. You can ftp gzip from bevo.che.wisc.edu in the directory +/pub/gnu. + +Even though the snapshots are available in a public place, we ask that +recipients not widely publicise the availability of the snapshots. +The motivation for this request is not to hoard them, but to avoid the +situation where the general Octave user base naively attempts to use +the snapshots, has trouble with them, complains publicly, and the +reputation of Octave declines because of a perception of instability +or lack of quality control. + + +Octave test suite +----------------- + +A test suite is distributed as an integral part of the snapshots. +However, to use it you will need to get a copy of the dejagnu testing +framework. Snapshots of dejagnu are available alongside the Octave +snapshots, using the same naming conventions as the Octave snapshots. +Once you have installed the dejagnu framework, a simple "make check" +in the Octave directory should be sufficient to run the tests. + +Note that the test suite is still quite limited. The test framework +itself might not install on your system if you have an environment +that is not similar to one that the Octave developers already use. +The tests themselves only cover a small portion of Octave features, +and what tests do exist for a feature are not exhaustive. New tests +are welcomed. + + +Getting help, Octave discussions, etc. +-------------------------------------- + +Mail sent to octave-testers@bevo.che.wisc.edu goes to everyone on the +list of octave testers, which should include everyone getting the +Octave snapshots. It is appropriate whenever you wish your mail to be +seen by all the testers. This would include announcements of any +kind, notices of intent to implement a specific enhancement (to +coordinate with other people on the list), etc. Before sending +something to octave-testers, ask yourself if what you are about to +send would be something you would care to see show up in your mailbox +if it was sent by someone else. + +Do *not* send any questions about the snapshots or patches specific to +the snapshots to bug-octave@bevo.wisc.che.edu. Nobody there will have +any idea what you are talking about and it will just cause confusion. + + +Bug reports +----------- + +Send bug reports to octave-maintainers@bevo.che.wisc.edu. + +Note that since no testing is done on the snapshots, and snapshots may +even be made when Octave is in an inconsistent state, it may not be +unusual for an occasional snapshot to have a very obvious bug, such as +failure to compile on *any* machine. It is likely that such bugs will +be fixed by the next snapshot, so it really isn't necessary to report +them unless they persist over more than one snapshot. + +Missing files should always be reported, since they usually mean there +is a problem with the snapshot-generating process and we won't know +about them unless someone tells us. + +Bugs which are non-obvious, such as failure to compile on only a +specific machine, a new machine dependent or obscure bug (particularly +one not detected by the testsuite), etc. should be reported when you +discover them, or have a suggested patch to fix them. + + +FORMAT FOR PATCHES +------------------ + +If you have a fix for a bug, or an enhancement to submit, send your +patch to octave-maintainers@bevo.che.wisc.edu. Here are some simple +guidelines for submitting patches: + + o Use "context diffs" for patches. A typical command for + generating context diffs is "diff -rc octave-old octave-new". + + o Use the "minimalist approach" for patches. That is, each patch + should address only one particular bug, new feature, etc. Do + not save up many unrelated changes and submit them all in one + big patch, since in general, the larger the patch the more + difficult it is for us to decide if the patch is either + correct or desirable. And if we find something about the + patch that needs to be corrected before it can be installed, + we would have to reject the entire patch, which might contain + changes which otherwise would be accepted if submitted + separately. + + o Submit a sample ChangeLog entry with your patch. See the + existing Octave ChangeLog for examples of what a ChangeLog + entry should look like. The emacs command ^X4A will create a + ChangeLog entry header for you. + + +Thanks, + +John W. Eaton +jwe@bevo.che.wisc.edu +University of Wisconsin-Madison +Department of Chemical Engineering
new file mode 100644 --- /dev/null +++ b/ROADMAP @@ -0,0 +1,67 @@ +Here is an attempt at a simple explanation of the directory layout for +Octave's source files. + + doc -- Texinfo documentation for Octave + + emacs -- Emacs lisp stuff + + glob -- filename globbing functions + + info -- a modified version of the GNU Info reader + + kpathsea -- Karl Berry's path searching library + + liboctave -- the C++ interfaces to the numerical libraries and + various OS facilities. + + libcruft -- various numerical libraries (mostly Fortran) + balgen * balancing subroutines for eigenvalue computations + blas * basic linear algebra subroutines + dassl * differential-algebraic system solver + eispack * subroutines for eigenvalue problems + fftpack * subroutines for fast fourier transforms + lapack * linear algebra package + linpack * linear algebra package + minpack * nonlinear equation solver + misc * miscellaneous utilities + odepack * odinary differential equation solver + quadpack * subroutines for numerical integration + ranlib * random number generators + slatec-fn * various special function subroutines + villad * subroutines for orthogonal collocation weights + + make -- make stuff used by kpathsea + + plplot -- the plplot plotting package + + readline -- GNU readline library (from bash), slightly modified + + scripts -- functions written in the Octave language + image * image processing + control * control theory + set * set manipulation + general * utility functions + statistics * statistical stuff + plot * plotting + polynomial * polynomial manipulation + linear-algebra * linear algebra stuff + miscellaneous * stuff that doesn't fit anywhere else + signal * signal processing + specfun * special mathematical functions + special-matrix * functions for generating special types of matrices + elfun * elementary mathematical functions + startup * initialization functions + strings * character string manipulation + time * time and date functions + + src -- the interpreter itself + + test -- tests for the interpreter + config * configuration files for DejaGnu + octave.test * subdirectories contianing actual tests are here + + +John W. Eaton +jwe@bevo.che.wisc.edu +University of Wisconsin-Madison +Department of Chemical Engineering
new file mode 100644 --- /dev/null +++ b/SENDING-PATCHES @@ -0,0 +1,26 @@ +[This was originally from Richard Stallman who was writing about + Emacs. --jwe] + +A reminder for those sending patches for Octave: + + * Always make the diffs with context. Preferably use diff -c. It + is unreliable to install a diff without context, and therefore we + probably will not take the risk of trying; instead we will + probably ask you to send a context diff. You might as well send + that in your first message. + + * Always send change log entries with your patches. Itemize the + entries so that they list each of the functions and variables + changed. Look at the ChangeLog files and follow our conventions + regarding what information to include and what style to use. + + * If the patch is to fix a bug, send a detailed bug report for the + bug. Make this just as detailed as if you did not have any fix + for it. This information is vital for convincing the maintainer + that your fix is necessary and should be installed. Also, if your + fix would cause some other sort of problem, the bug report may + enable the maintainer to find some other correct fix. + +Everyone, please read the Bugs chapter in the Octave manual to see +other guidelines on how to write a bug report that makes it possible +to fix a bug.
new file mode 100644 --- /dev/null +++ b/TESTERS @@ -0,0 +1,31 @@ +warnerd@pascal.dartmouth.edu (Doug Warner) + alpha-dec-osf3.2. + +U-E59264-Osman Buyukisik <Osman.Buyukisik@ae.ge.com> + pentium 120, 16MB, 1.6GB disk, linux/ELF 1.12 (slackware 3.0), gcc 2.7.0 + +James Beaupre <beaupre@draper.com> + Solaris 5.3 5.4 5.5 + + SunOS 4.1.4 +? + Digital Unix 3.2+ + + And possibly + HP-UX 10+ + IRIX 5+ + +Benedikt Oswald <oswald@ifh.ee.ethz.ch> + SunOS 4.1.4 + SGI system, IRIX 5.3 + +Robert Wilhelm <Robert.Wilhelm@Physik.TU-Muenchen.DE> + Linux/i386 + SunOs4.x/sparc + +Matthias Roessler <Matthias.Roessler@informatik.uni-erlangen.de> + HP-UX pioneer B.10.01 A 9000/715 2014334343 two-user license + HP-UX faui47i A.09.05 A 9000/735 2007225876 two-user license + SunOS faui09e 5.5 Generic_103093-01 sun4u sparc SUNW,SPARCstation-fusion + SunOS faui42 5.4 Generic_101945-36 sun4d sparc + SunOS camelot 4.1.3 #1.5 sun4m + IRIX galileo 5.3 11091812 IP22 mips +
new file mode 100644 --- /dev/null +++ b/THANKS @@ -0,0 +1,22 @@ +Special thanks to the following people and organizations for +supporting the development of Octave: + + * Digital Equipment Corporation, for a one year grant as part of + their External Research Program. + + * Sun Microsystems, Inc., for an Academic Equipment grant. + + * The University of Texas College of Engineering, for providing a + Challenge for Excellence Research Supplement, and for providing an + Academic Development Funds grant. + + * The State of Texas, for providing funding through the Texas + Advanced Technology Program under Grant No. 003658-078. + + * Texaco Chemical Company, for providing funding to continue the + development of this software. + + * Noel Bell, Senior Engineer, Texaco Chemical Company, Austin Texas. + + * James B. Rawlings, Associate Professor, Department of Chemical + Engineering, The University of Texas at Austin.
new file mode 100644 --- /dev/null +++ b/announce-others @@ -0,0 +1,12 @@ +Wayne Bequette <bequette@bequette.che.rpi.edu> +Michel Berkelaar <michel@es.ele.tue.nl> +Larry Biegler <biegler@cmu.edu> +Yuris Fuentes <yuris@matias.colorado.edu> +Jeff Kantor <jeffrey.kantor@nd.edu> +Keith Levien <levienk@ccmail.orst.edu> +Danny Lewin <cerdldl@technion.technion.ac.il> +Michael Liebman <mjliebman@amoco.com> +Wolfgang Marquardt <maq@Prandtl.lfpt.rwth-aachen.de> +Buff Miner <miner@hagar.ph.utexas.edu> +Ashutosh Patwardhan <ashu@shell.com> +Larry Ricker <ricker@chevax.cheme.washington.edu>
new file mode 100644 --- /dev/null +++ b/doc/ChangeLog @@ -0,0 +1,50 @@ +Sat Jun 15 23:01:33 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * interpreter/Makefile.in (TEXINFO): Add audio.texi and emacs.texi. + +Fri May 17 03:02:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * interpreter/Makefile.in: Use man1dir instead of mandir, and + man1ext instead of manext. + +Sat Mar 23 05:01:17 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * liboctave/Makefile.in (TEXINFO): Don't list conf.texi and + gpl.texi here. + + * liboctave/Makefile.in (dist targets): Fix ln command. + * refcard/Makefile.in (dist targets): Likewise. + * interpreter/Makefile.in (dist targets): Likewise. + * faq/Makefile.in (dist targets): Likewise. + +Fri Mar 22 23:57:26 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * liboctave/Makefile.in (DISTFILES): Add gpl.texi. + * interpreter/Makefile.in (DISTFILES): Add gpl.texi. + * Makefile.in (DISTFILES): Delete gpl.texi. + +Sun Mar 3 11:33:30 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Split docs into faq, interpreter, liboctave, and refcard + subdirectories. + +Wed Sep 20 00:47:45 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * mkinstalldirs: New file. + * Makefile.in (DISTFILES): Add it to the list. + + * Makefile.in (maintainer-clean): Delete .dvi, .ps, and .info + files here. + (clean): Not here. + (mostlyclean): Make this the same as clean. + +Tue Sep 19 03:18:35 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (../BUGS, ../INSTALL.OCTAVE): Specify output file to + makeinfo with --output option. + +Thu Sep 14 20:31:47 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in: Don't fail if makeinfo, tex, or dvips fail. + +See ChangeLog.1 in the top level directory for earlier changes.
new file mode 100644 --- /dev/null +++ b/info/ChangeLog @@ -0,0 +1,60 @@ +Fri May 24 01:16:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (TERMLIBS): Check for tputs, not main. + +Mon May 13 02:36:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * info.c (main): On program exit, leave the cursor at the bottom + of the window and restore the terminal IO. + +Fri Mar 29 13:36:03 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (distclean): Delete config.h here + +Sat Feb 24 22:00:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (.c.o): Provide pattern here too. + +Wed Jan 31 00:22:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (common): getopt source is now in liboctave. + +Wed Sep 20 00:12:26 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * mkinstalldirs: New file. + * Makefile.in (DISTFILES): Add it to the list. + + * Makefile.in (CC, CFLAGS): Add substitutions for these. + (maintainer-clean): Also remove config.h. + +Tue Sep 19 23:56:11 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (DISTFILES): Distribute configure and config.h.in. + +Sun Apr 30 17:00:36 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (all): Make info, not libinfo.a. + (install): Install info in $(archlibdir). + (uninstall): Remove info from $(archlibdir). + + * session.c (info_session): Position cursor at the bottom of the + screen. + +Thu Apr 20 14:08:06 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * xmalloc.c (xmalloc, xrealloc): Add some debugging code. + +Tue Apr 11 20:37:13 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: New file. + * acconfig.h: New file. + * Makefile.in (DISTFILES): Add configure.in and acconfig.h + (INCLUDES): Put a copy of getopt.h here too. + +Mon Apr 10 17:46:58 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (.c.o): Delete rule. + (ALL_CFLAGS): Rename from UGLY_ALL_CFLAGS. Replace $(UGLY_DEFS) + with $(DEFS). + + * All .c files: Include <config.h>.
new file mode 100755 --- /dev/null +++ b/install-sh @@ -0,0 +1,119 @@ +#!/bin/sh + +# +# install - install a program, script, or datafile +# This comes from X11R5; it is not part of GNU. +# +# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $ +# +# This script is compatible with the BSD install script, but was written +# from scratch. +# + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" + +instcmd="$mvprog" +chmodcmd="" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +fi + +if [ x"$dst" = x ] +then + echo "install: no destination specified" + exit 1 +fi + + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + +if [ -d $dst ] +then + dst="$dst"/`basename $src` +fi + +# Make a temp file name in the proper directory. + +dstdir=`dirname $dst` +dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + +$doit $instcmd $src $dsttmp + +# and set any options; do chmod last to preserve setuid bits + +if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; fi +if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; fi +if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; fi +if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; fi + +# Now rename the file to the real destination. + +$doit $rmcmd $dst +$doit $mvcmd $dsttmp $dst + + +exit 0
new file mode 100644 --- /dev/null +++ b/kpathsea/ChangeLog @@ -0,0 +1,1480 @@ +Mon Jun 24 02:33:27 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install): Use INSTALL_PROGRAM instead of + INSTALL_DATA to install shared libs. + +Fri Mar 29 13:35:09 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (distclean): Remove so_locations, which is generated + on DEC Alpha systems. + +Fri Feb 2 22:57:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (tex-file.o): Use correct rule for making shared + version. + +Fri Dec 29 21:41:08 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * config.guess, config.sub: New files. + * configure.in, Makefile.in: + Handle shared libraries for Octave. + +Wed Oct 4 02:26:09 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (uninstall): For use with Octave, don't do anything. + +Fri Sep 29 00:43:05 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * elt-dirs.c (kpse_element_dirs): Do call kpse_expand on elt. + +Sun Feb 26 16:46:32 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in: Depend on ./c-auto.h, not + $(kpathsea_srcdir)/c-auto.h. + +Sun Jan 8 12:14:47 1995 Karl Berry <karl@cs.umb.edu> + + * Version 2.6. + +Wed Jan 4 14:44:34 1995 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (mostlyclean): Remove kpsewhich. + +Tue Jan 3 11:48:40 1995 Karl Berry <karl@cs.umb.edu> + + * kpsewhich.c (long_options): Can't make this automatic. + + * basename.c: Include <kpathsea/config.h> before testing + HAVE_BASENAME. + + * Makefile.in (kpsewhich): Make the library before kpsewhich.o. + (paths.h): No need for the $(kpathsea_dir)/ any more, now make + depend gets rid of it. + + * rm-suffix.c: Doc fix. + + * kpsewhich.c: Extract the dpi from the filename if possible. + +Mon Jan 2 09:45:17 1995 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (kpsexpand): Replace with kpsewhich. + + * proginit.h: Doc fix. + + * texmf.cnf.in (TEXMFCNF): Rename from TEXMF_CNF. + * tex-file.c (kpse_init_format): Likewise. + +Sun Jan 1 14:04:41 1995 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (MakeTeXPK): Substitute for web2cdir. + * MakeTeXPK.in: Use it for MakeTeXPK.site. + (install-data): Install texmf.cnf in web2cdir instead of texmf. + * texmf.cnf.in (TEXMF_CNF): Default path includes web2cdir. + +Sat Dec 31 14:26:48 1994 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (objects): No more @LIBOBJS@. + * common.ac: Use AC_CHECK_FUNCS for basename, not REPLACE_FUNCS. + The latter doesn't define HAVE_BASENAME. + * basename.c [!HAVE_BASENAME]: Conditionalize whole file. + + * Makefile.in (uninstall-exec): Remove kpsexpand. + (MakeTeXPK): New target. + (install-exec): Install MTPK. + (install-library): New target to replace install-headers. + (install): Don't install-library by default. + +Fri Dec 30 15:53:04 1994 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (objects): Don't put @LIBOBJS@ on a line by itself. + From Joachim. + +Mon Dec 26 07:55:40 1994 Karl Berry <karl@cs.umb.edu> + + * common.ac (AC_FUNC_CLOSEDIR_VOID): Call this. Reported by + Timothy Murphy <tim@maths.tcd.ie>. + + * tex-file.c (init_path): If a variable is set to an empty value, + ignore it. Suggested by Stephen Gildea <gildea@x.org>. + + * proginit.c: If passed a NULL mode, put / in the environment here. + * tex-make.c (kpse_make_tex): Don't do STREQ on NULL (though it + should never be NULL in the first place), and properly restore + MAKETEX_MODE if it was /. + +Tue Dec 20 09:57:21 1994 Karl Berry <karl@cs.umb.edu> + + * install.texi: Mention how to do optimization. + +Mon Dec 19 13:18:04 1994 Karl Berry <karl@cs.umb.edu> + + * tex-file.h: Doc fix. + +Wed Dec 14 14:46:47 1994 Karl Berry <karl@cs.umb.edu> + + * Version 2.5. + + * pathsearch.c (log_search): Don't prepend the `kdebug:' to the + search result. + +Sat Dec 10 16:49:12 1994 Karl Berry <karl@cs.umb.edu> + + * tex-make.c (set_maketex_mag): Make case of magstep -1 work + properly. From a bug report by + heiko@lotte.sax.de (Heiko Schlittermann). + +Mon Dec 5 11:58:08 1994 Karl Berry <karl@cs.umb.edu> + + * Makefile.in (objects): Add @LIBOBJS@. + * common.ac: Check for basename. + + * db.c (db_insert): Include trailing / in directory part, and pass + the key and the value in the right order. From + te@informatik.uni-hannover.de. + +Sun Dec 4 14:26:44 1994 Karl Berry <karl@cs.umb.edu> + + * kpsexpand.c: Add extra filename argument. From + ware@cis.ohio-state.edu. + + * common.ac: Use AC_TRY_RUN to test for SMART_PUTENV, not + AC_TRY_LINK. From parkes@sierravista.com. + + * acconfig.h: Use #undef instead of commented-out `/* #define'. + +Sun Nov 27 13:47:06 1994 Karl Berry <karl@cs.umb.edu> + + * db.c (db_insert): Don't try to insert into an empty hash table. + From dc@cobi.gsfc.nasa.gov (and others). + + * pathsearch.c (log_search): Call DEBUGF, not printf, for the + filenames. From John I. + + * tex-make.c (kpse_make_tex): If MAKETEX_MODE is /, unset it and + reset it around the command expansion. + (maketex): Back to calling db_insert. + +Sat Nov 26 11:44:09 1994 Karl Berry <karl@cs.umb.edu> + + * cnf.c (read_file): If expansion of $TEXMF (KPSE_DB_DIR) fails, + expand DEFAULT_TEXMF. From te@informatik.uni-hannover.de. + +Thu Nov 24 13:41:15 1994 Karl Berry <karl@cs.umb.edu> + + * tex-file.c (KPSE_BST_ENVS): Do not look at TEXINPUTS. + + * tex-file.h: Doc fix. + +Tue Nov 15 14:06:56 1994 Karl Berry <karl@cs.umb.edu> + + * progname.c (kpse_set_progname): Use basename. + +Fri Nov 11 19:12:23 1994 Karl Berry <karl@cs.umb.edu> + + * acconfig.h (HAVE_SIGIO): Add this. + +Tue Nov 8 19:14:12 1994 Karl Berry <karl@cs.umb.edu> + + * tex-make.c (kpse_make_tex): Change argument name from + `basename', since now we have a fn by that name. + * magstep.c (kpse_magstep_fix): Initialize mdpi. + * basename.c (basename): Initalize base. + +Mon Nov 7 15:46:21 1994 Karl Berry <karl@cs.umb.edu> + + * common.ac: Run autoupdate. + * c-dir.h: Change #if names and NLENGTH to new style. + +Fri Oct 28 21:28:02 1994 K. Berry (karl@terminus.cs.umb.edu) + + * Version 2.4. + + * tex-make.c (maketex): Don't call db_insert, that routine is + buggy. I'll fix it later. In the meantime, trying to get a + semi-stable release. + +Tue Oct 25 16:43:31 1994 Karl Berry <karl@cs.umb.edu> + + * Version 2.3. + + * progname.c (kpse_set_progname): Initialize kpathsea_debug from + the KPATHSEA_DEBUG envvar. From neal@ctd.comsat.com. + +Mon Oct 24 13:41:24 1994 Karl Berry <karl@cs.umb.edu> + + * db.c (db_insert): New function. + * db.h: Declare it. + * tex-make.c (maketex): db_insert the result if we succeeded. + + * basename.c: New file to define basename. + * lib.h (basename): Declare it. + * Makefile.in (objects): Include basename.o. + + * tex-file.h (kpse_file_format_type): Add missing enum values for + base/fmt/pool files. + * tex-file.c (kpse_init_format): Add cases for these. + From te@informatik.uni-hannover.de. + + * lib.h (WARNING, FATAL): Use fputs instead of fprintf. + * Many files: Use DEBUGF instead of printf ("kdebug". + * debug.h (DEBUGF) [DEBUG]: Define this. + + * xputenv.c (xputenv): Initialize that static saved_env_items to + null, just for documentation's sake. + +Tue Oct 18 13:19:06 1994 Karl Berry <karl@cs.umb.edu> + + * tex-file.c (KPSE_*_ENVS): Move environment variable list here. + * tex-file.h: Move them from here. + + * tex-glyph.h: Doc fix. + + * tex-file.c (kpse_find_file): Correct off-by-one in suffix + comparison. From toy@rtp.ericsson.se. + +Mon Oct 17 14:01:02 1994 Karl Berry <karl@cs.umb.edu> + + * elt-dirs.c (do_subdir): Find a top-level subdir if it matches + the POST. + + * db.c (kpse_db_search): Allow for the passed name including a + directory part, as in dpi600/cmr10.pk. + * tex-glyph.c (try_format): First search all specs with + must_exist=false. + + * kpsexpand.c: New file, from te@informatik.uni-hannover.de. + * Makefile.in (kpsexpand): New target (a program). + (install-exec): Depend on, and install, kpsexpand. + + * common.ac: Doc fix. + + * cnf.c (do_line): Don't quit just because the variable is in the + environment. From te@informatik.uni-hannover.de. + + * tex-glyph.c (PXL_BITMAP_SPEC): Remove this, we're not going to + support pxl1500. + +Sun Oct 16 20:46:26 1994 Karl Berry <karl@cs.umb.edu> + + * kpathsea.texi: Make it clear that names of debugging bits can + never be used. + +Fri Oct 14 10:31:35 1994 Karl Berry <karl@cs.umb.edu> + + * Version 2.2. + + * hash.c (hash_lookup) [DEBUG]: Cast to long, not int. + +Thu Oct 13 15:39:34 1994 Karl Berry <karl@owl> + + * db.c (db_build): Warn if ls-R contains nothing useful. + + * debug.c (fopen, fclose) [DEBUG]: fflush stdout. + * dir.c (dir_links), + * hash.c (hash_lookup), + * tex-file.c (kpse_init_format), + * elt-dirs.c (kpse_element_dirs): Likewise. + +Thu Oct 13 09:02:56 1994 Karl Berry <karl@cs.umb.edu> + + * hash.c (kpse_debug_hash_lookup_int) [DEBUG]: New global. + (hash_lookup): Use it. + * hash.h [DEBUG]: Declare it. + * dir.c (dir_links) [DEBUG]: Set it and reset it. + + * tex-glyph.c (PXL_BITMAP_SPEC): Add this (pxlNNN/cmr10.pk) for + the Bitstream utilities. From abrahams@acm.org. + (try_format): Search for this. + +Tue Oct 11 15:15:49 1994 Karl Berry <karl@cs.umb.edu> + + * db.c (db_build): Use kpse_db_dir instead of KPSE_DB_DIR. This + avoids one variable expansion, and te@informatik.uni-hannover.de + says otherwise TeX sometimes can't find ls-R. + +Sun Oct 9 17:18:23 1994 Karl Berry <karl@cs.umb.edu> + + * kdefault.c: Rename from default.c. + * Makefile.in (objects): Likewise. + +Fri Oct 7 12:58:33 1994 Karl Berry <karl@cs.umb.edu> + + * tex-file.c (kpse_init_format): Call INIT_MT for the any_glyph + case. From carson@lehman.com. + +Sun Oct 2 14:11:20 1994 Karl Berry <karl@cs.umb.edu> + + * magstep.c: Doc fix. + +Sun Sep 25 17:11:40 1994 Karl Berry <karl@cs.umb.edu> + + * Makefile.in: Include library.make. + +Thu Sep 22 15:34:40 1994 Karl Berry <karl@cs.umb.edu> + + * tex-file.h (kpse_file_format_type): Don't make equal to the last + element index, make one more. From Eric Auborg. + +Thu Sep 15 19:24:30 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (distdir): Include install.texi in the distribution. + +Mon Sep 12 11:05:18 1994 Karl Berry (karl@cs.umb.edu) + + * Version 2.1. + +Sun Sep 11 15:03:18 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (install-data): Install texmf.cnf if it didn't exist. + +Sat Sep 10 13:28:29 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (texmf.sed, paths.h): Use tr 012 instead of \n. + From John Interrante. + + * Makefile.in (distdir): Include the .aux and .cps files in the + distribution. Don't include paths.h (from John Interrante). + + * kpathsea.texi: Fix overfull boxes and other TeX errors. + +Wed Sep 7 16:28:37 1994 Karl Berry (karl@cs.umb.edu) + + * Version 2.0. + +Tue Sep 6 10:33:18 1994 Karl Berry (karl@cs.umb.edu) + + * dir.c (dir_links): Use %ld for ret, since it's now a long. + +Sat Sep 3 09:01:25 1994 Karl Berry (karl@cs.umb.edu) + + * dir.c (dir_links): Use long instead of int for the cast and the + variable, to avoid warnings on the Alpha. + + * c-std.h (SYSV, X_NOT_STDC_ENV): Don't define these here. + * c-memstr.h (SYSV): Define this. + (_XFUNCS_H_): And this. + + * Makefile.in (distclean): Add texmf.cnf and texmf.sed. + +Thu Sep 1 14:22:48 1994 Karl Berry (karl@cs.umb.edu) + + * xputenv.c (putenv): Declare this to avoid a warning. + * xstat.c (lstat): And this. + + * common.ac (SMART_PUTENV): Use program to test for this. From + mike@cs.utah.edu. + + * tex-glyph.c (try_fallback_resolutions): Quit early if there's no + resolutions in the list. From sanjoy@dope.caltech.edu. + +Tue Aug 30 14:26:48 1994 Karl Berry (karl@cs.umb.edu) + + * acconfig.h (FOIL_X_WCHAR_T): New definition. + + * c-std.h (hypot) [!hypot]: Conditionalize declaration. + +Fri Aug 26 09:00:24 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (install-data): Install headers into + $(includedir)/kpathsea, not just $(includedir). From john@wpi.edu. + + * pathsearch.c (search): Show results of the search as well as the + start of it. + +Thu Aug 25 13:40:29 1994 Karl Berry (karl@cs.umb.edu) + + * proginit.c (kpse_init_prog): Newline at end of fputs. + + * pathsearch.c (search): Add debug statement. + * debug.h (KPSE_DEBUG_SEARCH): New bit. + + * tex-file.h (kpse_format_info_type): Rename `font_override_p' from + `font_p'. Also `program_enabled' => `program_enabled_p'. + Also new member `suffix_search_only'. + * tex-file.c (kpse_find_file): Avoid searching for foo.tex.tex, etc. + +Tue Aug 16 09:29:59 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (maketex): Announce that we are running the script + before running it. + +Mon Aug 15 11:18:19 1994 Karl Berry (karl@cs.umb.edu) + + * texmf.cnf.in (PKFONTS.xdvi): Write program-specific definition + to include gsftopk and ps2pk ``modes''. + +Sat Aug 13 16:34:43 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (lib): Rename to program to simplify rules. + + * magstep.h: Doc fix. + + * common.ac (AC_HAVE_FUNCS): Test for bcopy. + +Tue Aug 9 14:18:56 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (misstex): Prepend kpathsea: to the missfont.log + message. + +Mon Aug 8 17:53:58 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (set_maketex_mag): Rewrite to call kpse_magstep_fix. + * magstep.[ch]: New files. + +Fri Aug 5 14:07:51 1994 Karl Berry (karl@cs.umb.edu) + + * db.c (match): Allow a trailing component in the filename. + +Tue Aug 2 08:55:21 1994 Karl Berry (karl@cs.umb.edu) + + * Change `debug:' to `kdebug:'. + * hash.c (hash_lookup): Print results of lookup if DEBUG_HASH. + * debug.h (KPSE_DEBUG_HASH): New bit, replacing DB_BUILD. + * db.c (db_build): Don't print the built hash table. + + * db.c (match): Implement this. Petr Sojka and Zdenek Salvet(?) + supplied code for this, but I wound up writing my own. + * variable.c (expand): Do variable expansion on the value. + + * texmf.cnf.in (TEXINPUTS): Put this after the .prog-specific entries. + + * tex-file.c (kpse_pict_format): Remember to break after setting + the type. + (EXPAND_DEFAULT, init_path): Keep raw_path as pre-default expansion. + +Sun Jul 31 14:18:09 1994 Karl Berry (karl@cs.umb.edu) + + * debug.c: Don't include debug.h, it's already in debug.h. + + * Makefile.in (db.o,pathsearch.o): Don't need these special cases + since tossed db_dir from paths.make. + * db.h (DB_DIR): Change default to $TEXMF, rename to KPSE_DB_DIR. + (kpse_db_dir): New global variable (sigh). + * db.c (kpse_db_dir): Define. + * cnf.c: Include db.h for KPSE_DB_DIR. + (read_files): Set kpse_db_dir after all have been read. + * pathsearch.c (elt_in_db): Check if kpse_db_dir is null. + (path_search): Do not initialize db_dir. + +Sat Jul 30 06:12:12 1994 Karl Berry (karl@cs.umb.edu) + + * c-dir.h [_POSIX_VERSION]: Remove this condition; just use DIRENT. + +Fri Jul 29 11:36:25 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c (init_path): Look up cnf file value if no suffix. + + * xstat.h (SAME_FILE_P): Move here. + * c-stat.h (SAME_FILE_P): From here. + * file-p.c: Change include. + * lib.h (dir_p, dir_links): Declare here. + * dir.h: Split into xopendir.h and c-dir.h; Sun 3 include files + get confused otherwise, according to john@minster.york.ac.uk. + * xopendir.c: Include xopendir.h. + * elt-dirs.c, dir.c: Change includes. + +Sun Jul 17 10:21:16 1994 Karl Berry (karl@cs.umb.edu) + + * hash.c (hash_insert): Put new elements in at the end of the + list, instead of the beginning. + * hash.h: Document this. + + * texmf.cnf.in (TEXMFROOT): Change to TEXMF. + * kpathsea.texi: Likewise. + + * cnf.c (do_line): assert program_invocation_short_name. + * progname.c: Doc fix. + + * absolute.[ch] (kpse_absolute_p): Take additional arg relative_ok. + * pathsearch.c (log_search): Call it (with false). + * tex-glyph.c: Change call. + + * pathsearch.c (path_search): Initialize db_dir here. + (elt_in_db): Not here. + +Fri Jul 15 11:44:15 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.h: Doc fix. + + * pathsearch.c (log_search): Pass in the whole str_list; anything + else is unreliable. + + * proginit.[ch] (kpse_init_prog): Don't pass in argv0; we need it + earlier. + +Tue Jul 12 11:56:54 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c (init_path): Use the first envvar that's *set*, not + the first in the list. + + * tex-file.h (kpse_format_info_type): New member `type'. + * tex-file.c (kpse_init_format): Initialize it. + + * pathsearch.c (log_search): New fn. + (search): Call it. + +Fri Jul 1 11:54:29 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c: Doc fix. + +Mon Jun 27 10:18:59 1994 Karl Berry (karl@cs.umb.edu) + + * db.c (db_build): Call kpse_var_expand on the db filename. + * pathsearch.c (elt_in_db): Likewise. + + * tex-glyph.h (kpse_find_gf): By analogy with kpse_find_pk. + +Sat Jun 25 16:09:05 1994 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (try_format): Try both Unix and DOS bitmap specs, + instead of just one or the other. + (bitmap_name): No longer needed. + +Fri Jun 24 11:52:32 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c (kpse_find_file): Don't try the suffix if it doesn't + exist. + + * tex-file.h (kpse_find_{dvips_header,pict}): New definition. + +Thu Jun 23 16:57:58 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.h (kpse_{pict,dvips_header}_format): New consts. + (KPSE_{PICT,DVIPS_HEADER}_ENVS): Likewise. + +Tue Jun 21 11:53:09 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c (kpse_find_file): Try the name as given if the name + concatenated with the suffix fails, for the sake of, e.g., EPS files. + + * tex-file.h (kpse_find_tex): New definition. + + * absolute.[ch]: Make arg const. + + * tex-glyph.[ch]: (kpse_bitmap_tolerance): Move here from tex-make. + + * c-proto.h (P6[CH]): New definitions. + + * Makefile.in (objects): Add proginit.o. + * proginit.[ch]: New files. + +Mon Jun 20 14:55:57 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.c (kpse_init_format): Make override path not apply to + TFM and VF files. + + * tex-glyph.c (kpse_find_glyph_format): Rename to kpse_find_glyph, + and don't call MakeTeXPK if the filename is absolute. + * tex-glyph.h: Likewise. + +Sun Jun 19 11:00:50 1994 Karl Berry (karl@cs.umb.edu) + + * common.ac (HAVE_PROGRAM_INVOCATION_NAME): Test for this. + * acconfig.h: #undef this by default. + * progname.[ch]: New files. + * Makefile.in (objects): Add progname.o. + * cnf.c (do_line): Check for .<progname> qualification. + +Sat Jun 18 16:55:36 1994 Karl Berry (karl@cs.umb.edu) + + * elt-dirs.c (kpse_element_dirs): Avoid stats in leaf directories + found via a non-null post. + +Fri Jun 17 14:25:08 1994 Karl Berry (karl@cs.umb.edu) + + * elt-dirs.c (kpse_element_dirs) [DEBUG]: Print the directory + expansion of the path element. + + * str-llist.h: Doc fix. + + * elt-dirs.c (do_subdir): Ignore anything beginning with ., not + just `.' and `..'. + +Tue Jun 14 11:53:49 1994 Karl Berry (karl@cs.umb.edu) + + * dir.c (dir_links): Cache the lookups. + + * elt-dirs.c (kpse_element_dirs): Don't expand the argument. + * expand.h (kpse_path_expand): New routine. + * expand.c: Define it. + * pathsearch.h: Doc fix. + + * db.c, tex-file.c [DEBUG]: Prefix output lines with `debug:'. + + * tex-file.h (kpse_format_info_type): Add cnf_path to the struct. + * tex-file.c (kpse_init_path): Print the cnf_path. + (init_path): Set it, instead of a local variable. + + * pathsearch.c (path_search): Use !! for no-disk-search instead of + %%, because now % is the comment char in cnf files. + * kpathsea.texi: Document this. Also change all `Kpathsearch' to + `kpathsea'. + +Mon Jun 13 10:15:49 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.h (kpse_set_maketex_mag): Remove. + * tex-make.c (kpse_set_maketex_mag): Make static, remove kpse_ + prefix, and use KPATHSEA_DPI and MAKETEX_BASE_DPI instead of args. + +Sun Jun 12 13:49:15 1994 Karl Berry (karl@cs.umb.edu) + + * db.c (db_build): Put a header on the hash table. + + * tex-glyph.c (try_format): Set extension and path after + kpse_init_format, natch. + +Sat Jun 11 14:26:34 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (objects): Add cnf.o. + * variable.c (expand): Call kpse_cnf_get if no envvar value. + +Fri Jun 10 11:20:23 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.h: Remove spec type and variable. + +Thu Jun 9 13:42:21 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (objects): Remove init-path.o. + * tex-file.c (kpse_find_file): Rewrite to initialize the paths + only once, and keep all path info in a structure. + * tex-file.h: Vastly simplify. + * tex-glyph.h (kpse_font_file_type): Move here, since it's really + only for glyphs. + * tex-glyph.c: Corresponding changes. + * debug.h (KPSE_DEBUG_PATHS): New debug bit. + + * default.h, str-list.h: Doc fix. + +Tue May 31 10:06:51 1994 Karl Berry (karl@cs.umb.edu) + + * debug.c: Doc fix. + +Mon May 23 11:50:03 1994 Karl Berry (karl@cs.umb.edu) + + * c-fopen.h (FOPEN_A_MODE): Define this. + * tex-make.c (misstex, maketex): Split up kpse_make_tex into + these, and create missfont.log if appropriate. + +Sun May 22 17:39:52 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.h: Doc fix. + +Wed May 11 13:25:58 1994 Karl Berry (karl@cs.umb.edu) + + * configure.in (AC_OUTPUT): Use just `Makefile' instead of + `./Makefile', to avoid a bug in Autoconf (through 1.10). + +Sun Apr 17 16:18:00 1994 Karl Berry (karl@ra.cs.umb.edu) + + * debug.h: Prefix macros with KPSE_. + * db.c, dir.c: Change calls. + + * common.ac: Remove :: VPATH stuff; that made it in to Autoconf 1.8. + + * Makefile.in (top_srcdir): Define this for configure to substitute. + +Thu Apr 7 17:52:05 1994 Karl Berry (karl@ra.cs.umb.edu) + + * debug.[ch]: Implement fopen/fclose tracing. + +Thu Mar 31 07:25:49 1994 Karl Berry (karl@cs.umb.edu) + + * Version 1.8. + +Thu Mar 24 10:01:20 1994 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c: Doc fix. + + * pathsearch.c (path_search): Don't search the disk if there is + magic in the path spec. + + * db.c: Doc fix. + +Wed Mar 16 13:50:17 1994 Karl Berry (karl@cs.umb.edu) + + * readable.c (kpse_readable_file): Complain if errno == EPERM. + +Sun Mar 13 11:14:19 1994 Karl Berry (karl@cs.umb.edu) + + * pathsearch.h (kpse_path_search): Take an extra arg must_exist. + * pathsearch.c (kpse_path_search, search, path_search): Likewise. + * tex-file.c (kpse_find_file): Change call. + * tex-file.h (kpse_find_*): Change these calls, too. + + * hash.c (hash_create): Don't use xcalloc to init pointers to null. + + * db.c (kpse_db_search): Don't free the pointer after incrementing it. + From Frank Jensen. + +Sat Mar 12 17:55:36 1994 Karl Berry (karl@cs.umb.edu) + + * db.h (kpse_db_search): Returns a pointer. + * db.c (kpse_db_search): If db can't be built, return NULL, else a + pointer to the (possibly empty) list. + (db_build): Return whether we found the file. + * pathsearch.c (path_search): Change call. + +Thu Mar 10 07:45:13 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (install-info): New target. + +Fri Mar 4 08:06:16 1994 Karl Berry (karl@cs.umb.edu) + + * hash.c (hash): Change hash function to spread out the values a + bit better. + + * debug.h (DEBUG_DB_BUILD): New debug bit. + * db.c (db_build) [DEBUG]: If bit is set, print hash table. + * hash.h (hash_print): Declare. + +Thu Mar 3 08:52:01 1994 Karl Berry (karl@cs.umb.edu) + + * Version 1.7. + +Sun Feb 27 15:57:30 1994 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (objects): Add db.o, hash.o. + * db.[ch]: New files. + * hash.[ch]: Also new files. + * pathsearch.c (path_search): Try db search. + * tex-glyph.c, fontmap.c: Use general hash functions. + +Sat Feb 26 13:15:53 1994 Karl Berry (karl@cs.umb.edu) + + * fontmap.c: Doc fix. + + * pathsearch.c (INIT_ALLOC): Increase to 75, what the heck. + +Fri Feb 25 08:30:50 1994 Karl Berry (karl@cs.umb.edu) + + * tex-file.[ch]: Decare args const. + +Thu Feb 24 07:55:43 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.h: Include tex-file.h, not init-path.h. + + * init-path.h (KPSE_*_{ENVS,PATHS}, kpse_font_override_path): Move + to tex-font.h. + * tex-font.h (kpse_find_{file,tfm,vf}): Also declare these. + * tex-font.c (kpse_find_file): Define these. + (kpse_font_override_path): Move definition here. + + * tex-file.*: Rename from tex-font.*. + * GNUmakefile: Corresponding changes. + + * elt-dirs.c (do_subdir): Only append the / once we know it's a + directory. + +Wed Feb 23 16:41:31 1994 Karl Berry (karl@cs.umb.edu) + + * elt-dirs.c (do_subdir): Don't tack POST on if it is exactly the + d_name, so we can find a/b with a path of a//b. + + * c-vararg.h (PVAR3[CH]): New defines. + + * init-path.h: Include KPSE_*_{ENVS,PATHS} here. + (kpse_init_path): Take an additional arg font_p. + * init-path.c (kpse_override_path): Rename kpse_font_override_path. + (kpse_init_path): Only use kpse_font_override_font if font_p. + +Mon Feb 21 15:38:53 1994 Karl Berry (karl@cs.umb.edu) + + * common.ac (extrasub): Define to remove VPATH lines if srcdir = `.'. + +Thu Feb 3 06:19:49 1994 Karl Berry (karl@cs.umb.edu) + + * Version 1.6. + + * fn.c (fn_copy0): Remember to allocate space for the null. + Thanks, simon. + +Wed Feb 2 09:57:47 1994 Karl Berry (karl@cs.umb.edu) + + * tex-make.h (KPSE_BITMAP_TOLERANCE): Move to here from tex-glyph.c + (kpse_check_bitmap_tolerance): Declare. + * tex-make.c (kpse_check_bitmap_tolerance): Define. + +Tue Feb 1 10:42:03 1994 Karl Berry (karl@cs.umb.edu) + + * c-std.h (*alloc) [! _MALLOC_INTERNAL]: Make decl conditional. + + * c-std.h [HAVE_STDLIB_H]: Change #if for including <stdlib.h> to this. + * common.ac (AC_HAVE_HEADERS): Check for stdlib.h. + + * Makefile.in (paths.h): Do all substitutions globally. + + * absolute.c [DOS]: Include c-ctype.h. + * tex-glyph.c (KPATHSEA_BITMAP_NAME) [DOS]: Double the backslash. + * elt-dirs.c (do_subdir) [!UNIX_ST_LINK]: Avoid dangling else. + From Wayne. + + * paths.h.in: Doc fix. + + * xputenv.c (xputenv): Check entire variable name for being saved, + not just a prefix of it. + +Mon Jan 31 12:05:30 1994 Karl Berry (karl@cs.umb.edu) + + * fn.c (fn_copy0): Allocate LEN if that's bigger than CHUNK_SIZE. + (CHUNK_SIZE): Increase to 75. + +Sat Jan 22 15:36:08 1994 Karl Berry (karl@cs.umb.edu) + + * Version 1.5. + + * common.ac (AC_HAVE_FUNCS): Check for memmove. + + * paths.h.in (DEFAULT_MF_PATH): Don't search just public/, cause + we need ams/. + +Mon Jan 17 15:09:36 1994 Karl Berry (karl@cs.umb.edu) + + * paths.h.in (DEFAULT_{FMT,BASE}_PATH): Include `.'. + +Sun Jan 16 14:50:02 1994 Karl Berry (karl@cs.umb.edu) + + * paths.h.in (DEFAULT_PK_PATH): Search subdirs of pk. + +Mon Jan 10 16:40:35 1994 Karl Berry (karl@cs.umb.edu) + + * xputenv.c (xputenv): Don't try to be smart about saving/freeing + stuff if SMART_PUTENV is defined. + + * c-std.h (assert) [!HAVE_ASSERT_H]: Define as nothing, to avoid + undefined references to assert. + +Tue Dec 21 16:28:13 1993 Karl Berry (karl@cs.umb.edu) + + * c-std.h (SYSV) [STDC_HEADERS]: Define, to get around old X + include files under hpux. + +Sun Dec 19 13:06:15 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (objects): Put tex-font.o first. + +Sat Dec 18 15:03:57 1993 Karl Berry (karl@cs.umb.edu) + + * config.h (GCC_WCHAR_T, _GCC_WCHAR_T): Remove these; I have + another theory now for wchar_t, done in xdvi.h and x11.c. + +Sat Dec 18 14:41:15 1993 Karl Berry (karl@owl.hq.ileaf.com) + + * c-memstr.h ([r]index) [STDC_HEADERS]: Conditionalize #define. + +Tue Dec 14 17:43:30 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (paths.h): Change substitutions accordingly. + * paths.h.in (DEFAULT_FMT_PATH): Variable is now fmtdir. + (DEFAULT_{BIB,BST}_PATH): Variable is now texmf_prefix. + +Sat Dec 11 13:21:43 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (ABS): New macro. + (kpse_set_maketex_mag): Use it, instead of fabs. + +Fri Dec 10 15:31:16 1993 Karl Berry (karl@cs.umb.edu) + + * xmalloc.c, xrealloc.c: Use exit instead of abort, remove abort + decls, and reword error messages to be less cryptic. From + john@minster.york.ac.uk. + + * dir.h: use `defined' instead of just `DIRENT || _POSIX_VERSION'. + How annoying. From kretschm@aitxu3.ait.physik.uni-tuebingen.de. + + * xputenv.c (putenv): Remove declaration, as different systems do + it differently. From kayvan@satyr.sylvan.com. + +Thu Dec 9 09:12:33 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (kpse_set_maketex_mag): Allow off-by-1 when deciding + if a dpi is a magstep. + +Tue Dec 7 11:03:51 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (kpse_set_maketex_mag): New routine from dvips, + called by dvipsk and xdvik to ensure consistency. + (magstep): Subroutine of above, also from dvips. + * tex-make.h: Declare it. + + * tex-doc.texi: Correct menu item (from maechler@stat.math.ethz.ch). + +Fri Dec 3 12:53:38 1993 Karl Berry (karl@cs.umb.edu) + + * c-pathmx.h: Doc fix. + +Sat Nov 27 14:36:11 1993 Karl Berry (karl@cs.umb.edu) + + * default.h: Doc fix. + + * paths.h.in (texfontdir): This has been renamed to fontdir. + +Sun Nov 21 08:28:41 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (distdir): Include HIER in the distribution, until + we merge it into the manual. + +Sun Nov 7 14:54:47 1993 Karl Berry (karl@cs.umb.edu) + + * c-namemx.h (NAME_MAX): Avoid use of pathconf. + * c-pathmx.h: Doc fix. + +Thu Nov 4 14:50:45 1993 Karl Berry (karl@cs.umb.edu) + + * config.h (_GCC_WCHAR_T) [!GCC_WCHAR]: Conditionalize. + + * c-std.h (EXIT_SUCCESS) [!EXIT_SUCCESS]: Move these defines + outside of !STDC_HEADERS, for the sake of SunOS 4.1.1. (From + vonbrand@inf.utfsm.cl.) + +Wed Nov 3 14:43:05 1993 Karl Berry (karl@cs.umb.edu) + + * Version 1.4. + +Wed Nov 3 07:05:48 1993 Karl Berry (karl@cs.umb.edu) + + * paths.h.in (DEFAULT_{BASE,FMT}_PATH): Had these definitions reversed. + +Fri Oct 29 19:27:36 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (try_fallback_resolutions): Initialize ret in all cases. + +Thu Oct 28 14:32:34 1993 Karl Berry (karl@cs.umb.edu) + + * lib.h: Doc fix. + + * common.h (AC_UNISTD_H): Replace this with unistd.h in the list + of HAVE_HEADERS. + +Tue Oct 26 13:59:33 1993 Karl Berry (karl@cs.umb.edu) + + * str-llist.[ch]: New files. + * Makefile.in (objects): Add str_llist.o. + * elt-dirs.[ch]: Use str_llist_type throughout. + * pathsearch.c (dir_list_search): Take a str_llist_type, and float + a successful dir towards the top. + (path_search): Change call of kpse_element_dirs. + +Sun Oct 24 19:41:49 1993 Karl Berry (karl@cs.umb.edu) + + * elt-dirs.c (do_optional): Remove this stub. + (expand_elt): Don't call it. + +Fri Oct 22 14:46:44 1993 Karl Berry (karl@cs.umb.edu) + + * xmalloc.c, xrealloc.c, line.c, pathsearch.c: Doc fix. + +Tue Oct 19 12:11:32 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (try_fallback_resolutions): New routine. + (kpse_find_glyph_format): Call it, instead of repeating (the now + pretty complicated) code. + * tex-font.c (kpse_init_fallback_resolutions): Pass the value of + any environment variable, not its name. From R.Kooijman@et.tudelft.nl. + + * c-memstr.h (str[r]chr) [!str[r]chr]: Conditionalize. From + maarrrk@seidel.ece.ucsb.edu. + +Tue Oct 12 16:26:48 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c: Doc fix. + +Thu Oct 7 13:13:57 1993 Karl Berry (karl@cs.umb.edu) + + * xmalloc.c: Rewrite to not require <config.h>. + * xrealloc.c: Likewise. + + * make-suffix.c (make_suffix): Declare variables const. + * remove-suffx.c (remove_suffix): Likewise. Also rename to + rm-suffix.c. + * xputenv.c (putenv): Declare with correct prototype. + * fontmap.c (internal routines): Likewise. + * line.c (xmalloc, xrealloc): Declare as void *. + (From john@minster.york.ac.uk.) + +Wed Oct 6 06:49:53 1993 Karl Berry (karl@cs.umb.edu) + + * Version 1.3. + + * tilde.c (kpse_tilde_expand): Always return a malloc-ed value. + (From ken@cs.toronto.edu.) + +Sun Oct 3 14:11:33 1993 Karl Berry (karl@cs.umb.edu) + + * config.h (_GCC_WCHAR_T): Define. + +Sat Oct 2 17:17:32 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (install-*): Don't reassign PATH, just invoke + mkdirchain explicitly. + + * tex-glyph.c (KPATHSEA_BITMAP_NAME) [DOS]: Define what I think + will work for this ... + + * paths.h.in: Doc fix. + + * Makefile.in: Doc fix. + + * tex-glyph.c (kpse_find_glyph_format): Unconditionally initialize + glyph_paths[*], since we might use them both in try_size. From + worsch@ira.uka.de. + +Fri Oct 1 12:02:11 1993 Karl Berry (karl@cs.umb.edu) + + * expand.c: Doc fix. + +Wed Sep 29 15:21:49 1993 (karl@terminus.cs.umb.edu) + + * Version 1.2. + +Sat Sep 25 14:12:00 1993 Karl Berry (karl@cs.umb.edu) + + * pathsearch.c (path_search, absolute_search): Don't initialize + structs. + +Fri Sep 24 12:50:00 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (try_size): Skip the simultaneous stuff. + (try_format): Set the envvar here. + (bitmap_name): Not here. + * pathsearch.c (kpse_*_multi_search): Delete. + Change most other routines to take only a single name again, + instead of a name list. + * pathsearch.h: Delete decls. + + * tex-glyph.c (init-path.h): Don't need to include this. + + * tex-glyph.c (kpse_find_glyph_format): Try the fallback + resolutions for the fallback font. + + * Makefile.in (warn_more, MAKEINFO_FLAGS) [hayley]: Define these + for development and distribution. + + * Makefile.in (dvi): Make analogous to info (including use of new + suffix rule). + + * tex-glyph.c (kpse_find_glyph_format): Set KPATHSEA_NAME to the + fallback font if we get that far. + +Wed Sep 15 19:29:56 1993 Karl Berry (karl@cs.umb.edu) + + * filefmt.h (KPSE_*_PATH): Pass NULL as first arg. + + * xputenv.c (xputenv): Rewrite again to save the variable names, + not the old items. + +Mon Sep 13 06:55:29 1993 Karl Berry (karl@cs.umb.edu) + + * concatn.h: Doc fix. + +Sun Sep 12 15:54:55 1993 Karl Berry (karl@cs.umb.edu) + + * lib.h (XTALLOC): Parenthesize the cast. + + * xputenv.c (xputenv): Rewrite to collect some of the garbage. + +Fri Sep 10 14:00:35 1993 Karl Berry (karl@cs.umb.edu) + + * lib.h (ENVVAR_SET_DEFAULT): No longer needed. + + * xputenv.c (xputenv_int): New routine. + +Thu Sep 9 14:58:00 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c (MAKE_TEX_PK_SPEC): Change MAKETEX_DPI to + KPATHSEA_DPI. + + * tex-glyph.c (try_fontmap): Use KPSE_GLYPH_PATH. + * filefmt.c (KPSE_GLYPH_{PATH,ENVS}): New macros. + (KPSE_{GF,PK}_ENVS): Use GLYPH_ENVS. + + * tex-glyph.c (bitmap_name): Rewrite to use a variable spec, + introducing KPATHSEA_{BITMAP_NAME,FORMAT,DPI,NAME}. + (kpse_find_glyph_format): Set KPATHSEA_DPI instead of MAKETEX_DPI; + also set KPATHSEA_NAME. + (try_fontmap): Also set KPATHSEA_NAME here. + (try_size): Set KPATHSEA_DPI here. + + * tex-glyph.c (try_name): Delete this routine. + (kpse_find_glyph_format): Try fallback resolutions here, call + try_resolution directly. + (try_fontmap): Call try_resolution directly. + + * init-path.h: Need not include c-proto.h. + +Sun Aug 29 13:34:25 1993 Karl Berry (karl@cs.umb.edu) + + * tex-make.c: Doc fix. + + * filefmt.h: Don't need c-proto.h or types.h. + +Fri Aug 27 10:36:46 1993 Karl Berry (karl@cs.umb.edu) + + * c-vararg.h (PVAR2C): Take AP as an arg. + + * init-path.[ch] (kpse_init_path): Take the current value as an + additional argument, separate from the default path, and always + expand_default. + + * uppercasify.c (uppercasify): Don't discard upcased result! + +Thu Aug 26 10:36:28 1993 Karl Berry (karl@cs.umb.edu) + + * Version 1.1. + +Sun Aug 22 19:18:35 1993 Karl Berry (karl@cs.umb.edu) + + * install-data (install-data): Replace nonexistent + $(kpath_includedir) with $(includedir), and define it. Also + remove c-auto.h. + +Thu Aug 5 09:03:22 1993 Karl Berry (karl@cs.umb.edu) + + * Version 1.0. + +Wed Aug 4 13:51:24 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (kpse_find_glyph_format): Fill in the font_file + struct in the maketex case. + + * Makefile.in (info): Just depend on kpathsea.info, and rely on + new suffix rule to do the work. + +Tue Aug 3 17:50:40 1993 Karl Berry (karl@fishbowl.hq.ileaf.com) + + * tex-glyph.c (try_name): Don't free expanded_name if we're + returning it. + +Tue Aug 3 10:13:43 1993 Karl Berry (karl@owl.hq.ileaf.com) + + * version.c (kpathsea_version_string): Do not declare const. + + * line.h (read_line): Protoize decl. + +Tue Aug 3 09:10:07 1993 Karl Berry (karl@blood.hq.ileaf.com) + + * c-memstr.h (bcmp, bcopy, bzero) [!HAVE_BCOPY]: Conditionalize. + + * putenv.c: Include <kpathsea/c-auto.h>, and use const when + calling memcpy. + +Sun Aug 1 08:48:49 1993 Karl Berry (karl@cs.umb.edu) + + * Add new features to manual. + + * Makefile.in (objects): Include putenv.o. + * putenv.c: New file from gdb. + * common.ac: Test for putenv. + +Sat Jul 31 11:54:31 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (distclean): Remove paths.h. + + * Most files: changes for traditional C compatibility. + + * filefmt.h: Add new KPSE_..._PATH's for the other formats. + * paths.h.in: Add defaults. + * Makefile.in (paths.h): sed the values in. + +Fri Jul 30 17:23:10 1993 Karl Berry (karl@cs.umb.edu) + + * filefmt.h (KPSE_VF_PATH): Add empty parens. + + * tex-paths.h*: Rename to just paths.h*. + +Tue Jul 27 09:00:58 1993 Karl Berry (karl@cs.umb.edu) + + * filefmt.h: Include tex-paths.h, and use default paths in + KPSE_..._PATH macros. + + * find-suffix.c: Correct logic. + + * filefmt.h: Include init-path.h. + +Sat Jul 24 10:44:21 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (kpse_find_glyph_format): Assign to it. + * tex-font.h (kpse_font_file_type): New member `source'. + (KPSE_FONT_FILE_SOURCE): Accessor macro. + (kpse_source_type): New type. + +Wed Jul 21 19:45:45 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (configclean): New target. + +Sun Jul 18 13:53:38 1993 Karl Berry (karl@cs.umb.edu) + + * tilde.[ch] (kpse_expand_tilde): Rename to kpse_tilde_expand. + + * elt-dirs.c, pathsearch.c, tex-glyph.c: Replace calls to + kpse_expand_tilde with kpse_expand. + * expand.[ch]: New files. + * Makefile.in (objects): Add it. + + * fn.[ch]: New files. + * elt-dirs.c (fn*): Moved to fn.c. + * tex-make.c, variable.c: Use the new routines. + * *obstack*: No longer needed. + * Makefile.in (objects): Appropriate changes. + +Sat Jul 17 13:25:25 1993 Karl Berry (karl@cs.umb.edu) + + * concat.c: Doc fix. + + * pathsearch.c (search, path_search): Expand variable references. + + * itoa.c: New file. + * lib.h (itoa): Declare it. + * Makefile.in (objects): Add it. + + * lib.h (ENVVAR_SET_DEFAULT): New macro. + * tex-glyph.c (kpse_find_glyph_format): Call it to set the dpi. + +Fri Jul 16 09:10:52 1993 Karl Berry (karl@cs.umb.edu) + + * xputenv.c: New file. + * Makefile.in (objects): Add it. + * lib.h (xputenv): Declare it. + + * c-obstack.h: New file. + * variable.[ch]: New files. + * Makefile.in (objects): Add it. + + * uppercasify.c: New file. + * Makefile.in (objects): add it. + * lib.h (uppercasify): Declare it. + +Tue Jul 13 13:47:54 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (kpse_find_glyph_format): Simplify path initialization. + * filefmt.h: New file; add abbrevs for GF and PK inits. + + * Makefile.in (objects): Add obstack.o and tex-make.o. + * obstack.[ch]: New files from GNU. + * concatn.[ch], tex-make.[ch]: New files. + * init-path.c: Doc fix. + + * elt-dirs.c: Doc fix. + * readable.[ch]: Doc fixes. + +Sun Jul 11 13:37:02 1993 Karl Berry (karl@cs.umb.edu) + + * tex-font.h (kpse_font_format_type): Rename to kpse_file_format_type, + and include the other file formats. + * tex-glyph.c: Change uses. + +Tue Jul 6 08:09:10 1993 Karl Berry (karl@cs.umb.edu) + + * tex-font.c (kpse_fallback_font): Initialize to NULL. + +Mon Jul 5 08:23:09 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (try_size): Don't fill in FONT_FILE if it's null. + + * tex-font.c (kpse_init_fallback_resolutions): Look for TEXSIZES + after the program-specific *SIZES var. + + * tex-glyph.c (kpse_find_glyph_format): Use kpse_init_path. + * Makefile.in (objects): Add init_path.o. + * tex-font.[ch] (kpse_override_path): Move to init-path.[ch]. + * init-path.[ch]: New files. + * c-vararg.h: New file. + +Sun Jul 4 11:26:17 1993 Karl Berry (karl@cs.umb.edu) + + * tex-font.c (kpse_init_fallback_resolutions): New routine. + * tex-font.h: Declare it, and companion return type. + +Fri Jul 2 10:43:11 1993 Karl Berry (karl@cs.umb.edu) + + * tex-glyph.c (kpse_find_glyph_format): Take first successful + fontmap entry. + + * fontmap.c (map_file_parse): Take first % on line as starting the + comment, not the last. + + * fontmap.c (map_insert): Always insert the new element. + +Thu Jul 1 19:21:35 1993 Karl Berry (karl@cs.umb.edu) + + * fontmap.c (map_lookup): Return a list, not a single string. + (map_lookup_str): Likewise. + * fontmap.h (map_lookup): Change decl. + * tex-glyph.c (kpse_find_glyph_format): Change caller. + +Sat Jun 26 11:48:36 1993 Karl Berry (karl@cs.umb.edu) + + * tex-font.h: Doc fix. + +Thu Jun 24 11:16:41 1993 Karl Berry (karl@cs.umb.edu) + + * configure.in (MISSING_HEADERS): Toss in favor of HAVE_HEADERS. Sigh. + Also, move all this to an include file. + Change uses in several files. + + * stat.h: Rename to c-stat.h, and change includers. + + * Makefile.in (objects): Add tex-glyph.o. + * pathsearch.[ch] (kpse_*_multi_search): New routines. + +Sat Jun 19 11:37:18 1993 Karl Berry (karl@cs.umb.edu) + + * str-list.c (str_list_free): New routine. + +Fri Jun 18 13:54:08 1993 Karl Berry (karl@cs.umb.edu) + + * fontmap.c (map_create): Rewrite to use kpse_all_path_search. + Include const in various subroutines. + +Tue Jun 15 15:58:18 1993 Karl Berry (karl@cs.umb.edu) + + * Change <kpathsea/pathsrch.h> to pathsearch. Rename the files + themselves. + + * elt-dirs.c (cache): Copy the key into our own storage, since it + comes from kpse_path_element and might get overwritten. Should we + copy all the values, too? + +Sun Jun 13 16:49:09 1993 Karl Berry (karl@cs.umb.edu) + + * pathsearch.c (dir_list_search): Don't need to append the null + here; in fact, it's wrong, since then the final list might have + nulls in the middle. + + * elt-dirs.c (dir_list_add): Correct check for new directory + already ending in /. + +Fri Jun 11 10:45:33 1993 Karl Berry (karl@cs.umb.edu) + + * str-list.[ch]: New files. + * pathsrch.c: Use it for the dir_list routines. + * Many changes and new files throughout for new implementation + including TeX-font-lookup routines. + +Tue Jun 8 14:00:54 1993 Karl Berry (karl@cs.umb.edu) + + * Most files: Change `const string' (constant pointer) to `const + char *' (pointer to constant data). What a crock. + +Mon Jun 7 09:43:21 1993 Karl Berry (karl@cs.umb.edu) + + * debug.[ch]: New files. + * config.h: Include debug.h. + + * dir-p.c: Rename to dir.c. + (dir_links): New routine. + + * c-std.h (assert.h) [!ASSERT_H_MISSING]: Include this. + * configure.in: Check for it with new macro AC_MISSING_HEADERS. + +Thu Jun 3 10:12:12 1993 Karl Berry (karl@cs.umb.edu) + + * dirio.h (leaf_dir_p): No longer defined; rename to dir.h. + * xopendir.c, dir-p.c, pathsrch.c: Change include. + +Mon May 31 07:49:16 1993 Karl Berry (karl@cs.umb.edu) + + * c-std.h (EXIT_{SUCCESS,FAILURE}): Define these if they're undefined. + + * config.h: Use <kpathsea/...> instead "...". + + * kpathlib.h: Had #ifndef protection messed up. Rename to lib.h. + + * c-memstr.h (index, rindex) [!index, !rindex]: Make definitions + conditional. + +Tue May 25 10:07:00 1993 Karl Berry (karl@cs.umb.edu) + + * c-{namemx,pathmx,pathch,...}.h: Doc fixes. + + * c-systypes.h: New file. + * c-std.h: Include it. + + * stat.h: New file. + * xstat.h: Include it. + + * configure.in (AC_HAVE_HEADERS): Test for `pwd.h'. + +Sun May 23 19:06:22 1993 Karl Berry (karl@cs.umb.edu) + + * pathsrch.[ch]: Doc fixes. + +Fri May 21 11:27:54 1993 Karl Berry (karl@cs.umb.edu) + + * line.c (free): Declare. + + * pathsrch.c, find-suffix.c: Change caller. + * c-pathch.h ({IS_,}{DIR,ENV}_SEP): Rename existing confusing + definitions to these. Suggested by rocky. + +Mon May 17 08:18:18 1993 Karl Berry (karl@cs.umb.edu) + + * Version 0.3. + + * pathsrch.c (expand_default): Handle doubled colon and + nothing-but-colon cases. + + * Write documentation, change Makefile accordingly. + +Thu May 13 16:32:34 1993 Karl Berry (karl@cs.umb.edu) + + * c-std.h (popen) [VMS]: Make decl conditional, and include + <unixlib.h> and <unixio.h>. + +Mon May 10 07:12:50 1993 Karl Berry (karl@cs.umb.edu) + + * Version 0.2. + + * version.c: Put in placeholder. + +Sun May 9 10:42:34 1993 Karl Berry (karl@cs.umb.edu) + + * config.h (c-auto.h): Use <...> instead of "...". + +Tue May 4 14:54:41 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (info check dvi): New targets (that do nothing). + +Mon May 3 13:46:17 1993 Karl Berry (karl@claude.cs.umb.edu) + + * Version 0.1. + + * Use KPATHSEARCH_ prefix for various headers' cpp protections. + +Sun May 2 10:28:25 1993 Karl Berry (karl@cs.umb.edu) + + * Makefile.in (dist): Depend on TAGS, and put it in the dist. + + * Makefile.in (c-auto.h.in): Remove extra $(srcdir). + +Sun Apr 25 11:22:12 1993 Karl Berry (karl@cs.umb.edu) + + * pathsrch.h: Include c-proto.h. + + * make-suffix.c: New file. + * Makefile.in (objects): Add the .o. + + * file-p.c: Use the SAME_FILE_P macro. + + * fontmap.h: Include c-proto.h and types.h. + + * lib.h: Rename to kpathlib.h. + * config.h: Include changed. + + * c-proto.h, c-std.h: Doc fix. + + * c-limits.h [LIMITS_H_MISSING]: Conditionalize include of c-std.h. + + * xstat.h: Include c-std.h. + + * Makefile.in (c-auto.h.in): Add unused warning to top. + + * dirio.h: Include c-proto.h and types.h. + +Fri Apr 23 16:11:13 1993 Karl Berry (karl@cs.umb.edu) + + * line.c: Don't include config.h, just declare xmalloc and + xrealloc explicitly. + + * pathsrch.c: paths.h need not be included. + + * Created.
new file mode 100644 --- /dev/null +++ b/libcruft/ChangeLog @@ -0,0 +1,103 @@ +Wed May 22 15:07:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (stamp-shared): Use CC, not CXX to create shared + library. Also use SHARED_FLIBS here instead of FLIBS. + +Sat Apr 6 21:28:47 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makerules.in (clean, mostlyclean): Also remove pic/*.o. + (maintainer-clean, distclean): Also remove stamp-picdir and pic + directory. + +Wed Apr 3 01:01:31 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc/Makefile.in: Set SPECIAL_PICDEPEND after including Makeconf + and before including Makerules. + +Fri Mar 29 13:45:06 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (distclean): Delete so_locations, which is created + on DEC Alpha systems. + (distclean, maintainer-clean): Don't depend on clean. + +Wed Mar 27 05:59:02 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makerules.in: Add rules for making PIC code here. + * Makefile.in (libcruft.a): Depend on $(CRUFT_PICOBJ) + * misc/Makefile.in: Add rules for making PIC code from C and C++ + files. + +Fri Feb 9 21:04:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc/f77-extern.cc, misc/lo-error.cc: New files. + * misc/Makefile.in (SPECIAL, SPECIAL_DEPEND): Add them to the lists. + * Makefile.in (CRUFT_OBJ): Add it f77-extern.o and lo-error.o here + too. + +Sat Feb 3 07:57:39 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc/dostop.c (dostop): Call error handler if we have a message. + Call longjmp on f77_context, not jump_to_top_level(). + * misc/xstopx.f (xstopx): Pass non-blank strings on to dostop. + +Mon Jan 8 22:55:26 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (clean): If $(SHARED_LIBS), remove shared libs. + (mostlyclean): Ditto. + +Fri Dec 29 21:43:24 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in, Makerules.in: Handle creating position independent + code and shared libraries for Octave. + +Tue Dec 26 00:15:31 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makerules.in (stamp-picdir): New target. + (all): Depend on it. + + * Makefile.in: Delete references to configure stuff. + * configure.in, mkinstalldirs: Delete. + +Sun Dec 24 02:42:29 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * linpack/spofa.f: New file. + * blas/level-1/sdot.f: New file. + * blas/level-2/dsyr.f: New file. + +Thu Dec 14 02:34:19 1995 Rick Niles <niles@axp745.gsfc.nasa.gov> + + * fftpack/cfftb1.f, fftpack/cfftf1.f, fftpack/cffti1.f, + odepack/prepj.f, odepack/solsy.f, odepack/stode.f: + Avoid warnings for nonstandard dimension statements of the form + `real foo(1)' by using `real foo(*)' instead. + +Mon Nov 6 07:24:03 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * misc/dostop.c: Only call jump_to_top_level() if OCTAVE_SOURCE. + +Fri Nov 3 11:08:31 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * misc/dostop.c: Just call jump_to_top_level() directly here. + +Wed Sep 20 00:01:03 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * mkinstalldirs: New file. + * Makefile.in (DISTFILES): Add it to the list. + + * Makerules.in: Fix cleaning rules. Use double colon so we can + add things in the makefiles in the subdirectories. + + * Makefile.in (DISTFILES): Distribute configure.in and configure. + (distclean): Also remove Makerules, config.log, and config.status. + (maintainer-clean): Depend on distclean. + +Mon Apr 10 09:55:13 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: New file. + +Fri Mar 10 10:38:29 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (install uninstall clean mostlyclean distclean + realclean): Use SUBDIR_FOR_COMMAND. Combine actions. + +See ChangeLog.1 in the top level directory for earlier changes.
new file mode 100644 --- /dev/null +++ b/libcruft/fftpack/fftpack.doc @@ -0,0 +1,866 @@ + + FFTPACK + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + version 4 april 1985 + + a package of fortran subprograms for the fast fourier + transform of periodic and other symmetric sequences + + by + + paul n swarztrauber + + national center for atmospheric research boulder,colorado 80307 + + which is sponsored by the national science foundation + +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + + +this package consists of programs which perform fast fourier +transforms for both complex and real periodic sequences and +certain other symmetric sequences that are listed below. + +1. rffti initialize rfftf and rfftb +2. rfftf forward transform of a real periodic sequence +3. rfftb backward transform of a real coefficient array + +4. ezffti initialize ezfftf and ezfftb +5. ezfftf a simplified real periodic forward transform +6. ezfftb a simplified real periodic backward transform + +7. sinti initialize sint +8. sint sine transform of a real odd sequence + +9. costi initialize cost +10. cost cosine transform of a real even sequence + +11. sinqi initialize sinqf and sinqb +12. sinqf forward sine transform with odd wave numbers +13. sinqb unnormalized inverse of sinqf + +14. cosqi initialize cosqf and cosqb +15. cosqf forward cosine transform with odd wave numbers +16. cosqb unnormalized inverse of cosqf + +17. cffti initialize cfftf and cfftb +18. cfftf forward transform of a complex periodic sequence +19. cfftb unnormalized inverse of cfftf + + +****************************************************************** + +subroutine rffti(n,wsave) + + **************************************************************** + +subroutine rffti initializes the array wsave which is used in +both rfftf and rfftb. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed. + +output parameter + +wsave a work array which must be dimensioned at least 2*n+15. + the same work array can be used for both rfftf and rfftb + as long as n remains unchanged. different wsave arrays + are required for different values of n. the contents of + wsave must not be changed between calls of rfftf or rfftb. + +****************************************************************** + +subroutine rfftf(n,r,wsave) + +****************************************************************** + +subroutine rfftf computes the fourier coefficients of a real +perodic sequence (fourier analysis). the transform is defined +below at output parameter r. + +input parameters + +n the length of the array r to be transformed. the method + is most efficient when n is a product of small primes. + n may change so long as different work arrays are provided + +r a real array of length n which contains the sequence + to be transformed + +wsave a work array which must be dimensioned at least 2*n+15. + in the program that calls rfftf. the wsave array must be + initialized by calling subroutine rffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by rfftf and rfftb. + + +output parameters + +r r(1) = the sum from i=1 to i=n of r(i) + + if n is even set l =n/2 , if n is odd set l = (n+1)/2 + + then for k = 2,...,l + + r(2*k-2) = the sum from i = 1 to i = n of + + r(i)*cos((k-1)*(i-1)*2*pi/n) + + r(2*k-1) = the sum from i = 1 to i = n of + + -r(i)*sin((k-1)*(i-1)*2*pi/n) + + if n is even + + r(n) = the sum from i = 1 to i = n of + + (-1)**(i-1)*r(i) + + ***** note + this transform is unnormalized since a call of rfftf + followed by a call of rfftb will multiply the input + sequence by n. + +wsave contains results which must not be destroyed between + calls of rfftf or rfftb. + + +****************************************************************** + +subroutine rfftb(n,r,wsave) + +****************************************************************** + +subroutine rfftb computes the real perodic sequence from its +fourier coefficients (fourier synthesis). the transform is defined +below at output parameter r. + +input parameters + +n the length of the array r to be transformed. the method + is most efficient when n is a product of small primes. + n may change so long as different work arrays are provided + +r a real array of length n which contains the sequence + to be transformed + +wsave a work array which must be dimensioned at least 2*n+15. + in the program that calls rfftb. the wsave array must be + initialized by calling subroutine rffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by rfftf and rfftb. + + +output parameters + +r for n even and for i = 1,...,n + + r(i) = r(1)+(-1)**(i-1)*r(n) + + plus the sum from k=2 to k=n/2 of + + 2.*r(2*k-2)*cos((k-1)*(i-1)*2*pi/n) + + -2.*r(2*k-1)*sin((k-1)*(i-1)*2*pi/n) + + for n odd and for i = 1,...,n + + r(i) = r(1) plus the sum from k=2 to k=(n+1)/2 of + + 2.*r(2*k-2)*cos((k-1)*(i-1)*2*pi/n) + + -2.*r(2*k-1)*sin((k-1)*(i-1)*2*pi/n) + + ***** note + this transform is unnormalized since a call of rfftf + followed by a call of rfftb will multiply the input + sequence by n. + +wsave contains results which must not be destroyed between + calls of rfftb or rfftf. + + +****************************************************************** + +subroutine ezffti(n,wsave) + +****************************************************************** + +subroutine ezffti initializes the array wsave which is used in +both ezfftf and ezfftb. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed. + +output parameter + +wsave a work array which must be dimensioned at least 3*n+15. + the same work array can be used for both ezfftf and ezfftb + as long as n remains unchanged. different wsave arrays + are required for different values of n. + + +****************************************************************** + +subroutine ezfftf(n,r,azero,a,b,wsave) + +****************************************************************** + +subroutine ezfftf computes the fourier coefficients of a real +perodic sequence (fourier analysis). the transform is defined +below at output parameters azero,a and b. ezfftf is a simplified +but slower version of rfftf. + +input parameters + +n the length of the array r to be transformed. the method + is must efficient when n is the product of small primes. + +r a real array of length n which contains the sequence + to be transformed. r is not destroyed. + + +wsave a work array which must be dimensioned at least 3*n+15. + in the program that calls ezfftf. the wsave array must be + initialized by calling subroutine ezffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by ezfftf and ezfftb. + +output parameters + +azero the sum from i=1 to i=n of r(i)/n + +a,b for n even b(n/2)=0. and a(n/2) is the sum from i=1 to + i=n of (-1)**(i-1)*r(i)/n + + for n even define kmax=n/2-1 + for n odd define kmax=(n-1)/2 + + then for k=1,...,kmax + + a(k) equals the sum from i=1 to i=n of + + 2./n*r(i)*cos(k*(i-1)*2*pi/n) + + b(k) equals the sum from i=1 to i=n of + + 2./n*r(i)*sin(k*(i-1)*2*pi/n) + + +****************************************************************** + +subroutine ezfftb(n,r,azero,a,b,wsave) + +****************************************************************** + +subroutine ezfftb computes a real perodic sequence from its +fourier coefficients (fourier synthesis). the transform is +defined below at output parameter r. ezfftb is a simplified +but slower version of rfftb. + +input parameters + +n the length of the output array r. the method is most + efficient when n is the product of small primes. + +azero the constant fourier coefficient + +a,b arrays which contain the remaining fourier coefficients + these arrays are not destroyed. + + the length of these arrays depends on whether n is even or + odd. + + if n is even n/2 locations are required + if n is odd (n-1)/2 locations are required + +wsave a work array which must be dimensioned at least 3*n+15. + in the program that calls ezfftb. the wsave array must be + initialized by calling subroutine ezffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by ezfftf and ezfftb. + + +output parameters + +r if n is even define kmax=n/2 + if n is odd define kmax=(n-1)/2 + + then for i=1,...,n + + r(i)=azero plus the sum from k=1 to k=kmax of + + a(k)*cos(k*(i-1)*2*pi/n)+b(k)*sin(k*(i-1)*2*pi/n) + +********************* complex notation ************************** + + for j=1,...,n + + r(j) equals the sum from k=-kmax to k=kmax of + + c(k)*exp(i*k*(j-1)*2*pi/n) + + where + + c(k) = .5*cmplx(a(k),-b(k)) for k=1,...,kmax + + c(-k) = conjg(c(k)) + + c(0) = azero + + and i=sqrt(-1) + +*************** amplitude - phase notation *********************** + + for i=1,...,n + + r(i) equals azero plus the sum from k=1 to k=kmax of + + alpha(k)*cos(k*(i-1)*2*pi/n+beta(k)) + + where + + alpha(k) = sqrt(a(k)*a(k)+b(k)*b(k)) + + cos(beta(k))=a(k)/alpha(k) + + sin(beta(k))=-b(k)/alpha(k) + +****************************************************************** + +subroutine sinti(n,wsave) + +****************************************************************** + +subroutine sinti initializes the array wsave which is used in +subroutine sint. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed. the method + is most efficient when n+1 is a product of small primes. + +output parameter + +wsave a work array with at least int(2.5*n+15) locations. + different wsave arrays are required for different values + of n. the contents of wsave must not be changed between + calls of sint. + +****************************************************************** + +subroutine sint(n,x,wsave) + +****************************************************************** + +subroutine sint computes the discrete fourier sine transform +of an odd sequence x(i). the transform is defined below at +output parameter x. + +sint is the unnormalized inverse of itself since a call of sint +followed by another call of sint will multiply the input sequence +x by 2*(n+1). + +the array wsave which is used by subroutine sint must be +initialized by calling subroutine sinti(n,wsave). + +input parameters + +n the length of the sequence to be transformed. the method + is most efficient when n+1 is the product of small primes. + +x an array which contains the sequence to be transformed + + +wsave a work array with dimension at least int(2.5*n+15) + in the program that calls sint. the wsave array must be + initialized by calling subroutine sinti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i)= the sum from k=1 to k=n + + 2*x(k)*sin(k*i*pi/(n+1)) + + a call of sint followed by another call of + sint will multiply the sequence x by 2*(n+1). + hence sint is the unnormalized inverse + of itself. + +wsave contains initialization calculations which must not be + destroyed between calls of sint. + +****************************************************************** + +subroutine costi(n,wsave) + +****************************************************************** + +subroutine costi initializes the array wsave which is used in +subroutine cost. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed. the method + is most efficient when n-1 is a product of small primes. + +output parameter + +wsave a work array which must be dimensioned at least 3*n+15. + different wsave arrays are required for different values + of n. the contents of wsave must not be changed between + calls of cost. + +****************************************************************** + +subroutine cost(n,x,wsave) + +****************************************************************** + +subroutine cost computes the discrete fourier cosine transform +of an even sequence x(i). the transform is defined below at output +parameter x. + +cost is the unnormalized inverse of itself since a call of cost +followed by another call of cost will multiply the input sequence +x by 2*(n-1). the transform is defined below at output parameter x + +the array wsave which is used by subroutine cost must be +initialized by calling subroutine costi(n,wsave). + +input parameters + +n the length of the sequence x. n must be greater than 1. + the method is most efficient when n-1 is a product of + small primes. + +x an array which contains the sequence to be transformed + +wsave a work array which must be dimensioned at least 3*n+15 + in the program that calls cost. the wsave array must be + initialized by calling subroutine costi(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i) = x(1)+(-1)**(i-1)*x(n) + + + the sum from k=2 to k=n-1 + + 2*x(k)*cos((k-1)*(i-1)*pi/(n-1)) + + a call of cost followed by another call of + cost will multiply the sequence x by 2*(n-1) + hence cost is the unnormalized inverse + of itself. + +wsave contains initialization calculations which must not be + destroyed between calls of cost. + +****************************************************************** + +subroutine sinqi(n,wsave) + +****************************************************************** + +subroutine sinqi initializes the array wsave which is used in +both sinqf and sinqb. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed. the method + is most efficient when n is a product of small primes. + +output parameter + +wsave a work array which must be dimensioned at least 3*n+15. + the same work array can be used for both sinqf and sinqb + as long as n remains unchanged. different wsave arrays + are required for different values of n. the contents of + wsave must not be changed between calls of sinqf or sinqb. + +****************************************************************** + +subroutine sinqf(n,x,wsave) + +****************************************************************** + +subroutine sinqf computes the fast fourier transform of quarter +wave data. that is , sinqf computes the coefficients in a sine +series representation with only odd wave numbers. the transform +is defined below at output parameter x. + +sinqb is the unnormalized inverse of sinqf since a call of sinqf +followed by a call of sinqb will multiply the input sequence x +by 4*n. + +the array wsave which is used by subroutine sinqf must be +initialized by calling subroutine sinqi(n,wsave). + + +input parameters + +n the length of the array x to be transformed. the method + is most efficient when n is a product of small primes. + +x an array which contains the sequence to be transformed + +wsave a work array which must be dimensioned at least 3*n+15. + in the program that calls sinqf. the wsave array must be + initialized by calling subroutine sinqi(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i) = (-1)**(i-1)*x(n) + + + the sum from k=1 to k=n-1 of + + 2*x(k)*sin((2*i-1)*k*pi/(2*n)) + + a call of sinqf followed by a call of + sinqb will multiply the sequence x by 4*n. + therefore sinqb is the unnormalized inverse + of sinqf. + +wsave contains initialization calculations which must not + be destroyed between calls of sinqf or sinqb. + +****************************************************************** + +subroutine sinqb(n,x,wsave) + +****************************************************************** + +subroutine sinqb computes the fast fourier transform of quarter +wave data. that is , sinqb computes a sequence from its +representation in terms of a sine series with odd wave numbers. +the transform is defined below at output parameter x. + +sinqf is the unnormalized inverse of sinqb since a call of sinqb +followed by a call of sinqf will multiply the input sequence x +by 4*n. + +the array wsave which is used by subroutine sinqb must be +initialized by calling subroutine sinqi(n,wsave). + + +input parameters + +n the length of the array x to be transformed. the method + is most efficient when n is a product of small primes. + +x an array which contains the sequence to be transformed + +wsave a work array which must be dimensioned at least 3*n+15. + in the program that calls sinqb. the wsave array must be + initialized by calling subroutine sinqi(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i)= the sum from k=1 to k=n of + + 4*x(k)*sin((2k-1)*i*pi/(2*n)) + + a call of sinqb followed by a call of + sinqf will multiply the sequence x by 4*n. + therefore sinqf is the unnormalized inverse + of sinqb. + +wsave contains initialization calculations which must not + be destroyed between calls of sinqb or sinqf. + +****************************************************************** + +subroutine cosqi(n,wsave) + +****************************************************************** + +subroutine cosqi initializes the array wsave which is used in +both cosqf and cosqb. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the array to be transformed. the method + is most efficient when n is a product of small primes. + +output parameter + +wsave a work array which must be dimensioned at least 3*n+15. + the same work array can be used for both cosqf and cosqb + as long as n remains unchanged. different wsave arrays + are required for different values of n. the contents of + wsave must not be changed between calls of cosqf or cosqb. + +****************************************************************** + +subroutine cosqf(n,x,wsave) + +****************************************************************** + +subroutine cosqf computes the fast fourier transform of quarter +wave data. that is , cosqf computes the coefficients in a cosine +series representation with only odd wave numbers. the transform +is defined below at output parameter x + +cosqf is the unnormalized inverse of cosqb since a call of cosqf +followed by a call of cosqb will multiply the input sequence x +by 4*n. + +the array wsave which is used by subroutine cosqf must be +initialized by calling subroutine cosqi(n,wsave). + + +input parameters + +n the length of the array x to be transformed. the method + is most efficient when n is a product of small primes. + +x an array which contains the sequence to be transformed + +wsave a work array which must be dimensioned at least 3*n+15 + in the program that calls cosqf. the wsave array must be + initialized by calling subroutine cosqi(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i) = x(1) plus the sum from k=2 to k=n of + + 2*x(k)*cos((2*i-1)*(k-1)*pi/(2*n)) + + a call of cosqf followed by a call of + cosqb will multiply the sequence x by 4*n. + therefore cosqb is the unnormalized inverse + of cosqf. + +wsave contains initialization calculations which must not + be destroyed between calls of cosqf or cosqb. + +****************************************************************** + +subroutine cosqb(n,x,wsave) + +****************************************************************** + +subroutine cosqb computes the fast fourier transform of quarter +wave data. that is , cosqb computes a sequence from its +representation in terms of a cosine series with odd wave numbers. +the transform is defined below at output parameter x. + +cosqb is the unnormalized inverse of cosqf since a call of cosqb +followed by a call of cosqf will multiply the input sequence x +by 4*n. + +the array wsave which is used by subroutine cosqb must be +initialized by calling subroutine cosqi(n,wsave). + + +input parameters + +n the length of the array x to be transformed. the method + is most efficient when n is a product of small primes. + +x an array which contains the sequence to be transformed + +wsave a work array that must be dimensioned at least 3*n+15 + in the program that calls cosqb. the wsave array must be + initialized by calling subroutine cosqi(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + +output parameters + +x for i=1,...,n + + x(i)= the sum from k=1 to k=n of + + 4*x(k)*cos((2*k-1)*(i-1)*pi/(2*n)) + + a call of cosqb followed by a call of + cosqf will multiply the sequence x by 4*n. + therefore cosqf is the unnormalized inverse + of cosqb. + +wsave contains initialization calculations which must not + be destroyed between calls of cosqb or cosqf. + +****************************************************************** + +subroutine cffti(n,wsave) + +****************************************************************** + +subroutine cffti initializes the array wsave which is used in +both cfftf and cfftb. the prime factorization of n together with +a tabulation of the trigonometric functions are computed and +stored in wsave. + +input parameter + +n the length of the sequence to be transformed + +output parameter + +wsave a work array which must be dimensioned at least 4*n+15 + the same work array can be used for both cfftf and cfftb + as long as n remains unchanged. different wsave arrays + are required for different values of n. the contents of + wsave must not be changed between calls of cfftf or cfftb. + +****************************************************************** + +subroutine cfftf(n,c,wsave) + +****************************************************************** + +subroutine cfftf computes the forward complex discrete fourier +transform (the fourier analysis). equivalently , cfftf computes +the fourier coefficients of a complex periodic sequence. +the transform is defined below at output parameter c. + +the transform is not normalized. to obtain a normalized transform +the output must be divided by n. otherwise a call of cfftf +followed by a call of cfftb will multiply the sequence by n. + +the array wsave which is used by subroutine cfftf must be +initialized by calling subroutine cffti(n,wsave). + +input parameters + + +n the length of the complex sequence c. the method is + more efficient when n is the product of small primes. n + +c a complex array of length n which contains the sequence + +wsave a real work array which must be dimensioned at least 4n+15 + in the program that calls cfftf. the wsave array must be + initialized by calling subroutine cffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by cfftf and cfftb. + +output parameters + +c for j=1,...,n + + c(j)=the sum from k=1,...,n of + + c(k)*exp(-i*(j-1)*(k-1)*2*pi/n) + + where i=sqrt(-1) + +wsave contains initialization calculations which must not be + destroyed between calls of subroutine cfftf or cfftb + +****************************************************************** + +subroutine cfftb(n,c,wsave) + +****************************************************************** + +subroutine cfftb computes the backward complex discrete fourier +transform (the fourier synthesis). equivalently , cfftb computes +a complex periodic sequence from its fourier coefficients. +the transform is defined below at output parameter c. + +a call of cfftf followed by a call of cfftb will multiply the +sequence by n. + +the array wsave which is used by subroutine cfftb must be +initialized by calling subroutine cffti(n,wsave). + +input parameters + + +n the length of the complex sequence c. the method is + more efficient when n is the product of small primes. + +c a complex array of length n which contains the sequence + +wsave a real work array which must be dimensioned at least 4n+15 + in the program that calls cfftb. the wsave array must be + initialized by calling subroutine cffti(n,wsave) and a + different wsave array must be used for each different + value of n. this initialization does not have to be + repeated so long as n remains unchanged thus subsequent + transforms can be obtained faster than the first. + the same wsave array can be used by cfftf and cfftb. + +output parameters + +c for j=1,...,n + + c(j)=the sum from k=1,...,n of + + c(k)*exp(i*(j-1)*(k-1)*2*pi/n) + + where i=sqrt(-1) + +wsave contains initialization calculations which must not be + destroyed between calls of subroutine cfftf or cfftb + + + +["send index for vfftpk" describes a vectorized version of fftpack] +
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/COPYRIGHT @@ -0,0 +1,41 @@ +Date: Sat, 30 May 92 11:37:56 EDT +To: fsqp_sites@src.umd.edu +From: Andre Tits <andre@src.umd.edu> +Subject: FSQP 3.0 1/12: COPYRIGHT + + Conditions for External Use + + + 1. The FSQP routines may not be distributed to third parties. + Interested parties should contact the authors directly. + 2. If modifications are performed on the routines, these + modifications shall be communicated to the authors. The + modified routines will remain the sole property of the + authors. + 3. Due acknowledgment must be made of the use of the FSQP + routines in research reports or publications. A copy of + such reports or publications should be forwarded to the + authors. + 4. The FSQP routines may not be used for commercial + applications, unless this has been agreed upon with the + authors in writing. + +Copyright (c) 1989 --- 1992 by Jian L. Zhou and Andre L. Tits. +All rights Reserved. + + + Enquiries should be directed to + + Prof. Andre L. Tits + Electrical Engineering Dept. + and Systems Research Center + University of Maryland + College Park, Md 20742 + U. S. A. + + Phone: 301-405-3669 + Fax: 301-405-6707 + E-mail: andre@src.umd.edu + + +
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/README @@ -0,0 +1,48 @@ +Date: Sat, 30 May 92 11:37:57 EDT +To: fsqp_sites@src.umd.edu +From: Andre Tits <andre@src.umd.edu> +Subject: FSQP 3.0 2/12: README + +The FSQP distribution consists of the following files: + COPYRIGHT + README (this file) + Version* + fsqpd.f + macros.tex + manual.sty + manual.tex + manua2.tex + qld.f + sampl1.f + sampl2.f + sampl3.f +We suggest that you keep all these files in a dedicated subdirectory. + +All the FSQP routines are in fsqpd.f. FSQP requires a quadratic +program solver. As distributed, it calls QLD (written by +Klaus Schittkowski, provided in file qld.f for the user's convenience). +Three sample test problems are given in sampl1.f, sampl2.f and sampl3.f. +Thus, for example, to run sample1.f one should use the following +compiling sequence on a UNIX-based system + + f77 sampl1.f fsqpd.f qld.f + +The results obtained should be compared with those given in the +User's Guide. + +The User's Guide is provided in latex format (files manual.tex, +manua2.tex, macros.tex and manual.sty). It provides detailed information +concerning FSQP and its use. Simply type + + latex manual.tex + +with files manua2.tex, manual.sty and macros.tex present +in the same directory. + +Finally, the file Versionx.x lists the enhancements in the +successive versions of FSQP. + +Please send us your comments. Any feedback is highly appreciated. + + +
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/README.MISSING @@ -0,0 +1,29 @@ +If it were freely redistributable, the source for Tits and Zhou's +nonlinear programming solver FSQP would be in this directory. + +Unfortunately, if you want octave to use FSQP to solve constrained +nonlinear optimization problems, you must get the source from the +FSQP authors. Enquiries should be directed to: + + Prof. Andre L. Tits + Electrical Engineering Dept. + and Systems Research Center + University of Maryland + College Park, MD 20742 + USA + + Phone: 301-405-3669 + Fax: 301-405-6707 + E-mail: andre@src.umd.edu + +As of November, 1992, the routines were available free of charge to +academic sites. I do not know what the distribution terms are for +others. See the file COPYRIGHT in the directory for more information. + + + + + + + +
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/Version @@ -0,0 +1,142 @@ + Enhancements in successive versions of FSQP + +Version 3.3 : April 1993 + 1. If the user so requests (via "mode"), during the line search, + FSQP will now evaluate objectives only after having determined + that all constraints are satisfied. This is of value when some + objective functions are not defined outside the feasible set. + 2. The reserved common block "fsqpst" is no longer used by FSQP. + Instead, a new reserved common block "fsqpus" is provided to + give the users a choice of several possible stopping criteria. + (As a side-effect, the user is not allowed any more to have + his/her own block data; see Section 4 of the manual for details.) + 3. Some imperfections are fixed (e.g., comparision of double + precision number to hard zero, and incorrect checking of value + of "mode"). + +Version 3.2 : March 1993 + 1. The user is given the option to print output at every Nth iteration + and at the end, where N is a multiple of 10. + +Version 3.1a : January 1993 + 1. Bugs are fixed (with the help of Yaguang Yang). These bugs + have to do with finding a feasible point. There should be + no effect if the user's problem does not contain both nonlinear + and linear equality constraints. + +Version 3.1 : November 1992 + 1. Possible division by zero is avoided. + 2. Objective and constraint values at initial feasible point + are printed out if iprint >=1. + 3. Estimates of Lagrange multipliers are made available on output + even when execution is terminated abnormally in phase 2. + 4. Incorrect descriptions of nineq, neq, iwsize and nwsize in + the user's manual and in the comments in fsqpd.f are corrected. + +Version 3.0d : October 1992 + 1. Some imperfections (identified by WATFOR) are cleaned up. + 2. Erroneous declaration of dummy argument in sampl*.f are corrected. + +Version 3.0c : September 1992 + 1. A bug in identifying the active set of objectives is fixed. + (Thanks go to Yaguang Yang.) + 2. Some imperfections (identified by WATFOR) are cleaned up. + (Thanks go to Jaroslav Dolezal and Jiri Fidler + at CZ Academy of Sciences.) + +Version 3.0b : August 1992 + 1. A bug in assigning iskip(*) is fixed. This has to do with + finding a feasible point. + 2. Other bugs associated with nonlinear equality constraints + are fixed. The effect is on nonmonotone line search. + (Thanks go to Yaguang Yang at the Institute for Systems Research, + University of Maryland at College Park.) + +Version 3.0a : June 1992 + 1. A bug in check.f is fixed and a typo is corrected. + 2. A bug in initpt.f is fixed. + 3. Printout message is adjusted for various situations. + 4. Computation of initial equality constraint violation is corrected. + (Thanks go to Jaroslav Dolezal and Jiri Fidler + at CZ Academy of Sciences) + 5. An output error for function values is corrected. + +Version 3.0 : June 1992 + 1. FSQP now also handles nonlinear equality constraints. + "Semi-feasibility" for these constraints is maintained in + the following sense: given a scalar constraint h(x)=0, + if h(x0)<=0 (resp. >=0), then h(xk)<=0 (resp. >=0) for all k. + 2. An option is added to allow users to have their own stopping + criterion. + 3. The interface for QPSOL is no longer part of the standard + distribution (but it is still available on request). + 4. Objective and constraints now must be provided in Fortran + "subroutines" rather than "functions". + 5. Concerning the default stopping criterion, the norm requirement + on the Kuhn-Tucker vector is replaced by a norm requirement on + the Newton direction. + 6. The meaning of "mode" is redefined to encompass several attributes. + 7. The argument list to call FSQPD is modified. + 8. The Hessian matrix is reset to the identity whenever + the line search fails to complete after a specified number + of step reductions, provided the last reset occurred at least + 5*nparam iterations earlier (it used to be 1*nparam). + +Version 2.4b : November 1991 + 1. Bugs are fixed that affected the computation of a feasible point + and the initialization of iskp. (Thanks go to Klaus Schittkowski + at U Bayreuth and John Hauser at USC.) + +Version 2.4a : November 1991 + Mostly fixes on problems uncovered by Roque Donizete de Oliveira (Michigan. +) + 1. A bug is fixed that affected the multipliers given on output. + 2. A few unused statements are commented out. + 3. small() is modified to avoid too small a number on machines + that use extra-length registers for internal computations + (with Roque's help). + +Version 2.4 : October 1991 + 1. The Hessian matrix is reset to the identity whenever + the line search fails to complete after a specified number + of step reductions, provided the last reset occurred at least + nparam iterations earlier. + +Version 2.3B : September 1991 + 1. A bug is fixed in reordering active functions. + +Version 2.3A : September 1991 + 1. A bug is fixed in reordering active functions. + +Version 2.3 : July 1991 + 1. KKT multipliers at the solution point are provided on output. + 2. Bugs are fixed and code is adapted to be accepted by + some "tough" compilers (with the help of K. Schittkowski). + +Version 2.2 : June 1991 + 1. In computing d~, only the most "active" constraints and + objectives are taken into account, thus reducing the + number of function evaluations. + 2. Refinements of nonmonotone line search are implemented + for minimax problems without nonlinear constraints. + 3. Line search is more efficient. + 4. A bug is fixed in the computation of d~ in mode=1. + 5. The calling sequences of both gradcn and gradob are + simplified. + +Version 2.1 : April 1991 + 1. FSQP can use either of two quadratic programming codes: + QPSOL or QLD. + 2. Reorder constraints and objectives to enable more efficient + line search. + + +Version 2.0B : March 1991: Bugs are fixed +Version 2.0A : October 1990: Bugs are fixed +Version 2.0 : August 1990 + 1. Extension to the solution of constrained minimax problems. + + +Version 1.0B : June 1990: Bugs are fixed +Version 1.0A : December 1989: Bugs are fixed +Version 1.0 : August 1989
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/macros.tex @@ -0,0 +1,424 @@ +\def\Resetstrings{ + \def\present{ }\let\bgroup={\let\egroup=}%primitive TeX + \def\Astr{}\def\astr{}\def\Atest{}\def\atest{}% + \def\Bstr{}\def\bstr{}\def\Btest{}\def\btest{}% + \def\Cstr{}\def\cstr{}\def\Ctest{}\def\ctest{}% + \def\Dstr{}\def\dstr{}\def\Dtest{}\def\dtest{}% + \def\Estr{}\def\estr{}\def\Etest{}\def\etest{}% + \def\Fstr{}\def\fstr{}\def\Ftest{}\def\ftest{}% + \def\Gstr{}\def\gstr{}\def\Gtest{}\def\gtest{}% + \def\Hstr{}\def\hstr{}\def\Htest{}\def\htest{}% + \def\Istr{}\def\istr{}\def\Itest{}\def\itest{}% + \def\Jstr{}\def\jstr{}\def\Jtest{}\def\jtest{}% + \def\Kstr{}\def\kstr{}\def\Ktest{}\def\ktest{}% + \def\Lstr{}\def\lstr{}\def\Ltest{}\def\ltest{}% + \def\Mstr{}\def\mstr{}\def\Mtest{}\def\mtest{}% + \def\Nstr{}\def\nstr{}\def\Ntest{}\def\ntest{}% + \def\Ostr{}\def\ostr{}\def\Otest{}\def\otest{}% + \def\Pstr{}\def\pstr{}\def\Ptest{}\def\ptest{}% + \def\Qstr{}\def\qstr{}\def\Qtest{}\def\qtest{}% + \def\Rstr{}\def\rstr{}\def\Rtest{}\def\rtest{}% + \def\Sstr{}\def\sstr{}\def\Stest{}\def\stest{}% + \def\Tstr{}\def\tstr{}\def\Ttest{}\def\ttest{}% + \def\Ustr{}\def\ustr{}\def\Utest{}\def\utest{}% + \def\Vstr{}\def\vstr{}\def\Vtest{}\def\vtest{}% + \def\Wstr{}\def\wstr{}\def\Wtest{}\def\wtest{}% + \def\Xstr{}\def\xstr{}\def\Xtest{}\def\xtest{}% + \def\Ystr{}\def\ystr{}\def\Ytest{}\def\ytest{}% +} +\Resetstrings\def\Ztest{}\def\ztest{} + +\def\Refformat{%Determines the kind of reference by the presence or + \if\Jtest\present + {\if\Vtest\present\journalarticleformat + \else\conferencereportformat\fi} + \else\if\Btest\present\bookarticleformat + \else\if\Rtest\present\technicalreportformat + \else\if\Itest\present\bookformat + \else\otherformat\fi\fi\fi\fi} + +\def\Rpunct{%Default punctuation control strings if the punctuation + \def\Lspace{ }% + \def\Lperiod{ }% . + \def\Lcomma{ }% , + \def\Lquest{ }% ? + \def\Lcolon{ }% : + \def\Lscolon{ }% ; + \def\Lbang{ }% ! + \def\Lquote{ }% ' + \def\Lqquote{ }% " + \def\Lrquote{ }% ` + \def\Rspace{}% + \def\Rperiod{.}% . + \def\Rcomma{,}% , + \def\Rquest{?}% ? + \def\Rcolon{:}% : + \def\Rscolon{;}% ; + \def\Rbang{!}% ! + \def\Rquote{'}% ' + \def\Rqquote{"}% " + \def\Rrquote{`}% ` + } + +\def\Lpunct{%Default punctuation control strings if the punctuation + \def\Lspace{}% + \def\Lperiod{\unskip.}% . + \def\Lcomma{\unskip,}% , + \def\Lquest{\unskip?}% ? + \def\Lcolon{\unskip:}% : + \def\Lscolon{\unskip;}% ; + \def\Lbang{\unskip!}% ! + \def\Lquote{\unskip'}% ' + \def\Lqquote{\unskip"}% " + \def\Lrquote{\unskip`}% ` + \def\Rspace{\spacefactor=1000}% + \def\Rperiod{\spacefactor=3000}% . + \def\Rcomma{\spacefactor=1250}% , + \def\Rquest{\spacefactor=3000}% ? + \def\Rcolon{\spacefactor=2000}% : + \def\Rscolon{\spacefactor=1250}% ; + \def\Rbang{\spacefactor=3000}% ! + \def\Rquote{\spacefactor=1000}% ' + \def\Rqquote{\spacefactor=1000}% " + \def\Rrquote{\spacefactor=1000}% ` + } + +\def\Refstd{ + \def\Acomma{\unskip, }%between multiple author names + \def\Aand{\unskip\ and }%between two author names + \def\Aandd{\unskip\ and }%between last two of multiple author names + \def\Ecomma{\unskip, }%between multiple editor names + \def\Eand{\unskip\ and }%between two editor names + \def\Eandd{\unskip\ and }%between last two of multiple author names + \def\acomma{\unskip, }%same for authors of reviewed material + \def\aand{\unskip\ and }%same for authors of reviewed material + \def\aandd{\unskip\ and }%same for authors of reviewed material + \def\ecomma{\unskip, }%same for translators + \def\eand{\unskip\ and }%same for translators + \def\eandd{\unskip\ and }%same for translators + \def\Namecomma{\unskip, }%same for citations using authors' names + \def\Nameand{\unskip\ and }%same for citations using authors' names + \def\Nameandd{\unskip\ and }%same for citations using authors' names + \def\Revcomma{\unskip, }%between last and first name of reversed name + \def\Initper{.\ }%punctuation after initial + \def\Initgap{\dimen0=\spaceskip\divide\dimen0 by 2\hskip-\dimen0}% + %gap between initials of abbreviated first name + } + +\def\Smallcapsaand{%Smallcaps redefinition of \Aand and \Aandd + for \Refstd + \def\Aand{\unskip\bgroup{\Smallcapsfont\ AND }\egroup}% + \def\Aandd{\unskip\bgroup{\Smallcapsfont\ AND }\egroup}% + \def\eand{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + \def\eandd{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + } + +\def\Smallcapseand{%Smallcaps redefinition of \Eand, + \Eeand, etc for Refstd + \def\Eand{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + \def\Eandd{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + \def\aand{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + \def\aandd{\unskip\bgroup\Smallcapsfont\ AND \egroup}% + } + +\def\Refstda{ + \chardef\Ampersand=`\&%primitive TeX + \def\Acomma{\unskip, }%between multiple author names + \def\Aand{\unskip\ \Ampersand\ }%between two author names + \def\Aandd{\unskip\ \Ampersand\ } + \def\Ecomma{\unskip, }%between multiple editor names + \def\Eand{\unskip\ \Ampersand\ }%between two editor names + \def\Eandd{\unskip\ \Ampersand\ } + \def\acomma{\unskip, }%same for authors of reviewed material + \def\aand{\unskip\ \Ampersand\ } + \def\aandd{\unskip\ \Ampersand\ } + \def\ecomma{\unskip, }%same for translators + \def\eand{\unskip\ \Ampersand\ }%same for translators + \def\eandd{\unskip\ \Ampersand\ }%same for translators + \def\Namecomma{\unskip, }%same for citations using authors' names + \def\Nameand{\unskip\ \Ampersand\ } + \def\Nameandd{\unskip\ \Ampersand\ } + \def\Revcomma{\unskip, } + \def\Initper{.\ }%punctuation after initial + \def\Initgap{\dimen0=\spaceskip\divide\dimen0 by 2\hskip-\dimen0}% + %gap between initials of abbreviated first name + } + + \def\Citefont{}%citations + \def\ACitefont{}%alternate citations + \def\Authfont{}%authors + \def\Titlefont{}%titles + \def\Tomefont{\sl}%journals or books + \def\Volfont{}%volume number of journal + \def\Flagfont{}%citation flag + \def\Reffont{\rm}%set at beginning of reference listing + \def\Smallcapsfont{\sevenrm}%small caps + \def\Flagstyle#1{\hangindent\parindent\indent\hbox to0pt%flag style + {\hss[{\Flagfont#1}]\kern.5em}\ignorespaces} + +\def\Underlinemark{\vrule height .7pt depth 0pt width 3pc}%for replacing + +\def\Citebrackets{\Rpunct%defaults for putting citations in brackets []. + \def\Lcitemark{\def\Cfont{\Citefont}[\bgroup\Cfont} + \def\Rcitemark{\egroup]}%mark at right of citation + \def\LAcitemark{\def\Cfont{\ACitefont}\bgroup\ACitefont}% + %mark at left of alternate citation + \def\RAcitemark{\egroup}%mark at right of alternate citation + \def\LIcitemark{\egroup}%mark at left of insertion in citation + \def\RIcitemark{\bgroup\Cfont}%mark at right of insertion in citation + \def\Citehyphen{\egroup--\bgroup\Cfont} + \def\Citecomma{\egroup,\hskip0pt\bgroup\Cfont}% + %separater for multiple citations + \def\Citebreak{} + } + +\def\Citeparen{\Rpunct%defaults for putting citations in parenthesis (). + \def\Lcitemark{\def\Cfont{\Citefont}(\bgroup\Cfont} + \def\Rcitemark{\egroup)}%mark at right of citation + \def\LAcitemark{\def\Cfont{\ACitefont}\bgroup\ACitefont}% + %mark at left of alternate citation + \def\RAcitemark{\egroup}%mark at right of alternate citation + \def\LIcitemark{\egroup}%mark at left of insertion in citation + \def\RIcitemark{\bgroup\Cfont}%mark at right of insertion in citation + \def\Citehyphen{\egroup--\bgroup\Cfont} + \def\Citecomma{\egroup,\hskip0pt\bgroup\Cfont}% + %separater for multiple citations + \def\Citebreak{} + } + +\def\Citesuper{\Lpunct%defaults for making superscript citations +\def\Lcitemark{\def\Cfont{\Citefont}\raise1ex\hbox\bgroup\bgroup\Cfont}% + %mark at left of citation + \def\Rcitemark{\egroup\egroup}%mark at right of citation + \def\LAcitemark{\def\Cfont{\ACitefont}\bgroup\ACitefont}% + %mark at left of alternate citation + \def\RAcitemark{\egroup}%mark at right of alternate citation + \def\LIcitemark{\egroup\egroup}%mark at left of insertion in citation + \def\RIcitemark{\raise1ex\hbox\bgroup\bgroup\Cfont}% + %mark at right of insertion in citation + \def\Citehyphen{\egroup--\bgroup\Cfont} + \def\Citecomma{\egroup,\hskip0pt\bgroup% + \Cfont}%separater for multiple citations + \def\Citebreak{} + } + +\def\Citenamedate{\Rpunct%defaults for making name-date citations + \def\Lcitemark{ + \def\Citebreak{\egroup\ [\bgroup\Citefont}%separater in citation + \def\Citecomma{\egroup]; %between multiple citations + \bgroup\let\uchyph=1\Citefont}(\bgroup\let\uchyph=1\Citefont}% + \def\Rcitemark{\egroup])}%mark at right of citation + \def\LAcitemark{%mark at left of alternate citation + \def\Citebreak{\egroup\ [\bgroup\Citefont}\def\Citecomma{\egroup], % + \bgroup\ACitefont }\bgroup\let\uchyph=1\ACitefont}% + \def\RAcitemark{\egroup]}%mark at right of alternate citation + \def\Citehyphen{\egroup--\bgroup\Citefont} + \def\LIcitemark{\egroup}%mark at left of insertion in citation + \def\RIcitemark{\bgroup\Citefont} + } + + +\def\Flagstyle#1{\hangindent\parindent +\indent\hbox to0pt{\hss[{\Flagfont#1}]\kern.5em}}%flag style + +\def\journalarticleformat{\Reffont\let\uchyph=1 +\parindent=1.25pc\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000\sfcode`\:=1000 + \sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% +\if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }\fi% + \if\Ttest\present\Comma + \bgroup``\Titlefont\Tstr\egroup\def\Comma{," }\fi% + \if\etest\present\if\Ttest\present{"}\fi\hskip.16667em( + \bgroup\estr\egroup)\def\Comma{\unskip, }\fi% + \if\Jtest\present\Comma\bgroup\Tomefont\Jstr\/\egroup + \def\Comma{, }\fi% + \if\Vtest\present\if\Jtest\present\hskip.16667em + \else\Comma\fi\bgroup\Volfont\Vstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\hskip.16667em(\bgroup\Dstr\egroup) + \def\Comma{, }\fi% + \if\Ptest\present\bgroup, \Pstr\egroup\def\Comma{, }\fi% + \if\ttest\present\Comma + \bgroup``\Titlefont\tstr\egroup\def\Comma{," }\fi% + \if\jtest\present\Comma\bgroup\Tomefont\jstr\/\egroup + \def\Comma{, }\fi% + \if\vtest\present\if\jtest\present\hskip.16667em\else + \Comma\fi\bgroup\Volfont\vstr\egroup\def\Comma{, }\fi% + \if\dtest\present\hskip.16667em(\bgroup\dstr\egroup) + \def\Comma{, }\fi% + \if\ptest\present\bgroup, \pstr\egroup\def\Comma{, }\fi% + \if\Gtest\present{\Comma Gov't ordering no. } + \bgroup\Gstr\egroup\def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.}\else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\def\conferencereportformat{\Reffont\let\uchyph=1 +\parindent=1.25pc\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000 + \sfcode`\:=1000\sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% + \if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }\fi% + \if\Ttest\present\Comma + \bgroup``\Titlefont\Tstr\egroup\def\Comma{," }\fi% +\if\Jtest\present\Comma\bgroup\Tomefont\Jstr\/\egroup\def\Comma{, }\fi% + \if\Ctest\present\Comma\bgroup\Cstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\hskip.16667em(\bgroup\Dstr\egroup) + \def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.}\else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\def\bookarticleformat{\Reffont\let\uchyph=1\parindent=1.25pc +\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000 + \sfcode`\:=1000\sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% + \if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }\fi% + \if\Ttest\present\Comma\bgroup``\Titlefont\Tstr + \egroup\def\Comma{," }\fi% + \if\etest\present\if\Ttest\present"\fi\hskip.16667em( + \bgroup\estr\egroup)\def\Comma{\unskip, }\fi% + \if\Btest\present\Comma in \bgroup\Tomefont\Bstr\/\egroup + \def\Comma{\unskip, }\fi% + \if\otest\present\ \bgroup\ostr\egroup\def\Comma{, }\fi% + \if\Etest\present\Comma\bgroup\Estr\egroup + \unskip, \ifnum\Ecnt>1eds.\else ed.\fi\def\Comma{, }\fi% + \if\Stest\present\Comma\bgroup\Sstr\egroup\def\Comma{, }\fi% + \if\Vtest\present\bgroup\hskip.16667em\#\Volfont\Vstr + \egroup\def\Comma{, }\fi% + \if\Ntest\present\bgroup\hskip.16667em\#\Volfont\Nstr + \egroup\def\Comma{, }\fi% + \if\Itest\present\Comma\bgroup\Istr\egroup\def\Comma{, }\fi% + \if\Ctest\present\Comma\bgroup\Cstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\Comma\bgroup\Dstr\egroup\def\Comma{, }\fi% + \if\Ptest\present\Comma\Pstr\def\Comma{, }\fi% + \if\ttest\present\Comma\bgroup``\Titlefont\Tstr + \egroup\def\Comma{," }\fi% + \if\btest\present\Comma in \bgroup\Tomefont\bstr + \egroup\def\Comma{, }\fi% + \if\atest\present\Comma\bgroup\astr\egroup\unskip, + \if\acnt\present eds.\else ed.\fi\def\Comma{, }\fi% + \if\stest\present\Comma\bgroup\sstr + \egroup\def\Comma{, }\fi% + \if\vtest\present\bgroup\hskip.16667em\#\Volfont + \vstr\egroup\def\Comma{, }\fi% + \if\ntest\present\bgroup\hskip.16667em\#\Volfont + \nstr\egroup\def\Comma{, }\fi% + \if\itest\present\Comma\bgroup\istr\egroup + \def\Comma{, }\fi% + \if\ctest\present\Comma\bgroup\cstr + \egroup\def\Comma{, }\fi% + \if\dtest\present\Comma\bgroup\dstr + \egroup\def\Comma{, }\fi% + \if\ptest\present\Comma\pstr\def\Comma{, }\fi% + \if\Gtest\present{\Comma Gov't ordering no. } + \bgroup\Gstr\egroup\def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.} + \else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\def\bookformat{\Reffont\let\uchyph=1\parindent=1.25pc\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000 + \sfcode`\:=1000\sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% + \if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }% + \else\if\Etest\present\bgroup\def\Eand{\Aand}\def\Eandd{\Aandd} +\Authfont\Estr\egroup\unskip, \ifnum\Ecnt>1eds.\else ed.\fi +\def\Comma{, }% + \else\if\Itest\present\bgroup\Authfont\Istr + \egroup\def\Comma{, }\fi\fi\fi% + \if\Ttest\present\Comma\bgroup\Tomefont\Tstr\/\egroup + \def\Comma{\unskip, }% + \else\if\Btest\present\Comma\bgroup\Tomefont\Bstr\/\egroup + \def\Comma{\unskip, }\fi\fi% + \if\otest\present\ \bgroup\ostr\egroup\def\Comma{, }\fi% + \if\etest\present\hskip.16667em(\bgroup\estr\egroup) + \def\Comma{\unskip, }\fi% + \if\Stest\present\Comma\bgroup\Sstr\egroup\def\Comma{, }\fi% + \if\Vtest\present\bgroup\hskip.16667em\#\Volfont\Vstr + \egroup\def\Comma{, }\fi% + \if\Ntest\present\bgroup\hskip.16667em\#\Volfont\Nstr + \egroup\def\Comma{, }\fi% + \if\Atest\present\if\Itest\present + \Comma\bgroup\Istr\egroup\def\Comma{\unskip, }\fi% + \else\if\Etest\present\if\Itest\present + \Comma\bgroup\Istr\egroup + \def\Comma{\unskip, }\fi\fi\fi% + \if\Ctest\present\Comma\bgroup\Cstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\Comma\bgroup\Dstr\egroup\def\Comma{, }\fi% + \if\ttest\present\Comma\bgroup\Tomefont\tstr\egroup\def\Comma{, }% + \else\if\btest\present\Comma\bgroup\Tomefont\bstr + \egroup\def\Comma{, }\fi\fi% + \if\stest\present\Comma\bgroup\sstr\egroup\def\Comma{, }\fi% +\if\vtest\present\bgroup\hskip.16667em\#\Volfont\vstr + \egroup\def\Comma{, }\fi% +\if\ntest\present\bgroup\hskip.16667em\#\Volfont +\nstr\egroup\def\Comma{, }\fi% + \if\itest\present\Comma\bgroup\istr\egroup\def\Comma{, }\fi% + \if\ctest\present\Comma\bgroup\cstr\egroup\def\Comma{, }\fi% + \if\dtest\present\Comma\bgroup\dstr\egroup\def\Comma{, }\fi% + \if\Gtest\present{\Comma Gov't ordering no. }\bgroup\Gstr + \egroup\def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.}\else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\def\technicalreportformat{\Reffont\let\uchyph=1 +\parindent=1.25pc\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000 + \sfcode`\:=1000\sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% + \if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }% + \else\if\Etest\present\bgroup\def\Eand{\Aand} + \def\Eandd{\Aandd}\Authfont\Estr\egroup\unskip, + \ifnum\Ecnt>1eds.\else ed.\fi\def\Comma{, }% + \else\if\Itest\present\bgroup\Authfont\Istr + \egroup\def\Comma{, }\fi\fi\fi% + \if\Ttest\present\Comma + \bgroup``\Titlefont\Tstr\egroup\def\Comma{," }\fi% + \if\Atest\present\if\Itest\present + \Comma\bgroup\Istr\egroup\def\Comma{, }\fi% + \else\if\Etest\present\if\Itest\present + \Comma\bgroup\Istr\egroup\def\Comma{, }\fi\fi\fi% + \if\Rtest\present\Comma\bgroup\Rstr\egroup\def\Comma{, }\fi% + \if\Ctest\present\Comma\bgroup\Cstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\Comma\bgroup\Dstr\egroup\def\Comma{, }\fi% + \if\ttest\present\Comma + \bgroup``\Titlefont\tstr\egroup\def\Comma{," }\fi% + \if\itest\present\Comma\bgroup\istr\egroup\def\Comma{, }\fi% + \if\rtest\present\Comma\bgroup\rstr\egroup\def\Comma{, }\fi% + \if\ctest\present\Comma\bgroup\cstr\egroup\def\Comma{, }\fi% + \if\dtest\present\Comma\bgroup\dstr\egroup\def\Comma{, }\fi% + \if\Gtest\present{\Comma Gov't ordering no. } + \bgroup\Gstr\egroup\def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.}\else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\def\otherformat{\Reffont\let\uchyph=1\parindent=1.25pc\def\Comma{}% + \sfcode`\.=1000\sfcode`\?=1000\sfcode`\!=1000 + \sfcode`\:=1000\sfcode`\;=1000\sfcode`\,=1000%\frenchspacing + \par\vfil\penalty-200\vfilneg%\filbreak + \if\Ftest\present\Flagstyle\Fstr\fi% + \if\Atest\present\bgroup\Authfont\Astr\egroup\def\Comma{\unskip, }% + \else\if\Etest\present\bgroup\def\Eand{\Aand} + \def\Eandd{\Aandd}\Authfont\Estr\egroup\unskip, + \ifnum\Ecnt>1eds.\else ed.\fi\def\Comma{, }% + \else\if\Itest\present\bgroup\Authfont\Istr + \egroup\def\Comma{, }\fi\fi\fi% + \if\Ttest\present\Comma + \bgroup``\Titlefont\Tstr\egroup\def\Comma{," }\fi% + \if\Atest\present\if\Itest\present + \Comma\bgroup\Istr\egroup\def\Comma{, }\fi% + \else\if\Etest\present\if\Itest\present + \Comma\bgroup\Istr\egroup\def\Comma{, }\fi\fi\fi% + \if\Ctest\present\Comma\bgroup\Cstr\egroup\def\Comma{, }\fi% + \if\Dtest\present\Comma\bgroup\Dstr\egroup\def\Comma{, }\fi% + \if\Gtest\present{\Comma Gov't ordering no. } + \bgroup\Gstr\egroup\def\Comma{, }\fi% + \if\Otest\present{\Comma\bgroup\Ostr\egroup.}\else{.}\fi% + \vskip3ptplus1ptminus1pt}%\smallskip + +\Refstda\Citebrackets
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/manua2.tex @@ -0,0 +1,1316 @@ +\section{Examples} +\label{example} +The first problem is borrowed +from\Lspace \Lcitemark 9\Rcitemark \Rspace{} (Problem 32). +It involves a single objective function, simple bounds on the variables, +nonlinear inequality constraints, +and linear equality constraints. +The objective function $f$ is defined for $x\in R^3$ by +\begin{quote} +\begin{quote} +$f(x)=(x_1+3x_2+x_3)^2+4(x_1-x_2)^2$ +\end{quote} +\end{quote} +The constraints are +\begin{quote} +\begin{quote} + $0 \leq x_i ,~~~~~~~~~~i = 1,\ldots,3$ \\ + $x_1^3-6x_2-4x_3+3 \leq 0\;\;\;\;\;\ + 1-x_1-x_2-x_3 = 0$ +\end{quote} +\end{quote} +The feasible initial guess is:~~~$x_0=(0.1,~0.7,~0.2)^T$ ~~with +corresponding value +of the objective function~~~ $f(x_0)=7.2$. +The final solution is:~~~$x^*=(0,~0,~1)^T$ ~~with ~~~$f(x^*)=1$. +A suitable main program is as follows. +\begin{quote} +\begin{verbatim} +c +c problem description +c + program sampl1 +c + integer iwsize,nwsize,nparam,nf,nineq,neq + parameter (iwsize=29, nwsize=219) + parameter (nparam=3, nf=1) + parameter (nineq=1, neq=1) + integer iw(iwsize) + double precision x(nparam),bl(nparam),bu(nparam), + * f(nf+1),g(nineq+neq+1),w(nwsize) + external obj32,cntr32,grob32,grcn32 +c + integer mode,iprint,miter,nineqn,neqn,inform + double precision bigbnd,eps,epseqn,udelta +c + mode=100 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.d-08 + epseqn=0.d0 + udelta=0.d0 +c +c nparam=3 +c nf=1 + nineqn=1 + neqn=0 +c nineq=1 +c neq=1 +c + bl(1)=0.d0 + bl(2)=0.d0 + bl(3)=0.d0 + bu(1)=bigbnd + bu(2)=bigbnd + bu(3)=bigbnd +c +c give the initial value of x +c + x(1)=0.1d0 + x(2)=0.7d0 + x(3)=0.2d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epseqn,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj32,cntr32,grob32,grcn32) + end +\end{verbatim} +\end{quote} +Following are the subroutines defining the objective and +constraints and their gradients. +\begin{quote} +\begin{verbatim} + subroutine obj32(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj +c + fj=(x(1)+3.d0*x(2)+x(3))**2+4.d0*(x(1)-x(2))**2 + return + end +c + subroutine grob32(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision x(nparam),gradfj(nparam),fa,fb + external dummy +c + fa=2.d0*(x(1)+3.d0*x(2)+x(3)) + fb=8.d0*(x(1)-x(2)) + gradfj(1)=fa+fb + gradfj(2)=fa*3.d0-fb + gradfj(3)=fa + return + end +c + subroutine cntr32(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj + external dummy +c + go to (10,20),j + 10 gj=x(1)**3-6.0d0*x(2)-4.0d0*x(3)+3.d0 + return + 20 gj=1.0d0-x(1)-x(2)-x(3) + return + end +c + subroutine grcn32(nparam,j,x,gradgj,dummy) + integer nparam,j + double precision x(nparam),gradgj(nparam) + external dummy +c + go to (10,20),j + 10 gradgj(1)=3.d0*x(1)**2 + gradgj(2)=-6.d0 + gradgj(3)=-4.d0 + return + 20 gradgj(1)=-1.d0 + gradgj(2)=-1.d0 + gradgj(3)=-1.d0 + return + end +\end{verbatim} +\end{quote} +The file containing the user-provided subroutines is +then compiled together with {\tt fsqpd.f} and {\tt qld.f}. +After running the algorithm on a SUN 4/SPARC station 1, the +following output is obtained: +\begin{verbatim} + + FSQP Version 3.2 (Released March 1993) + Copyright (c) 1989 --- 1993 + J.L. Zhou and A.L. Tits + All Rights Reserved + + + The given initial point is feasible for inequality + constraints and linear equality constraints: + x 0.10000000000000E+00 + 0.70000000000000E+00 + 0.20000000000000E+00 + objectives 0.72000000000000E+01 + constraints -0.19990000000000E+01 + 0.55511151231258E-16 + + + iteration 3 + x -0.98607613152626E-31 + 0.00000000000000E+00 + 0.10000000000000E+01 + objectives 0.10000000000000E+01 + constraints -0.10000000000000E+01 + 0.00000000000000E+00 + SCV 0.00000000000000E+00 + d0norm 0.13945222387368E-30 + ktnorm 0.10609826585190E-29 + ncallf 3 + ncallg 5 + + + inform 0 + Normal termination: You have obtained a solution !! +\end{verbatim} + +Our second example is taken from example 6 +in\Lspace \Lcitemark 10\Rcitemark \Rspace{}. The problem is as follows. +$$\begin{array}{cl} +\min\limits_{x\in R^6} & \max\limits_{i=1,\ldots,163} |f_i(x)| \\ +\mbox{s.t.} & -x(1)~~~~~~\,\!~~~~~~~~~~~~~~\; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+s \leq 0 \\ + & ~\,\,\,\!x(1)-x(2)~~~~~~~~~~~~\; +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+s \leq 0 \\ + & ~~~~~~\,\!~~~~~\,x(2)-x(3)~~~~\;\, +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+s \leq 0 \\ + & ~~~~~~~\,\!~~~~~~~~~~~~~~x(3)-x(4) +~~~~~~~~~~~~~~~~~~~~~~~~\;~+s \leq 0 \\ + & ~~~~~~~~\,\!~~~~~~~~~~~~~~~~~~~~~~\,x(4)-x(5) +~~~~~~~~~~~~~~~\;\,+s \leq 0 \\ + & ~~~~~~~~~~~\,\!~~~~~~~~~~~~~~~~~~~~~~~~~~~~\,\,x(5)-x(6) +~~~\;~~~+s \leq 0 \\ + & ~~~~~~~~~~~~~~~\,\!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~\,x(6)-3.5+s \leq 0; +\end{array}$$ +where +$$\begin{array}{l} +f_i(x)=\frac{1}{15}+\frac{2}{15}(\sum^6_{j=1} + \mbox{cos}(2\pi x_j\mbox{sin}\theta _i) + +\mbox{cos}(7\pi \mbox{sin}\theta _i)), \\ +\theta _i=\frac{\pi}{180}(8.5+0.5i),~i=1,\ldots,163,\\ +s=0.425. +\end{array}$$ +The feasible initial guess is:~$x_0=(0.5,1,1.5,2,2.5,3)^T$ with +the corresponding value of the objective +function $\max\limits_{i=1,\ldots,163} |f_i(x_0)|=0.22051991555531$. +A suitable main program is as follows. +\begin{quote} +\begin{verbatim} +c +c problem description +c + program sampl2 +c + integer iwsize,nwsize,nparam,nf,nineq,neq + parameter (iwsize=1029, nwsize=7693) + parameter (nparam=6, nf=163) + parameter (nineq=7, neq=0) + integer iw(iwsize) + double precision x(nparam),bl(nparam),bu(nparam), + * f(nf+1),g(nineq+neq+1),w(nwsize) + external objmad,cnmad,grobfd,grcnfd +c + integer mode,iprint,miter,nineqn,neqn,inform + double precision bigbnd,eps,udelta +c + mode=111 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.0d-08 + epseqn=0.d0 + udelta=0.d0 +c +c nparam=6 +c nf=163 + nineqn=0 + neqn=0 +c nineq=7 +c neq=0 +c + bl(1)=-bigbnd + bl(2)=-bigbnd + bl(3)=-bigbnd + bl(4)=-bigbnd + bl(5)=-bigbnd + bl(6)=-bigbnd + bu(1)=bigbnd + bu(2)=bigbnd + bu(3)=bigbnd + bu(4)=bigbnd + bu(5)=bigbnd + bu(6)=bigbnd +c +c give the initial value of x +c + x(1)=0.5d0 + x(2)=1.d0 + x(3)=1.5d0 + x(4)=2.d0 + x(5)=2.5d0 + x(6)=3.d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epseqn,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,objmad,cnmad,grobfd,grcnfd) + end + stop +\end{verbatim} +\end{quote} +We choose to compute the gradients of functions by means of +finite difference approximation. Thus only subroutines that +define the objectives and constraints are needed as follows. +\begin{quote} +\begin{verbatim} + subroutine objmad(nparam,j,x,fj) + integer nparam,j,i + double precision x(nparam),theta,pi,fj +c + pi=3.14159265358979d0 + theta=pi*(8.5d0+dble(j)*0.5d0)/180.d0 + fj=0.d0 + do 10 i=1,6 + 10 fj=fj+dcos(2.d0*pi*x(i)*dsin(theta)) + fj=2.d0*(fj+dcos(2.d0*pi*3.5d0*dsin(theta)))/15.d0 + * +1.d0/15.d0 + return + end +c + subroutine cnmad(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),ss,gj +c + ss=0.425d0 + goto(10,20,30,40,50,60,70),j + 10 gj=ss-x(1) + return + 20 gj=ss+x(1)-x(2) + return + 30 gj=ss+x(2)-x(3) + return + 40 gj=ss+x(3)-x(4) + return + 50 gj=ss+x(4)-x(5) + return + 60 gj=ss+x(5)-x(6) + return + 70 gj=ss+x(6)-3.5d0 + return + end +\end{verbatim} +\end{quote} +After running the algorithm on a SUN 4/SPARC station 1, +the following output +is obtained (the results for the set of objectives have been deleted to +save space) +\begin{verbatim} + + FSQP Version 3.2 (Released March 1993) + Copyright (c) 1989 --- 1993 + J.L. Zhou and A.L. Tits + All Rights Reserved + + + The given initial point is feasible for inequality + constraints and linear equality constraints: + 0.50000000000000E+00 + 0.10000000000000E+01 + 0.15000000000000E+01 + 0.20000000000000E+01 + 0.25000000000000E+01 + 0.30000000000000E+01 + objmax 0.22051986506559E+00 + constraints -0.75000000000000E-01 + -0.75000000000000E-01 + -0.75000000000000E-01 + -0.75000000000000E-01 + -0.75000000000000E-01 + -0.75000000000000E-01 + -0.75000000000000E-01 + + + iteration 7 + x 0.42500000000000E+00 + 0.85000000000000E+00 + 0.12750000000000E+01 + 0.17000000000000E+01 + 0.21840763196688E+01 + 0.28732755096448E+01 + objective max4 0.11421841325221E+00 + objmax 0.11310472749826E+00 + constraints 0.00000000000000E+00 + 0.00000000000000E+00 + 0.00000000000000E+00 + 0.00000000000000E+00 + -0.59076319668817E-01 + -0.26419918997596E+00 + -0.20172449035522E+00 + SCV 0.00000000000000E+00 + d0norm 0.15662162275640E-09 + ktnorm 0.20564110435030E-10 + ncallf 1141 + + + inform 0 + Normal termination: You have obtained a solution !! +\end{verbatim} + +Our third example is borrowed +from\Lspace \Lcitemark 9\Rcitemark \Rspace{} (Problem 71). It involves both +equality and inequality nonlinear constraints and is defined by +$$\begin{array}{cl} +\min\limits_{x\in R^4} & x_1x_4(x_1+x_2+x_3)+x_3\\ +\mbox{s.t.} & 1\leq x_i\leq 5,\quad i=1,\ldots,4\\ + & x_1x_2x_3x_4-25\geq 0\\ + & x_1^2+x_2^2+x_3^2+x_4^2-40=0. +\end{array}$$ +The feasible initial guess is: $x_0=(1,5,5,1)^T$ with the corresponding +value of the objective function $f(x_0)=16$. A suitable program +that invokes FSQP to solve this problem is given below. +\begin{quote} +\begin{verbatim} +c +c problem description +c + program sampl3 +c + integer iwsize,nwsize,nparam,nf,nineq,neq + parameter (iwsize=33, nwsize=284) + parameter (nparam=4, nf=1) + parameter (nineq=1, neq=1) + integer iw(iwsize) + double precision x(nparam),bl(nparam),bu(nparam),f(nf+1), + * g(nineq+neq+1),w(nwsize) + external obj,cntr,gradob,gradcn +c + integer mode,iprint,miter,neqn,nineqn,inform + double precision bigbnd,eps,epseqn,udelta +c + mode=100 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.0d-07 + epseqn=7.d-06 + udelta=0.d0 +c + neqn=1 + nineqn=1 +c + bl(1)=1.d0 + bl(2)=1.d0 + bl(3)=1.d0 + bl(4)=1.d0 + bu(1)=5.d0 + bu(2)=5.d0 + bu(3)=5.d0 + bu(4)=5.d0 +c +c give the initial value of x +c + x(1)=1.d0 + x(2)=5.d0 + x(3)=5.d0 + x(4)=1.d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epseqn,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj,cntr,gradob,gradcn) + end +\end{verbatim} +\end{quote} +Following are the subroutines that define the objective, constraints +and their gradients. +\begin{quote} +\begin{verbatim} + subroutine obj(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj +c + fj=x(1)*x(4)*(x(1)+x(2)+x(3))+x(3) + return + end +c + subroutine gradob(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision x(nparam),gradfj(nparam) + external dummy +c + gradfj(1)=x(4)*(x(1)+x(2)+x(3))+x(1)*x(4) + gradfj(2)=x(1)*x(4) + gradfj(3)=x(1)*x(4)+1.d0 + gradfj(4)=x(1)*(x(1)+x(2)+x(3)) + return + end +c + subroutine cntr(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj +c + goto (10,20),j + 10 gj=25.d0-x(1)*x(2)*x(3)*x(4) + return + 20 gj=x(1)**2+x(2)**2+x(3)**2+x(4)**2-40.d0 + return + end +c + subroutine gradcn(nparam,j,x,gradgj,dummy) + integer nparam,j + double precision x(nparam),gradgj(nparam) + external dummy +c + goto (10,20),j + 10 gradgj(1)=-x(2)*x(3)*x(4) + gradgj(2)=-x(1)*x(3)*x(4) + gradgj(3)=-x(1)*x(2)*x(4) + gradgj(4)=-x(1)*x(2)*x(3) + return + 20 gradgj(1)=2.d0*x(1) + gradgj(2)=2.d0*x(2) + gradgj(3)=2.d0*x(3) + gradgj(4)=2.d0*x(4) + return + end +\end{verbatim} +\end{quote} +After running the algorithm on a SUN 4/SPARC station 1, the following +output is obtained +\begin{verbatim} + + FSQP Version 3.2 (Released March 1993) + Copyright (c) 1989 --- 1993 + J.L. Zhou and A.L. Tits + All Rights Reserved + + + The given initial point is feasible for inequality + constraints and linear equality constraints: + x 0.10000000000000E+01 + 0.50000000000000E+01 + 0.50000000000000E+01 + 0.10000000000000E+01 + objectives 0.16000000000000E+02 + constraints 0.00000000000000E+00 + -0.12000000000000E+02 + + + iteration 8 + x 0.10000000000000E+01 + 0.47429996518112E+01 + 0.38211499651796E+01 + 0.13794082958030E+01 + objectives 0.17014017289158E+02 + constraints -0.35171865420125E-11 + -0.35100811146549E-11 + SCV 0.35100811146549E-11 + d0norm 0.23956399867788E-07 + ktnorm 0.34009891628142E-07 + ncallf 9 + ncallg 24 + + + inform 0 + Normal termination: You have obtained a solution !! +\end{verbatim} + +\section{Results for Test Problems} +\label{results} +\noindent These results are provided to allow the user to +compare FSQP with his/her favorite code (see +also\Lspace \Lcitemark 2\Citehyphen 4\Rcitemark \Rspace{}). +Table 1 contains results +obtained for some (non-minimax) test problems +from\Lspace \Lcitemark 9\Rcitemark \Rspace{} (the same initial points +as in\Lspace \Lcitemark 9\Rcitemark \Rspace{} were selected). +{\tt prob} indicates the problem number as in +\Lcitemark 9\Rcitemark \Rspace{}, {\tt nineqn} the number of nonlinear constrai +nts, +{\tt ncallf} the total number of evaluations of the objective function, +{\tt ncallg} the total number of evaluations of the (scalar) nonlinear +constraint functions, {\tt iter} the total number of iterations, +{\tt objective} the final value +of the objective, {\tt ktnorm} the norm of Kuhn-Tucker vector at the +final iterate, {\tt eps} the norm requirement of the Kuhn-Tucker vector, +{\tt SCV} the sum of feasibility violation of linear constraints (see +\S~\ref{stopcri}). On each test problem, {\tt eps} was selected +so as to achieve the same +field precision as in\Lspace \Lcitemark 9\Rcitemark \Rspace{}. +Whether FSQP-AL (0) or FSQP-NL (1) is used is indicated in column ``B''. + +Results obtained on selected minimax problems +are summarized in Table 2. +Problems {\tt bard}, {\tt davd2}, {\tt f\&r}, {\tt hettich}, +and {\tt wats} are +from\Lspace \Lcitemark 11\Rcitemark \Rspace{}; +{\tt cb2}, {\tt cb3}, {\tt r-s}, {\tt wong} and {\tt colv} are +from\Lspace \Lcitemark 12\LIcitemark{}; Examples 5.1-5\RIcitemark \Rcitemark \R +space{} +(the latest test results on problems {\tt bard} down to +{\tt wong} can be found in\Lspace \Lcitemark 13\Rcitemark \Rspace{}); +{\tt kiw1} and {\tt kiw4} are from\Lspace \Lcitemark 14\Rcitemark \Rspace{} +(results for {\tt kiw2} and {\tt kiw3} are not reported due to +data disparity); +{\tt mad1} to {\tt mad8} are from\Lspace \Lcitemark 10\LIcitemark{}, Examples 1 +-8\RIcitemark \Rcitemark \Rspace{}; +{\tt polk1} to {\tt polk4} are from\Lspace \Lcitemark 15\Rcitemark \Rspace{}. +%for {\tt polk1} to {\tt polk4}. +Some of these test problems allow one to freely select +the number of variables; +problems {\tt wats-6} and {\tt wats-20} correspond to 6 and 20 +variables respectively, +and {\tt mad8-10}, {\tt mad8-30} and {\tt mad8-50} to 10, 30 and 50 +variables respectively. +All of the above are either +unconstrained or linearly constrained minimax problems. Unable to find +nonlinearly constrained minimax test problems in the literature, we +constructed problems {\tt p43m} through {\tt p117m} from problems +43, 84, 113 and 117 in\Lspace \Lcitemark 9\Rcitemark \Rspace{} +by removing certain constraints and including instead +additional objectives of the form +$$f_i(x)=f(x)+\alpha _ig_i(x)$$ +where the $\alpha _i$'s are positive scalars and $g_i(x)\leq 0.$ +Specifically, {\tt p43m} +is constructed from problem 43 by taking out the first +two constraints and +including two corresponding objectives with $\alpha _i=15$ for both; +{\tt p84m} similarly corresponds to problem 84 without +constraints 5 and 6 but +with two corresponding additional objectives, +with $\alpha _i=20$ for both; +for {\tt p113m}, the first three linear constraints from problem 113 +were turned into objectives, with $\alpha _i=10$ for all; +for {\tt p117m}, +the first two nonlinear constraints were turned into objectives, +again with $\alpha _i=10$ for both. +The gradients of all the functions were computed by finite difference +approximation except for {\tt polk1} through {\tt polk4} for which +gradients were computed analytically. + +In Table 2, the meaning of columns {\tt B}, {\tt nineqn}, {\tt ncallf}, +{\tt ncallg}, +{\tt iter}, {\tt ktnorm} and {\tt SCV} is as in +Table 1 (but {\tt ncallf} +is the total number of evaluations of {\it scalar} objective function). +{\tt nf} is the number of objective functions in the max, +{\tt objmax} is the +final value of the max of the objective functions. +Finally, as in Table 1, +{\tt eps} is the stopping rule parameter. +Here however its specific meaning +varies from problem to problem as we attempted to best approximate the +stopping rule used in the reference. Specifically, +for problems {\tt bard} through {\tt kiw4}, +execution was terminated when $\|d^0_k\|$ becomes smaller +than the corresponding value of $\epsilon$ in the column +of {\tt eps} (this was also done for problems {\tt p43m} +through {\tt p117m}); +for problems {\tt mad1} down to {\tt mad8}, execution was +terminated when $\|d^0_k\|$ is smaller than $\|x_k\|$ times the +corresponding value of $\epsilon$ in the column {\tt eps} +(except {\tt mad2} for which FSQPD was terminated when the 14 digits +of the maximum objective value carried out by our code did not change); +for problems {\tt polk1} through {\tt polk4}, execution +was terminated when +$\log _e\|x_k-x^*\|$ becomes smaller than the corresponding +value of $\epsilon$ in the column of {\tt eps}. +FSQPD with monotone line search failed to reach a solution for {\tt mad8-30} +when QLD was used, but it succeeded when QPSOL\Lspace \Lcitemark 16\Rcitemark \ +Rspace{} +was used.\footnote{But on most problems, according to our experience, +QLD is significantly faster than QPSOL. A subroutine to interface FSQP +with QPSOL can be obtained from the authors.} + +Table 3 contains results of problems with nonlinear equality +constraints from\Lspace \Lcitemark 9\Rcitemark \Rspace{}. All symbols are the s +ame as +described before. {\tt eps} is the norm requirement on $d_k^0$ +and {\tt epseqn} is chosen close to the corresponding values +in\Lspace \Lcitemark 9\Rcitemark \Rspace{}, with $10^{-8}$ replacing 0. +An asterisk (*) indicates that FSQP failed +to meet the stopping criterion before certain execution error is encountered. +It can be checked that +the second order sufficient conditions of optimality are not satisfied +at the known optimal solution for problems 26, 27, 46 and 47. + +\section{Programming Tips} +\label{tips} +\noindent +The order in which FSQP evaluates the various objectives and +constraints during the line search varies from iteration to +iteration, as the functions deemed more likely to cause rejection of +the trial steps are evaluated first. On the other hand, in +many applications, it is far more efficient to evaluate all +(or at least more than one) of the objectives and constraints concurrently, +as they are all obtained as byproducts of expensive simulations +(e.g., involving finite element computation). This situation +can be accomodated as follows. Whenever a function evaluation +has been performed, store in a common block the value of {\tt x} +and the corresponding values of all objectives and constraints (alternatively, +the values of all ``simulation outputs''). Then, whenever a function +evaluation is requested by FSQP, first check whether the same value of +{\tt x} has just been used and, if so, entirely bypass the expensive +simulation. Note that, if gradients are computed by finite differences, +it will be necessary to save the past {\tt nparam}+1 values of {\tt x} +and of the corresponding objective/constraint values. + +\section{Trouble-Shooting} +\label{trouble} +\noindent It is important to keep in mind some limitations of FSQP. +First, similar to most codes targeted at smooth problems, it is +likely to encounter difficulties when confronted to nonsmooth +functions such as, for example, functions involving matrix +eigenvalues. Second, because FSQP generates feasible iterates, it may +be slow if the feasible set is very ``thin'' or oddly shaped. +Third, concerning equality constraints, if $h_j(x)\geq 0$ for all +$x\in R^n$ and if $h_j(x_0)=0$ +for some $j$ at the initial point $x_0$, the interior of the feasible set +defined by $h_j(x)\leq 0$ for such $j$ is empty. This may cause +difficulties for FSQPD because, in FSQPD, $h_j(x)=0$ is directly +turned into $h_j(x)\leq 0$ for such $j$. +The user is advised to either give an initial point +that is infeasible for all nonlinear equality constraints or change +the sign of $h_j$ so that $h_j(x)<0$ can be achieved at some point +for all such nonlinear equality constraint. + +A common failure mode for FSQP, corresponding to ${\tt inform}=5$ or 6, +is that of the QP solver in constructing {\tt d0} or {\tt d1}. +This is often due to linear dependence (or almost dependence) +of gradients of equality constraints or active inequality constraints. +Sometimes this problem can be circumvented by making use of a more +robust (but likely slower) QP solver. We have designed an interface, +available upon request, that allows the user to use QPSOL\Lspace \Lcitemark 16\ +Rcitemark \Rspace{} +instead of QLD. The user may also want to +check the jacobian matrix and identify which constraints are the +culprit. Eliminating redundant constraints or formulating the constraints +differently (without changing the feasible set) may then be the way to go. + +Finally, when FSQP fails in the line search ({\tt inform}=4), it is +typically due to inaccurate computation of the search direction. Two +possible reasons are: (i) Insufficient accuracy of the QP solver; again, +it may be appropriate to substitute a different QP solver. (ii) +Insufficient accuracy of gradient computation, e.g., when gradients +are computed by finite differences. A remedy may be to provide +analytical gradients or, more astutely, to resort to ``automatic +differentiation''. + +\vspace{1em} +\noindent{\bf Acknowledgment} + +\vspace{1em} +The authors are indebted to Dr. E.R. Panier for many invaluable +comments and suggestions. + +\vspace{1em} +\noindent{\bf References} +\vspace{1em} + +\message{REFERENCE LIST} + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{1}% +\def\Atest{ }\def\Astr{D.Q. Mayne% + \Aand E. Polak}% +\def\Ttest{ }\def\Tstr{Feasible Directions Algorithms for Optimization Problems + with Equality and Inequality Constraints}% +\def\Jtest{ }\def\Jstr{Math. Programming}% +\def\Vtest{ }\def\Vstr{11}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{67--80}% +\def\Dtest{ }\def\Dstr{1976}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{2}% +\def\Atest{ }\def\Astr{E.R. Panier% + \Aand A.L. Tits}% +\def\Ttest{ }\def\Tstr{On Combining Feasibility, Descent and Superlinear Conver +gence in Inequality Constrained Optimization}% +\def\Jtest{ }\def\Jstr{Math. Programming}% +\def\Dtest{ }\def\Dstr{1993, to appear}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{4}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{3}% +\def\Atest{ }\def\Astr{J.F. Bonnans% + \Acomma E.R. Panier% + \Acomma A.L. Tits% + \Aandd J.L. Zhou}% +\def\Ttest{ }\def\Tstr{Avoiding the Maratos Effect by Means of a Nonmonotone Li +ne Search. II. Inequality Constrained Problems -- Feasible Iterates}% +\def\Jtest{ }\def\Jstr{SIAM J. Numer. Anal.}% +\def\Vtest{ }\def\Vstr{29}% +\def\Ntest{ }\def\Nstr{4}% +\def\Dtest{ }\def\Dstr{1992}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{1187--1202}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{4}% +\def\Atest{ }\def\Astr{J.L. Zhou% + \Aand A.L. Tits}% +\def\Ttest{ }\def\Tstr{Nonmonotone Line Search for Minimax Problems}% +\def\Jtest{ }\def\Jstr{J. Optim. Theory Appl.}% +\def\Vtest{ }\def\Vstr{76}% +\def\Ntest{ }\def\Nstr{3}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{455--476}% +\def\Dtest{ }\def\Dstr{1993}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{3}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{5}% +\def\Atest{ }\def\Astr{L. Grippo% + \Acomma F. Lampariello% + \Aandd S. Lucidi}% +\def\Ttest{ }\def\Tstr{A Nonmonotone Line Search Technique for Newton's Method} +% +\def\Jtest{ }\def\Jstr{SIAM J. Numer. Anal.}% +\def\Vtest{ }\def\Vstr{23}% +\def\Ntest{ }\def\Nstr{4}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{707--716}% +\def\Dtest{ }\def\Dstr{1986}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{6}% +\def\Atest{ }\def\Astr{D. Q. Mayne% + \Aand E. Polak}% +\def\Ttest{ }\def\Tstr{A Superlinearly Convergent Algorithm for Constrained Opt +imization Problems}% +\def\Jtest{ }\def\Jstr{Math. Programming Stud.}% +\def\Vtest{ }\def\Vstr{16}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{45--61}% +\def\Dtest{ }\def\Dstr{1982}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{1}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{7}% +\def\Atest{ }\def\Astr{K. Schittkowski}% +\def\Ttest{ }\def\Tstr{QLD : A FORTRAN Code for Quadratic Programming, User's G +uide}% +\def\Itest{ }\def\Istr{Mathematisches Institut, Universit{\"a}t Bayreuth}% +\def\Ctest{ }\def\Cstr{Germany}% +\def\Dtest{ }\def\Dstr{1986}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{1}\def\Ecnt{1}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{8}% +\def\Atest{ }\def\Astr{M.J.D. Powell}% +\def\Ttest{ }\def\Tstr{A Fast Algorithm for Nonlinearly Constrained Optimizatio +n Calculations}% +\def\Btest{ }\def\Bstr{Numerical Analysis, Dundee, 1977, Lecture Notes in Mathe +matics 630}% +\def\Etest{ }\def\Estr{G.A. Watson}% +\def\Itest{ }\def\Istr{Springer-Verlag}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{144--157}% +\def\Dtest{ }\def\Dstr{1978}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{9}% +\def\Atest{ }\def\Astr{W. Hock% + \Aand K. Schittkowski}% +\def\Ttest{ }\def\Tstr{Test Examples for Nonlinear Programming Codes}% +\def\Itest{ }\def\Istr{Lecture Notes in Economics and Mathematical Systems (187 +), Springer Verlag}% +\def\Dtest{ }\def\Dstr{1981}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{10}% +\def\Atest{ }\def\Astr{K. Madsen% + \Aand H. Schj{\ae}r-Jacobsen}% +\def\Ttest{ }\def\Tstr{Linearly Constrained Minimax Optimization}% +\def\Jtest{ }\def\Jstr{Math. Programming}% +\def\Vtest{ }\def\Vstr{14}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{208--223}% +\def\Dtest{ }\def\Dstr{1978}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{1}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{11}% +\def\Atest{ }\def\Astr{G.A. Watson}% +\def\Ttest{ }\def\Tstr{The Minimax Solution of an Overdetermined System of Non- +linear Equations}% +\def\Jtest{ }\def\Jstr{J. Inst. Math. Appl.}% +\def\Vtest{ }\def\Vstr{23}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{167--180}% +\def\Dtest{ }\def\Dstr{1979}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{12}% +\def\Atest{ }\def\Astr{C. Charalambous% + \Aand A.R. Conn}% +\def\Ttest{ }\def\Tstr{An Efficient Method to Solve the Minimax Problem Directl +y}% +\def\Jtest{ }\def\Jstr{SIAM J. Numer. Anal.}% +\def\Vtest{ }\def\Vstr{15}% +\def\Ntest{ }\def\Nstr{1}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{162--187}% +\def\Dtest{ }\def\Dstr{1978}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{2}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{13}% +\def\Atest{ }\def\Astr{A.R. Conn% + \Aand Y. Li}% +\def\Ttest{ }\def\Tstr{An Efficient Algorithm for Nonlinear Minimax Problems}% +\def\Rtest{ }\def\Rstr{Research Report CS-88-41}% +\def\Itest{ }\def\Istr{University of Waterloo}% +\def\Ctest{ }\def\Cstr{Waterloo, Ontario, N2L 3G1 Canada}% +\def\Dtest{ }\def\Dstr{November, 1989 }% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{1}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{14}% +\def\Atest{ }\def\Astr{K.C. Kiwiel}% +\def\Ttest{ }\def\Tstr{Methods of Descent in Nondifferentiable Optimization}% +\def\Stest{ }\def\Sstr{Lecture Notes in Mathematics}% +\def\Ntest{ }\def\Nstr{1133}% +\def\Itest{ }\def\Istr{Springer-Verlag}% +\def\Ctest{ }\def\Cstr{New York--Heidelberg--Berlin}% +\def\Ctest{ }\def\Cstr{Berlin, Heidelberg, New-York, Tokyo}% +\def\Dtest{ }\def\Dstr{1985}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{3}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{15}% +\def\Atest{ }\def\Astr{E. Polak% + \Acomma D.Q. Mayne% + \Aandd J.E. Higgins}% +\def\Ttest{ }\def\Tstr{A Superlinearly Convergent Algorithm for Min-max Problem +s}% +\def\Jtest{ }\def\Jstr{Proceedings of the 28th IEEE Conference on Decision and +Control}% +\def\Dtest{ }\def\Dstr{December 1989}% +\def\Ptest{ }\def\Pcnt{ }\def\Pstr{894--898}% +\Refformat\egroup% + +\bgroup\Resetstrings% +\def\Loccittest{}\def\Abbtest{}\def\Capssmallcapstest{}\def\Edabbtest{}\def\Edc +apsmallcapstest{}\def\Underlinetest{}% +\def\NoArev{0}\def\NoErev{0}\def\Acnt{4}\def\Ecnt{0}\def\acnt{0}\def\ecnt{0}% +\def\Ftest{ }\def\Fstr{16}% +\def\Atest{ }\def\Astr{P.E. Gill% + \Acomma W. Murray% + \Acomma M.A. Saunders% + \Aandd M.H. Wright}% +\def\Ttest{ }\def\Tstr{User's Guide for QPSOL (Version 3.2): A Fortran Package +for Quadratic Programming}% +\def\Rtest{ }\def\Rstr{Technical Report SOL 84-6}% +\def\Itest{ }\def\Istr{Systems Optimization Laboratory, Stanford University}% +\def\Ctest{ }\def\Cstr{Stanford, CA 94305}% +\def\Dtest{ }\def\Dstr{1984}% +\Refformat\egroup% + + +\newpage +\renewcommand{\baselinestretch}{0.95} % more interline spacing + \footnotesize{ +\begin{tabular}{ccccccrlll} \hline +\multicolumn{1}{c}{{\tt prob}} & +\multicolumn{1}{c}{{\tt B}} & +\multicolumn{1}{c}{{\tt nineqn}} & +\multicolumn{1}{c}{{\tt ncallf}} & +\multicolumn{1}{c}{{\tt ncallg}} & +\multicolumn{1}{c}{{\tt iter}} & +\multicolumn{1}{c}{{\tt objective}} & +\multicolumn{1}{c}{{\tt ktnorm}} & +\multicolumn{1}{c}{{\tt eps}} & +\multicolumn{1}{l}{{\tt SCV}} \\ \hline \\ + + {\tt p12} & 0 & 1 & ~7 & ~14 &~7 &$-$.300000000E+02 &.72E-06 & .10E-05 & +.0\\ + & 1 & & ~7 & ~12 &~7 &$-$.300000000E+02 &.79E-06 & .10E-05 & +.0\\\hline + {\tt p29} & 0 & 1 & 11 & ~20 & 10 &$-$.226274170E+02 &.41E-05 & .10E-04 & +.0\\ + & 1 & & 12 & ~16 & 12 &$-$.226274170E+02 &.63E-05 & .10E-04 & +.0\\\hline + {\tt p30} & 0 & 1 & 13 & ~25 & 13 & .100000000E+01 &.26E-07 & .10E-06 & +.0\\ + & 1 & & 14 & ~14 & 14 & .100000000E+01 &.43E-07 & .10E-06 & +.0\\\hline + {\tt p31} & 0 & 1 & 10 & ~21 &~8 & .600000000E+01 &.34E-06 & .10E-04 & +.0\\ + & 1 & & 10 & ~18 & 10 & .600000000E+01 &.50E-06 & .10E-04 & +.0\\\hline + {\tt p32} & 0 & 1 & ~3 & ~~5 &~3 & .100000000E+01 &.15E-14 & .10E-07 & +.0\\ + & 1 & & ~3 & ~~4 &~3 & .100000000E+01 &.64E-16 & .10E-07 & +.0\\\hline + {\tt p33} & 0 & 2 & ~4 & ~11 &~4 &$-$.400000000E+01 &.13E-11 & .10E-07 & +.0\\ + & 1 & & ~5 & ~10 &~5 &$-$.400000000E+01 &.47E-11 & .10E-07 & +.0\\\hline + {\tt p34} & 0 & 2 & ~7 & ~28 &~7 &$-$.834032443E+00 &.19E-08 & .10E-07 & +.0\\ + & 1 & & ~9 & ~24 &~9 &$-$.834032445E+00 &.38E-11 & .10E-07 & +.0\\\hline + {\tt p43} & 0 & 3 & 11 & ~51 & ~9 &$-$.440000000E+02 &.12E-05 & .10E-04 & +.0\\ + & 1 & & 12 & ~49 &12 &$-$.440000000E+02 &.16E-06 & .10E-04 & +.0\\\hline + {\tt p44} & 0 & 0 & ~6 & ~~0 & ~6 &$-$.150000000E+02 &.0 & .10E-07 & +.0\\ + & 1 & & ~6 & &~6 &$-$.150000000E+02 &.0 & .10E-07 & +.0\\\hline + {\tt p51} & 0 & 0 & ~8 & ~~0 &~6 & .505655658E$-$15 &.46E-06 &.10E-05 +&.22E-15\\ + & 1 & & ~9 & &~8 & .505655658E$-$15 &.34E-08 &.10E-05 +&.22E-15\\\hline + {\tt p57} & 0 & 1 & ~5 & ~~7 &~3 & .306463061E$-$01 &.29E-05 &.10E-04 +&.0\\ + & 1 & & ~5 & ~~7 &~3 & .306463061E$-$01 &.28E-05 &.10E-04 +&.0\\\hline + {\tt p66} & 0 & 2 & ~8 & ~30 &~8 & .518163274E+00 &.50E-09 &.10E-07 +&.0\\ + & 1 & & ~9 & ~24 &~9 & .518163274E+00 &.14E-08 &.10E-07 +&.0\\\hline + {\tt p67} & 0 & 14 & 21 & 305 &21 &$-$.116211927E+02 &.88E-06 &.10E-04 +&.0\\ + & 1 & & 61 & 854 &61 &$-$.116211927E+02 &.58E-05 &.10E-04 +&.0\\\hline + {\tt p70} & 0 & 1 & 32 & ~39 &30 & .940197325E$-$02 &.58E-08 &.10E-06 +&.0\\ + & 1 & & 31 & ~31 &31 & .940197325E$-$02 &.19E-07 &.10E-06 +&.0\\\hline + {\tt p76} & 0 & 0 & ~6 & ~~0 &~6 &$-$.468181818E+01 &.34E-04 &.10E-03 &. +0\\ + & 1 & & ~6 & &~6 &$-$.468181818E+01 &.34E-04 &.10E-03 &. +0\\\hline + {\tt p84} & 0 & 6 & ~4 & ~30 &~4 &$-$.528033513E+07 &.0 & .10E-07 & +.0\\ +* & 1 & & ~4 & ~29 &~4 &$-$.528033513E+07 &.38E-09 & .10E-07 & +.0\\\hline + {\tt p85} & 0 &38 & 34 & 1347 &34 &$-$.240000854E+01 &.35E-03 &.10E-02 &. +0\\ + & 1 & & 80 & 3040 &80 &$-$.240000854E+01 &.81E-03 &.10E-02 &. +0\\\hline + {\tt p86} & 0 & 0 & ~8 & ~~0 &~6 &$-$.323486790E+02 &.22E-08 & .10E-05 & +.0\\ + & 1 & & ~7 & &~6 &$-$.323486790E+02 &.53E-06 & .10E-05 & +.0\\\hline + {\tt p93} & 0 & 2 & 15 & ~58 & 12 & .135075968E+03 &.37E-03 & .10E-02 & +.0\\ + & 1 & & 15 & ~36 & 15 & .135075964E+03 &.24E-04 & .10E-02 & +.0\\\hline + {\tt p100}& 0 & 4 & 23 & 114 & 16 & .680630057E+03 &.62E-06 & .10E-03 & +.0\\ + & 1 & & 20 & 102 & 17 & .680630057E+03 &.49E-04 & .10E-03 & +.0\\\hline + {\tt p110}& 0 & 0 & ~9 & ~~0 &~8 &$-$.457784697E+02 &.50E-06 & .10E-05 & +.0\\ + & 1 & & ~9 & &~8 &$-$.457784697E+02 &.50E-06 & .10E-05 & +.0\\\hline + {\tt p113}& 0 & 5 & 12 & 108 & 12 & .243063768E+02 &.81E-03 & .10E-02 & +.0\\ + & 1 & & 12 & ~99 & 12 & .243064357E+02 &.83E-03 & .10E-02 & +.35E-14\\\hline + {\tt p117}& 0 & 5 & 20 & 219 & 19 & .323486790E+02 &.58E-04 & .10E-03 & +.0\\ + & 1 & & 18 & ~93 & 17 & .323486790E+02 &.34E-04 & .10E-03 & +.0\\\hline + {\tt p118}& 0 & 0 & 19 &~~0 & 19 & .664820450E+03 &.13E-14 & .10E-07 & +.0\\ + & 1 & & 19 & & 19 & .664820450E+03 &.17E-14 & .10E-07 & +.0\\ +\hline +\end{tabular} +} + +\nopagebreak +\vspace{1em} +\hspace{4em} +Table 1: Results for Inequality Constrained Problems with FSQP Version 3.2 + +\newpage +\renewcommand{\baselinestretch}{1.0} % more interline spacing + \begin{quote} +{\scriptsize +\begin{tabular}{cccccccrllc} \hline +\multicolumn{1}{c}{\tt prob} & +\multicolumn{1}{c}{{\tt B}} & +\multicolumn{1}{c}{{\tt nineqn}} & +\multicolumn{1}{r}{{\tt nf}} & +\multicolumn{1}{c}{{\tt ncallf}} & +\multicolumn{1}{c}{{\tt ncallg}} & +\multicolumn{1}{c}{{\tt iter}} & +\multicolumn{1}{c}{{\tt objmax}} & +\multicolumn{1}{c}{{\tt ktnorm}} & +\multicolumn{1}{c}{{\tt eps}} & +\multicolumn{1}{c}{{\tt SCV}}\\ \hline \\ + {\tt bard} & 0 &0&~15&~168&~~0&~8& .508163265E$-$01&.61E-09 & .50E-05&.0 \\ + & 1 & & &~105& &~7& .508168686E$-$01&.22E-06 & .50E-05&.0 \\\ +hline + {\tt cb2} & 0 &0&~~3&~~30&~~0&~6& .195222449E+01 &.37E-06 & .50E-05&.0 \\ + & 1 & & &~~18& &~6& .195222449E+01 &.29E-05 & .50E-05 &.0\\\ +hline + {\tt cb3} & 0 &0&~~3&~~15&~~0&~3& .200000157E+01 &.40E-05 & .50E-05 &.0\\ + & 1 & & &~~15& &~5& .200000000E+01 &.47E-08 & .50E-05 &.0\\\ +hline +{\tt colv} & 0 &0&~~6&~240&~~0&21& .323486790E+02 &.46E-05 & .50E-05 &.0\\ + & 1 & & &~102& &17& .323486790E+02 &.12E-04 & .50E-05 &.0\\\ +hline +{\tt davd2} & 0 &0&~20&~342&~~0&12& .115706440E+03 &.62E-06 & .50E-05 &.0\\ + & 1 & & &~220& &11& .115706440E+03 &.11E-05 & .50E-05 &.0\\\ +hline +{\tt f\&r} & 0 &0&~~2&~~32&~~0&~9& .494895210E+01 &.90E-09 & .50E-05 &.0\\ + & 1 & & &~~20& &10& .494895210E+01 &.70E-07 & .50E-05 &.0\\\ +hline +{\tt hettich}& 0 &0&~~5&~125&~~0&13& .245935695E$-$02&.10E-07 & .50E-05&.0 \\ + & 1 & & &~~75& &11& .245936698E$-$02&.18E-07 & .50E-05&.0 \\\ +hline +{\tt r-s} & 0 &0&~~4&~~71&~~0&~9&$-$.440000000E+02 &.98E-06 & .50E-05 &.0\\ + & 1 & & &~~68& &12&$-$.440000000E+02 &.28E-06 & .50E-05 &.0\\\ +hline +{\tt wats-6}& 0 &0&~31&~623&~~0&12& .127172748E$-$01&.42E-07 & .50E-05&.0 \\ + & 1 & & &~433& &13& .127170913E$-$01&.84E-10 & .50E-05 &.0\\\ +hline +{\tt wats-20}& 0 &0&~31&1953&~~0&32& .895554035E$-$07&.13E-05 & .50E-05 &.0\\ + & 1 & & &1023& &32& .898278737E$-$07&.13E-05 & .50E-05 &.0\\\ +hline +{\tt wong} & 0 &0&~~5&~182&~~0&19& .680630057E+03 &.40E-04 & .50E-05 &.0\\ + & 1 & & &~171& &26& .680630057E+03 &.13E-03 & .50E-05 &.0\\\ +hline +{\tt kiw1} & 0 &0&~10&~159&~~0&11& .226001621E+02 &.32E-05 & .11E-05 &.0\\ + & 1 & & &~130& &13& .226001621E+02 &.54E-05 & .60E-06 &.0\\\ +hline +{\tt kiw4} & 0 &0&~~2&~~42&~~0&~9& .222044605E$-$15&.18E-07 &.42E-07&.0 \\ + & 1 & & &~~23& &~9& .0\hspace{5.75em}~~~&.47E-07 &.15E-07 &.0 +\\\hline +{\tt mad1} & 0 &0&~~3&~~24&~~0&~5&$-$.389659516E+00 &.22E-10 & .10E-09 &.0\\ + & 1 & & &~~18& &~6&$-$.389659516E+00 &.48E-10 & .10E-09 &.0\\\ +hline +{\tt mad2} & 0 &0&~~3&~~25&~~0&~5&$-$.330357143E+00 &.22E-10 & .10E-09 &.0\\ + & 1 & & &~~21& &~6&$-$.330357143E+00 &.86E-09 & .10E-09 &.0\\\ +hline +{\tt mad4} & 0 &0&~~3&~~29&~~0&~6&$-$.448910786E+00 &.31E-17 & .10E-09 &.0\\ + & 1 & & &~~24& &~8&$-$.448910786E+00 &.38E-16 & .10E-09 &.0\\\ +hline +{\tt mad5} & 0 &0&~~3&~~31&~~0&~7&$-$.100000000E+01 &.21E-11 & .10E-09 &.0\\ + & 1 & & &~~24& &~8&$-$.100000000E+01 &.78E-14 & .10E-09 &.0\\\ +hline +{\tt mad6} & 0 &0&163&1084&~~0&~6& .113104727E+00 &.81E-11 & .10E-09 &.0\\ + & 1 & & &1141& &~7& .113104727E+00 &.21E-10 & .10E-09 &.0\\\ +hline +{\tt mad8-10}& 0&0&~18&~291&~~0&10& .381173963E+00 &.89E-11 & .10E-09 &.0\\ + & 1 & & &~252& &14& .381173963E+00 &.16E-14 & .10E-09 &.0\\\ +hline +{\tt mad8-30}& 0&0& & & & *& & & .10E-09 & \\ + & 1 & & &1102& &18& .547620496E+00 &.12E-14 & .10E-09 &.0\\\ +hline +{\tt mad8-50}& 0&0&~98&3056&~~0&21& .579276202E+00 &.86E-15 & .10E-09 &.0\\ + & 1 & & &2084& &21& .579276202E+00 &.91E-16 & .10E-09 &.0\\\ +hline +{\tt polk1} & 0 &0&~~2&~~42&~~0&10& .271828183E+01 &.50E-04 & ~$-$10.00&.0 \ +\ + & 1 & & &~~22& &10& .271828183E+01 &.68E-04 & ~$-$10.00&.0 \ +\\hline +{\tt polk2} & 0 &0&~~2&~203&~~0&42& .545981839E+02 &.28E-03 & ~$-$\,~9.00&.0 + \\ + & 1 & & &~116& &38& .545981500E+02 &.14E-02 & ~$-$\,~9.00&.0 + \\\hline +{\tt polk3} & 0 &0&~10&~188&~~0&12& .370348302E+01 &.23E-02 & ~$-$\,~5.50&.0 + \\ + & 1 & & &~141& &12& .370348272E+01 &.26E-02 & ~$-$\,~5.50&.0 + \\\hline +{\tt polk4} & 0 &0&~~3&~~45&~~0&~7&.0\hspace{5.45em}~~~ &.39E-04 & ~$-$10.00&. +0 \\ + & 1 & & &~~24& &~7& .364604254E+00 &.37E-06 & ~$-$10.00&.0 \ +\\hline +{\tt p43m} & 0 &1&~~3&~~80&~43&15&$-$.440000000E+02 &.14E-05 & .50E-05&.0\\ + &1 & & &~~63&~25&16&$-$.440000000E+02 &.46E-05 & .50E-05&.0\\\h +line +{\tt p84m} &0 &4&~~3&~~17&~20&~4&$-$.528033513E+07 &.28E-09 & .50E-05&.0\\ + &1 & & &~~~9&~12&~3&$-$.528033511E+07 &.76E-05 & .50E-05&.0\\\h +line +{\tt p113m} &0 &5&~~4&~108&127&14& .243062091E+02 &.14E-04 & .50E-05&.0\\ + &1 & & &~~84&105&14& .243062091E+02 &.29E-04 & .50E-05&.0\\\h +line +{\tt p117m} &0 &3&~~3&~124&144&21& .323486790E+02 &.43E-05 & .50E-05&.0\\ + &1 & & &~~57&~54&17& .323486790E+02 &.26E-04 & .50E-05&.0\\\h +line +\end{tabular} +} +\end{quote} + +\nopagebreak +\hspace{6em}Table 2: Results for Minimax Problems with FSQP Version 3.2 + +\newpage +\renewcommand{\baselinestretch}{0.924} % more interline spacing + \footnotesize{ +\begin{tabular}{cccccrllll} \hline +\multicolumn{1}{c}{{\tt prob}} & +\multicolumn{1}{c}{{\tt B}} & +\multicolumn{1}{c}{{\tt ncallf}} & +\multicolumn{1}{c}{{\tt ncallg}} & +\multicolumn{1}{c}{{\tt iter}} & +\multicolumn{1}{c}{{\tt objective}} & +\multicolumn{1}{c}{{\tt ktnorm}} & +\multicolumn{1}{c}{{\tt eps}} & +\multicolumn{1}{c}{{\tt epseqn}} & +\multicolumn{1}{c}{{\tt SCV}} \\ \hline \\ + + {\tt p6} &0 &~17 & ~22 &10 & .274055126E$-$11 &.42E-05 & .10E-03 &.40E +-06&.20E-09\\ + &1 &~21 & ~23 &10 & .116074629E$-$12 &.35E-05 & .10E-03 &.40E +-06&.28E-06\\\hline + {\tt p7} &0 &~57 & ~57 &13 &$-$.173205081E+01 &.12E-06 & .10E-03 &.35E-0 +8&.70E-09\\ + &1 & ~27 & ~25 & 15 &$-$.173205081E+01 &.68E-08 & .10E-03 &.35E-0 +8&.15E-09\\\hline + {\tt p26} &0 & 127 & 138 & 51 & .270576724E$-$13 &.15E-08 & .10E-03 &.16E +-04&.12E-09\\ + &1 & ~38 & ~38 & 31 & .322181110E$-$13 &.49E-08 & .10E-03 &.16E +-04&.43E-08\\\hline + {\tt p27} &0 & 153 & 147 & 44 & .399986835E$-$01 &.24E-02 & .10E-02 &.10E- +02&.38E-04\\ + &1 & 999 & 996 &130 & .399916645E$-$01 &.39E-03 & .10E-02 &.10E +-02&.21E-03\\\hline + {\tt p39} &0 &~23 & ~49 & 17 &$-$.100000000E+01 &.39E-04 & .10E-03 &.75E-0 +4&.90E-08\\ + &1 &~12 & ~25 &12 &$-$.100000000E+01 &.50E-04 & .10E-03 &.75E-0 +4&.64E-06\\\hline + {\tt p40} &0 &~~5 & ~15 & ~5 &$-$.250000002E+01 &.26E-05 & .10E-03 &.85E-0 +4&.96E-08\\ + &1 &~~5 & ~17 &~5 &$-$.250000000E+01 &.41E-04 & .10E-03 &.85E-0 +4&.43E-05\\\hline + {\tt p42} &0 &~~9 & ~10 &~6 & .138578644E+02 &.27E-05 & .10E-03 &.45E-0 +5&.51E-09\\ + &1 &~~7 & ~12 &~7 & .138578652E+02 &.26E-03 & .10E-03 &.45E-0 +5&.33E-06\\\hline + {\tt p46} &0 & ~62 & 135 &26 & .224262538E$-$10 &.11E-04 & .10E-03 &.50E +-04&.57E-10 \\ + &1 & ~56 & ~25 &14 & .461984187E$-$04 &.19E-02 & .10E-03 &.50E +-04&.95E-06\\\hline + {\tt p47} &0 & ~74 & 241 &38 & .162241544E$-$11 &.56E-06 & .10E-03 &.60E +-04&.41E-09\\ + &1 & ~50 & 282 & 36 & .308185534E$-$01 &.11E-04 & .10E-03 &.60E +-04&.26E-08 \\\hline + {\tt p56} &0 & ~31 & 147 &15 &$-$.345600000E+01 &.46E-08 & .10E-03 &.25E-0 +6&.34E-10\\ + &1 & ~14 & ~60 &14 &$-$.345600000E+01 &.88E-05 & .10E-03 &.25E-0 +6&.11E-08\\\hline + {\tt p60} &0 & ~10 & ~13 &10 & .325682003E$-$01 &.29E-05 &.10E-03 &.55E- +04&.27E-09\\ + &1 & ~~9 & ~14 &~9 & .325687946E$-$01 &.21E-03 &.10E-03 &.55E- +04&.55E-04\\\hline + {\tt p61} &0 &~18 & ~38 &~8 &$-$.143646142E+03 &.35E-04 &.10E-03 &.25E- +06&.13E-07\\ + &1 &~38 & ~17 &~9 &$-$.143646142E+03 &.67E-07 &.10E-03 &.25E- +06&.27E-12\\\hline + {\tt p63} &0 &~~8 & ~10 &~8 & .961715172E+03 &.12E-06 &.10E-03 &.60E- +05&.15E-10\\ + &1 &~~6 & ~10 &~6 & .961715172E+03 &.25E-04 &.10E-03 &.60E- +05&.65E-07\\\hline + {\tt p71} &0 &~~9 & ~24 &~8 & .170140173E+02 &.34E-07 &.10E-03 &.70E- +05&.35E-11\\ + &1 &~~6 & ~19 &~6 & .170140173E+02 &.79E-09 &.10E-03 &.70E- +05&.28E-08\\\hline + {\tt p74} &0 &~14 & ~43 &14 & .512649811E+04 &.65E-06 &.10E-03 &.65E-05 +&.21E-10\\ + &1 &~41 & 123 &41 & .512649811E+04 &.31E-04 &.10E-03 &.65E-05 +&.16E-08\\\hline + {\tt p75} &0 &~13 & ~39 &13 & .517441270E+04 &.84E-08 &.10E-03 &.10E-07 +&.25E-11\\ +* &1 &~28 & ~84 &28 & .517441270E+04 &.35E-08 &.10E-03 &.10E-07 +&.19E-08\\\hline + {\tt p77} &0 &~15 & ~37 &15 & .241505129E+00 &.30E-05 &.10E-03 &.35E-04 +&.68E-07\\ + &1 &~18 & ~48 &19 & .241505211E+00 &.61E-04 &.10E-03 &.35E-04 +&.14E-05\\\hline + {\tt p78} &0 &~~9 & ~41 &~9 &$-$.291970041E+01 &.83E-07 &.10E-03 &.15E-05 +&.45E-10\\ + &1 &~~8 & ~26 &~8 &$-$.291970041E+01 &.11E-03 &.10E-03 &.15E-05 +&.11E-08\\\hline + {\tt p79} &0 &~~7 & ~24 &~7 & .974340336E$-$01 &.12E-04 & .10E-03 &.15E +-03&.41E-07\\ + &1 &~10 & ~34 &10 & .974340336E$-$01 &.66E-05 & .10E-03 &.15E +-03&.40E-07\\\hline + {\tt p80} &0 & ~66 & 198 & 20 & .539498478E$-$01 &.25E-08 & .10E-03 &.15E +-07&.25E-12\\ + &1 & ~~7 & ~21 & ~7 & .539498478E$-$01 &.91E-08 & .10E-03 &.15E +-07&.11E-07\\\hline + {\tt p81} &0 & ~59 & 177 & 20 & .539498478E$-$01 &.55E-05 & .10E-03 &.80E +-06&.36E-09\\ + &1 & ~~8 & ~24 & ~8 & .539498419E$-$01 &.63E-05 & .10E-03 &.80E +-06&.17E-06\\\hline + {\tt p99} & 0& 111 & 269 & 38 &$-$.831079886E+09 &.17E+03 & .10E-03 &.10E +-07&.92E-09 \\ + & 1& 130 & 1229 &130 &$-$.831079886E+09 &.33E+01 & .10E-03 &.10E-0 +7&.50E-01 \\\hline + {\tt p107}&0 & ~16 & 116 & 14 & .505501180E+04 & .56E-02& .10E-03 &.10E-0 +7&.48E-09 \\ + &1 & ~16 & 109 & 16 & .505501180E+04 &.69E-03 & .10E-03 &.10E-0 +7&.39E-09\\\hline + {\tt p109}&0 & & & * & & & .10E-03 &.10E-0 +7& \\ + &1 & & & * & & & .10E-03 &.10E-0 +7& \\\hline + {\tt p114}&0 & & & * & & & .10E-02 &.10E-0 +3& \\ + &1 &18241 & 941 &924 &$-$.176880696E+04 &.51E-05 & .10E-02 &.10E-0 +3&.22E-12 \\\hline +\end{tabular} +} + +\nopagebreak +\vspace{0.4em} +\hspace{8em}Table 3: Results for General Problems with FSQP Version 3.2 + +\end{document}
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/manual.sty @@ -0,0 +1,384 @@ +% manual.sty 9-Jun-87 + +\typeout{Document Style `manual' <9 Jun 87>.} + + +\def\@ptsize{0} \@namedef{ds@11pt}{\def\@ptsize{1}} +\@namedef{ds@12pt}{\def\@ptsize{2}} +\def\ds@twoside{\@twosidetrue \@mparswitchtrue} +\def\ds@draft{\overfullrule +5pt} +\@options +% art12.sty 9-Jun-87 + +\lineskip 1pt \normallineskip 1pt +\def\baselinestretch{1} + +\def\@normalsize{\@setsize\normalsize{14.5pt}\xiipt\@xiipt +\abovedisplayskip 12pt plus3pt minus7pt\belowdisplayskip +\abovedisplayskip +\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt +minus3pt\let\@listi\@listI} +\def\small{\@setsize\small{13.6pt}\xipt\@xipt +\abovedisplayskip 11pt plus3pt minus6pt\belowdisplayskip +\abovedisplayskip +\abovedisplayshortskip \z@ plus3pt\belowdisplayshortskip 6.5pt plus3.5pt +minus3pt +\def\@listi{\parsep 4.5pt plus 2pt minus 1pt + \itemsep \parsep + \topsep 9pt plus 3pt minus 5pt}} +\def\footnotesize{\@setsize\footnotesize{12pt}\xpt\@xpt +\abovedisplayskip 10pt plus2pt minus5pt\belowdisplayskip +\abovedisplayskip +\abovedisplayshortskip \z@ plus3pt +\belowdisplayshortskip 6pt plus3pt minus3pt +\def\@listi{\topsep 6pt plus 2pt minus 2pt\parsep 3pt plus 2pt minus 1pt +\itemsep \parsep}} +\def\scriptsize{\@setsize\scriptsize{9.5pt}\viiipt\@viiipt} +\def\tiny{\@setsize\tiny{7pt}\vipt\@vipt} +\def\large{\@setsize\large{18pt}\xivpt\@xivpt} +\def\Large{\@setsize\Large{22pt}\xviipt\@xviipt} +\def\LARGE{\@setsize\LARGE{25pt}\xxpt\@xxpt} +\def\huge{\@setsize\huge{30pt}\xxvpt\@xxvpt} +\let\Huge=\huge +\normalsize + +\if@twoside \oddsidemargin 21pt \evensidemargin 59pt +\marginparwidth 85pt +\else \oddsidemargin 39.5pt \evensidemargin 39.5pt + \marginparwidth 68pt +\fi +\marginparsep 10pt + \topmargin 27pt \headheight 12pt \headsep 25pt \footskip 30pt + +\textheight = 36\baselineskip +\advance\textheight by \topskip +\textwidth 390pt \columnsep 10pt \columnseprule 0pt + +\footnotesep 8.4pt +\skip\footins 10.8pt plus 4pt minus 2pt +\floatsep 14pt plus 2pt minus 4pt \textfloatsep 20pt plus 2pt minus 4pt +\intextsep 14pt plus 4pt minus 4pt \@maxsep 20pt +\dblfloatsep 14pt plus 2pt +minus 4pt \dbltextfloatsep 20pt plus 2pt minus 4pt \@dblmaxsep 20pt +\@fptop 0pt plus 1fil \@fpsep 10pt plus 2fil \@fpbot 0pt plus 1fil +\@dblfptop 0pt plus 1fil \@dblfpsep 10pt plus 2fil +\@dblfpbot 0pt plus 1fil +\marginparpush 7pt + +\parskip 0pt plus 1pt \parindent 1.5em \partopsep 3pt plus 2pt minus 2pt +\@lowpenalty 51 \@medpenalty 151 \@highpenalty 301 +\@beginparpenalty -\@lowpenalty \@endparpenalty -\@lowpenalty +\@itempenalty +-\@lowpenalty + + +\def\part{\par \addvspace{4ex} \@afterindentfalse \secdef\@part\@spart} +\def\@part[#1]#2{\ifnum \c@secnumdepth >\m@ne \refstepcounter{part} +\addcontentsline{toc}{part}{\thepart \hspace{1em}#1}\else +\addcontentsline{toc}{part}{#1}\fi { \parindent 0pt \raggedright + \ifnum \c@secnumdepth >\m@ne \Large \bf Part +\thepart \par\nobreak \fi \huge +\bf #2\markboth{}{}\par } \nobreak \vskip 3ex \@afterheading } +\def\@spart#1{{\parindent 0pt \raggedright + \huge \bf + #1\par} \nobreak \vskip 3ex \@afterheading } +\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus + -.2ex}{2.3ex plus .2ex}{\bf}} +\def\subsection{\@startsection{subsection}{2}{\z@} +{-3.25ex plus -1ex minus + -.2ex}{1.5ex plus .2ex}{\normalsize\bf}} +\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{-3.25ex plus + -1ex minus -.2ex}{1.5ex plus .2ex}{\normalsize\bf}} +\def\paragraph{\@startsection + {paragraph}{4}{\z@}{3.25ex plus 1ex minus .2ex}{-1em}{\normalsize\bf}} +\def\subparagraph{\@startsection + {subparagraph}{4}{\parindent}{3.25ex plus 1ex minus + .2ex}{-1em}{\normalsize\bf}} + + +\setcounter{secnumdepth}{3} + +\def\appendix{\par + \setcounter{section}{0} + \setcounter{subsection}{0} + \def\thesection{\Alph{section}}} + + +\leftmargini 2.5em +\leftmarginii 2.2em \leftmarginiii 1.87em +\leftmarginiv 1.7em \leftmarginv 1em +\leftmarginvi 1em +\leftmargin\leftmargini +\labelsep .5em +\labelwidth\leftmargini\advance\labelwidth-\labelsep +\def\@listI{\leftmargin\leftmargini +\parsep 5pt plus 2.5pt minus 1pt\topsep +10pt plus 4pt minus 6pt\itemsep 5pt plus 2.5pt minus 1pt} +\let\@listi\@listI +\@listi +\def\@listii{\leftmargin\leftmarginii + \labelwidth\leftmarginii\advance\labelwidth-\labelsep + \topsep 5pt plus 2.5pt minus 1pt + \parsep 2.5pt plus 1pt minus 1pt + \itemsep \parsep} +\def\@listiii{\leftmargin\leftmarginiii + \labelwidth\leftmarginiii\advance\labelwidth-\labelsep + \topsep 2.5pt plus 1pt minus 1pt + \parsep \z@ \partopsep 1pt plus 0pt minus 1pt + \itemsep \topsep} +\def\@listiv{\leftmargin\leftmarginiv + \labelwidth\leftmarginiv\advance\labelwidth-\labelsep} +\def\@listv{\leftmargin\leftmarginv + \labelwidth\leftmarginv\advance\labelwidth-\labelsep} +\def\@listvi{\leftmargin\leftmarginvi + \labelwidth\leftmarginvi\advance\labelwidth-\labelsep} +\relax + + +\def\labelenumi{\arabic{enumi}.} +\def\theenumi{\arabic{enumi}} +\def\labelenumii{(\alph{enumii})} +\def\theenumii{\alph{enumii}} +\def\p@enumii{\theenumi} +\def\labelenumiii{\roman{enumiii}.} +\def\theenumiii{\roman{enumiii}} +\def\p@enumiii{\theenumi(\theenumii)} +\def\labelenumiv{\Alph{enumiv}.} +\def\theenumiv{\Alph{enumiv}} +\def\p@enumiv{\p@enumiii\theenumiii} + +\def\labelitemi{$\bullet$} +\def\labelitemii{\bf --} +\def\labelitemiii{$\ast$} +\def\labelitemiv{$\cdot$} + +\def\verse{\let\\=\@centercr + \list{}{\itemsep\z@ \itemindent -1.5em\listparindent \itemindent + \rightmargin\leftmargin\advance\leftmargin 1.5em}\item[]} +\let\endverse\endlist +\def\quotation{\list{}{\listparindent 1.5em + \itemindent\listparindent + \rightmargin\leftmargin \parsep 0pt plus 1pt}\item[]} +\let\endquotation=\endlist +\def\quote{\list{}{\rightmargin\leftmargin}\item[]} +\let\endquote=\endlist + +%\def\descriptionlabel#1{\hspace\labelsep \bf #1} +%\def\description{\list{}{\labelwidth\z@ \itemindent-\leftmargin +% \let\makelabel\descriptionlabel}} +%\let\enddescription\endlist + +\def\descriptionlabel#1{\it #1 \hfill} +\def\description{\list{}{\labelwidth=0.7in +\itemindent=0in \leftmargin=0.9in + \labelsep=0in \let\makelabel\descriptionlabel}} +\let\enddescription\endlist + +\def\describelabel#1{\hspace{0.1in} \tt #1 \hfill} +\def\describe{\list{}{\labelwidth=0.8in +\itemindent=0in \leftmargin=0.8in + \labelsep=0in \let\makelabel\describelabel}} +\let\enddescribe\endlist + + + +\def\theequation{\arabic{equation}} + + +\def\titlepage{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn + \else \newpage \fi \thispagestyle{empty}\c@page\z@} +\def\endtitlepage{\if@restonecol\twocolumn \else \newpage \fi} + +\arraycolsep 5pt \tabcolsep 6pt \arrayrulewidth .4pt \doublerulesep 2pt +\tabbingsep \labelsep + +\skip\@mpfootins = \skip\footins +\fboxsep = 3pt \fboxrule = .4pt + +\newcounter{part} +\newcounter {section} +\newcounter {subsection}[section] +\newcounter {subsubsection}[subsection] +\newcounter {paragraph}[subsubsection] +\newcounter {subparagraph}[paragraph] + +\def\thepart{\Roman{part}} \def\thesection {\arabic{section}} +\def\thesubsection {\thesection.\arabic{subsection}} +\def\thesubsubsection {\thesubsection .\arabic{subsubsection}} +\def\theparagraph {\thesubsubsection.\arabic{paragraph}} +\def\thesubparagraph {\theparagraph.\arabic{subparagraph}} + +\def\@pnumwidth{1.55em} +\def\@tocrmarg {2.55em} +\def\@dotsep{4.5} +\setcounter{tocdepth}{3} + +\def\tableofcontents{\section*{Contents\@mkboth{CONTENTS}{CONTENTS}} + \@starttoc{toc}} +\def\l@part#1#2{\addpenalty{\@secpenalty} + \addvspace{2.25em plus 1pt} \begingroup + \@tempdima 3em \parindent \z@ \rightskip \@pnumwidth \parfillskip +-\@pnumwidth + {\large \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}}\par + \nobreak \endgroup} +\def\l@section#1#2{\addpenalty{\@secpenalty} \addvspace{1.0em plus 1pt} +\@tempdima 1.5em \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \bf \leavevmode #1\hfil \hbox to\@pnumwidth{\hss #2}\par + \endgroup} +\def\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} +\def\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} +\def\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} +\def\l@subparagraph{\@dottedtocline{5}{10em}{5em}} +\def\listoffigures{\section*{List of Figures\@mkboth + {LIST OF FIGURES}{LIST OF FIGURES}}\@starttoc{lof}} +\def\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} +\def\listoftables{\section*{List of Tables\@mkboth + {LIST OF TABLES}{LIST OF TABLES}}\@starttoc{lot}} +\let\l@table\l@figure + + +\def\thebibliography#1{\section*{References\@mkboth + {REFERENCES}{REFERENCES}}\list + {[\arabic{enumi}]}{\settowidth\labelwidth{[#1]}\leftmargin\labelwidth + \advance\leftmargin\labelsep + \usecounter{enumi}} + \def\newblock{\hskip .11em plus .33em minus -.07em} + \sloppy\clubpenalty4000\widowpenalty4000 + \sfcode`\.=1000\relax} +\let\endthebibliography=\endlist + + +\newif\if@restonecol +\def\theindex{\@restonecoltrue\if@twocolumn\@restonecolfalse\fi +\columnseprule \z@ +\columnsep 35pt\twocolumn[\section*{Index}] + \@mkboth{INDEX}{INDEX}\thispagestyle{plain}\parindent\z@ + \parskip\z@ plus .3pt\relax\let\item\@idxitem} +\def\@idxitem{\par\hangindent 40pt} +\def\subitem{\par\hangindent 40pt \hspace*{20pt}} +\def\subsubitem{\par\hangindent 40pt \hspace*{30pt}} +\def\endtheindex{\if@restonecol\onecolumn\else\clearpage\fi} +\def\indexspace{\par \vskip 10pt plus 5pt minus 3pt\relax} + +\def\footnoterule{\kern-3\p@ + \hrule width .4\columnwidth + \kern 2.6\p@} + +\long\def\@makefntext#1{\parindent 1em\noindent + \hbox to 1.8em{\hss$^{\@thefnmark}$}#1} + + +\setcounter{topnumber}{2} +\def\topfraction{.7} +\setcounter{bottomnumber}{1} +\def\bottomfraction{.3} +\setcounter{totalnumber}{3} +\def\textfraction{.2} +\def\floatpagefraction{.5} +\setcounter{dbltopnumber}{2} +\def\dbltopfraction{.7} +\def\dblfloatpagefraction{.5} + +\long\def\@makecaption#1#2{ + \vskip 10pt + \setbox\@tempboxa\hbox{#1: #2} + \ifdim \wd\@tempboxa >\hsize #1: #2\par \else \hbox +to\hsize{\hfil\box\@tempboxa\hfil} + \fi} + + +\newcounter{figure} +\def\thefigure{\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{Figure \thefigure} +\def\figure{\@float{figure}} +\let\endfigure\end@float +\@namedef{figure*}{\@dblfloat{figure}} +\@namedef{endfigure*}{\end@dblfloat} +\newcounter{table} +\def\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{Table \thetable} +\def\table{\@float{table}} +\let\endtable\end@float +\@namedef{table*}{\@dblfloat{table}} +\@namedef{endtable*}{\end@dblfloat} + + +\def\maketitle{\par + \begingroup + \def\thefootnote{\fnsymbol{footnote}} + \def\@makefnmark{\hbox + to 0pt{$^{\@thefnmark}$\hss}} + \if@twocolumn + \twocolumn[\@maketitle] + \else \newpage + \global\@topnum\z@ \@maketitle \fi\thispagestyle{plain}\@thanks + \endgroup + \setcounter{footnote}{0} + \let\maketitle\relax + \let\@maketitle\relax + \gdef\@thanks{}\gdef\@author{}\gdef\@title{}\let\thanks\relax} +\def\@maketitle{\newpage + \null + \vskip 2em \begin{center} + {\@title \par} \vskip 1.5em {\normalsize \lineskip .5em +\begin{tabular}[t]{c}\@author + \end{tabular}\par} + \par + \vskip 1.5em} +\def\abstract{\if@twocolumn +\section*{Abstract} +\else \small +\begin{center} +{\normalsize\bf Abstract\vspace{-.5em}\vspace{0pt}} +\end{center} +\quotation +\fi} +\def\endabstract{\if@twocolumn\else\endquotation\fi} + +\mark{{}{}} + +\if@twoside \def\ps@headings{\let\@mkboth\markboth +\def\@oddfoot{}\def\@evenfoot{}\def\@evenhead{\rm \thepage\hfil \sl +\leftmark}\def\@oddhead{\hbox{}\sl \rightmark \hfil +\rm\thepage}\def\sectionmark##1{\markboth +{\uppercase{\ifnum \c@secnumdepth +>\z@ + \thesection\hskip 1em\relax \fi ##1}}{}} +\def\subsectionmark##1{\markright +{\ifnum \c@secnumdepth >\@ne + \thesubsection\hskip 1em\relax \fi ##1}}} +\else \def\ps@headings{\let\@mkboth\markboth +\def\@oddfoot{}\def\@evenfoot{}\def\@oddhead{\hbox {} +\sl \rightmark \hfil +\rm\thepage}\def\sectionmark##1{\markright +{\uppercase{\ifnum \c@secnumdepth +>\z@ + \thesection\hskip 1em\relax \fi ##1}}}} +\fi +%\def\ps@myheadings{\let\@mkboth\@gobbletwo +%\def\@oddhead{\hbox{}\sl\rightmark \hfil +%\rm\thepage}\def\@oddfoot{}\def\@evenhead{\rm +%\thepage\hfil\sl\leftmark\hbox +%{}}\def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}} +\def\ps@myheadings{\let\@mkboth\@gobbletwo +\def\@oddhead{\hbox{}\hfil +\rm\thepage\hfil}\def\@oddfoot{}\def\@evenhead{\hfil\rm +\thepage\hfil\hbox +{}}\def\@evenfoot{}\def\sectionmark##1{}\def\subsectionmark##1{}} + +\def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} + +\ps@plain \pagenumbering{arabic} \onecolumn +\if@twoside\else\raggedbottom\fi
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/manual.tex @@ -0,0 +1,2774 @@ +\input macros.tex +\documentstyle[12pt]{manual} +\pagestyle{myheadings} +\markboth{User's Guide for FSQP}{User's Guide for FSQP} +\renewcommand{\baselinestretch}{1.08} % more interline spacing + \textheight=8.3in +\topmargin=-.2in +\textwidth=6.5in +\oddsidemargin=-.15cm +\tolerance=1000 % to avoid overfull boxes + \pagenumbering{arabic} +\begin{document} +\thispagestyle{empty} +\begin{titlepage} +\begin{center} +{\large \bf User's Guide for FSQP Version 3.2:\\ +\vspace{1mm} + A FORTRAN Code for Solving Constrained Nonlinear \\ +\vspace{1mm} + (Minimax) Optimization Problems, Generating Iterates \\ +\vspace{1mm} + Satisfying All Inequality and Linear Constraints\footnote{ +This research was supported in part by NSF's Engineering Research Centers +Program No. NSFD-CDR-88-03012, by NSF grant No. DMC-88-15996 and by a grant +from the Westinghouse Corporation.}}\\ +\vspace{4mm} + {\it Jian L. Zhou and Andr\'{e} L. Tits} \\ +\vspace{4mm} + Electrical Engineering Department\\ + and\\ + Institute for Systems Research\\ + University of Maryland, College Park, MD 20742\\ + (Systems Research Center TR-92-107r2) +\end{center} +\vspace{3mm} +\noindent{\bf Abstract} +\vspace{1em} + +\hspace{4mm}FSQP 3.2 is a set of FORTRAN subroutines +for the minimization of the maximum of a set of smooth +objective functions (possibly a single one) subject to +general smooth constraints. +If the initial guess provided by the user is infeasible for +some inequality constraint or some linear equality constraint, FSQP first +generates a feasible point for these constraints; +subsequently the successive iterates generated by +FSQP all satisfy these constraints. Nonlinear equality constraints +are turned into inequality constraints (to be satisfied by all iterates) +and the maximum of the objective functions is replaced +by an exact penalty function which +penalizes nonlinear equality constraint violations only. +The user has the option of either +requiring that the (modified) objective function decrease +at each iteration after feasibility for nonlinear inequality and +linear constraints has been reached (monotone line search), or +requiring a decrease within at most four iterations (nonmonotone line search). +He/She must provide subroutines that define the objective functions +and constraint functions and may either provide subroutines +to compute the gradients of these functions or require that FSQP +estimate them by forward finite differences. + +\hspace{4mm} FSQP 3.2 implements two algorithms based on Sequential +Quadratic Programming~(SQP),~modified so as to generate +feasible iterates. In the first one (monotone line search), a certain +Armijo type arc search is used with the property that the step of one +is eventually accepted, a requirement for superlinear convergence. +In the second one the same effect is achieved by means +of a (nonmonotone) search along a straight line. The merit function +used in both searches is the maximum of the objective functions if +there is no nonlinear equality constraint. +\end{titlepage} + +\begin{titlepage} +\centerline{\bf Conditions for External Use} +\bigskip +\begin{enumerate} +\item The FSQP routines may not be distributed to third parties. + Interested parties should contact the authors directly. +\item If modifications are performed on the routines, these + modifications will be communicated to the authors. + The modified routines will remain + the sole property of the authors. +\item Due acknowledgment must be made of the use of the FSQP routines in + research reports or publications. A copy of such reports or + publications should be forwarded to the authors. +\item The FSQP routines may not be used in industrial production, + unless this has been agreed upon with the authors in writing. +\end{enumerate} + +\bigskip\noindent +{\bf User's Guide for FSQP Version 3.2 (Released March 1993)} \\ +Copyright {\copyright} 1989 --- 1993 by Jian L. Zhou and Andr\'e L. Tits\\ +All Rights Reserved. +%Copyright {\copyright} 1993, University of Maryland at College Park. +%All Rights Reserved. \\ +%(Developed by Jian L. Zhou and Andr\'e L. Tits.) + +\bigskip +\bigskip +\noindent Enquiries should be directed to + +\bigskip +\hspace{5em}Prof. Andr\'e L. Tits + +\hspace{5em}Electrical Engineering Dept. + +\hspace{5em}and Institute for Systems Research + +\hspace{5em}University of Maryland + +\hspace{5em}College Park, Md 20742 + +\hspace{5em}U. S. A. + +\smallskip +\hspace{5em}Phone$\,\,$:~~~301-405-3669 + +\hspace{5em}Fax~~~$\,\;$:~~~301-405-6707 + +\hspace{5em}E-mail$\,$:~~~andre@src.umd.edu +\end{titlepage} + +%\begin{titlepage} +\tableofcontents +%\end{titlepage} + +\newpage +\section{Introduction} +\label{intro} +FSQP~(Feasible Sequential Quadratic Programming) 3.2 +is a set of FORTRAN subroutines +for the minimization of the maximum of a set of smooth +objective functions (possibly a single one) subject to +nonlinear equality and inequality constraints, +linear equality and inequality constraints, +and simple bounds on the variables. Specifically, FSQP +tackles optimization problems of the form +\smallskip +$$ + (P)~~~~~~ \min ~ \max\limits_{i\in I^f} \{f_i(x)\} + \mbox{~~~s.t.~~}x\in X +$$ +where $I^f=\{1,\ldots,n_f\}$ and $X$ is the set of point $x\in R^n$ +satisfying +$$\begin{array}{l} + bl \leq x \leq bu \\ + g_j(x) \leq 0,~~~j=1,\ldots,n_i\\ + g_j(x)\equiv \langle c_{j-n_i},x\rangle - d_{j-n_i} \leq 0, + ~~~j=n_i+1,\ldots,t_i \\ + h_j(x)=0,~~~j=1,\ldots,n_e\\ + h_j(x)\equiv\langle a_{j-n_e},x \rangle-b_{j-n_e}=0, ~~~j=n_e+1,\ldots,t_ +e +\end{array}$$ +with $bl\in R^n$; $bu\in R^n$; +$f_i:R^n\rightarrow R,$ $i=1,\ldots,n_f$ smooth; +$g_j:R^n\rightarrow R,~j=1,\ldots,n_i$ nonlinear and smooth; +$c_j\in R^n$, $d_j\in R$, $j=1,\ldots,t_i-n_i$; +$h_j:R^n\rightarrow R,~j=1,\ldots,n_e$ nonlinear and smooth; +$a_j\in R^n$, $b_j\in R$, $j=1,\ldots,t_e-n_e$. + +If the initial guess provided by the user is infeasible for nonlinear +inequality constraints and linear constraints, FSQP first +generates a point satisfying all these constraints +by iterating on the problem of minimizing +the maximum of these constraints. Then, +using Mayne-Polak's scheme\Lspace \Lcitemark 1\Rcitemark \Rspace{}, +nonlinear equality constraints are turned into +inequality constraints\footnote{For every $j$ for which $h_j(x_0)>0$ +($x_0$ is the initial point), ``$h_j(x)=0$'' is first replaced by +``$-h_j(x)=0$'' and $-h_j$ is renamed $h_j$.} +$$h_j(x)\leq 0,~~~~j=1,\ldots,n_e$$ +and the original objective function $\max_{i\in I^f}\{f_i(x)\}$ +is replaced by the modified objective function +$$f_m(x,p)=\max\limits_{i\in I^f}\{f_i(x)\}-\sum_{j=1}^{n_e}p_jh_j(x),$$ +where $p_j$, $j=1,\ldots,n_e$, are positive penalty parameters +and are iteratively adjusted. +The resulting optimization problem therefore involves only +linear constraints and nonlinear inequality constraints. +Subsequently, the successive iterates generated by +FSQP all satisfy these constraints. The user has the option of +either requiring that the exact penalty function +(the maximum value of the objective functions if without nonlinear equality +constraints) decrease at each iteration after feasibility for +original nonlinear inequality and linear constraints has been reached, +or requiring a decrease within at most three iterations. +He/She must provide subroutines that define the objective functions +and constraint functions and may either provide subroutines +to compute the gradients of these functions or require that FSQP +estimate them by forward finite differences. + +Thus, FSQP 3.2 solves the original problem with nonlinear equality constraints +by solving a modified optimization problem with only linear constraints +and nonlinear inequality constraints. For the transformed problem, +it implements algorithms that are described +and analyzed in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +\Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \Rspace{}, w +ith some additional refinements. +These algorithms are based on a Sequential Quadratic Programming~(SQP) +iteration, modified so as to generate feasible iterates. +The merit function is the objective function. +An Armijo-type line search is used to generate an initial feasible point +when required. +After obtaining feasibility, either $(i)$ an Armijo-type line +search may be used, yielding a monotone decrease of the +objective function at each iteration\Lspace \Lcitemark 2\Rcitemark \Rspace{}; +or $(ii)$ a nonmonotone line +search (inspired from\Lspace \Lcitemark 5\Rcitemark \Rspace{} and analyzed +in\Lspace \Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \R +space{} in this context) +may be selected, forcing a decrease of +the objective function within at most four iterations. +In the monotone line search scheme, the SQP direction is first +``tilted'' if nonlinear constraints are present +to yield a feasible direction, then possibly ``bent'' to ensure +that close to a solution the step of one is accepted, +a requirement for superlinear convergence. +The nonmonotone line search scheme achieves superlinear convergence +with no bending of the search direction, thus avoiding function +evaluations at auxiliary points and subsequent solution of +an additional quadratic program. After turning nonlinear equality +constraints into inequality constraints, these algorithms are +used directly to solve the modified problems. Certain procedures +(see, e.g.,\Lspace \Lcitemark 6\Rcitemark \Rspace{}) +are adopted to obtain proper values of $p_j$'s in order to +ensure that a solution of the modified problem is also a solution +of the original problem, as described below. + +For the solution of the quadratic programming subproblems, FSQP 3.2 +is set up to call QLD\Lspace \Lcitemark 7\Rcitemark \Rspace{} which is provided + +with the FSQP distribution for the user's convenience. + +\section{Description of the Algorithms} +\label{algo} +The algorithms described and analyzed +in\Lspace \Lcitemark 2\Rcitemark \Rspace{},\Lspace \Lcitemark 3\Rcitemark \Rspa +ce{} +and\Lspace \Lcitemark 4\Rcitemark \Rspace{} are as follows. +Given a feasible iterate $x$, the basic SQP direction +$d^0$ is first computed by solving a standard quadratic program +using a positive definite estimate $H$ of +the Hessian of the Lagrangian. +$d^0$ is a direction of descent for the objective function; it is +almost feasible in the sense that it is at worst tangent to +the feasible set if there are nonlinear constraints and it is feasible +otherwise. + +In\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +an essentially arbitrary feasible descent direction $d^1=d^{1}(x)$ is +then computed. Then for a certain +scalar $\rho =\rho (x)\in [0,1]$, a feasible descent +direction $d=(1-\rho)d^0+\rho d^1$ is obtained, asymptotically +close to $d^0.$ Finally a second order +correction $\tilde d=\tilde{d}(x,d,H)$ is computed, involving +auxiliary function evaluations at $x+d,$ +and an Armijo type search is performed along the +arc $x+td+t^2 \tilde d.$ +The purpose of $\tilde d$ is to allow a full step of one to be taken +close to a solution, thus allowing superlinear convergence to +take place. Conditions are given +in\Lspace \Lcitemark 2\Rcitemark \Rspace{} on +$d^{1}(\cdot)$, $\rho(\cdot)$ and $\tilde d(\cdot ,\cdot)$ +that result in a globally convergent, +locally superlinear convergent algorithm. + +The algorithm in\Lspace \Lcitemark 3\Rcitemark \Rspace{} is somewhat +more sophisticated. An essential difference is that while feasibility +is still required, the requirement of decrease of the max objective +value is replaced by the weaker requirement that the max +objective value at the new point be lower than its maximum over the last +four iterates. The main payoff is that the auxiliary function +evaluations +can be dispensed with, except possibly at the first few iterations. +First a direction $d^1=d^1(x)$ is computed, which is feasible even at +Karush-Kuhn-Tucker points. Then for a certain +scalar $\rho ^{\ell} =\rho ^{\ell}(x)\in [0,1],$ +a ``local'' feasible +direction $d ^{\ell}=(1-\rho ^{\ell})d^0+\rho ^{\ell}d^1$ is obtained, +and at $x+d^{\ell}$ the objective functions are tested +and feasibility is +checked. If the requirements pointed out above are satisfied, $x+d^\ell$ +is accepted as next iterate. This will always be the case close to a +solution. Whenever $x+d^\ell$ is not accepted, a ``global'' +feasible {\it descent} +direction $d ^g=(1-\rho ^g)d^0+\rho ^gd^1$ is obtained with +$\rho ^g =\rho ^g(x)\in [0,\rho ^{\ell}].$ +A second order correction $\tilde d=\tilde{d}(x,d^g,H)$ is computed +the same way as in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +and a ``nonmonotone'' search is performed along the +arc $x+td^g+t^2 \tilde d.$ +Here the purpose of $\tilde d$ +is to suitably initialize the sequence for the ``four iterate'' rule. +Conditions are given in\Lspace \Lcitemark 3\Rcitemark \Rspace{} on +$d^{1}(\cdot)$, $\rho ^{\ell}(\cdot)$, $\rho ^g(\cdot)$, +and $\tilde d(\cdot ,\cdot)$ that result in a +globally convergent, locally superlinear convergent algorithm. +In\Lspace \Lcitemark 4\Rcitemark \Rspace{}, the algorithm of\Lspace \Lcitemark +3\Rcitemark \Rspace{} is refined +for the case of unconstrained minimax problems. +The major difference over the algorithm of\Lspace \Lcitemark 3\Rcitemark \Rspac +e{} +is that there is no need of $d^1$. +As in\Lspace \Lcitemark 3\Rcitemark \Rspace{}, $\tilde d$ is required to initia +lize superlinear +convergence. + +The FSQP implementation corresponds to a specific choice of +$d^1(\cdot)$, $\rho(\cdot)$, $\tilde{d}(\cdot,\cdot)$, +$\rho^\ell(\cdot)$, and $\rho^g(\cdot)$, +with some modifications as follows. If the first algorithm +is used, $d^1$ is computed as +a function not only of $x$ but also of $d^0$~(thus of $H$), as it +appears beneficial to keep $d^1$ relatively close to $d^0$. +In the case of the second algorithm, the construction +of $d^{\ell}$ is modified so that the function +evaluations at different auxiliary points can +be avoided during early iteration +when $\rho ^g\neq \rho ^{\ell}$; +the quadratic program that yields $\tilde{d}$ involves only a +subset of ``active'' functions, thus decreasing the number +of function evaluations. +The details are given below. +The analysis in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +\Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \Rspace{} +can be easily extended to these modified algorithms. +Also obvious simplifications are introduced concerning +linear constraints: the iterates are allowed (for inequality constraints) +or are forced (for equality constraints) to stay +on the boundary of these constraints and these constraints +are not checked in the line search. Finally, FSQP automatically switches to +a ``phase 1'' mode if the initial guess provided by +the user is not in the feasible set. + +Below we call FSQP-AL +the algorithm with the Armijo line search, and FSQP-NL the algorithm +with nonmonotone line search. We make use of the notations +$$f_{I^f}(x)=\max\limits _{i\in I^f} \{f_i(x)\}$$ +$$f'(x,d,p)=\max\limits_{i\in I^f}\{f_i(x)+ + \langle \nabla f_i(x),d\rangle\} - f_{I^f}(x) + -\sum\limits_{j=1}^{n_e}p_j\langle\nabla h_j(x),d\rangle$$ +and, for any subset $I\subset I^f$, +$$\tilde {f}'_I(x+d,x,\tilde d,p)=\max\limits_{i\in I}\{f_i(x+d)+ + \langle \nabla f_i(x),\tilde d\rangle\} - f_{I}(x+d) + -\sum\limits_{j=1}^{n_e}p_j\langle\nabla h_j(x),\tilde d\rangle.$$ +At each iteration $k$, the quadratic program $QP(x_k,H_k,p_k)$ that yields +the SQP direction $d^0_k$ is defined +at $x_k$ for $H_k$ symmetric positive definite by +\smallskip +$$\begin{array}{ll} + \min\limits_{d^0\in R^n}~~ & {1 \over {2}}\langle {d^0},H_k {d^0} + \rangle+f'(x_k,d^0,p_k) \\ + {\rm ~~s.t.} & bl \leq x_k+d^0 \leq bu \\ + & g_j(x_k)+\langle\nabla g_j(x_k),d^0 \rangle + \leq 0, ~~~j=1,\ldots , t_i \\ + & h_j(x_k)+\langle\nabla h_j(x_k),d^0 \rangle + \leq 0, ~~~j=1,\ldots ,n_e \\ + & \langle a_j,x_k + d^0 \rangle=b_j, + ~~~j=1,\ldots , t_e-n_e. \end{array}$$ +Let $\zeta _{k,j}$'s with $\sum_{j=1}^{n_f} \zeta _{k,j} =1$, +$\xi_{k,j}$'s, $\lambda _{k,j}$'s, and $\mu_{k,j}$'s denote +the multipliers, for the various objective functions, simple +bounds (only $n$ possible active bounds at each iteration), inequality, +and equality constraints respectively, associated +with this quadratic program. +Define the set of active objective functions, +for any $i$ such that $\zeta_{k,i}>0$, by +$$ +I^f_k(d_k)=\{j\in I^f: |f_j(x_k)-f_i(x_k)|\leq +0.2\|d_k\|\cdot\|\nabla f_j(x_k)-\nabla f_i(x_k)\|\} +\cup\{j\in I^f:\zeta_{k,j}>0\} +$$ +and the set of active constraints by +$$ +I^g_k(d_k)\!=\!\{j\!\in\!\{1,\ldots,t_i\}:|g_j(x_k)|\leq +0.2\|d_k\|\cdot\|\nabla g_j(x_k)\|\} +\cup\{j\in\{1,\ldots,t_i\}:\lambda_{k,j}>0\}. +$$ + +\vspace{1em} +\noindent{\bf Algorithm FSQP-AL.} + +\vspace{1em} +\noindent{\it Parameters.} $\eta =0.1$, $\nu=0.01$, $\alpha=0.1$, +$\beta=0.5$, $\kappa = 2.1$, $\tau _1=\tau _2 = 2.5$, $\underline t=0.1$, +$\epsilon_1=1$, $\epsilon_2=10$, $\delta=5$. + +\smallskip +\noindent{\it Data.} $x_0\in R^n$, $\epsilon > 0$, $\epsilon_e>0$ and +$p_{0,j}=\epsilon_2$ for $j=1,\ldots,n_e$. + +\smallskip +\noindent{\it Step 0: Initialization.} Set $k=0$ and $H_0=$ the +identity matrix. Set $nset=0$. If $x_0$ is infeasible for some constraint +other than a nonlinear equality constraint, +substitute a feasible point, obtained as discussed below. +For $j=1,\ldots,n_e$, replace $h_j(x)$ by $-h_j(x)$ whenever +$h_j(x_0)>0$. + +\smallskip +\noindent{\it Step 1: Computation of a search arc.} + +\begin{itemize} +\item[\it i.]Compute $d_{k}^{0}$, the solution of the quadratic program +$QP(x_k,H_k,p_k)$. +If $\|d_k^0\|\leq \epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq \epsilon_e$, stop. +If $n_i+n_e=0$ and $n_f=1,$ set $d_k=d^0_k$ and $\tilde d_k =0$ and +go to {\it Step~2}. If $n_i+n_e=0$ and $n_f > 1$, set $d_k=d^0_k$ and +go to {\it Step~1~iv}. + +\item[\it ii.]Compute $d_{k}^{1}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{ll} \min\limits_{d^1\in R^n,\gamma \in R} + & \frac{\eta}{2} + \langle d_{k}^{0}-d^1,d_{k}^{0}-d^1 \rangle +\gamma \\ + {\rm ~~~~s.t.} & bl \leq x_k+d^1 \leq bu\\ + & f'(x_k,d^1,p_k) \leq \gamma\\ + & g_j(x_k)+\langle \nabla g_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_i\\ + & \langle c_j,x_k + d^1 \rangle \leq d_j, + ~~~~j=1,\ldots,t_i-n_i \\ + & h_j(x_k)+\langle \nabla h_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k + d^1 \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +\smallskip +\item[\it iii.] Set $d_k=(1-\rho_k)d_k^0+\rho_kd_k^1$~ + with $\rho_k=\|d_k^0\|^{\kappa}/(\|d_k^0\|^{\kappa}+v_k)$,~ + where $v_k = \max(0.5,~\|d_k^1\|^{\tau _1}).$ + +\item[\it iv.] +Compute $\tilde d_k$ by solving the strictly convex +quadratic program +\smallskip +$$\begin{array}{ll} \min\limits_{\tilde d \in R^n} & \frac{1}{2} + \langle (d_k+\tilde d),H_{k}(d_k+\tilde d)\rangle + +f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k) \\ + {\rm ~s.t.} & bl \leq x_k+d_k+\tilde d \leq bu\\ + & g_j(x_k+d_k) +\langle \nabla g_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k\|,~\|d_k\|^{\tau _2}),~ + j\in I^g_k(d_k)\cap\{j:j\leq n_i\}\\ +% & \hspace{20em} j\in I^g_k(d_k)\cap\{j:j\leq n_i\}\\ + & \langle c_{j-n_i},x_k+d_k + \tilde d \rangle \leq d_{j-n_i}, + ~~~~j\in I^g_k(d_k)\cap\{j:j>n_i\}\\ + & h_j(x_k+d_k) +\langle \nabla h_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k\|,~\|d_k\|^{\tau _2}),~j=1,\ldots,n_e\\ + & \langle a_j,x_k+d_k + \tilde d \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +where $f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k)=f'(x_k,d_k+\tilde d,p_k)$ +if $n_f = 1,$ and +$f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k)=\tilde{f}'_{I^f_k(d_k)}(x_k+d_k,x_k,\til +de d,p_k)$ +if $n_f > 1$. +If the quadratic program has no solution or +if $\|\tilde d_k\|>\|d_{k}\|$, set $\tilde d_k=0$. +\end{itemize} + +\noindent{\it Step 2. Arc search.} +Let $\delta _k=f'(x_k,d_k,p_k)$ if $n_i+n_e\ne 0$ +and $\delta _k=-\langle d_k^0,H_kd_k^0\rangle$ otherwise. +Compute $t_{k}$, the first number $t$ in +the sequence $\mbox\{1,\beta,\beta^{2},\ldots\}$ satisfying +\begin{eqnarray*} +\textstyle +& f_m(x_{k}+td_{k}+t^{2}\tilde d_{k},p_k)\leq f_m(x_k,p_k)+\alpha t\delta_k & \ +\ +& g_j(x_k+td_k+t^2\tilde d_k)\leq0,~~j=1,\ldots,n_i & \\ +&\langle c_{j-n_i},x_k+td_k + t^2\tilde{d}_k \rangle \leq d_{j-n_i}, + ~~~~\forall j>n_i~\&~j\not\in I^g_k(d_k)\\ +&h_j(x_k+td_k+t^2\tilde d_k)\leq0,~~j=1,\ldots,n_e. & +\end{eqnarray*} +Specifically, the line search proceeds as follows. +First, the linear constraints that were not used +in computing $\tilde{d}_k$ are checked until all of them are +satisfied, resulting in a stepsize, say, $\bar{t}_k$. Due to +the convexity of linear constraints, these constraints +will be satisfied for any $t\leq \bar{t}_k$. Then, for $t=\bar{t}_k$, +nonlinear constraints are checked first and, +for both objectives and constraints, those with nonzero +multipliers in the QP yielding $d^0_k$ are evaluated first. +For $t<\bar{t}_k$, the function that caused the previous value of $t$ to +be rejected is checked first; all functions of the same type +(``objective'' or ``constraint'') as the latter +will then be checked first. + +\smallskip +\smallskip +\noindent{\it Step 3. Updates.} +\begin{itemize} +\item[$\cdot$] If $nset>5n$ and $t_k<\underline t$, set $H_{k+1}=H_0$ +and $nset=0$. +Otherwise, set $nset=nset+1$ and compute a new approximation $H_{k+1}$ +to the Hessian of the Lagrangian using the BFGS formula with Powell's +modification\Lspace \Lcitemark 8\Rcitemark \Rspace{}. +\item[$\cdot$] Set $x_{k+1}=x_{k}+t_{k}d_{k}+t_{k}^{2}\tilde d_{k}$. +\item[$\cdot$] Solve the unconstrained +quadratic problem in $\bar{\mu}$ +$$\begin{array}{cl} +\min\limits_{\bar{\mu}\in R^{t_e}} & +\|\sum\limits_{j=1}^{n_f}\zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda_{k,j}\nabla g_j(x_k) + +\sum\limits_{j=1}^{t_e}\bar{\mu}_j\nabla h_j(x_k)\|^2, +\end{array}$$ +where the $\zeta_{k,j}$'s, $\xi_k$ and the $\lambda_{k,j}$'s +are the multipliers associated with $QP(x_k,H_k,p_k)$ for the objective +functions, variable bounds, and inequality constraints +respectively.\footnote{This is a refinement (saving much computation +and memory) of the scheme proposed in\Lspace \Lcitemark 1\Rcitemark \Rspace{}.} +Update $p_k$ as follows: for $j=1,\ldots,n_e$, +$$p_{k+1,j}=\left\{\begin{array}{ll} +p_{k,j} & \mbox{if } p_{k,j}+\bar\mu_j \geq \epsilon_1\\ +\max\{\epsilon_1-\bar\mu_j,~\delta p_{k,j}\} & \mbox{otherwise.} +\end{array}\right.$$ +\item[$\cdot$] Increase $k$ by 1. +\item[$\cdot$] Go back to {\it Step 1}. +\end{itemize} + +\hfill{\large \bf $\Box$} + +\vspace{1em} +\noindent{\bf Algorithm FSQP-NL.} + +\vspace{1em} +\noindent{\it Parameters.} $\eta =3.0$, $\nu=0.01$, +$\alpha=0.1$, $\beta=0.5$, $\theta=0.2$, $\bar{\rho}=0.5$, $\gamma = 2.5$, +$\underline{C}=0.01$, $\underline{d}=5.0$, $\underline t=0.1$, +$\epsilon_1=0.1$, $\epsilon_2=10$, $\delta=5$. + +\smallskip +\noindent{\it Data.} $x_0\in R^n$, $\epsilon > 0$, $\epsilon_e>0$ and +$p_{0,j}=\epsilon_2$ for $j=1, \ldots, n_e$. + +\smallskip +\noindent{\it Step 0: Initialization.} Set $k=0$, $H_0=$ the identity +matrix, and $C_0 = \underline{C}.$ If $x_0$ is infeasible for +constraints other than nonlinear equality constraints, substitute a +feasible point, obtained as discussed below. +Set $x_{-3}=x_{-2}=x_{-1}=x_0$ and $nset=0$. +For $j=1,\ldots,n_e$, replace $h_j(x)$ by $-h_j(x)$ whenever +$h_j(x_0)>0$. + +\smallskip +\noindent{\it Step 1: Computation of a new iterate.} + +\begin{itemize} +\item[\it ~~~i.] Compute $d_{k}^{0}$, the solution of quadratic program +$QP(x_k,H_k,p_k)$. +%Compute the Kuhn-Tucker vector +%$$\begin{array}{lll} +%\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)& = & +%\sum\limits_{j=1}^{n_f} \zeta _{k,j}\nabla f_j(x_k)+ +%\sum\limits_{j=1}^{n} \xi _{k,j}+\sum\limits_{j=1}^{t_i} +% \lambda _{k,j}\nabla g_j(x_k) \\ +%& & ~~~+\sum\limits_{j=1}^{n_e}(\mu_{k,j}-p_{k,j})\nabla h_j(x_k) +% +\sum\limits_{j=n_e+1}^{t_e}\mu_{k,j}\nabla h_j(x_k).\end{array}$$ + +%If $\|\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)\|\leq \epsilon$ +If $\|d_k^0\|\leq \epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq\epsilon_e$, stop. +If $n_i+n_e=0$ and $n_f=1,$ set $d_k=d^0_k$ and $\tilde d_k =0$ and +go to {\it Step~1~viii}. If $n_i+n_e=0$ and $n_f >1,$ +set $\rho _k^{\ell}=\rho _k^g=0$ and go to {\it Step~1~v}. + +\item[\it ~~ii.] Compute $d_{k}^{1}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{ll} \min\limits_{d^1\in R^n,\gamma \in R} + & \frac{\eta}{2}\|d^1\|^2+\gamma \\ + {\rm ~~~~s.t.} & bl \leq x_k+d^1 \leq bu\\ + & g_j(x_k)+\langle \nabla g_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_i\\ + & \langle c_j,x_k + d^1 \rangle \leq d_j, + ~~~~j=1,\ldots,t_i-n_i \\ + & h_j(x_k)+\langle \nabla h_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k + d^1 \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ + +\item[\it ~iii.] Set $v_{k}=\min \{C_k\|d^0_k\|^2,\|d^0_k\|\}$. +Define values +$\rho^g_{k,j}$ for $j=1,\ldots,n_i$ by $\rho^g_{k,j}$ equal to zero if +\smallskip +$$g_j(x_k)+\langle \nabla g_j(x_k),d^0_k\rangle \leq -v_k$$ +\smallskip +or equal to the maximum $\rho$ in $[0,1]$ such that +\smallskip +$$g_j(x_k)+\langle \nabla g_j(x_k),(1-\rho)d^0_k+ + \rho d^1_k\rangle \geq -v_k$$ +\smallskip +otherwise. Similarly, define values $\rho^h_{k,j}$ for $j=1,\ldots,n_e$. +Let $$\rho ^{\ell}_k=\max\left\{\max _{j=1,\ldots,n_i}\{\rho^g_{k,j}\},~ +\max _{j=1,\ldots,n_e}\{\rho^h_{k,j}\}\right\}.$$ + +\item[\it ~~iv.] Define $\rho _k^g$ as the largest number $\rho$ +in $[0,\rho ^{\ell}_k]$ such that +\smallskip +$$f'(x_k,(1-\rho)d^0_k+\rho d^1_k,p_k)\leq \theta f'(x_k,d^0_k,p_k).$$ +If ($k\geq 1$ \& $t_{k-1}<1$) or ($\rho _k^{\ell} > \bar{\rho}$), set +$\rho _k^\ell = \min \{\rho _k^\ell, \rho _k^g\}.$ + +\item[\it ~~~v.] Construct a ``local'' direction +\smallskip +$$d_k^{\ell}=(1-\rho _k^{\ell})d^0_k+\rho _k^{\ell} d^1_k.$$ +Set $M=3$, $\delta_k=f'(x_k,d_k^0)$ if $n_i+n_e\ne 0$, +and $M=2$, $\delta_k=-\langle d_k^0,H_kd_k^0\rangle$ otherwise. +If +$$f_m(x_k+d^{\ell}_k,p_k)\leq +\max\limits_{\ell=0,\ldots,M}\{f_m(x_{k-\ell},p_k)\} + + \alpha \delta_k$$ +$$g_j(x_k+d^{\ell}_k)\leq 0,~~j=1,\ldots,n_i$$ +and +$$h_j(x_k+d^{\ell}_k)\leq 0,~~j=1,\ldots,n_e,$$ +\smallskip +set $t_k=1$, $x_{k+1}=x_k+d_k^{\ell}$ and go to {\it Step 2}. + +\item[\it ~~vi.] Construct a ``global'' direction +\smallskip +$$d_k^{g}=(1-\rho _k^{g})d^0_k+\rho _k^{g}d^1_k.$$ + +\item[\it ~vii.] +Compute $\tilde d_{k}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{cl} \min\limits_{\tilde d \in R^n} & \frac{1}{2} + \langle (d_k^g+\tilde d),H_{k}(d^g_k+\tilde d)\rangle + +f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k) \\ + \mbox{s.t.} & bl \leq x_k+d_k^g+\tilde d \leq bu\\ + & g_j(x_k+d_k^g) +\langle \nabla g_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k^g\|,~\|d_k^g\|^{\tau}), + ~~~j\in I^g_k(d^g_k)\cap\{j:j\leq n_i\}\\ + & \langle c_{j-n_i},x_k+d_k^g + \tilde d \rangle \leq d_{j-n_i}, + ~~~~j\in I^g_k(d^g_k)\cap\{j:j>n_i\}\\ + & h_j(x_k+d_k^g) +\langle \nabla h_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k^g\|,~\|d_k^g\|^{\tau}), + ~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k+d_k^g + \tilde d \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +where $f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k)=f'(x_k,d_k^g+\tilde d,p_k)$ if + $n_f=1,$ +and $f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k)= +\tilde{f}'_{I^f_k(d_k^g)}(x_k+d_k^g,x_k,\tilde d,p_k)$ +if $n_f>1$. If the quadratic program has no solution or +if $\|\tilde d_k\|>\|d_k^g\|$, set $\tilde d_k=0$. + +\item[\it viii.] Set $M=3$, $\delta_k=f'(x_k,d^g_k,p_k)$ if $n_i+n_e\ne 0$, +and $M=2$, $\delta_k=-\langle d^g_k,H_kd^g_k\rangle$ otherwise. +Compute $t_k$, the first number $t$ in +the sequence $\mbox\{1,\beta,\beta^{2},\ldots\}$ satisfying +\smallskip +\begin{eqnarray*} +\textstyle +& f_m(x_{k}+td^g_k+t^{2}\tilde d_k,p_k)\leq + \max\limits_{\ell=0,\ldots,M}\{f_m(x_{k-\ell},p_k)\}+ +\alpha t \delta_k &\\ +& g_{j}(x_{k}+td_k^g+t^{2}\tilde d_{k})\leq0,~~j=1,\ldots,n_i & \\ +&\langle c_{j-n_i},x_k+td_k^g +t^2 \tilde{d}_k \rangle \leq d_{j-n_i}, + ~~~~j>n_i~\&~j\not\in I^g_k(d^g_k) &\\ +& h_{j}(x_{k}+td_k^g+t^{2}\tilde d_{k})\leq0,~~j=1,\ldots,n_e & +\end{eqnarray*} +and set $x_{k+1}=x_k+t_kd_k^g+t_k^2\tilde d_k.$ \\ +Specifically, the line search proceeds as follows. +First, the linear constraints that were not used +in computing $\tilde{d}_k$ are checked until all of them are +satisfied, resulting in a stepsize, say, $\bar{t}_k$. Due to +the convexity of linear constraints, these constraints +will be satisfied for any $t\leq \bar{t}_k$. Then, for $t=\bar{t}_k$, +nonlinear constraints are checked first and, +for both objectives and constraints, those with nonzero +multipliers in the QP yielding $d^0_k$ are evaluated first. +For $t<\bar{t}_k$, the function that caused the previous value of $t$ to +be rejected is checked first; all functions of the same type +(``objective'' or ``constraint'') as the latter +will then be checked first. +\end{itemize} + +\noindent{\it Step 2. Updates.} +\begin{itemize} +\item[$\cdot$] If $nset>5n$ and $t_k<\underline t$, set $H_{k+1}=H_0$ +and $nset=0$. Otherwise, set $nset=nset+1$ and +compute a new approximation $H_{k+1}$ +to the Hessian of the Lagrangian using the BFGS formula with Powell's +modification\Lcitemark 8\Rcitemark . +\item[$\cdot$] If $\|d^0_k\|>\underline{d}$, +set $C_{k+1}=\max \{0.5C_k,\underline{C}\}.$ +Otherwise, if $g_j(x_k+d_k^\ell) \leq 0,~~j=1,\ldots,n_i$, +set $C_{k+1}=C_k$. Otherwise, set $C_{k+1}=10C_k$. +\item[$\cdot$] Solve the unconstrained +quadratic problem in $\bar{\mu}$ +$$\begin{array}{cl} +\min\limits_{\bar{\mu}\in R^{t_e}} & +\|\sum\limits_{j=1}^{n_f}\zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda_{k,j}\nabla g_j(x_k) + +\sum\limits_{j=1}^{t_e}\bar{\mu}_j\nabla h_j(x_k)\|^2, +\end{array}$$ +where the $\zeta_{k,j}$'s, $\xi_k$ and the $\lambda_{k,j}$'s +are the multipliers associated with $QP(x_k,H_k,p_k)$ for the objective +functions, variable bounds, and inequality constraints +respectively.\footnote{See footnote to corresponding step in description +of FSQP-AL.} + +Update $p_k$ as follows: for $j=1,\ldots,n_e$, +$$p_{k+1,j}=\left\{\begin{array}{ll} +p_{k,j} & \mbox{if } p_{k,j}+\bar\mu_j \geq \epsilon_1\\ +\max\{\epsilon_1-\bar\mu_j,~\delta p_{k,j}\} & \mbox{otherwise.} +\end{array}\right.$$ +\item[$\cdot$] Increase $k$ by 1. +\item[$\cdot$] Go back to {\it Step 1}. +\end{itemize} + +\hfill{\large \bf $\Box$} + +\noindent{\bf Remark:} The Hessian matrix is reset +in both algorithms whenever stepsize is too small and +the updating of the matrix goes through $n$ iterations. +This is helpful in some situations where the Hessian matrix +becomes singular. + +\vspace{1em} +If the initial guess $x_0$ provided by the user is not feasible +for some inequality constraint or some linear equality constraint, +FSQP first solves a strictly convex quadratic program +\smallskip +$$\begin{array}{cl} + \min\limits_{v\in R^n} & \langle v,v\rangle \\ + \mbox{s.t.} & bl \leq x_0+v \leq bu\\ + & \langle c_j,x_0 + v \rangle \leq d_j, + ~~~j=1,\ldots,t_i-n_i\\ + & \langle a_j,x_0 + v \rangle=b_j, + ~~~j=1,\ldots,t_e-n_e. \end{array}$$ + +\vspace{.5em} +\noindent{}Then, starting from the point $x=x_0+v$, it will iterate, +using algorithm FSQP-AL, on the problem +\smallskip +$$\begin{array}{cl} + \min\limits_{x\in R^n} & \max\limits_{j=1,\ldots,n_i}\{g_j(x)\} \\ + \mbox{s.t.} & ~~bl \leq x \leq bu\\ + & ~~\langle c_j,x\rangle \leq d_j,~~~j=1,\ldots,t_i-n_i\\ + & ~~\langle a_j,x \rangle =b_j,~~~j=1,\ldots , t_e-n_e + \end{array}$$ +until $\max\limits_{j=1,\ldots,n_i}\{g_j(x)\} \leq 0$ is achieved. +The corresponding iterate $x$ will then be feasible +for all constraints other than nonlinear equality constraints of +the original problem. + +\section{Specification of Subroutine FSQPD 3.2} +\label{specs} +Only a double precision version of FSQP, FSQPD is currently available. +The specification of FSQPD is as follows: +\vspace{1em} +\begin{quote} +\begin{verbatim} + subroutine FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint,miter, + * inform,bigbnd,eps,epseqn,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj,constr,gradob,gradcn) + integer nparam,nf,nineqn,nineq,neqn,neq,mode,iprint,miter,inform, + * iwsize,nwsize + integer iw(iwsize) + double precision bigbnd,eps,epseqn,udelta + double precision bl(nparam),bu(nparam),x(nparam), + * f(nf),g(nineq+neq),w(nwsize) + external obj,constr,gradob,gradcn +\end{verbatim} +\end{quote} +\vspace{1em} +{\bf Important:} all real variables and arrays must be declared as +double precision in the routine that calls FSQPD. The following are +specifications of parameters and workspace. + +\vspace{1em} +\begin{description} +\item[\tt nparam] {\bf (Input)}~Number of free variables, + i.e., the dimension of {\tt x}. +\item[\tt nf] {\bf (Input)}~Number of objective + functions ($n_f$ in the algorithm description). +\item[\tt nineqn] {\bf (Input)}~Number (possibly zero) of + nonlinear inequality constraints ($n_i$ in the + algorithm description). +\item[\tt nineq] {\bf (Input)}~Total number (possibly equal + to {\tt nineqn}) of + inequality constraints ($t_i$ in the algorithm + description). +\item[\tt neqn] {\bf (Input)}~Number (possibly zero) of + nonlinear equality constraints ($n_e$ in the + algorithm description). +\item[\tt neq] {\bf (Input)}~Total number (possibly equal to {\tt neqn}) of + equality constraints ($t_e$ in the algorithm + description). +\item[\tt mode] {\bf (Input)}~${\tt mode} = 1BA$ with the following + meanings: + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[${\tt A} = 0$~:~~] $(P)$ is to be solved. + \item[${\tt A} = 1$~:~~] $(PL_\infty)$ is to be solved. + $(PL_\infty)$ is defined as follows +$$ + (PL_\infty)~~~~~ \min ~ \max\limits_{i\in I^f} |f_i(x)| + \mbox{~~~s.t.~~}x\in X +$$ + where $X$ is the same as for $(P).$ It is handled + in this code by splitting $|f_i(x)|$ as $f_i(x)$ + and $-f_i(x)$ for each $i.$ The user is required + to provide only $f_i(x)$ for $i\in I^f$. + \item[${\tt B} = 0$~:~~]Algorithm FSQP-AL is + selected, resulting in a + decrease of the (modified) objective + + function at each iteration. + \item[${\tt B} = 1$~:~~]Algorithm FSQP-NL is + selected, resulting in a + decrease of the (modified) objective + function within at + most four iterations (or three + iterations, see Algorithm FSQP-NL). + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt iprint] {\bf (Input)}~Parameter indicating the + desired output (see \S~\ref{output} for details): + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[~~${\tt iprint} =0$~:~~] No information except + for user-input errors is displayed. This value + is imposed during phase 1. + \item[~~${\tt iprint} =1$~:~~] + Objective and constraint values + at the initial feasible point are displayed. + At the end of execution, status ({\tt inform}), + iterate, objective values, constraint values, + number of evaluations of objectives and + nonlinear constraints, norm of the Kuhn-Tucker + vector, and sum of feasibility violation + are displayed. + \item[~~${\tt iprint} =2$~:~~] At the end of each + iteration, the same information as with + ${\tt iprint}=1$ is displayed. + \item[~~${\tt iprint} =3$~:~~] At each iteration, + the same information as with ${\tt iprint}=2$, + including detailed information on the search + direction computation, on the line search, + and on the update, is displayed. + \item[~~${\tt iprint} =10*N+M,~N~{\rm any~positive~integer}, + M=2~{\rm or}~3$~:~~] + Information corresponding to {\tt iprint}=$M$ + is displayed at every $(10\times N)$th + iteration and at the last iteration. + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt miter] {\bf (Input)}~Maximum number of iterations +allowed by the user before termination of execution. +\item[\tt inform] {\bf (Output)}~Parameter indicating the status of + the execution of FSQPD: + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[~~${\tt inform} = 0$~:~] Normal termination of + execution in the sense that + $\|d^0\|\leq {\tt eps}$ + and (if ${\tt neqn} \ne 0$) + $\sum_{j=1}^{n_e}|h_j(x)|\leq {\tt epseqn}$. + \item[~~${\tt inform} = 1$~:~] The user-provided + initial guess + is infeasible for + linear constraints and + FSQPD is unable to + generate a point + satisfying all these + constraints. + \item[~~${\tt inform} = 2$~:~] The user-provided + initial guess + is infeasible for nonlinear + inequality constraints and + linear constraints; and + FSQPD is unable to + generate a point + satisfying all these + constraints. + \item[~~${\tt inform} = 3$~:~] The maximum + number~{\tt miter} + of iterations has been + reached before a + solution is obtained. + \item[~~${\tt inform} = 4$~:~] The line search fails + to find a new + iterate (trial step size + being + smaller than the machine + precision + {\tt epsmac} computed by FSQPD). + \item[~~${\tt inform} = 5$~:~] Failure of the QP solver + in attempting + to construct $d^0$. A more + robust QP solver may succeed. + \item[~~${\tt inform} = 6$~:~] Failure of the QP solver + in attempting + to construct $d^1$. A more + robust QP solver may succeed. + \item[~~${\tt inform} = 7$~:~] Input data are not + consistent~(with + printout + indicating the error). + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt bigbnd] {\bf (Input)}~(see also {\tt bl} + and {\tt bu} below)~It plays the role of + Infinite Bound. +\item[\tt eps] {\bf (Input)}~Final norm requirement for +% the Kuhn-Tucker vector ($\epsilon$ in the + the Newton direction $d_k^0$ ($\epsilon$ in the + algorithm description). It must be bigger + than the machine + precision {\tt epsmac} (computed by FSQPD). + (If the user does not have a good feeling of + what value should be chosen, a very small + number could be provided and $\mbox{\tt iprint}=2$ + be selected so that the user would be able to keep track of + the process of optimization and terminate FSQPD + at appropriate time.) +\item[\tt epseqn] {\bf (Input)}~Maximum violation of nonlinear equality + constraints allowed by the user at an optimal point + ($\epsilon_e$ in the algorithm description). + It is in effect only if $n_e\ne 0$ and + must be bigger than the machine + precision {\tt epsmac} (computed by FSQPD). +\item[\tt udelta] {\bf (Input)}~The perturbation + size the user suggests to use in + approximating gradients by finite difference. + The perturbation size actually used is defined by +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times \max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} + is the square root of {\tt epsmac}). {\tt udelta} + should be set to zero if the user has no idea + how to choose it. +\item[\tt bl] {\bf (Input)}~Array of + dimension {\tt nparam} containing + lower bounds for the components of {\tt x}. + To specify a non-existent lower + bound (i.e., ${\tt bl}(j)=-\infty$ for + some $j$), the value used must + satisfy ${\tt bl}(j)\leq -{\tt bigbnd}$. +\item[\tt bu] {\bf (Input)}~Array of + dimension {\tt nparam} containing + upper bounds for the components of {\tt x}. + To specify a non-existent upper + bound (i.e., ${\tt bu}(j)=\infty$ for + some $j$), the value used must + satisfy ${\tt bu}(j)\geq {\tt bigbnd}$. +\item[\tt x] {\bf (Input)}~Initial guess.\\ + {\bf (Output)}~Iterate at the end of execution. +\item[\tt f] Array of dimension $\max\{1, {\tt nf}\}$.\\ + {\bf (Output)}~Value of functions + $f_i,i=1,\ldots,n_f$, at {\tt x} at the end of + execution. +\item[\tt g] Array of dimension $\max\{1,{\tt nineq}+{\tt neq}\}$.\\ + {\bf (Output)}~Values of constraints at {\tt x} at + the end of execution. +\item[\tt iw] Workspace vector of dimension {\tt iwsize}. +\item[\tt iwsize] {\bf (Input)}~Workspace length + for {\tt iw}. It must be at least as big as + $6\times {\tt nparam}+8\times ({\tt nineq}+{\tt neq}) + +7\times{\tt nf}+30$. This estimate is usually very conservative + and the smallest suitable value will be + displayed if the user-supplied value is too small. +\item[\tt w] {\bf (Input)}~Workspace of dimension {\tt nwsize}. \\ + {\bf (Output)}~Estimate of Lagrange multipliers at + the end of execution of phase 2 in the + first ${\tt nparam}+{\tt nineq+neq+nff}$ entries; + where ${\tt nff}=0$ if (in {\tt mode}) ${\tt A}=0$ and + ${\tt nf}=1$, and ${\tt nff}={\tt nf}$ otherwise. + They are ordered as $\xi$'s (variables), $\lambda$'s (inequality + constraints), $\mu$'s (equality constraints), and $\zeta$ + (objective functions). + $\lambda _j \geq 0~~\forall j=1,\ldots,t_i$ + and $\mu _j \ge 0~~\forall j=1,\ldots,t_e.$ $\xi _i > 0$ + indicates that $x_i$ reaches its upper bound and $\xi _i <0$ + indicates that $x_i$ reaches its lower bound. When + (in {\tt mode}) ${\tt A}=0$ and ${\tt nf}>1$, $\zeta _i \geq0.$ + When ${\tt B}=1$, $\zeta _i >0$ refers to + $+f_i(x)$ and $\zeta _i<0$ to $-f_i(x)$. +\item[\tt nwsize] {\bf (Input)}~Workspace length for {\tt w}. + It must be at least as big as + $4\times {\tt nparam}^{2}+ + 5\times ({\tt nineq}+{\tt neq})\times{\tt nparam}+ + 3\times{\tt nf}\times{\tt nparam}+ + 26\times ({\tt nparam}+{\tt nf})+45\times ({\tt nineq}+{\tt neq})+100$ +. This estimate + is usually very conservative and the + smallest suitable value will be + displayed if the user-supplied value is too small. +\item[\tt obj] {\bf (Input)}~Name of the user-defined subroutine + that computes the value of the objective + functions $f_i(x),~~\forall i=1,\ldots,n_f.$ This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The detailed specification is given in \S~\ref{subobj} below. +\item[\tt constr] {\bf (Input)}~Name of the user-defined subroutine + that computes the value of the constraints. This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The detailed specification is given in \S~\ref{subconstr} below. +\item[\tt gradob] {\bf (Input)}~Name of the subroutine that + computes the gradients of the objective + functions $f_i(x),~~\forall i=1,\ldots,n_f.$ This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The user must pass the subroutine name + {\tt grobfd}~(and declare it as {\bf external}), + if he/she wishes that FSQPD evaluate + these gradients automatically, by forward finite differences. + The detailed specification is given in \S~\ref{subgradob} below. +\item[\tt gradcn] {\bf (Input)}~Name of the subroutine that + computes the gradients of the constraints. + This name must be declared as {\bf external} in the calling + routine and passed as an argument to FSQPD. + The user must pass the subroutine name {\tt grcnfd}~(and + declare it as {\bf external}), if he/she wishes that + FSQPD evaluate these gradients automatically, + by forward finite differences. + The detailed specification is given in \S~\ref{subgradcn} below. +\end{description} + +\section{User-Accessible Stopping Criterion} +\label{stopcri} +As is clear from the two algorithms, the optimization process +normally terminates if both +$\|d_k^0\|\leq\epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq\epsilon_e$ are satisfied. +Very small value of either of these two parameters may request +exceedingly long execution time, depending on the complexity +of underlying problem and the nonlinearity of various functions. +FSQP allows users to specify their own stopping criterion in any one of +the four user-supplied subroutines mentioned above via the following +common block +\begin{verbatim} + integer nstop + common /fsqpst/nstop +\end{verbatim} +if (s)he wishes to. +${\tt nstop}=0$ should be returned to FSQP when the stopping criterion +is satisfied. FSQP will check the value of {\tt nstop} at appropriate places +during the optimization process and will terminate when +either the user's criterion or the default criterion is satisfied. + +\section{Description of the Output} +\label{output} +No output will be displayed before a feasible starting +point is obtained. The following information is displayed +at the end of execution when +${\tt iprint} = 1$ or at each iteration when ${\tt iprint}=2$: +\begin{description} +\item[\tt iteration] Total number of iterations (${\tt iprint}=1$) or + iteration number (${\tt iprint}=2$). +\item[\tt inform] See \S~\ref{specs}. It is displayed only + at the end of execution. +\item[\tt x] Iterate. +\item[\tt objectives] Value of objective functions $f_i(x),~~\forall + i=1,\ldots,n_f$ at {\tt x}. +\item[\tt objmax] (displayed only if $\mbox{\tt nf} > 1$)~The + maximum value of the set of objective + functions (i.e., $\max f_i(x) \mbox{ or } \max |f_i(x)|,~~ + \forall i=1,\ldots,n_f$) at {\tt x}. +\item[\tt objective max4] (displayed only if $\mbox{\tt B} = 1$ + in {\tt mode})~Largest value of + the maximum of the objective functions over the + last four (or three, see FSQP-NL) + iterations (including the current one). +\item[\tt constraints] Values of the constraints at {\tt x}. +\item[\tt ncallf] Number of evaluations (so far) of + individual~(scalar) objective function $f_i(x)$ + for $1\leq i \leq n_f.$ +\item[\tt ncallg] Number of evaluations (so far) of + individual~(scalar) nonlinear constraints. +\item[\tt d0norm] Norm of the Newton direction $d_k^0$. +\item[\tt ktnorm] Norm of the Kuhn-Tucker vector at the current + iteration. The Kuhn-Tucker vector is given by +$$\begin{array}{lll} +\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)& = & +\sum\limits_{j=1}^{n_f} \zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda _{k,j}\nabla g_j(x_k) \\ +& &~+\sum\limits_{j=1}^{n_e}(\mu_{k,j}-p_{k,j})\nabla h_j(x_k) + +\sum\limits_{j=n_e+1}^{t_e}\mu_{k,j}\nabla h_j(x_k).\end{array}$$ +\item[\tt SCV] Sum of the violation of nonlinear equality constraints +at a solution. +\end{description} + +{\noindent}For ${\tt iprint}=3$, in addition to the same + information as the one for ${\tt iprint}=2$, + the following is printed at every iteration. + +\vspace{1em} +Details in the computation of a search direction: +\begin{description} +\item[\tt d0] Quasi-Newton direction $d^0_k$. +\item[\tt d1] First order direction $d^1_k$. +\item[\tt d1norm] Norm of $d^1_k$. +\item[\tt d] (${\tt B}=0$ in {\tt mode})~Feasible descent + direction $d_k=(1-\rho _k)d^0_k+\rho _k d^1_k$. +\item[\tt dnorm] (${\tt B}=0$ in {\tt mode})~Norm of $d_k$. +\item[\tt rho] (${\tt B}=0$ in {\tt mode})~Coefficient $\rho_k$ in + constructing $d_k$. +\item[\tt dl] (${\tt B}=1$ in {\tt mode})~Local direction + $d^\ell_k=(1-\rho^\ell_k)d_k^0+\rho^\ell_kd^1_k$. +\item[\tt dlnorm] (${\tt B}=1$ in {\tt mode})~Norm of $d_k^\ell$. +\item[\tt rhol] (${\tt B}=1$ in {\tt mode})~Coefficient $\rho_k^{\ell}$ in + constructing $d_k^{\ell}$. +\item[\tt dg] (${\tt B}=1$ in {\tt mode})~Global search direction + $d^g=(1-\rho^g_k)d_k^0+\rho^g_kd^1_k$. +\item[\tt dgnorm] (${\tt B}=1$ in {\tt mode})~Norm of $d_k^g$. +\item[\tt rhog] (${\tt B}=1$ in {\tt mode})~Coefficient $\rho_k^g$ in + constructing $d_k^g$. +\item[\tt dtilde] Second order correction $\tilde d_k$. +\item[\tt dtnorm] Norm of $\tilde d_k$. +\end{description} + +Details in the line search: +\begin{description} +\item[\tt trial step] Trial steplength $t$ in the search direction. +\item[\tt trial point] Trial iterate along the search arc + with {\tt trial step}. +\item[\tt trial objectives] This gives the indices $i$ and + the corresponding + values of the functions + $f_i(x)-\sum_{j=1}^{n_e}p_jh_j(x)$ + for $1\leq i \leq n_f$ up to the one which fails + in line search at the {\tt trial point}. The + indices $i$ + are not necessarily in the natural order (see + remark at the end of {\it Step 2} in FSQP-AL and of + the end of {\it Step~1~viii}\ in FSQP-NL). +\item[\tt trial constraints] This gives the indices $j$ and the + corresponding values of nonlinear constraints + for $1\leq j \leq n_i+n_e$ up to the + one which is not feasible at the {\tt trial point}. + The indices $j$ + are not necessarily in the natural order (see + remark at the end of {\it Step 2} in FSQP-AL and of + the end of {\it Step~1~viii}\ in FSQP-NL). +\end{description} + +Details in the updates: +\begin{description} +\item[\tt delta] Perturbation size for each variable + in finite difference gradients computation. +\item[\tt gradf] Gradients of + functions $f_i(x),~\forall i=1,\ldots,n_f,$ + at the new iterate. +\item[\tt gradg] Gradients of constraints at the new iterate. +\item[\tt p] Penalty parameters for nonlinear equality constraints at + the new iterate. +\item[\tt multipliers] Multiplier estimates ordered as $\xi$'s, + $\lambda$'s, $\mu$'s, and $\zeta$'s (from quadratic program + computing $d^0_k$). $\lambda _j \geq 0~~\forall j=1,\ldots,t_i$ + and $\mu _j \ge 0~~\forall j=1,\ldots,t_e$. $\xi _i > 0$ + indicates that $x_i$ reaches its upper bound and $\xi _i <0$ + indicates that $x_i$ reaches its lower bound. When + (in {\tt mode}) ${\tt A}=0$ and ${\tt nf}>1$, $\zeta _i \geq0$. + When (in {\tt mode}) ${\tt A}=1$, $\zeta _i >0$ refers to + $+f_i(x)$ and $\zeta _i<0$ to $-f_i(x)$. + (cf.\ \S~\ref{specs} under item {\tt w}.) +\item[\tt hess] Estimate of the Hessian matrix of the Lagrangian. +\item[\tt Ck] The value $C_k$ as defined in Algorithm FSQP-NL. +\end{description} + +\section{User-Supplied Subroutines} +At least two of the following four Fortran 77 subroutines, +namely {\tt obj} and {\tt constr}, +must be provided by the user in order to define the problem. +The name of all four routines can be changed at the user's will, +as they are passed as arguments to FSQPD. + +\subsection{Subroutine obj} +\label{subobj} +The subroutine {\bf obj}, to be provided by the user, +computes the value of the objective functions. +A (dummy) subroutine must be provided due to Fortran 77 compiling +requirement if $\mbox{\tt nf}=0$ (This may happen when the user +is only interested in finding a feasible point). +The specification of {\bf obj} for FSQPD is +\begin{quote} +\begin{verbatim} + subroutine obj(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj + c + c for given j, assign to fj the value of the jth objective + c evaluated at x + c + return + end +\end{verbatim} +\end{quote} +\noindent Arguments: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of the objective to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt fj] {\bf (Output)}~Value of the {\tt j}th objective function + at {\tt x}. +\end{description} + +\subsection{Subroutine constr} +\label{subconstr} +The subroutine {\bf constr}, to be provided by the user, +computes the value of +the constraints. If there are no constraints, +a (dummy) subroutine must be +provided anyway due to Fortran 77 compiling requirement. +The specification of {\tt constr} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine constr(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj + c + c for given j, assign to gj the value of the jth constraint + c evaluated at x + c + return + end +\end{verbatim} +\end{quote} +\noindent Arguments: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of the constraint to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gj] {\bf (Output)}~Value of the {\tt j}th constraint at {\tt x}. +\end{description} +\bigskip +The order of the constraints must be as follows. +First the {\tt nineqn} (possibly zero) nonlinear inequality constraints. +Then the ${\tt nineq-nineqn}$ (possibly zero) linear inequality constraints. +Finally, the {\tt neqn} (possibly zero) nonlinear equality constraints +followed by the ${\tt neq-neqn}$ (possibly zero) linear equality constraints. + +\subsection{Subroutine gradob} +\label{subgradob} +The subroutine {\bf gradob} computes the gradients of the +objective functions. +The user may omit to provide this routine and require that +forward finite difference +approximation be used by FSQPD via calling {\tt grobfd} instead~ +(see argument {\tt gradob} of FSQPD in \S~\ref{specs}). +The specification of {\tt gradob} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine gradob(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision x(nparam),gradfj(nparam) + double precision dummy + external dummy +c +c assign to gradfj the gradient of the jth objective function +c evaluated at x +c + return + end +\end{verbatim} +\end{quote} +\noindent{Arguments}: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of objective for + which gradient is to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gradfj] {\bf (Output)}~Gradient of the {\tt j}th objective + function at x. +\item[\tt dummy] {\bf (Input)}~Used by {\tt grobfd}. +\end{description} +Note that {\tt dummy} is +passed as arguments to {\tt gradob} to allow for forward finite +difference computation of the gradient. + +\subsection{Subroutine gradcn} +\label{subgradcn} +The subroutine {\bf gradcn} computes the gradients of the constraints. +The user may omit to provide this routine and require that forward +finite difference approximation be used by FSQPD via +calling {\tt grcnfd} instead (see argument {\tt gradcn} of +FSQPD in \S~\ref{specs}). +The specification of {\tt gradcn} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine gradcn (nparam,j,x,gradgj,dummy) + integer nparam,j + double precision x(nparam),gradgj(nparam) + double precision dummy + external dummy +c +c assign to gradgj the gradient of the jth constraint +c evaluated at x +c + return + end +\end{verbatim} +\end{quote} +\noindent{Arguments}: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of constraint for which + gradient is to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gradgj] {\bf (Output)}~Gradient of the {\tt j}th + constraint evaluated at {\tt x}. +\item[\tt dummy] {\bf (Input)}~Used by {\tt grcnfd}. +\end{description} + +\noindent Note that {\tt dummy} is passed as arguments +to {\tt gradcn} to allow for forward finite difference +computation of the gradients. + +\section{Organization of FSQPD and Main Subroutines} +\subsection{Main Subroutines} +\label{mainorg} +FSQPD first checks for inconsistencies of input parameters using the +subroutine {\tt check}. It then checks if the starting +point given by the user satisfies the linear +constraints and if not, generates a point +satisfying these constraints using +subroutine {\tt initpt}. It then calls FSQPD1 for generating a point +satisfying linear and nonlinear inequality constraints. Finally, +it attempts to find +a point satisfying the optimality condition using again FSQPD1. +\begin{description} +\item[\tt check] Check that all upper bounds on variables + are no smaller than lower bounds; + check that all input integers are nonnegative + and appropriate (${\tt nineq} \geq {\tt nineqn}$, etc.); + and check that {\tt eps} ($\epsilon$) + and (if ${\tt neqn}\ne 0$) {\tt epseqn} + ($\epsilon_e$) are at least as large as + the machine precision {\tt epsmac} (computed by FSQPD). +\item[\tt initpt] Attempt to generate a feasible point satisfying + simple bounds and all linear constraints. +\item[\tt FSQPD1] Main subroutine used possibly twice by FSQPD, + first for generating + a feasible iterate as explained at the + end of \S~\ref{algo} and + second for generating an optimal iterate + from that feasible iterate. +\end{description} +FSQPD1 uses the following subroutines: +\begin{description} +\item[\tt dir] Compute various directions $d_k^0$, $d^1_0$ and $\tilde d_k$. +\item[\tt step]Compute a step size along a certain search direction. + It is also called to check if $x_k+d_k^\ell$ is acceptable + in {\it Step 1 v} of Algorithm FSQP-NL. +\item[\tt hesian] Perform the Hessian matrix updating. +\item[\tt out] Print the output for ${\tt iprint=1}$ + or ${\tt iprint}=2$. +\item[\tt grobfd] (optional)~Compute the gradient of an objective + function + by forward finite differences with mesh size equal to +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times\max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} is the + square root of {\tt epsmac}, the machine + precision computed by FSQPD). +\item[\tt grcnfd] (optional)~Compute the gradient of a constraint by + forward finite differences with mesh size equal to +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times\max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} is the + square root of {\tt epsmac}, the machine + precision computed by FSQPD). +\end{description} + +\subsection{Other Subroutines} +\label{othsub} +In addition to QLD, the following subroutines are used: +\begin{verbatim} + diagnl di1 dqp error estlam fool fuscmp indexs matrcp + matrvc nullvc resign sbout1 sbout2 scaprd shift slope small +\end{verbatim} + +\subsection{Reserved Common Blocks} +\label{reserved} +The following named common blocks are used in FSQPD and QLD: +\begin{verbatim} + fsqpp1 fsqpp2 fsqpp3 fsqpq1 fsqpq2 fsqplo fsqpqp fsqpst CMACHE +\end{verbatim} + + +\input manua2 +\input macros.tex +\documentstyle[12pt]{manual} +\pagestyle{myheadings} +\markboth{User's Guide for FSQP}{User's Guide for FSQP} +\renewcommand{\baselinestretch}{1.08} % more interline spacing + \textheight=8.3in +\topmargin=-.2in +\textwidth=6.5in +\oddsidemargin=-.15cm +\tolerance=1000 % to avoid overfull boxes + \pagenumbering{arabic} +\begin{document} +\thispagestyle{empty} +\begin{titlepage} +\begin{center} +{\large \bf User's Guide for FSQP Version 3.1:\\ +\vspace{1mm} + A FORTRAN Code for Solving Constrained Nonlinear \\ +\vspace{1mm} + (Minimax) Optimization Problems, Generating Iterates \\ +\vspace{1mm} + Satisfying All Inequality and Linear Constraints\footnote{ +This research was supported in part by NSF's Engineering Research Centers +Program No. NSFD-CDR-88-03012, by NSF grant No. DMC-88-15996 and by a grant +from the Westinghouse Corporation.}}\\ +\vspace{4mm} + {\it Jian L. Zhou and Andr\'{e} L. Tits} \\ +\vspace{4mm} + Electrical Engineering Department\\ + and\\ + Institute for Systems Research\\ + University of Maryland, College Park, MD 20742\\ + (Systems Research Center TR-92-107r2) +\end{center} +\vspace{3mm} +\noindent{\bf Abstract} +\vspace{1em} + +\hspace{4mm}FSQP 3.1 is a set of FORTRAN subroutines +for the minimization of the maximum of a set of smooth +objective functions (possibly a single one) subject to +general smooth constraints. +If the initial guess provided by the user is infeasible for +some inequality constraint or some linear equality constraint, FSQP first +generates a feasible point for these constraints; +subsequently the successive iterates generated by +FSQP all satisfy these constraints. Nonlinear equality constraints +are turned into inequality constraints (to be satisfied by all iterates) +and the maximum of the objective functions is replaced +by an exact penalty function which +penalizes nonlinear equality constraint violations only. +The user has the option of either +requiring that the (modified) objective function decrease +at each iteration after feasibility for nonlinear inequality and +linear constraints has been reached (monotone line search), or +requiring a decrease within at most four iterations (nonmonotone line search). +He/She must provide subroutines that define the objective functions +and constraint functions and may either provide subroutines +to compute the gradients of these functions or require that FSQP +estimate them by forward finite differences. + +\hspace{4mm} FSQP 3.1 implements two algorithms based on Sequential +Quadratic Programming~(SQP),~modified so as to generate +feasible iterates. In the first one (monotone line search), a certain +Armijo type arc search is used with the property that the step of one +is eventually accepted, a requirement for superlinear convergence. +In the second one the same effect is achieved by means +of a (nonmonotone) search along a straight line. The merit function +used in both searches is the maximum of the objective functions if +there is no nonlinear equality constraint. +\end{titlepage} + +\begin{titlepage} +\centerline{\bf Conditions for External Use} +\bigskip +\begin{enumerate} +\item The FSQP routines may not be distributed to third parties. + Interested parties should contact the authors directly. +\item If modifications are performed on the routines, these + modifications will be communicated to the authors. + The modified routines will remain + the sole property of the authors. +\item Due acknowledgment must be made of the use of the FSQP routines in + research reports or publications. A copy of such reports or + publications should be forwarded to the authors. +\item The FSQP routines may not be used in industrial production, + unless this has been agreed upon with the authors in writing. +\end{enumerate} + +\bigskip\noindent +{\bf User's Guide for FSQP Version 3.1 (Released November 1992)} \\ +Copyright {\copyright} 1989 --- 1992 by Jian L. Zhou and Andr\'e L. Tits\\ +All Rights Reserved. +%Copyright {\copyright} 1992, University of Maryland at College Park. +%All Rights Reserved. \\ +%(Developed by Jian L. Zhou and Andr\'e L. Tits.) + +\bigskip +\bigskip +\noindent Enquiries should be directed to + +\bigskip +\hspace{5em}Prof. Andr\'e L. Tits + +\hspace{5em}Electrical Engineering Dept. + +\hspace{5em}and Institute for Systems Research + +\hspace{5em}University of Maryland + +\hspace{5em}College Park, Md 20742 + +\hspace{5em}U. S. A. + +\smallskip +\hspace{5em}Phone$\,\,$:~~~301-405-3669 + +\hspace{5em}Fax~~~$\,\;$:~~~301-405-6707 + +\hspace{5em}E-mail$\,$:~~~andre@src.umd.edu +\end{titlepage} + +%\begin{titlepage} +\tableofcontents +%\end{titlepage} + +\newpage +\section{Introduction} +FSQP~(Feasible Sequential Quadratic Programming) 3.1 +is a set of FORTRAN subroutines +for the minimization of the maximum of a set of smooth +objective functions (possibly a single one) subject to +nonlinear equality and inequality constraints, +linear equality and inequality constraints, +and simple bounds on the variables. Specifically, FSQP +tackles optimization problems of the form +\smallskip +$$ + (P)~~~~~~ \min ~ \max\limits_{i\in I^f} \{f_i(x)\} + \mbox{~~~s.t.~~}x\in X +$$ +where $I^f=\{1,\ldots,n_f\}$ and $X$ is the set of point $x\in R^n$ +satisfying +$$\begin{array}{l} + bl \leq x \leq bu \\ + g_j(x) \leq 0,~~~j=1,\ldots,n_i\\ + g_j(x)\equiv \langle c_{j-n_i},x\rangle - d_{j-n_i} \leq 0, + ~~~j=n_i+1,\ldots,t_i \\ + h_j(x)=0,~~~j=1,\ldots,n_e\\ + h_j(x)\equiv\langle a_{j-n_e},x \rangle-b_{j-n_e}=0, ~~~j=n_e+1,\ldots,t_ +e +\end{array}$$ +with $bl\in R^n$; $bu\in R^n$; +$f_i:R^n\rightarrow R,$ $i=1,\ldots,n_f$ smooth; +$g_j:R^n\rightarrow R,~j=1,\ldots,n_i$ nonlinear and smooth; +$c_j\in R^n$, $d_j\in R$, $j=1,\ldots,t_i-n_i$; +$h_j:R^n\rightarrow R,~j=1,\ldots,n_e$ nonlinear and smooth; +$a_j\in R^n$, $b_j\in R$, $j=1,\ldots,t_e-n_e$. + +If the initial guess provided by the user is infeasible for nonlinear +inequality constraints and linear constraints, FSQP first +generates a point satisfying all these constraints +by iterating on the problem of minimizing +the maximum of these constraints. Then, +using Mayne-Polak's scheme\Lspace \Lcitemark 1\Rcitemark \Rspace{}, +nonlinear equality constraints are turned into +inequality constraints\footnote{For every $j$ for which $h_j(x_0)>0$ +($x_0$ is the initial point), ``$h_j(x)=0$'' is first replaced by +``$-h_j(x)=0$'' and $-h_j$ is renamed $h_j$.} +$$h_j(x)\leq 0,~~~~j=1,\ldots,n_e$$ +and the original objective function $\max_{i\in I^f}\{f_i(x)\}$ +is replaced by the modified objective function +$$f_m(x,p)=\max\limits_{i\in I^f}\{f_i(x)\}-\sum_{j=1}^{n_e}p_jh_j(x),$$ +where $p_j$, $j=1,\ldots,n_e$, are positive penalty parameters +and are iteratively adjusted. +The resulting optimization problem therefore involves only +linear constraints and nonlinear inequality constraints. +Subsequently, the successive iterates generated by +FSQP all satisfy these constraints. The user has the option of +either requiring that the exact penalty function +(the maximum value of the objective functions if without nonlinear equality +constraints) decrease at each iteration after feasibility for +original nonlinear inequality and linear constraints has been reached, +or requiring a decrease within at most three iterations. +He/She must provide subroutines that define the objective functions +and constraint functions and may either provide subroutines +to compute the gradients of these functions or require that FSQP +estimate them by forward finite differences. + +Thus, FSQP 3.1 solves the original problem with nonlinear equality constraints +by solving a modified optimization problem with only linear constraints +and nonlinear inequality constraints. For the transformed problem, +it implements algorithms that are described +and analyzed in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +\Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \Rspace{}, w +ith some additional refinements. +These algorithms are based on a Sequential Quadratic Programming~(SQP) +iteration, modified so as to generate feasible iterates. +The merit function is the objective function. +An Armijo-type line search is used to generate an initial feasible point +when required. +After obtaining feasibility, either $(i)$ an Armijo-type line +search may be used, yielding a monotone decrease of the +objective function at each iteration\Lspace \Lcitemark 2\Rcitemark \Rspace{}; +or $(ii)$ a nonmonotone line +search (inspired from\Lspace \Lcitemark 5\Rcitemark \Rspace{} and analyzed +in\Lspace \Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \R +space{} in this context) +may be selected, forcing a decrease of +the objective function within at most four iterations. +In the monotone line search scheme, the SQP direction is first +``tilted'' if nonlinear constraints are present +to yield a feasible direction, then possibly ``bent'' to ensure +that close to a solution the step of one is accepted, +a requirement for superlinear convergence. +The nonmonotone line search scheme achieves superlinear convergence +with no bending of the search direction, thus avoiding function +evaluations at auxiliary points and subsequent solution of +an additional quadratic program. After turning nonlinear equality +constraints into inequality constraints, these algorithms are +used directly to solve the modified problems. Certain procedures +(see, e.g.,\Lspace \Lcitemark 6\Rcitemark \Rspace{}) +are adopted to obtain proper values of $p_j$'s in order to +ensure that a solution of the modified problem is also a solution +of the original problem, as described below. + +For the solution of the quadratic programming subproblems, FSQP 3.1 +is set up to call QLD\Lspace \Lcitemark 7\Rcitemark \Rspace{} which is provided + +with the FSQP distribution for the user's convenience. + +\section{Description of the Algorithms} +The algorithms described and analyzed +in\Lspace \Lcitemark 2\Rcitemark \Rspace{},\Lspace \Lcitemark 3\Rcitemark \Rspa +ce{} +and\Lspace \Lcitemark 4\Rcitemark \Rspace{} are as follows. +Given a feasible iterate $x$, the basic SQP direction +$d^0$ is first computed by solving a standard quadratic program +using a positive definite estimate $H$ of +the Hessian of the Lagrangian. +$d^0$ is a direction of descent for the objective function; it is +almost feasible in the sense that it is at worst tangent to +the feasible set if there are nonlinear constraints and it is feasible +otherwise. + +In\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +an essentially arbitrary feasible descent direction $d^1=d^{1}(x)$ is +then computed. Then for a certain +scalar $\rho =\rho (x)\in [0,1]$, a feasible descent +direction $d=(1-\rho)d^0+\rho d^1$ is obtained, asymptotically +close to $d^0.$ Finally a second order +correction $\tilde d=\tilde{d}(x,d,H)$ is computed, involving +auxiliary function evaluations at $x+d,$ +and an Armijo type search is performed along the +arc $x+td+t^2 \tilde d.$ +The purpose of $\tilde d$ is to allow a full step of one to be taken +close to a solution, thus allowing superlinear convergence to +take place. Conditions are given +in\Lspace \Lcitemark 2\Rcitemark \Rspace{} on +$d^{1}(\cdot)$, $\rho(\cdot)$ and $\tilde d(\cdot ,\cdot)$ +that result in a globally convergent, +locally superlinear convergent algorithm. + +The algorithm in\Lspace \Lcitemark 3\Rcitemark \Rspace{} is somewhat +more sophisticated. An essential difference is that while feasibility +is still required, the requirement of decrease of the max objective +value is replaced by the weaker requirement that the max +objective value at the new point be lower than its maximum over the last +four iterates. The main payoff is that the auxiliary function +evaluations +can be dispensed with, except possibly at the first few iterations. +First a direction $d^1=d^1(x)$ is computed, which is feasible even at +Karush-Kuhn-Tucker points. Then for a certain +scalar $\rho ^{\ell} =\rho ^{\ell}(x)\in [0,1],$ +a ``local'' feasible +direction $d ^{\ell}=(1-\rho ^{\ell})d^0+\rho ^{\ell}d^1$ is obtained, +and at $x+d^{\ell}$ the objective functions are tested +and feasibility is +checked. If the requirements pointed out above are satisfied, $x+d^\ell$ +is accepted as next iterate. This will always be the case close to a +solution. Whenever $x+d^\ell$ is not accepted, a ``global'' +feasible {\it descent} +direction $d ^g=(1-\rho ^g)d^0+\rho ^gd^1$ is obtained with +$\rho ^g =\rho ^g(x)\in [0,\rho ^{\ell}].$ +A second order correction $\tilde d=\tilde{d}(x,d^g,H)$ is computed +the same way as in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +and a ``nonmonotone'' search is performed along the +arc $x+td^g+t^2 \tilde d.$ +Here the purpose of $\tilde d$ +is to suitably initialize the sequence for the ``four iterate'' rule. +Conditions are given in\Lspace \Lcitemark 3\Rcitemark \Rspace{} on +$d^{1}(\cdot)$, $\rho ^{\ell}(\cdot)$, $\rho ^g(\cdot)$, +and $\tilde d(\cdot ,\cdot)$ that result in a +globally convergent, locally superlinear convergent algorithm. +In\Lspace \Lcitemark 4\Rcitemark \Rspace{}, the algorithm of\Lspace \Lcitemark +3\Rcitemark \Rspace{} is refined +for the case of unconstrained minimax problems. +The major difference over the algorithm of\Lspace \Lcitemark 3\Rcitemark \Rspac +e{} +is that there is no need of $d^1$. +As in\Lspace \Lcitemark 3\Rcitemark \Rspace{}, $\tilde d$ is required to initia +lize superlinear +convergence. + +The FSQP implementation corresponds to a specific choice of +$d^1(\cdot)$, $\rho(\cdot)$, $\tilde{d}(\cdot,\cdot)$, +$\rho^\ell(\cdot)$, and $\rho^g(\cdot)$, +with some modifications as follows. If the first algorithm +is used, $d^1$ is computed as +a function not only of $x$ but also of $d^0$~(thus of $H$), as it +appears beneficial to keep $d^1$ relatively close to $d^0$. +In the case of the second algorithm, the construction +of $d^{\ell}$ is modified so that the function +evaluations at different auxiliary points can +be avoided during early iteration +when $\rho ^g\neq \rho ^{\ell}$; +the quadratic program that yields $\tilde{d}$ involves only a +subset of ``active'' functions, thus decreasing the number +of function evaluations. +The details are given below. +The analysis in\Lspace \Lcitemark 2\Rcitemark \Rspace{}, +\Lcitemark 3\Rcitemark \Rspace{} and\Lspace \Lcitemark 4\Rcitemark \Rspace{} +can be easily extended to these modified algorithms. +Also obvious simplifications are introduced concerning +linear constraints: the iterates are allowed (for inequality constraints) +or are forced (for equality constraints) to stay +on the boundary of these constraints and these constraints +are not checked in the line search. Finally, FSQP automatically switches to +a ``phase 1'' mode if the initial guess provided by +the user is not in the feasible set. + +Below we call FSQP-AL +the algorithm with the Armijo line search, and FSQP-NL the algorithm +with nonmonotone line search. We make use of the notations +$$f_{I^f}(x)=\max\limits _{i\in I^f} \{f_i(x)\}$$ +$$f'(x,d,p)=\max\limits_{i\in I^f}\{f_i(x)+ + \langle \nabla f_i(x),d\rangle\} - f_{I^f}(x) + -\sum\limits_{j=1}^{n_e}p_j\langle\nabla h_j(x),d\rangle$$ +and, for any subset $I\subset I^f$, +$$\tilde {f}'_I(x+d,x,\tilde d,p)=\max\limits_{i\in I}\{f_i(x+d)+ + \langle \nabla f_i(x),\tilde d\rangle\} - f_{I}(x+d) + -\sum\limits_{j=1}^{n_e}p_j\langle\nabla h_j(x),\tilde d\rangle.$$ +At each iteration $k$, the quadratic program $QP(x_k,H_k,p_k)$ that yields +the SQP direction $d^0_k$ is defined +at $x_k$ for $H_k$ symmetric positive definite by +\smallskip +$$\begin{array}{ll} + \min\limits_{d^0\in R^n}~~ & {1 \over {2}}\langle {d^0},H_k {d^0} + \rangle+f'(x_k,d^0,p_k) \\ + {\rm ~~s.t.} & bl \leq x_k+d^0 \leq bu \\ + & g_j(x_k)+\langle\nabla g_j(x_k),d^0 \rangle + \leq 0, ~~~j=1,\ldots , t_i \\ + & h_j(x_k)+\langle\nabla h_j(x_k),d^0 \rangle + \leq 0, ~~~j=1,\ldots ,n_e \\ + & \langle a_j,x_k + d^0 \rangle=b_j, + ~~~j=1,\ldots , t_e-n_e. \end{array}$$ +Let $\zeta _{k,j}$'s with $\sum_{j=1}^{n_f} \zeta _{k,j} =1$, +$\xi_{k,j}$'s, $\lambda _{k,j}$'s, and $\mu_{k,j}$'s denote +the multipliers, for the various objective functions, simple +bounds (only $n$ possible active bounds at each iteration), inequality, +and equality constraints respectively, associated +with this quadratic program. +Define the set of active objective functions, +for any $i$ such that $\zeta_{k,i}>0$, by +$$ +I^f_k(d_k)=\{j\in I^f: |f_j(x_k)-f_i(x_k)|\leq +0.2\|d_k\|\cdot\|\nabla f_j(x_k)-\nabla f_i(x_k)\|\} +\cup\{j\in I^f:\zeta_{k,j}>0\} +$$ +and the set of active constraints by +$$ +I^g_k(d_k)\!=\!\{j\!\in\!\{1,\ldots,t_i\}:|g_j(x_k)|\leq +0.2\|d_k\|\cdot\|\nabla g_j(x_k)\|\} +\cup\{j\in\{1,\ldots,t_i\}:\lambda_{k,j}>0\}. +$$ + +\vspace{1em} +\noindent{\bf Algorithm FSQP-AL.} + +\vspace{1em} +\noindent{\it Parameters.} $\eta =0.1$, $\nu=0.01$, $\alpha=0.1$, +$\beta=0.5$, $\kappa = 2.1$, $\tau _1=\tau _2 = 2.5$, $\underline t=0.1$, +$\epsilon_1=1$, $\epsilon_2=10$, $\delta=5$. + +\smallskip +\noindent{\it Data.} $x_0\in R^n$, $\epsilon > 0$, $\epsilon_e>0$ and +$p_{0,j}=\epsilon_2$ for $j=1,\ldots,n_e$. + +\smallskip +\noindent{\it Step 0: Initialization.} Set $k=0$ and $H_0=$ the +identity matrix. Set $nset=0$. If $x_0$ is infeasible for some constraint +other than a nonlinear equality constraint, +substitute a feasible point, obtained as discussed below. +For $j=1,\ldots,n_e$, replace $h_j(x)$ by $-h_j(x)$ whenever +$h_j(x_0)>0$. + +\smallskip +\noindent{\it Step 1: Computation of a search arc.} + +\begin{itemize} +\item[\it i.]Compute $d_{k}^{0}$, the solution of the quadratic program +$QP(x_k,H_k,p_k)$. +If $\|d_k^0\|\leq \epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq \epsilon_e$, stop. +If $n_i+n_e=0$ and $n_f=1,$ set $d_k=d^0_k$ and $\tilde d_k =0$ and +go to {\it Step~2}. If $n_i+n_e=0$ and $n_f > 1$, set $d_k=d^0_k$ and +go to {\it Step~1~iv}. + +\item[\it ii.]Compute $d_{k}^{1}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{ll} \min\limits_{d^1\in R^n,\gamma \in R} + & \frac{\eta}{2} + \langle d_{k}^{0}-d^1,d_{k}^{0}-d^1 \rangle +\gamma \\ + {\rm ~~~~s.t.} & bl \leq x_k+d^1 \leq bu\\ + & f'(x_k,d^1,p_k) \leq \gamma\\ + & g_j(x_k)+\langle \nabla g_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_i\\ + & \langle c_j,x_k + d^1 \rangle \leq d_j, + ~~~~j=1,\ldots,t_i-n_i \\ + & h_j(x_k)+\langle \nabla h_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k + d^1 \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +\smallskip +\item[\it iii.] Set $d_k=(1-\rho_k)d_k^0+\rho_kd_k^1$~ + with $\rho_k=\|d_k^0\|^{\kappa}/(\|d_k^0\|^{\kappa}+v_k)$,~ + where $v_k = \max(0.5,~\|d_k^1\|^{\tau _1}).$ + +\item[\it iv.] +Compute $\tilde d_k$ by solving the strictly convex +quadratic program +\smallskip +$$\begin{array}{ll} \min\limits_{\tilde d \in R^n} & \frac{1}{2} + \langle (d_k+\tilde d),H_{k}(d_k+\tilde d)\rangle + +f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k) \\ + {\rm ~s.t.} & bl \leq x_k+d_k+\tilde d \leq bu\\ + & g_j(x_k+d_k) +\langle \nabla g_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k\|,~\|d_k\|^{\tau _2}),~ + j\in I^g_k(d_k)\cap\{j:j\leq n_i\}\\ +% & \hspace{20em} j\in I^g_k(d_k)\cap\{j:j\leq n_i\}\\ + & \langle c_{j-n_i},x_k+d_k + \tilde d \rangle \leq d_{j-n_i}, + ~~~~j\in I^g_k(d_k)\cap\{j:j>n_i\}\\ + & h_j(x_k+d_k) +\langle \nabla h_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k\|,~\|d_k\|^{\tau _2}),~j=1,\ldots,n_e\\ + & \langle a_j,x_k+d_k + \tilde d \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +where $f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k)=f'(x_k,d_k+\tilde d,p_k)$ +if $n_f = 1,$ and +$f'_{I^f_k(d_k)}(x_k,d_k,\tilde d,p_k)=\tilde{f}'_{I^f_k(d_k)}(x_k+d_k,x_k,\til +de d,p_k)$ +if $n_f > 1$. +If the quadratic program has no solution or +if $\|\tilde d_k\|>\|d_{k}\|$, set $\tilde d_k=0$. +\end{itemize} + +\noindent{\it Step 2. Arc search.} +Let $\delta _k=f'(x_k,d_k,p_k)$ if $n_i+n_e\ne 0$ +and $\delta _k=-\langle d_k^0,H_kd_k^0\rangle$ otherwise. +Compute $t_{k}$, the first number $t$ in +the sequence $\mbox\{1,\beta,\beta^{2},\ldots\}$ satisfying +\begin{eqnarray*} +\textstyle +& f_m(x_{k}+td_{k}+t^{2}\tilde d_{k},p_k)\leq f_m(x_k,p_k)+\alpha t\delta_k & \ +\ +& g_j(x_k+td_k+t^2\tilde d_k)\leq0,~~j=1,\ldots,n_i & \\ +&\langle c_{j-n_i},x_k+td_k + t^2\tilde{d}_k \rangle \leq d_{j-n_i}, + ~~~~\forall j>n_i~\&~j\not\in I^g_k(d_k)\\ +&h_j(x_k+td_k+t^2\tilde d_k)\leq0,~~j=1,\ldots,n_e. & +\end{eqnarray*} +Specifically, the line search proceeds as follows. +First, the linear constraints that were not used +in computing $\tilde{d}_k$ are checked until all of them are +satisfied, resulting in a stepsize, say, $\bar{t}_k$. Due to +the convexity of linear constraints, these constraints +will be satisfied for any $t\leq \bar{t}_k$. Then, for $t=\bar{t}_k$, +nonlinear constraints are checked first and, +for both objectives and constraints, those with nonzero +multipliers in the QP yielding $d^0_k$ are evaluated first. +For $t<\bar{t}_k$, the function that caused the previous value of $t$ to +be rejected is checked first; all functions of the same type +(``objective'' or ``constraint'') as the latter +will then be checked first. + +\smallskip +\smallskip +\noindent{\it Step 3. Updates.} +\begin{itemize} +\item[$\cdot$] If $nset>5n$ and $t_k<\underline t$, set $H_{k+1}=H_0$ +and $nset=0$. +Otherwise, set $nset=nset+1$ and compute a new approximation $H_{k+1}$ +to the Hessian of the Lagrangian using the BFGS formula with Powell's +modification\Lspace \Lcitemark 8\Rcitemark \Rspace{}. +\item[$\cdot$] Set $x_{k+1}=x_{k}+t_{k}d_{k}+t_{k}^{2}\tilde d_{k}$. +\item[$\cdot$] Solve the unconstrained +quadratic problem in $\bar{\mu}$ +$$\begin{array}{cl} +\min\limits_{\bar{\mu}\in R^{t_e}} & +\|\sum\limits_{j=1}^{n_f}\zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda_{k,j}\nabla g_j(x_k) + +\sum\limits_{j=1}^{t_e}\bar{\mu}_j\nabla h_j(x_k)\|^2, +\end{array}$$ +where the $\zeta_{k,j}$'s, $\xi_k$ and the $\lambda_{k,j}$'s +are the multipliers associated with $QP(x_k,H_k,p_k)$ for the objective +functions, variable bounds, and inequality constraints +respectively.\footnote{This is a refinement (saving much computation +and memory) of the scheme proposed in\Lspace \Lcitemark 1\Rcitemark \Rspace{}.} +Update $p_k$ as follows: for $j=1,\ldots,n_e$, +$$p_{k+1,j}=\left\{\begin{array}{ll} +p_{k,j} & \mbox{if } p_{k,j}+\bar\mu_j \geq \epsilon_1\\ +\max\{\epsilon_1-\bar\mu_j,~\delta p_{k,j}\} & \mbox{otherwise.} +\end{array}\right.$$ +\item[$\cdot$] Increase $k$ by 1. +\item[$\cdot$] Go back to {\it Step 1}. +\end{itemize} + +\hfill{\large \bf $\Box$} + +\vspace{1em} +\noindent{\bf Algorithm FSQP-NL.} + +\vspace{1em} +\noindent{\it Parameters.} $\eta =3.0$, $\nu=0.01$, +$\alpha=0.1$, $\beta=0.5$, $\theta=0.2$, $\bar{\rho}=0.5$, $\gamma = 2.5$, +$\underline{C}=0.01$, $\underline{d}=5.0$, $\underline t=0.1$, +$\epsilon_1=0.1$, $\epsilon_2=10$, $\delta=5$. + +\smallskip +\noindent{\it Data.} $x_0\in R^n$, $\epsilon > 0$, $\epsilon_e>0$ and +$p_{0,j}=\epsilon_2$ for $j=1, \ldots, n_e$. + +\smallskip +\noindent{\it Step 0: Initialization.} Set $k=0$, $H_0=$ the identity +matrix, and $C_0 = \underline{C}.$ If $x_0$ is infeasible for +constraints other than nonlinear equality constraints, substitute a +feasible point, obtained as discussed below. +Set $x_{-3}=x_{-2}=x_{-1}=x_0$ and $nset=0$. +For $j=1,\ldots,n_e$, replace $h_j(x)$ by $-h_j(x)$ whenever +$h_j(x_0)>0$. + +\smallskip +\noindent{\it Step 1: Computation of a new iterate.} + +\begin{itemize} +\item[\it ~~~i.] Compute $d_{k}^{0}$, the solution of quadratic program +$QP(x_k,H_k,p_k)$. +%Compute the Kuhn-Tucker vector +%$$\begin{array}{lll} +%\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)& = & +%\sum\limits_{j=1}^{n_f} \zeta _{k,j}\nabla f_j(x_k)+ +%\sum\limits_{j=1}^{n} \xi _{k,j}+\sum\limits_{j=1}^{t_i} +% \lambda _{k,j}\nabla g_j(x_k) \\ +%& & ~~~+\sum\limits_{j=1}^{n_e}(\mu_{k,j}-p_{k,j})\nabla h_j(x_k) +% +\sum\limits_{j=n_e+1}^{t_e}\mu_{k,j}\nabla h_j(x_k).\end{array}$$ + +%If $\|\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)\|\leq \epsilon$ +If $\|d_k^0\|\leq \epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq\epsilon_e$, stop. +If $n_i+n_e=0$ and $n_f=1,$ set $d_k=d^0_k$ and $\tilde d_k =0$ and +go to {\it Step~1~viii}. If $n_i+n_e=0$ and $n_f >1,$ +set $\rho _k^{\ell}=\rho _k^g=0$ and go to {\it Step~1~v}. + +\item[\it ~~ii.] Compute $d_{k}^{1}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{ll} \min\limits_{d^1\in R^n,\gamma \in R} + & \frac{\eta}{2}\|d^1\|^2+\gamma \\ + {\rm ~~~~s.t.} & bl \leq x_k+d^1 \leq bu\\ + & g_j(x_k)+\langle \nabla g_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_i\\ + & \langle c_j,x_k + d^1 \rangle \leq d_j, + ~~~~j=1,\ldots,t_i-n_i \\ + & h_j(x_k)+\langle \nabla h_j(x_k),d^1 \rangle + \leq\gamma, ~~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k + d^1 \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ + +\item[\it ~iii.] Set $v_{k}=\min \{C_k\|d^0_k\|^2,\|d^0_k\|\}$. +Define values +$\rho^g_{k,j}$ for $j=1,\ldots,n_i$ by $\rho^g_{k,j}$ equal to zero if +\smallskip +$$g_j(x_k)+\langle \nabla g_j(x_k),d^0_k\rangle \leq -v_k$$ +\smallskip +or equal to the maximum $\rho$ in $[0,1]$ such that +\smallskip +$$g_j(x_k)+\langle \nabla g_j(x_k),(1-\rho)d^0_k+ + \rho d^1_k\rangle \geq -v_k$$ +\smallskip +otherwise. Similarly, define values $\rho^h_{k,j}$ for $j=1,\ldots,n_e$. +Let $$\rho ^{\ell}_k=\max\left\{\max _{j=1,\ldots,n_i}\{\rho^g_{k,j}\},~ +\max _{j=1,\ldots,n_e}\{\rho^h_{k,j}\}\right\}.$$ + +\item[\it ~~iv.] Define $\rho _k^g$ as the largest number $\rho$ +in $[0,\rho ^{\ell}_k]$ such that +\smallskip +$$f'(x_k,(1-\rho)d^0_k+\rho d^1_k,p_k)\leq \theta f'(x_k,d^0_k,p_k).$$ +If ($k\geq 1$ \& $t_{k-1}<1$) or ($\rho _k^{\ell} > \bar{\rho}$), set +$\rho _k^\ell = \min \{\rho _k^\ell, \rho _k^g\}.$ + +\item[\it ~~~v.] Construct a ``local'' direction +\smallskip +$$d_k^{\ell}=(1-\rho _k^{\ell})d^0_k+\rho _k^{\ell} d^1_k.$$ +Set $M=3$, $\delta_k=f'(x_k,d_k^0)$ if $n_i+n_e\ne 0$, +and $M=2$, $\delta_k=-\langle d_k^0,H_kd_k^0\rangle$ otherwise. +If +$$f_m(x_k+d^{\ell}_k,p_k)\leq +\max\limits_{\ell=0,\ldots,M}\{f_m(x_{k-\ell},p_k)\} + + \alpha \delta_k$$ +$$g_j(x_k+d^{\ell}_k)\leq 0,~~j=1,\ldots,n_i$$ +and +$$h_j(x_k+d^{\ell}_k)\leq 0,~~j=1,\ldots,n_e,$$ +\smallskip +set $t_k=1$, $x_{k+1}=x_k+d_k^{\ell}$ and go to {\it Step 2}. + +\item[\it ~~vi.] Construct a ``global'' direction +\smallskip +$$d_k^{g}=(1-\rho _k^{g})d^0_k+\rho _k^{g}d^1_k.$$ + +\item[\it ~vii.] +Compute $\tilde d_{k}$ by solving the strictly convex +quadratic program +\smallskip +$$ \begin{array}{cl} \min\limits_{\tilde d \in R^n} & \frac{1}{2} + \langle (d_k^g+\tilde d),H_{k}(d^g_k+\tilde d)\rangle + +f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k) \\ + \mbox{s.t.} & bl \leq x_k+d_k^g+\tilde d \leq bu\\ + & g_j(x_k+d_k^g) +\langle \nabla g_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k^g\|,~\|d_k^g\|^{\tau}), + ~~~j\in I^g_k(d^g_k)\cap\{j:j\leq n_i\}\\ + & \langle c_{j-n_i},x_k+d_k^g + \tilde d \rangle \leq d_{j-n_i}, + ~~~~j\in I^g_k(d^g_k)\cap\{j:j>n_i\}\\ + & h_j(x_k+d_k^g) +\langle \nabla h_j(x_k),\tilde d\rangle\leq + -\min(\nu\|d_k^g\|,~\|d_k^g\|^{\tau}), + ~~~j=1,\ldots,n_e\\ + & \langle a_j,x_k+d_k^g + \tilde d \rangle=b_j, + ~~~~j=1,\ldots,t_e-n_e\end{array}$$ +where $f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k)=f'(x_k,d_k^g+\tilde d,p_k)$ if + $n_f=1,$ +and $f'_{I^f_k(d_k^g)}(x_k,d_k^g,\tilde d,p_k)= +\tilde{f}'_{I^f_k(d_k^g)}(x_k+d_k^g,x_k,\tilde d,p_k)$ +if $n_f>1$. If the quadratic program has no solution or +if $\|\tilde d_k\|>\|d_k^g\|$, set $\tilde d_k=0$. + +\item[\it viii.] Set $M=3$, $\delta_k=f'(x_k,d^g_k,p_k)$ if $n_i+n_e\ne 0$, +and $M=2$, $\delta_k=-\langle d^g_k,H_kd^g_k\rangle$ otherwise. +Compute $t_k$, the first number $t$ in +the sequence $\mbox\{1,\beta,\beta^{2},\ldots\}$ satisfying +\smallskip +\begin{eqnarray*} +\textstyle +& f_m(x_{k}+td^g_k+t^{2}\tilde d_k,p_k)\leq + \max\limits_{\ell=0,\ldots,M}\{f_m(x_{k-\ell},p_k)\}+ +\alpha t \delta_k &\\ +& g_{j}(x_{k}+td_k^g+t^{2}\tilde d_{k})\leq0,~~j=1,\ldots,n_i & \\ +&\langle c_{j-n_i},x_k+td_k^g +t^2 \tilde{d}_k \rangle \leq d_{j-n_i}, + ~~~~j>n_i~\&~j\not\in I^g_k(d^g_k) &\\ +& h_{j}(x_{k}+td_k^g+t^{2}\tilde d_{k})\leq0,~~j=1,\ldots,n_e & +\end{eqnarray*} +and set $x_{k+1}=x_k+t_kd_k^g+t_k^2\tilde d_k.$ \\ +Specifically, the line search proceeds as follows. +First, the linear constraints that were not used +in computing $\tilde{d}_k$ are checked until all of them are +satisfied, resulting in a stepsize, say, $\bar{t}_k$. Due to +the convexity of linear constraints, these constraints +will be satisfied for any $t\leq \bar{t}_k$. Then, for $t=\bar{t}_k$, +nonlinear constraints are checked first and, +for both objectives and constraints, those with nonzero +multipliers in the QP yielding $d^0_k$ are evaluated first. +For $t<\bar{t}_k$, the function that caused the previous value of $t$ to +be rejected is checked first; all functions of the same type +(``objective'' or ``constraint'') as the latter +will then be checked first. +\end{itemize} + +\noindent{\it Step 2. Updates.} +\begin{itemize} +\item[$\cdot$] If $nset>5n$ and $t_k<\underline t$, set $H_{k+1}=H_0$ +and $nset=0$. Otherwise, set $nset=nset+1$ and +compute a new approximation $H_{k+1}$ +to the Hessian of the Lagrangian using the BFGS formula with Powell's +modification\Lcitemark 8\Rcitemark . +\item[$\cdot$] If $\|d^0_k\|>\underline{d}$, +set $C_{k+1}=\max \{0.5C_k,\underline{C}\}.$ +Otherwise, if $g_j(x_k+d_k^\ell) \leq 0,~~j=1,\ldots,n_i$, +set $C_{k+1}=C_k$. Otherwise, set $C_{k+1}=10C_k$. +\item[$\cdot$] Solve the unconstrained +quadratic problem in $\bar{\mu}$ +$$\begin{array}{cl} +\min\limits_{\bar{\mu}\in R^{t_e}} & +\|\sum\limits_{j=1}^{n_f}\zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda_{k,j}\nabla g_j(x_k) + +\sum\limits_{j=1}^{t_e}\bar{\mu}_j\nabla h_j(x_k)\|^2, +\end{array}$$ +where the $\zeta_{k,j}$'s, $\xi_k$ and the $\lambda_{k,j}$'s +are the multipliers associated with $QP(x_k,H_k,p_k)$ for the objective +functions, variable bounds, and inequality constraints +respectively.\footnote{See footnote to corresponding step in description +of FSQP-AL.} + +Update $p_k$ as follows: for $j=1,\ldots,n_e$, +$$p_{k+1,j}=\left\{\begin{array}{ll} +p_{k,j} & \mbox{if } p_{k,j}+\bar\mu_j \geq \epsilon_1\\ +\max\{\epsilon_1-\bar\mu_j,~\delta p_{k,j}\} & \mbox{otherwise.} +\end{array}\right.$$ +\item[$\cdot$] Increase $k$ by 1. +\item[$\cdot$] Go back to {\it Step 1}. +\end{itemize} + +\hfill{\large \bf $\Box$} + +\noindent{\bf Remark:} The Hessian matrix is reset +in both algorithms whenever stepsize is too small and +the updating of the matrix goes through $n$ iterations. +This is helpful in some situations where the Hessian matrix +becomes singular. + +\vspace{1em} +If the initial guess $x_0$ provided by the user is not feasible +for some inequality constraint or some linear equality constraint, +FSQP first solves a strictly convex quadratic program +\smallskip +$$\begin{array}{cl} + \min\limits_{v\in R^n} & \langle v,v\rangle \\ + \mbox{s.t.} & bl \leq x_0+v \leq bu\\ + & \langle c_j,x_0 + v \rangle \leq d_j, + ~~~j=1,\ldots,t_i-n_i\\ + & \langle a_j,x_0 + v \rangle=b_j, + ~~~j=1,\ldots,t_e-n_e. \end{array}$$ + +\vspace{.5em} +\noindent{}Then, starting from the point $x=x_0+v$, it will iterate, +using algorithm FSQP-AL, on the problem +\smallskip +$$\begin{array}{cl} + \min\limits_{x\in R^n} & \max\limits_{j=1,\ldots,n_i}\{g_j(x)\} \\ + \mbox{s.t.} & ~~bl \leq x \leq bu\\ + & ~~\langle c_j,x\rangle \leq d_j,~~~j=1,\ldots,t_i-n_i\\ + & ~~\langle a_j,x \rangle =b_j,~~~j=1,\ldots , t_e-n_e + \end{array}$$ +until $\max\limits_{j=1,\ldots,n_i}\{g_j(x)\} \leq 0$ is achieved. +The corresponding iterate $x$ will then be feasible +for all constraints other than nonlinear equality constraints of +the original problem. + +\section{Specification of Subroutine FSQPD 3.1} +Only a double precision version of FSQP, FSQPD is currently available. +The specification of FSQPD is as follows: +\vspace{1em} +\begin{quote} +\begin{verbatim} + subroutine FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint,miter, + * inform,bigbnd,eps,epseqn,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj,constr,gradob,gradcn) + integer nparam,nf,nineqn,nineq,neqn,neq,mode,iprint,miter,inform, + * iwsize,nwsize + integer iw(iwsize) + double precision bigbnd,eps,epseqn,udelta + double precision bl(nparam),bu(nparam),x(nparam), + * f(nf),g(nineq+neq),w(nwsize) + external obj,constr,gradob,gradcn +\end{verbatim} +\end{quote} +\vspace{1em} +{\bf Important:} all real variables and arrays must be declared as +double precision in the routine that calls FSQPD. The following are +specifications of parameters and workspace. + +\vspace{1em} +\begin{description} +\item[\tt nparam] {\bf (Input)}~Number of free variables, + i.e., the dimension of {\tt x}. +\item[\tt nf] {\bf (Input)}~Number of objective + functions ($n_f$ in the algorithm description). +\item[\tt nineqn] {\bf (Input)}~Number (possibly zero) of + nonlinear inequality constraints ($n_i$ in the + algorithm description). +\item[\tt nineq] {\bf (Input)}~Total number (possibly equal + to {\tt nineqn}) of + inequality constraints ($t_i$ in the algorithm + description). +\item[\tt neqn] {\bf (Input)}~Number (possibly zero) of + nonlinear equality constraints ($n_e$ in the + algorithm description). +\item[\tt neq] {\bf (Input)}~Total number (possibly equal to {\tt neqn}) of + equality constraints ($t_e$ in the algorithm + description). +\item[\tt mode] {\bf (Input)}~${\tt mode} = 1BA$ with the following + meanings: + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[${\tt A} = 0$~:~~] $(P)$ is to be solved. + \item[${\tt A} = 1$~:~~] $(PL_\infty)$ is to be solved. + $(PL_\infty)$ is defined as follows +$$ + (PL_\infty)~~~~~ \min ~ \max\limits_{i\in I^f} |f_i(x)| + \mbox{~~~s.t.~~}x\in X +$$ + where $X$ is the same as for $(P).$ It is handled + in this code by splitting $|f_i(x)|$ as $f_i(x)$ + and $-f_i(x)$ for each $i.$ The user is required + to provide only $f_i(x)$ for $i\in I^f$. + \item[${\tt B} = 0$~:~~]Algorithm FSQP-AL is + selected, resulting in a + decrease of the (modified) objective + + function at each iteration. + \item[${\tt B} = 1$~:~~]Algorithm FSQP-NL is + selected, resulting in a + decrease of the (modified) objective + function within at + most four iterations (or three + iterations, see Algorithm FSQP-NL). + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt iprint] {\bf (Input)}~Parameter indicating the + desired output (see \S 4 for details): + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[~~${\tt iprint} =0$~:~~] No information except + for user-input errors is displayed. This value + is imposed during phase 1. + \item[~~${\tt iprint} =1$~:~~] + Objective and constraint values + at the initial feasible point are displayed. + At the end of execution, status ({\tt inform}), + iterate, objective values, constraint values, + number of evaluations of objectives and + nonlinear constraints, norm of the Kuhn-Tucker + vector, and sum of feasibility violation + are displayed. + \item[~~${\tt iprint} =2$~:~~] At the end of each + iteration, the same information as with + ${\tt iprint}=1$ is displayed. + \item[~~${\tt iprint} =3$~:~~] At each iteration, + the same information as with ${\tt iprint}=2$, + including detailed information on the search + direction computation, on the line search, + and on the update is displayed. + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt miter] {\bf (Input)}~Maximum number of iterations +allowed by the user before termination of execution. +\item[\tt inform] {\bf (Output)}~Parameter indicating the status of + the execution of FSQPD: + \begin{quote} + \begin{quote} + \begin{quote} + \begin{itemize} + \item[~~${\tt inform} = 0$~:~] Normal termination of + execution in the sense that + $\|d^0\|\leq {\tt eps}$ + and (if ${\tt neqn} \ne 0$) + $\sum_{j=1}^{n_e}|h_j(x)|\leq {\tt epseqn}$. + \item[~~${\tt inform} = 1$~:~] The user-provided + initial guess + is infeasible for + linear constraints and + FSQPD is unable to + generate a point + satisfying all these + constraints. + \item[~~${\tt inform} = 2$~:~] The user-provided + initial guess + is infeasible for nonlinear + inequality constraints and + linear constraints; and + FSQPD is unable to + generate a point + satisfying all these + constraints. + \item[~~${\tt inform} = 3$~:~] The maximum + number~{\tt miter} + of iterations has been + reached before a + solution is obtained. + \item[~~${\tt inform} = 4$~:~] The line search fails + to find a new + iterate (trial step size + being + smaller than the machine + precision + {\tt epsmac} computed by FSQPD). + \item[~~${\tt inform} = 5$~:~] Failure of the QP solver + in attempting + to construct $d^0$. A more + robust QP solver may succeed. + \item[~~${\tt inform} = 6$~:~] Failure of the QP solver + in attempting + to construct $d^1$. A more + robust QP solver may succeed. + \item[~~${\tt inform} = 7$~:~] Input data are not + consistent~(with + printout + indicating the error). + \end{itemize} + \end{quote} + \end{quote} + \end{quote} +\item[\tt bigbnd] {\bf (Input)}~(see also {\tt bl} + and {\tt bu} below)~It plays the role of + Infinite Bound. +\item[\tt eps] {\bf (Input)}~Final norm requirement for +% the Kuhn-Tucker vector ($\epsilon$ in the + the Newton direction $d_k^0$ ($\epsilon$ in the + algorithm description). It must be bigger + than the machine + precision {\tt epsmac} (computed by FSQPD). + (If the user does not have a good feeling of + what value should be chosen, a very small + number could be provided and $\mbox{\tt iprint}=2$ + be selected so that the user would be able to keep track of + the process of optimization and terminate FSQPD + at appropriate time.) +\item[\tt epseqn] {\bf (Input)}~Maximum violation of nonlinear equality + constraints allowed by the user at an optimal point + ($\epsilon_e$ in the algorithm description). + It is in effect only if $n_e\ne 0$ and + must be bigger than the machine + precision {\tt epsmac} (computed by FSQPD). +\item[\tt udelta] {\bf (Input)}~The perturbation + size the user suggests to use in + approximating gradients by finite difference. + The perturbation size actually used is defined by +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times \max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} + is the square root of {\tt epsmac}). {\tt udelta} + should be set to zero if the user has no idea + how to choose it. +\item[\tt bl] {\bf (Input)}~Array of + dimension {\tt nparam} containing + lower bounds for the components of {\tt x}. + To specify a non-existent lower + bound (i.e., ${\tt bl}(j)=-\infty$ for + some $j$), the value used must + satisfy ${\tt bl}(j)\leq -{\tt bigbnd}$. +\item[\tt bu] {\bf (Input)}~Array of + dimension {\tt nparam} containing + upper bounds for the components of {\tt x}. + To specify a non-existent upper + bound (i.e., ${\tt bu}(j)=\infty$ for + some $j$), the value used must + satisfy ${\tt bu}(j)\geq {\tt bigbnd}$. +\item[\tt x] {\bf (Input)}~Initial guess.\\ + {\bf (Output)}~Iterate at the end of execution. +\item[\tt f] Array of dimension $\max\{1, {\tt nf}\}$.\\ + {\bf (Output)}~Value of functions + $f_i,i=1,\ldots,n_f$, at {\tt x} at the end of + execution. +\item[\tt g] Array of dimension $\max\{1,{\tt nineq}+{\tt neq}\}$.\\ + {\bf (Output)}~Values of constraints at {\tt x} at + the end of execution. +\item[\tt iw] Workspace vector of dimension {\tt iwsize}. +\item[\tt iwsize] {\bf (Input)}~Workspace length + for {\tt iw}. It must be at least as big as + $6\times {\tt nparam}+8\times ({\tt nineq}+{\tt neq}) + +7\times{\tt nf}+30$. This estimate is usually very conservative + and the smallest suitable value will be + displayed if the user-supplied value is too small. +\item[\tt w] {\bf (Input)}~Workspace of dimension {\tt nwsize}. \\ + {\bf (Output)}~Estimate of Lagrange multipliers at + the end of execution of phase 2 in the + first ${\tt nparam}+{\tt nineq+neq+nff}$ entries; + where ${\tt nff}=0$ if (in {\tt mode}) ${\tt A}=0$ and + ${\tt nf}=1$, and ${\tt nff}={\tt nf}$ otherwise. + They are ordered as $\xi$'s (variables), $\lambda$'s (inequality + constraints), $\mu$'s (equality constraints), and $\zeta$ + (objective functions). + $\lambda _j \geq 0~~\forall j=1,\ldots,t_i$ + and $\mu _j \ge 0~~\forall j=1,\ldots,t_e.$ $\xi _i > 0$ + indicates that $x_i$ reaches its upper bound and $\xi _i <0$ + indicates that $x_i$ reaches its lower bound. When + (in {\tt mode}) ${\tt A}=0$ and ${\tt nf}>1$, $\zeta _i \geq0.$ + When ${\tt B}=1$, $\zeta _i >0$ refers to + $+f_i(x)$ and $\zeta _i<0$ to $-f_i(x)$. +\item[\tt nwsize] {\bf (Input)}~Workspace length for {\tt w}. + It must be at least as big as + $4\times {\tt nparam}^{2}+ + 5\times ({\tt nineq}+{\tt neq})\times{\tt nparam}+ + 3\times{\tt nf}\times{\tt nparam}+ + 26\times ({\tt nparam}+{\tt nf})+45\times ({\tt nineq}+{\tt neq})+100$ +. This estimate + is usually very conservative and the + smallest suitable value will be + displayed if the user-supplied value is too small. +\item[\tt obj] {\bf (Input)}~Name of the user-defined subroutine + that computes the value of the objective + functions $f_i(x),~~\forall i=1,\ldots,n_f.$ This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The detailed specification is given in \S 5.1 below. +\item[\tt constr] {\bf (Input)}~Name of the user-defined subroutine + that computes the value of the constraints. This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The detailed specification is given in \S 5.2 below. +\item[\tt gradob] {\bf (Input)}~Name of the subroutine that + computes the gradients of the objective + functions $f_i(x),~~\forall i=1,\ldots,n_f.$ This name must + be declared as {\bf external} in the calling routine + and passed as an argument to FSQPD. + The user must pass the subroutine name + {\tt grobfd}~(and declare it as {\bf external}), + if he/she wishes that FSQPD evaluate + these gradients automatically, by forward finite differences. + The detailed specification is given in \S 5.3 below. +\item[\tt gradcn] {\bf (Input)}~Name of the subroutine that + computes the gradients of the constraints. + This name must be declared as {\bf external} in the calling + routine and passed as an argument to FSQPD. + The user must pass the subroutine name {\tt grcnfd}~(and + declare it as {\bf external}), if he/she wishes that + FSQPD evaluate these gradients automatically, + by forward finite differences. + The detailed specification is given in \S 5.4 below. +\end{description} + +\section{User-Accessible Stopping Criterion} +As is clear from the two algorithms, the optimization process +normally terminates if both +$\|d_k^0\|\leq\epsilon$ +and $\sum_{j=1}^{n_e}|h_j(x_k)|\leq\epsilon_e$ are satisfied. +Very small value of either of these two parameters may request +exceedingly long execution time, depending on the complexity +of underlying problem and the nonlinearity of various functions. +FSQP allows users to specify their own stopping criterion in any one of +the four user-supplied subroutines mentioned above via the following +common block +\begin{verbatim} + integer nstop + common /fsqpst/nstop +\end{verbatim} +if (s)he wishes to. +${\tt nstop}=0$ should be returned to FSQP when the stopping criterion +is satisfied. FSQP will check the value of {\tt nstop} at appropriate places +during the optimization process and will terminate when +either the user's criterion or the default criterion is satisfied. + +\section{Description of the Output} +No output will be displayed before a feasible starting +point is obtained. The following information is displayed +at the end of execution when +${\tt iprint} = 1$ or at each iteration when ${\tt iprint}=2$: +\begin{description} +\item[\tt iteration] Total number of iterations (${\tt iprint}=1$) or + iteration number (${\tt iprint}=2$). +\item[\tt inform] See \S 3. It is displayed only + at the end of execution. +\item[\tt x] Iterate. +\item[\tt objectives] Value of objective functions $f_i(x),~~\forall + i=1,\ldots,n_f$ at {\tt x}. +\item[\tt objmax] (displayed only if $\mbox{\tt nf} > 1$)~The + maximum value of the set of objective + functions (i.e., $\max f_i(x) \mbox{ or } \max |f_i(x)|,~~ + \forall i=1,\ldots,n_f$) at {\tt x}. +\item[\tt objective max4] (displayed only if $\mbox{\tt B} = 1$ + in {\tt mode})~Largest value of + the maximum of the objective functions over the + last four (or three, see FSQP-NL) + iterations (including the current one). +\item[\tt constraints] Values of the constraints at {\tt x}. +\item[\tt ncallf] Number of evaluations (so far) of + individual~(scalar) objective function $f_i(x)$ + for $1\leq i \leq n_f.$ +\item[\tt ncallg] Number of evaluations (so far) of + individual~(scalar) nonlinear constraints. +\item[\tt d0norm] Norm of the Newton direction $d_k^0$. +\item[\tt ktnorm] Norm of the Kuhn-Tucker vector at the current + iteration. The Kuhn-Tucker vector is given by +$$\begin{array}{lll} +\nabla L(x_k,\zeta_k,\xi_k,\lambda_k,\mu_k,p_k)& = & +\sum\limits_{j=1}^{n_f} \zeta _{k,j}\nabla f_j(x_k)+ +\xi_k+\sum\limits_{j=1}^{t_i}\lambda _{k,j}\nabla g_j(x_k) \\ +& &~+\sum\limits_{j=1}^{n_e}(\mu_{k,j}-p_{k,j})\nabla h_j(x_k) + +\sum\limits_{j=n_e+1}^{t_e}\mu_{k,j}\nabla h_j(x_k).\end{array}$$ +\item[\tt SCV] Sum of the violation of nonlinear equality constraints +at a solution. +\end{description} + +{\noindent}For ${\tt iprint}=3$, in addition to the same + information as the one for ${\tt iprint}=2$, + the following is printed at every iteration. + +\vspace{1em} +Details in the computation of a search direction: +\begin{description} +\item[\tt d0] Quasi-Newton direction $d^0_k$. +\item[\tt d1] First order direction $d^1_k$. +\item[\tt d1norm] Norm of $d^1_k$. +\item[\tt d] (${\tt B}=0$ in {\tt mode})~Feasible descent + direction $d_k=(1-\rho _k)d^0_k+\rho _k d^1_k$. +\item[\tt dnorm] (${\tt B}=0$ in {\tt mode})~Norm of $d_k$. +\item[\tt rho] (${\tt B}=0$ in {\tt mode})~Coefficient $\rho_k$ in + constructing $d_k$. +\item[\tt dl] (${\tt B}=1$ in {\tt mode})~Local direction + $d^\ell_k=(1-\rho^\ell_k)d_k^0+\rho^\ell_kd^1_k$. +\item[\tt dlnorm] (${\tt B}=1$ in {\tt mode})~Norm of $d_k^\ell$. +\item[\tt rhol] (${\tt B}=1$ in {\tt mode})~Coefficient $\rho_k^{\ell}$ in + constructing $d_k^{\ell}$. +\item[\tt dg] (${\tt B}=1$ in {\tt mode})~Global search direction + $d^g=(1-\rho^g_k)d_k^0+\rho^g_kd^1_k$. +\item[\tt dgnorm] (${\tt B}=1$ in {\tt mode})~Norm of $d_k^g$. +\item[\tt rhog] (${\tt B}=1$ in {\tt mode})~Coefficient $\rho_k^g$ in + constructing $d_k^g$. +\item[\tt dtilde] Second order correction $\tilde d_k$. +\item[\tt dtnorm] Norm of $\tilde d_k$. +\end{description} + +Details in the line search: +\begin{description} +\item[\tt trial step] Trial steplength $t$ in the search direction. +\item[\tt trial point] Trial iterate along the search arc + with {\tt trial step}. +\item[\tt trial objectives] This gives the indices $i$ and + the corresponding + values of the functions + $f_i(x)-\sum_{j=1}^{n_e}p_jh_j(x)$ + for $1\leq i \leq n_f$ up to the one which fails + in line search at the {\tt trial point}. The + indices $i$ + are not necessarily in the natural order (see + remark at the end of {\it Step 2} in FSQP-AL and of + the end of {\it Step~1~viii}\ in FSQP-NL). +\item[\tt trial constraints] This gives the indices $j$ and the + corresponding values of nonlinear constraints + for $1\leq j \leq n_i+n_e$ up to the + one which is not feasible at the {\tt trial point}. + The indices $j$ + are not necessarily in the natural order (see + remark at the end of {\it Step 2} in FSQP-AL and of + the end of {\it Step~1~viii}\ in FSQP-NL). +\end{description} + +Details in the updates: +\begin{description} +\item[\tt delta] Perturbation size for each variable + in finite difference gradients computation. +\item[\tt gradf] Gradients of + functions $f_i(x),~\forall i=1,\ldots,n_f,$ + at the new iterate. +\item[\tt gradg] Gradients of constraints at the new iterate. +\item[\tt p] Penalty parameters for nonlinear equality constraints at + the new iterate. +\item[\tt multipliers] Multiplier estimates ordered as $\xi$'s, + $\lambda$'s, $\mu$'s, and $\zeta$'s (from quadratic program + computing $d^0_k$). $\lambda _j \geq 0~~\forall j=1,\ldots,t_i$ + and $\mu _j \ge 0~~\forall j=1,\ldots,t_e$. $\xi _i > 0$ + indicates that $x_i$ reaches its upper bound and $\xi _i <0$ + indicates that $x_i$ reaches its lower bound. When + (in {\tt mode}) ${\tt A}=0$ and ${\tt nf}>1$, $\zeta _i \geq0$. + When (in {\tt mode}) ${\tt A}=1$, $\zeta _i >0$ refers to + $+f_i(x)$ and $\zeta _i<0$ to $-f_i(x)$. + (cf.\ \S 3 under item {\tt w}.) +\item[\tt hess] Estimate of the Hessian matrix of the Lagrangian. +\item[\tt Ck] The value $C_k$ as defined in Algorithm FSQP-NL. +\end{description} + +\section{User-Supplied Subroutines} +At least two of the following four Fortran 77 subroutines, +namely {\tt obj} and {\tt constr}, +must be provided by the user in order to define the problem. +The name of all four routines can be changed at the user's will, +as they are passed as arguments to FSQPD. + +\subsection{Subroutine obj} +The subroutine {\bf obj}, to be provided by the user, +computes the value of the objective functions. +A (dummy) subroutine must be provided due to Fortran 77 compiling +requirement if $\mbox{\tt nf}=0$ (This may happen when the user +is only interested in finding a feasible point). +The specification of {\bf obj} for FSQPD is +\begin{quote} +\begin{verbatim} + subroutine obj(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj + c + c for given j, assign to fj the value of the jth objective + c evaluated at x + c + return + end +\end{verbatim} +\end{quote} +\noindent Arguments: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of the objective to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt fj] {\bf (Output)}~Value of the {\tt j}th objective function + at {\tt x}. +\end{description} + +\subsection{Subroutine constr} +The subroutine {\bf constr}, to be provided by the user, +computes the value of +the constraints. If there are no constraints, +a (dummy) subroutine must be +provided anyway due to Fortran 77 compiling requirement. +The specification of {\tt constr} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine constr(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj + c + c for given j, assign to gj the value of the jth constraint + c evaluated at x + c + return + end +\end{verbatim} +\end{quote} +\noindent Arguments: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of the constraint to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gj] {\bf (Output)}~Value of the {\tt j}th constraint at {\tt x}. +\end{description} +\bigskip +The order of the constraints must be as follows. +First the {\tt nineqn} (possibly zero) nonlinear inequality constraints. +Then the ${\tt nineq-nineqn}$ (possibly zero) linear inequality constraints. +Finally, the {\tt neqn} (possibly zero) nonlinear equality constraints +followed by the ${\tt neq-neqn}$ (possibly zero) linear equality constraints. + +\subsection{Subroutine gradob} +The subroutine {\bf gradob} computes the gradients of the +objective functions. +The user may omit to provide this routine and require that +forward finite difference +approximation be used by FSQPD via calling {\tt grobfd} instead~ +(see argument {\tt gradob} of FSQPD in \S 3). +The specification of {\tt gradob} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine gradob(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision x(nparam),gradfj(nparam) + double precision dummy + external dummy +c +c assign to gradfj the gradient of the jth objective function +c evaluated at x +c + return + end +\end{verbatim} +\end{quote} +\noindent{Arguments}: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of objective for + which gradient is to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gradfj] {\bf (Output)}~Gradient of the {\tt j}th objective + function at x. +\item[\tt dummy] {\bf (Input)}~Used by {\tt grobfd}. +\end{description} +Note that {\tt dummy} is +passed as arguments to {\tt gradob} to allow for forward finite +difference computation of the gradient. + +\subsection{Subroutine gradcn} +The subroutine {\bf gradcn} computes the gradients of the constraints. +The user may omit to provide this routine and require that forward +finite difference approximation be used by FSQPD via +calling {\tt grcnfd} instead (see argument {\tt gradcn} of FSQPD in \S 3). +The specification of {\tt gradcn} for FSQPD is as follows +\begin{quote} +\begin{verbatim} + subroutine gradcn (nparam,j,x,gradgj,dummy) + integer nparam,j + double precision x(nparam),gradgj(nparam) + double precision dummy + external dummy +c +c assign to gradgj the gradient of the jth constraint +c evaluated at x +c + return + end +\end{verbatim} +\end{quote} +\noindent{Arguments}: +\begin{description} +\item[\tt nparam] {\bf (Input)}~Dimension of {\tt x}. +\item[\tt j] {\bf (Input)}~Number of constraint for which + gradient is to be computed. +\item[\tt x] {\bf (Input)}~Current iterate. +\item[\tt gradgj] {\bf (Output)}~Gradient of the {\tt j}th + constraint evaluated at {\tt x}. +\item[\tt dummy] {\bf (Input)}~Used by {\tt grcnfd}. +\end{description} + +\noindent Note that {\tt dummy} is passed as arguments +to {\tt gradcn} to allow for forward finite difference +computation of the gradients. + +\section{Organization of FSQPD and Main Subroutines} +\subsection{Main Subroutines} +FSQPD first checks for inconsistencies of input parameters using the +subroutine {\tt check}. It then checks if the starting +point given by the user satisfies the linear +constraints and if not, generates a point +satisfying these constraints using +subroutine {\tt initpt}. It then calls FSQPD1 for generating a point +satisfying linear and nonlinear inequality constraints. Finally, +it attempts to find +a point satisfying the optimality condition using again FSQPD1. +\begin{description} +\item[\tt check] Check that all upper bounds on variables + are no smaller than lower bounds; + check that all input integers are nonnegative + and appropriate (${\tt nineq} \geq {\tt nineqn}$, etc.); + and check that {\tt eps} ($\epsilon$) + and (if ${\tt neqn}\ne 0$) {\tt epseqn} + ($\epsilon_e$) are at least as large as + the machine precision {\tt epsmac} (computed by FSQPD). +\item[\tt initpt] Attempt to generate a feasible point satisfying + simple bounds and all linear constraints. +\item[\tt FSQPD1] Main subroutine used possibly twice by FSQPD, + first for generating + a feasible iterate as explained at the + end of \S 2 and + second for generating an optimal iterate + from that feasible iterate. +\end{description} +FSQPD1 uses the following subroutines: +\begin{description} +\item[\tt dir] Compute various directions $d_k^0$, $d^1_0$ and $\tilde d_k$. +\item[\tt step]Compute a step size along a certain search direction. + It is also called to check if $x_k+d_k^\ell$ is acceptable + in {\it Step 1 v} of Algorithm FSQP-NL. +\item[\tt hesian] Perform the Hessian matrix updating. +\item[\tt out] Print the output for ${\tt iprint=1}$ + or ${\tt iprint}=2$. +\item[\tt grobfd] (optional)~Compute the gradient of an objective + function + by forward finite differences with mesh size equal to +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times\max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} is the + square root of {\tt epsmac}, the machine + precision computed by FSQPD). +\item[\tt grcnfd] (optional)~Compute the gradient of a constraint by + forward finite differences with mesh size equal to +$\mbox{sign}(x^i)\times\max \{{\tt udelta},~ + {\tt rteps}\times\max (1,\,|x^i|)\}$~ + for each component $x^i$ of $x$ ({\tt rteps} is the + square root of {\tt epsmac}, the machine + precision computed by FSQPD). +\end{description} + +\subsection{Other Subroutines} +In addition to QLD, the following subroutines are used: +\begin{verbatim} + diagnl di1 dqp error estlam fool fuscmp indexs matrcp + matrvc nullvc resign sbout1 sbout2 scaprd shift slope small +\end{verbatim} + +\subsection{Reserved Common Blocks} +The following named common blocks are used in FSQPD and QLD: +\begin{verbatim} + fsqpp1 fsqpp2 fsqpp3 fsqpq1 fsqpq2 fsqplo fsqpqp fsqpst CMACHE +\end{verbatim} + + +\input manua2
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/sampl1.for @@ -0,0 +1,98 @@ +c +c problem description +c + program sampl1 +c + integer iwsize,nwsize,nparam,nf,nineq,neq + parameter (iwsize=29, nwsize=219) + parameter (nparam=3, nf=1) + parameter (nineq=1, neq=1) + integer iw(iwsize) + double precision x(nparam),bl(nparam),bu(nparam),f(nf+1), + * g(nineq+neq+1),w(nwsize) + external obj32,cntr32,grob32,grcn32 +c + integer mode,iprint,miter,neqn,nineqn,inform + double precision bigbnd,eps,epsneq,udelta +c + mode=100 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.d-08 + epsneq=0.d0 + udelta=0.d0 +c +c nparam=3 +c nf=1 + neqn=0 + nineqn=1 +c nineq=1 +c neq=1 +c + bl(1)=0.d0 + bl(2)=0.d0 + bl(3)=0.d0 + bu(1)=bigbnd + bu(2)=bigbnd + bu(3)=bigbnd +c +c give the initial value of x +c + x(1)=0.1d0 + x(2)=0.7d0 + x(3)=0.2d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epsneq,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj32,cntr32,grob32,grcn32) + end +c + subroutine obj32(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj +c + fj=(x(1)+3.d0*x(2)+x(3))**2+4.d0*(x(1)-x(2))**2 + return + end +c + subroutine grob32(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision dummy,x(nparam),gradfj(nparam), + * fa,fb + external dummy +c + fa=2.d0*(x(1)+3.d0*x(2)+x(3)) + fb=8.d0*(x(1)-x(2)) + gradfj(1)=fa+fb + gradfj(2)=fa*3.d0-fb + gradfj(3)=fa + return + end +c + subroutine cntr32(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj +c + go to (10,20),j + 10 gj=x(1)**3-6.0d0*x(2)-4.0d0*x(3)+3.d0 + return + 20 gj=1.0d0-x(1)-x(2)-x(3) + return + end +c + subroutine grcn32(nparam,j,x,gradgj,dummy) + integer nparam,j + double precision dummy,x(nparam),gradgj(nparam) + external dummy +c + go to (10,20),j + 10 gradgj(1)=3.d0*x(1)**2 + gradgj(2)=-6.d0 + gradgj(3)=-4.d0 + return + 20 gradgj(1)=-1.d0 + gradgj(2)=-1.d0 + gradgj(3)=-1.d0 + return + end
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/sampl2.for @@ -0,0 +1,91 @@ +c +c problem description +c + program sampl2 +c + integer nwsize,iwsize,nparam,nf,nineq,neq + parameter (iwsize=1029, nwsize=7693) + parameter (nparam=6, nf=163, nineq=7, neq=0) + integer nineqn,neqn,mode,iprint,miter,inform, + * iw(iwsize) + double precision bigbnd,eps,epsneq,delta + double precision x(nparam),bl(nparam),bu(nparam),w(nwsize), + * f(nf+1),g(nineq+neq+1) + external objmad,cnmad,grobfd,grcnfd +c + mode=111 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.d-08 + epsneq=0.d0 + delta=0.d0 +c +c nparam=6 +c nf=163 + nineqn=0 + neqn=0 +c nineq=7 +c neq=0 +c + bl(1)=-bigbnd + bl(2)=-bigbnd + bl(3)=-bigbnd + bl(4)=-bigbnd + bl(5)=-bigbnd + bl(6)=-bigbnd + bu(1)=bigbnd + bu(2)=bigbnd + bu(3)=bigbnd + bu(4)=bigbnd + bu(5)=bigbnd + bu(6)=bigbnd +c +c give the initial value of x +c + x(1) = 0.5d0 + x(2) = 1.d0 + x(3) = 1.5d0 + x(4) = 2.d0 + x(5) = 2.5d0 + x(6) = 3.d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epsneq,delta,bl,bu,x,f, + * g,iw,iwsize,w,nwsize,objmad,cnmad,grobfd,grcnfd) + end +c + subroutine objmad(nparam,j,x,fj) + integer nparam,j,i + double precision x(nparam),theta,pi,fj +c + pi=3.14159265358979d0 + theta=pi*(8.5d0+dble(j)*0.5d0)/180.d0 + fj=0.d0 + do 10 i=1,6 + 10 fj=fj+dcos(2.d0*pi*x(i)*dsin(theta)) + fj=2.d0*(fj+dcos(2.d0*pi*3.5d0*dsin(theta)))/15.d0+1.d0/15.d0 + return + end +c + subroutine cnmad(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),ss,gj +c + ss=0.425d0 + goto(10,20,30,40,50,60,70),j + 10 gj=ss-x(1) + return + 20 gj=ss+x(1)-x(2) + return + 30 gj=ss+x(2)-x(3) + return + 40 gj=ss+x(3)-x(4) + return + 50 gj=ss+x(4)-x(5) + return + 60 gj=ss+x(5)-x(6) + return + 70 gj=ss+x(6)-3.5d0 + return + end
new file mode 100644 --- /dev/null +++ b/libcruft/fsqp/sampl3.for @@ -0,0 +1,94 @@ +c +c problem description +c + integer iwsize,nwsize,nparam,nf,nineq,neq + parameter (iwsize=33, nwsize=284) + parameter (nparam=4, nf=1) + parameter (nineq=1, neq=1) + integer iw(iwsize) + double precision x(nparam),bl(nparam),bu(nparam),f(nf+1), + * g(nineq+neq+1),w(nwsize) + external obj,cntr,gradob,gradcn +c + integer mode,iprint,miter,neqn,nineqn,inform + double precision bigbnd,eps,epsneq,udelta +c + mode=100 + iprint=1 + miter=500 + bigbnd=1.d+10 + eps=1.d-07 + epsneq=7.d-6 + udelta=0.d0 +c + neqn=1 + nineqn=1 + bl(1)=1.d0 + bl(2)=1.d0 + bl(3)=1.d0 + bl(4)=1.d0 + bu(1)=5.d0 + bu(2)=5.d0 + bu(3)=5.d0 + bu(4)=5.d0 +c +c give the initial value of x +c + x(1)=1.d0 + x(2)=5.d0 + x(3)=5.d0 + x(4)=1.d0 +c + call FSQPD(nparam,nf,nineqn,nineq,neqn,neq,mode,iprint, + * miter,inform,bigbnd,eps,epsneq,udelta,bl,bu,x,f,g, + * iw,iwsize,w,nwsize,obj,cntr,gradob,gradcn) + end +c + subroutine obj(nparam,j,x,fj) + integer nparam,j + double precision x(nparam),fj +c + fj=x(1)*x(4)*(x(1)+x(2)+x(3))+x(3) + return + end +c + subroutine gradob(nparam,j,x,gradfj,dummy) + integer nparam,j + double precision dummy,x(nparam),gradfj(nparam) + external dummy +c + gradfj(1)=x(4)*(x(1)+x(2)+x(3))+x(1)*x(4) + gradfj(2)=x(1)*x(4) + gradfj(3)=x(1)*x(4)+1.d0 + gradfj(4)=x(1)*(x(1)+x(2)+x(3)) + return + end +c + subroutine cntr(nparam,j,x,gj) + integer nparam,j + double precision x(nparam),gj +c + goto (10,20),j + 10 gj=25.d0-x(1)*x(2)*x(3)*x(4) + return + 20 gj=x(1)**2+x(2)**2+x(3)**2+x(4)**2-40.d0 + return + end +c + subroutine gradcn(nparam,j,x,gradgj,dummy) + integer nparam,j + double precision dummy,x(nparam),gradgj(nparam) + external dummy +c + goto (10,20),j + 10 gradgj(1)=-x(2)*x(3)*x(4) + gradgj(2)=-x(1)*x(3)*x(4) + gradgj(3)=-x(1)*x(2)*x(4) + gradgj(4)=-x(1)*x(2)*x(3) + return + 20 gradgj(1)=2.d0*x(1) + gradgj(2)=2.d0*x(2) + gradgj(3)=2.d0*x(3) + gradgj(4)=2.d0*x(4) + return + end
new file mode 100644 --- /dev/null +++ b/libcruft/npsol/README.MISSING @@ -0,0 +1,18 @@ +If it were freely redistributable, the source for Gill and Murray's +nonlinear programming solver NPSOL would be in this directory. + +Unfortunately, if you want octave to use NPSOL to solve constrained +nonlinear optimization problems, you must get the source from the +Stanford Office of Technology Licensing: + + Stanford University + Office of Technology Licensing + 857 Serra Street + Stanford CA 94305-7295 + USA + + Tel: (415) 723-0651 + Fax: (415) 725-7295 + +As of April, 1992, the license fee for NPSOL was $3600 for commercial +sites and $400 for academic and US Government sites.
new file mode 100644 --- /dev/null +++ b/libcruft/qpsol/README.MISSING @@ -0,0 +1,18 @@ +If it were freely redistributable, the source for Gill and Murray's +quadratic programming solver QPSOL would be in this directory. + +Unfortunately, if you want octave to use QPSOL to solve quadratic +programs, you must get the source from the Stanford Office of +Technology Licensing: + + Stanford University + Office of Technology Licensing + 857 Serra Street + Stanford CA 94305-7295 + USA + + Tel: (415) 723-0651 + Fax: (415) 725-7295 + +As of April, 1992, the license fee for QPSOL was $3600 for commercial +sites and $400 for academic and US Government sites.
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/Basegen.doc @@ -0,0 +1,382 @@ + + + + + + + + + + + + RANLIB + + Library of Fortran Routines for Random Number Generation + + + + + + + + + Base Generator Documentation + + + + + + + + + Compiled and Written by: + + Barry W. Brown + James Lovato + + + + + + + + + + + Department of Biomathematics, Box 237 + The University of Texas, M.D. Anderson Cancer Center + 1515 Holcombe Boulevard + Houston, TX 77030 + + + This work was supported by grant CA-16672 from the National Cancer Institute. + + + + + Base Random Number Generator + + + +I. OVERVIEW AND DEFAULT BEHAVIOR + +This set of programs contains 32 virtual random number generators. +Each generator can provide 1,048,576 blocks of numbers, and each block +is of length 1,073,741,824. Any generator can be set to the beginning +or end of the current block or to its starting value. The methods are +from the paper cited immediately below, and most of the code is a +transliteration from the Pascal of the paper into Fortran. + +P. L'Ecuyer and S. Cote. Implementing a Random Number Package with +Splitting Facilities. ACM Transactions on Mathematical Software 17:1, +pp 98-111. + +Most users won't need the sophisticated capabilities of this package, +and will desire a single generator. This single generator (which will +have a non-repeating length of 2.3 X 10^18 numbers) is the default. +In order to accommodate this use, the concept of the current generator +is added to those of the cited paper; references to a generator are +always to the current generator. The current generator is initially +generator number 1; it can be changed by SETCGN, and the ordinal +number of the current generator can be obtained from GETCGN. + +The user of the default can set the initial values of the two integer +seeds with SETALL. If the user does not set the seeds, the random +number generation will use the default values, 1234567890 and +123456789. The values of the current seeds can be achieved by a call +to GETSD. Random number may be obtained as integers ranging from 1 to +a large integer by reference to function IGNLGI or as a floating point +number between 0 and 1 by a reference to function RANF. These are the +only routines needed by a user desiring a single stream of random +numbers. + +II. CONCEPTS + +A stream of pseudo-random numbers is a sequence, each member of which +can be obtained either as an integer in the range 1..2,147,483,563 or +as a floating point number in the range [0..1]. The user is in charge +of which representation is desired. + +The method contains an algorithm for generating a stream with a very +long period, 2.3 X 10^18. This stream in partitioned into G (=32) +virtual generators. Each virtual generator contains 2^20 (=1,048,576) +blocks of non-overlapping random numbers. Each block is 2^30 +(=1,073,741,824) in length. + + + +Base Random Number Generator Page 2 + + +The state of a generator is determined by two integers called seeds. +The seeds can be initialized by the user; the initial values of the +first must lie between 1 and 2,147,483,562, that of the second between +1 and 2,147,483,398. Each time a number is generated, the values of +the seeds change. Three values of seeds are remembered by the +generators at all times: the value with which the generator was +initialized, the value at the beginning of the current block, and the +value at the beginning of the next block. The seeds of any generator +can be set to any of these three values at any time. + + Of the 32 virtual generators, exactly one will be the current +generator, i.e., that one will be used to generate values for IGNLGI +and RANDF. Initially, the current generator is set to number one. +The current generator may be changed by calling SETCGN, and the number +of the current generator can be obtained using GETCGN. + +III. AN EXAMPLE + +An example of the need for these capabilities is as follows. Two +statistical techniques are being compared on data of different sizes. +The first technique uses bootstrapping and is thought to be as +accurate using less data than the second method which employs only +brute force. + +For the first method, a data set of size uniformly distributed between +25 and 50 will be generated. Then the data set of the specified size +will be generated and alalyzed. The second method will choose a data +set size between 100 and 200, generate the data and alalyze it. This +process will be repeated 1000 times. + +For variance reduction, we want the random numbers used in the two +methods to be the same for each of the 1000 comparisons. But method +two will use more random numbers than method one and without this +package, synchronization might be difficult. + +With the package, it is a snap. Use generator 1 to obtain the sample +size for method one and generator 2 to obtain the data. Then reset +the state to the beginning of the current block and do the same for +the second method. This assures that the initial data for method two +is that used by method one. When both have concluded, advance the +block for both generators. + +IV. THE INTERFACE + +A random number is obtained either as a random integer between 1 and +2,147,483,562 by invoking integer function IGNLGI (I GeNerate LarGe +Integer) or as a random floating point number between 0 and 1 by +invoking real function RANF. Neither function has arguments. + +The seed of the first generator can be set by invoking subroutine +SETALL; the values of the seeds of the other 31 generators are +calculated from this value. + + + +Base Random Number Generator Page 3 + + +The number of the current generator can be set by calling subroutine +SETCGN, which takes a single argument, the integer generator number in +the range 1..32. The number of the current generator can be obtained +by invoking subroutine GETCGN which returns the number in its single +integer argument. + + +V. CALLING SEQUENCES + + A. SETTING THE SEED OF ALL GENERATORS + +C********************************************************************** +C +C SUBROUTINE SETALL(ISEED1,ISEED2) +C SET ALL random number generators +C +C Sets the initial seed of generator 1 to ISEED1 and ISEED2. The +C initial seeds of the other generators are set accordingly, and +C all generators states are set to these seeds. +C +C Arguments +C +C +C ISEED1 -> First of two integer seeds +C INTEGER ISEED1 +C +C ISEED2 -> Second of two integer seeds +C INTEGER ISEED1 +C +C********************************************************************** + + + B. OBTAINING RANDOM NUMBERS + +C********************************************************************** +C +C INTEGER FUNCTION IGNLGI() +C GeNerate LarGe Integer +C +C Returns a random integer following a uniform distribution over +C (1, 2147483562) using the current generator. +C +C********************************************************************** + +C********************************************************************** +C +C REAL FUNCTION RANF() +C RANDom number generator as a Function +C +C Returns a random floating point number from a uniform distribution +C over 0 - 1 (endpoints of this interval are not returned) using the +C current generator +C +C********************************************************************** + + + +Base Random Number Generator Page 4 + + + C. SETTING AND OBTAINING THE NUMBER OF THE CURRENT GENERATOR + +C********************************************************************** +C +C SUBROUTINE SETCGN( G ) +C Set GeNerator +C +C Sets the current generator to G. All references to a generator +C are to the current generator. +C +C Arguments +C +C G --> Number of the current random number generator (1..32) +C INTEGER G +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE GETCGN(G) +C Get GeNerator +C +C Returns in G the number of the current random number generator +C +C Arguments +C +C G <-- Number of the current random number generator (1..32) +C INTEGER G +C +C********************************************************************** + + D. OBTAINING OR CHANGING SEEDS IN CURRENT GENERATOR + +C********************************************************************** +C +C SUBROUTINE ADVNST(K) +C ADV-a-N-ce ST-ate +C +C Advances the state of the current generator by 2^K values and +C resets the initial seed to that value. +C +C Arguments +C +C +C K -> The generator is advanced by 2^K values +C INTEGER K +C +C********************************************************************** + + + +Base Random Number Generator Page 5 + + +C********************************************************************** +C +C SUBROUTINE GETSD(ISEED1,ISEED2) +C GET SeeD +C +C Returns the value of two integer seeds of the current generator +C +C Arguments +C +C +C +C ISEED1 <- First integer seed of generator G +C INTEGER ISEED1 +C +C ISEED2 <- Second integer seed of generator G +C INTEGER ISEED1 +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE INITGN(ISDTYP) +C INIT-ialize current G-e-N-erator +C +C Reinitializes the state of the current generator +C +C Arguments +C +C +C ISDTYP -> The state to which the generator is to be set +C ISDTYP = -1 => sets the seeds to their initial value +C ISDTYP = 0 => sets the seeds to the first value of +C the current block +C ISDTYP = 1 => sets the seeds to the first value of +C the next block +C +C INTEGER ISDTYP +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE SETSD(ISEED1,ISEED2) +C SET S-ee-D of current generator +C +C Resets the initial seed of the current generator to ISEED1 and +C ISEED2. The seeds of the other generators remain unchanged. +C +C Arguments +C +C +C ISEED1 -> First integer seed +C INTEGER ISEED1 +C +C ISEED2 -> Second integer seed +C INTEGER ISEED1 +C +C********************************************************************** + + + +Base Random Number Generator Page 6 + + + E. MISCELLANY + +C********************************************************************** +C +C INTEGER FUNCTION MLTMOD(A,S,M) +C +C Returns (A*S) MOD M +C +C Arguments +C +C +C A, S, M --> +C INTEGER A,S,M +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE SETANT(QVALUE) +C SET ANTithetic +C +C Sets whether the current generator produces antithetic values. If +C X is the value normally returned from a uniform [0,1] random +C number generator then 1 - X is the antithetic value. If X is the +C value normally returned from a uniform [0,N] random number +C generator then N - 1 - X is the antithetic value. +C +C All generators are initialized to NOT generate antithetic values. +C +C Arguments +C +C QVALUE -> .TRUE. if generator G is to generating antithetic +C values, otherwise .FALSE. +C LOGICAL QVALUE +C +C**********************************************************************
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/README @@ -0,0 +1,225 @@ + + + + + + + + + + + + RANLIB + + Library of Fortran Routines for Random Number Generation + + + + + + + + + README + + + + + + + + + Compiled and Written by: + + Barry W. Brown + James Lovato + + + + + + + + + + + Department of Biomathematics, Box 237 + The University of Texas, M.D. Anderson Cancer Center + 1515 Holcombe Boulevard + Houston, TX 77030 + + + This work was supported by grant CA-16672 from the National Cancer Institute. + + + SUMMARY OF RANLIB + +The bottom level routines provide 32 virtual random number generators. +Each generator can provide 1,048,576 blocks of numbers, and each block +is of length 1,073,741,824. Any generator can be set to the beginning +or end of the current block or to its starting value. Packaging is +provided so that if these capabilities are not needed, a single +generator with period 2.3 X 10^18 is seen. + +Using this base, routines are provided that return: + (1) Beta random deviates + (2) Chi-square random deviates + (3) Exponential random deviates + (4) F random deviates + (5) Gamma random deviates + (6) Multivariate normal random deviates (mean and covariance + matrix specified) + (7) Noncentral chi-square random deviates + (8) Noncentral F random deviates + (9) Univariate normal random deviates + (10) Random permutations of an integer array + (11) Real uniform random deviates between specified limits + (12) Binomial random deviates + (13) Poisson random deviates + (14) Integer uniform deviates between specified limits + (15) Seeds for the random number generator calculated from a + character string + + INSTALLATION + +Directory src contains the Fortran source for most of the routines. +Directory linpack contains two linpack routines needed by the +multivariate generator. If linpack is present on your machine, you +won't need these routines. The Fortran code from these directories +should be compiled and placed in a library. Directory test contains +three test programs for this code. + + DOCUMENTATION + +Documentation is on directory doc on the distribution. All of the +documentation is in the form of character (ASCII) files. An +explanation of the concepts involved in the base generator and details +of its implementation are contained in Basegen.doc. A summary of all +of the available routines is contained in ranlib.chs (chs is an +abbreviation of 'cheat sheet'). The 'chs' file will probably be the +reference to ranlib that is primarily used. The file, ranlib.fdoc, +contains all comments heading each routine. There is somewhat more +information in 'fdoc' than 'chs', but the additional information +consists primarily of references to the literature. + + + + + SOURCES + +The following routines, which were written by others and lightly +modified for consistency in packaging, are included in RANLIB. + + Bottom Level Routines + +These routines are a transliteration of the Pascal in the reference to +Fortran. + +L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package with +Splitting Facilities." ACM Transactions on Mathematical Software, +17:98-111 (1991) + + Exponential + +This code was obtained from Netlib. + +Ahrens, J.H. and Dieter, U. Computer Methods for Sampling From the +Exponential and Normal Distributions. Comm. ACM, 15,10 (Oct. 1972), +873 - 882. + + Gamma + +(Case R >= 1.0) + +Ahrens, J.H. and Dieter, U. Generating Gamma Variates by a Modified +Rejection Technique. Comm. ACM, 25,1 (Jan. 1982), 47 - 54. +Algorithm GD + +(Case 0.0 <= R <= 1.0) + +Ahrens, J.H. and Dieter, U. Computer Methods for Sampling from Gamma, +Beta, Poisson and Binomial Distributions. Computing, 12 (1974), +223-246. Adaptation of algorithm GS. + + Normal + +This code was obtained from netlib. + +Ahrens, J.H. and Dieter, U. Extensions of Forsythe's Method for +Random Sampling from the Normal Distribution. Math. Comput., 27,124 +(Oct. 1973), 927 - 937. + + Binomial + +This code was kindly sent me by Dr. Kachitvichyanukul. + +Kachitvichyanukul, V. and Schmeiser, B. W. Binomial Random Variate +Generation. Communications of the ACM, 31, 2 (February, 1988) 216. + + Poisson + +This code was obtained from netlib. + +Ahrens, J.H. and Dieter, U. Computer Generation of Poisson Deviates +From Modified Normal Distributions. ACM Trans. Math. Software, 8, 2 +(June 1982),163-179 + + + + + Beta + +This code was written by us following the recipe in the following. + +R. C. H. Cheng Generating Beta Variables with Nonintegral Shape +Parameters. Communications of the ACM, 21:317-322 (1978) (Algorithms +BB and BC) + + Linpack + +Routines SPOFA and SDOT are used to perform the Cholesky decomposition +of the covariance matrix in SETGMN (used for the generation of +multivariate normal deviates). + +Dongarra, J. J., Moler, C. B., Bunch, J. R. and Stewart, G. W. +Linpack User's Guide. SIAM Press, Philadelphia. (1979) + + + LEGALITIES + +Code that appeared in an ACM publication is subject to their +algorithms policy: + + Submittal of an algorithm for publication in one of the ACM + Transactions implies that unrestricted use of the algorithm within a + computer is permissible. General permission to copy and distribute + the algorithm without fee is granted provided that the copies are not + made or distributed for direct commercial advantage. The ACM + copyright notice and the title of the publication and its date appear, + and notice is given that copying is by permission of the Association + for Computing Machinery. To copy otherwise, or to republish, requires + a fee and/or specific permission. + + Krogh, F. Algorithms Policy. ACM Tran. Math. Softw. 13(1987), + 183-186. + +We place the Ranlib code that we have written in the public domain. + + NO WARRANTY + + WE PROVIDE ABSOLUTELY NO WARRANTY OF ANY KIND EITHER EXPRESSED OR + IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK + AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD + THIS PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY + SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT SHALL THE UNIVERSITY OF TEXAS OR ANY OF ITS COMPONENT + INSTITUTIONS INCLUDING M. D. ANDERSON HOSPITAL BE LIABLE TO YOU FOR + DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, + INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR + INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA OR + ITS ANALYSIS BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD + PARTIES) THE PROGRAM. + + (Above NO WARRANTY modified from the GNU NO WARRANTY statement.)
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/ranlib.chs @@ -0,0 +1,336 @@ + SUMMARY OF ROUTINES IN RANLIB + +0. Base Level Routines to Set and Obtain Values of Seeds + +(These should be the only base level routines used by those who don't +need multiple generators with blocks of numbers.) + +C********************************************************************** +C +C SUBROUTINE SETALL(ISEED1,ISEED2) +C SET ALL random number generators +C INTEGER ISEED1, ISEED2 +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GETSD(ISEED1,ISEED2) +C GET SeeD +C INTEGER ISEED1, ISEED2 +C +C Returns the value of two integer seeds of the current generator +C in ISEED1, ISEED2 +C +C********************************************************************** + +I. Higher Level Routines + +C********************************************************************** +C +C REAL FUNCTION GENBET( A, B ) +C GeNerate BETa random deviate +C REAL A,B +C +C Returns a single random deviate from the beta distribution with +C parameters A and B. The density of the beta is +C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1 +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENCHI( DF ) +C Generate random value of CHIsquare variable +C REAL DF +C +C Generates random deviate from the distribution of a chisquare +C with DF degrees of freedom random variable. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENEXP( AV ) +C GENerate EXPonential random deviate +C REAL AV +C +C Generates a single random deviate from an exponential +C distribution with mean AV. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENF( DFN, DFD ) +C GENerate random deviate from the F distribution +C REAL DFN, DFD +C +C Generates a random deviate from the F (variance ratio) +C distribution with DFN degrees of freedom in the numerator +C and DFD degrees of freedom in the denominator. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENGAM( A, R ) +C GENerates random deviates from GAMma distribution +C REAL A, R +C +C Generates random deviates from the gamma distribution whose +C density is +C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X) +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GENMN(PARM,X,WORK) +C GENerate Multivariate Normal random deviate +C REAL PARM(*), X(*), WORK(*) +C +C PARM is set by SETGMN which must be called prior to GENMN. The +C generated deviates are placed in X. WORK is a work array of the +C same size as X. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNCH( DF, XNONC ) +C Generate random value of Noncentral CHIsquare variable +C REAL DF, XNONC +C +C Generates random deviate from the distribution of a noncentral +C chisquare with DF degrees of freedom and noncentrality parameter +C XNONC. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNF( DFN, DFD, XNONC ) +C GENerate random deviate from the Noncentral F distribution +C REAL DFN, DFD, XNONC +C +C Generates a random deviate from the noncentral F (variance ratio) +C distribution with DFN degrees of freedom in the numerator, and DFD +C degrees of freedom in the denominator, and noncentrality parameter +C XNONC. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNOR( AV, SD ) +C GENerate random deviate from a NORmal distribution +C REAL AV, SD +C +C Generates a single random deviate from a normal distribution +C with mean, AV, and standard deviation, SD. +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GENPRM( IARRAY, LARRAY ) +C GENerate random PeRMutation of iarray +C INTEGER IARRAY(LARRAY), LARRAY +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENUNF( LOW, HIGH ) +C GeNerate Uniform Real between LOW and HIGH +C REAL LOW, HIGH +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNBIN( N, P ) +C GENerate BINomial random deviate +C INTEGER N +C REAL P +C +C Returns a single random deviate from a binomial +C distribution whose number of trials is N and whose +C probability of an event in each trial is P. +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNPOI( AV ) +C GENerate POIsson random deviate +C REAL AV +C +C Generates a single random deviate from a Poisson +C distribution with mean AV. +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNUIN( LOW, HIGH ) +C GeNerate Uniform INteger +C INTEGER LOW, HIGH +C +C Generates an integer uniformly distributed between LOW and HIGH. +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 ) +C PHRase To SeeDs +C CHARACTER*(*) PHRASE +C INTEGER SEED1, SEED2 +C +C Uses a phrase (character string) to generate two seeds for the RGN +C random number generator. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION RANF() +C RANDom number generator as a Function +C +C Returns a random floating point number from a uniform distribution +C over 0 - 1 (endpoints of this interval are not returned) using the +C current generator +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETGMN( MEANV, COVM, P, PARM) +C SET Generate Multivariate Normal random deviate +C INTEGER P +C REAL MEANV(P), COVM(P,P), PARM(P*(P+3)/2 + 1) +C +C P is the length of normal vectors to be generated, MEANV +C is the vector of their means and COVM is their variance +C covariance matrix. Places information necessary to generate +C the deviates in PARM. +C +C********************************************************************** + +II. Uniform Generator and Associated Routines + + + A. SETTING THE SEED OF ALL GENERATORS + +C********************************************************************** +C +C SUBROUTINE SETALL(ISEED1,ISEED2) +C SET ALL random number generators +C INTEGER ISEED1, ISEED2 +C +C********************************************************************** + + B. OBTAINING RANDOM NUMBERS + +C********************************************************************** +C +C INTEGER FUNCTION IGNLGI() +C GeNerate LarGe Integer +C +C Returns a random integer following a uniform distribution over +C (1, 2147483562) using the current generator. +C +C********************************************************************** + +C********************************************************************** +C +C REAL FUNCTION RANF() +C RANDom number generator as a Function +C +C Returns a random floating point number from a uniform distribution +C over 0 - 1 (endpoints of this interval are not returned) using the +C current generator +C +C********************************************************************** + + C. SETTING AND OBTAINING THE NUMBER OF THE CURRENT GENERATOR + +C********************************************************************** +C +C SUBROUTINE SETCGN( G ) +C Set GeNerator +C INTEGER G +C +C Sets the current generator to G. All references to a generator +C are to the current generator. +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE GETCGN(G) +C GET Current GeNerator +C INTEGER G +C +C Returns in G the number of the current random number generator +C +C********************************************************************** + + D. OBTAINING OR CHANGING SEEDS IN CURRENT GENERATOR + +C********************************************************************** +C +C SUBROUTINE ADVNST(K) +C ADV-a-N-ce ST-ate +C INTEGER K +C +C Advances the state of the current generator by 2^K values and +C resets the initial seed to that value. +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE GETSD(ISEED1,ISEED2) +C GET SeeD +C INTEGER ISEED1, ISEED2 +C +C Returns the value of two integer seeds of the current generator +C in ISEED1, ISEED2 +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE INITGN(ISDTYP) +C INIT-ialize current G-e-N-erator +C +C INTEGER ISDTYP The state to which the generator is to be set +C ISDTYP = -1 => sets the seeds to their initial value +C ISDTYP = 0 => sets the seeds to the first value of +C the current block +C ISDTYP = 1 => sets the seeds to the first value of +C the next block +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE SETSD(ISEED1,ISEED2) +C SET S-ee-D of current generator +C +C Resets the initial seed of the current generator to ISEED1 and +C ISEED2. The seeds of the other generators remain unchanged. +C +C********************************************************************** + + E. MISCELLANY + +C********************************************************************** +C +C INTEGER FUNCTION MLTMOD(A,S,M) +C Returns (A*S) MOD M +C INTEGER A, S, M +C +C********************************************************************** + +C********************************************************************** +C +C SUBROUTINE SETANT(QVALUE) +C SET ANTithetic +C LOGICAL QVALUE +C +C Sets whether the current generator produces antithetic values. If +C X is the value normally returned from a uniform [0,1] random +C number generator then 1 - X is the antithetic value. If X is the +C value normally returned from a uniform [0,N] random number +C generator then N - 1 - X is the antithetic value. +C +C All generators are initialized to NOT generate antithetic values. +C +C**********************************************************************
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/ranlib.fdoc @@ -0,0 +1,870 @@ + + + + + + + + + + + + RANLIB + + Library of Fortran Routines for Random Number Generation + + + + + + + + + Full Documentation of Each Routine + + + + + + + + + Compiled and Written by: + + Barry W. Brown + James Lovato + + + + + + + + + + + Department of Biomathematics, Box 237 + The University of Texas, M.D. Anderson Cancer Center + 1515 Holcombe Boulevard + Houston, TX 77030 + + + This work was supported by grant CA-16672 from the National Cancer Institute. + +C********************************************************************** +C +C SUBROUTINE ADVNST(K) +C ADV-a-N-ce ST-ate +C +C Advances the state of the current generator by 2^K values and +C resets the initial seed to that value. +C +C This is a transcription from Pascal to Fortran of routine +C Advance_State from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C K -> The generator is advanced by2^K values +C INTEGER K +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENBET( A, B ) +C GeNerate BETa random deviate +C +C +C Function +C +C +C Returns a single random deviate from the beta distribution with +C parameters A and B. The density of the beta is +C x^(a-1) * (1-x)^(b-1) / B(a,b) for 0 < x < 1 +C +C +C Arguments +C +C +C A --> First parameter of the beta distribution +C REAL A +C +C B --> Second parameter of the beta distribution +C REAL B +C +C +C Method +C +C +C R. C. H. Cheng +C Generating Beta Variables with Nonintegral Shape Parameters +C Communications of the ACM, 21:317-322 (1978) +C (Algorithms BB and BC) +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENCHI( DF ) +C Generate random value of CHIsquare variable +C +C +C Function +C +C +C Generates random deviate from the distribution of a chisquare +C with DF degrees of freedom random variable. +C +C +C Arguments +C +C +C DF --> Degrees of freedom of the chisquare +C (Must be positive) +C REAL DF +C +C +C Method +C +C +C Uses relation between chisquare and gamma. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENEXP( AV ) +C +C GENerate EXPonential random deviate +C +C +C Function +C +C +C Generates a single random deviate from an exponential +C distribution with mean AV. +C +C +C Arguments +C +C +C AV --> The mean of the exponential distribution from which +C a random deviate is to be generated. +C REAL AV +C +C GENEXP <-- The random deviate. +C REAL GENEXP +C +C +C Method +C +C +C Renames SEXPO from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C +C Ahrens, J.H. and Dieter, U. +C Computer Methods for Sampling From the +C Exponential and Normal Distributions. +C Comm. ACM, 15,10 (Oct. 1972), 873 - 882. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENF( DFN, DFD ) +C GENerate random deviate from the F distribution +C +C +C Function +C +C +C Generates a random deviate from the F (variance ratio) +C distribution with DFN degrees of freedom in the numerator +C and DFD degrees of freedom in the denominator. +C +C +C Arguments +C +C +C DFN --> Numerator degrees of freedom +C (Must be positive) +C REAL DFN +C DFD --> Denominator degrees of freedom +C (Must be positive) +C REAL DFD +C +C +C Method +C +C +C Directly generates ratio of chisquare variates +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENGAM( A, R ) +C GENerates random deviates from GAMma distribution +C +C +C Function +C +C +C Generates random deviates from the gamma distribution whose +C density is +C (A**R)/Gamma(R) * X**(R-1) * Exp(-A*X) +C +C +C Arguments +C +C +C A --> Location parameter of Gamma distribution +C REAL A +C +C R --> Shape parameter of Gamma distribution +C REAL R +C +C +C Method +C +C +C Renames SGAMMA from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C (Case R >= 1.0) +C Ahrens, J.H. and Dieter, U. +C Generating Gamma Variates by a +C Modified Rejection Technique. +C Comm. ACM, 25,1 (Jan. 1982), 47 - 54. +C Algorithm GD +C +C (Case 0.0 <= R <= 1.0) +C Ahrens, J.H. and Dieter, U. +C Computer Methods for Sampling from Gamma, +C Beta, Poisson and Binomial Distributions. +C Computing, 12 (1974), 223-246/ +C Adapted algorithm GS. +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GENMN(PARM,X,WORK) +C GENerate Multivariate Normal random deviate +C +C +C Arguments +C +C +C PARM --> Parameters needed to generate multivariate normal +C deviates (MEANV and Cholesky decomposition of +C COVM). Set by a previous call to SETGMN. +C +C 1 : 1 - size of deviate, P +C 2 : P + 1 - mean vector +C P+2 : P*(P+3)/2 + 1 - upper half of cholesky +C decomposition of cov matrix +C REAL PARM(*) +C +C X <-- Vector deviate generated. +C REAL X(P) +C +C WORK <--> Scratch array +C REAL WORK(P) +C +C +C Method +C +C +C 1) Generate P independent standard normal deviates - Ei ~ N(0,1) +C +C 2) SETGMN uses Cholesky decomposition find A s.t. trans(A)*A = COV +C +C 3) Generate trans(A)*E + MEANV ~ N(MEANV,COVM) +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNCH( DF, XNONC ) +C Generate random value of Noncentral CHIsquare variable +C +C +C Function +C +C + +C Generates random deviate from the distribution of a noncentral +C chisquare with DF degrees of freedom and noncentrality parameter +C XNONC. +C +C +C Arguments +C +C +C DF --> Degrees of freedom of the chisquare +C (Must be > 1.0) +C REAL DF +C +C XNONC --> Noncentrality parameter of the chisquare +C (Must be >= 0.0) +C REAL XNONC +C +C +C Method +C +C +C Uses fact that noncentral chisquare is the sum of a chisquare +C deviate with DF-1 degrees of freedom plus the square of a normal +C deviate with mean XNONC and standard deviation 1. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNF( DFN, DFD, XNONC ) +C GENerate random deviate from the Noncentral F distribution +C +C +C Function +C +C +C Generates a random deviate from the noncentral F (variance ratio) +C distribution with DFN degrees of freedom in the numerator, and DFD +C degrees of freedom in the denominator, and noncentrality parameter +C XNONC. +C +C +C Arguments +C +C +C DFN --> Numerator degrees of freedom +C (Must be >= 1.0) +C REAL DFN +C DFD --> Denominator degrees of freedom +C (Must be positive) +C REAL DFD +C +C XNONC --> Noncentrality parameter +C (Must be nonnegative) +C REAL XNONC +C +C +C Method +C +C +C Directly generates ratio of noncentral numerator chisquare variate +C to central denominator chisquare variate. +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENNOR( AV, SD ) +C +C GENerate random deviate from a NORmal distribution +C +C +C Function +C +C +C Generates a single random deviate from a normal distribution +C with mean, AV, and standard deviation, SD. +C +C +C Arguments +C +C +C AV --> Mean of the normal distribution. +C REAL AV +C +C SD --> Standard deviation of the normal distribution. +C REAL SD +C +C GENNOR <-- Generated normal deviate. +C REAL GENNOR +C +C +C Method +C +C +C Renames SNORM from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C Ahrens, J.H. and Dieter, U. +C Extensions of Forsythe's Method for Random +C Sampling from the Normal Distribution. +C Math. Comput., 27,124 (Oct. 1973), 927 - 937. +C +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GENPRM( IARRAY, LARRAY ) +C GENerate random PeRMutation of iarray +C +C +C Arguments +C +C +C IARRAY <--> On output IARRAY is a random permutation of its +C value on input +C INTEGER IARRAY( LARRAY ) +C +C LARRAY <--> Length of IARRAY +C INTEGER LARRAY +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION GENUNF( LOW, HIGH ) +C +C GeNerate Uniform Real between LOW and HIGH +C +C +C Function +C +C +C Generates a real uniformly distributed between LOW and HIGH. +C +C +C Arguments +C +C +C LOW --> Low bound (exclusive) on real value to be generated +C REAL LOW +C +C HIGH --> High bound (exclusive) on real value to be generated +C REAL HIGH +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GETCGN(G) +C Get GeNerator +C +C Returns in G the number of the current random number generator +C +C +C Arguments +C +C +C G <-- Number of the current random number generator (1..32) +C INTEGER G +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE GETSD(ISEED1,ISEED2) +C GET SeeD +C +C Returns the value of two integer seeds of the current generator +C +C This is a transcription from Pascal to Fortran of routine +C Get_State from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C +C ISEED1 <- First integer seed of generator G +C INTEGER ISEED1 +C +C ISEED2 <- Second integer seed of generator G +C INTEGER ISEED1 +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNBIN( N, P ) +C +C GENerate BINomial random deviate +C +C +C Function +C +C +C Generates a single random deviate from a binomial +C distribution whose number of trials is N and whose +C probability of an event in each trial is P. +C +C +C Arguments +C +C +C N --> The number of trials in the binomial distribution +C from which a random deviate is to be generated. +C INTEGER N +C +C P --> The probability of an event in each trial of the +C binomial distribution from which a random deviate +C is to be generated. +C REAL P +C +C IGNBIN <-- A random deviate yielding the number of events +C from N independent trials, each of which has +C a probability of event P. +C INTEGER IGNBIN +C +C +C Note +C +C +C Uses RANF so the value of the seeds, ISEED1 and ISEED2 must be set +C by a call similar to the following +C DUM = RANSET( ISEED1, ISEED2 ) +C +C +C Method +C +C +C This is algorithm BTPE from: +C +C Kachitvichyanukul, V. and Schmeiser, B. W. +C +C Binomial Random Variate Generation. +C Communications of the ACM, 31, 2 +C (February, 1988) 216. +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNLGI() +C GeNerate LarGe Integer +C +C Returns a random integer following a uniform distribution over +C (1, 2147483562) using the current generator. +C +C This is a transcription from Pascal to Fortran of routine +C Random from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNPOI( AV ) +C +C GENerate POIsson random deviate +C +C +C Function +C +C +C Generates a single random deviate from a Poisson +C distribution with mean AV. +C +C +C Arguments +C +C +C AV --> The mean of the Poisson distribution from which +C a random deviate is to be generated. +C REAL AV +C +C GENEXP <-- The random deviate. +C REAL GENEXP +C +C +C Method +C +C +C Renames KPOIS from TOMS as slightly modified by BWB to use RANF +C instead of SUNIF. +C +C For details see: +C +C Ahrens, J.H. and Dieter, U. +C Computer Generation of Poisson Deviates +C From Modified Normal Distributions. +C ACM Trans. Math. Software, 8, 2 +C (June 1982),163-179 +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION IGNUIN( LOW, HIGH ) +C +C GeNerate Uniform INteger +C +C +C Function +C +C +C Generates an integer uniformly distributed between LOW and HIGH. +C +C +C Arguments +C +C +C LOW --> Low bound (inclusive) on integer value to be generated +C INTEGER LOW +C +C HIGH --> High bound (inclusive) on integer value to be generated +C INTEGER HIGH +C +C +C Note +C +C +C If (HIGH-LOW) > 2,147,483,561 prints error message on * unit and +C stops the program. +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE INITGN(ISDTYP) +C INIT-ialize current G-e-N-erator +C +C Reinitializes the state of the current generator +C ISDTYP = -1 => sets the state to its initial seed +C ISDTYP = 0 => sets the state to its last (previous) seed +C ISDTYP = 1 => sets the state to a new seed 2^w values +C from its last seed +C +C This is a transcription from Pascal to Fortran of routine +C Init_Generator from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C ISDTYP -> The state to which the generator is to be set +C +C INTEGER ISDTYP +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE INRGCM() +C INitialize Random number Generator CoMmon +C +C +C Function +C +C +C Initializes common area for random number generator. This saves +C the nuisance of a BLOCK DATA routine and the difficulty of +C assuring that the routine is loaded with the other routines. +C +C********************************************************************** +C********************************************************************** +C +C INTEGER FUNCTION MLTMOD(A,S,M) +C +C Returns (A*S) MOD M +C +C This is a transcription from Pascal to Fortran of routine +C MULtMod_Decompos from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C A, S, M --> +C INTEGER A,S,M +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE PHRTSD( PHRASE, SEED1, SEED2 ) +C PHRase To SeeDs +C +C +C Function +C +C +C Uses a phrase (character string) to generate two seeds for the RGN +C random number generator. +C +C +C Arguments +C +C +C PHRASE --> Phrase to be used for random number generation +C CHARACTER*(*) PHRASE +C +C SEED1 <-- First seed for RGN generator +C INTEGER SEED1 +C +C SEED2 <-- Second seed for RGN generator +C INTEGER SEED2 +C +C +C Note +C +C +C Trailing blanks are eliminated before the seeds are generated. +C +C Generated seed values will fall in the range 1..2^30 +C (1..1,073,741,824) +C +C********************************************************************** +C********************************************************************** +C +C REAL FUNCTION RANF() +C RANDom number generator as a Function +C +C Returns a random floating point number from a uniform distribution +C over 0 - 1 (endpoints of this interval are not returned) using the +C current generator +C +C This is a transcription from Pascal to Fortran of routine +C Uniform_01 from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETALL(ISEED1,ISEED2) +C SET ALL random number generators +C +C Sets the initial seed of generator 1 to ISEED1 and ISEED2. The +C initial seeds of the other generators are set accordingly, and +C all generators states are set to these seeds. +C +C This is a transcription from Pascal to Fortran of routine +C Set_Initial_Seed from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C ISEED1 -> First of two integer seeds +C INTEGER ISEED1 +C +C ISEED2 -> Second of two integer seeds +C INTEGER ISEED1 +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETANT(QVALUE) +C SET ANTithetic +C +C Sets whether the current generator produces antithetic values. If +C X is the value normally returned from a uniform [0,1] random +C number generator then 1 - X is the antithetic value. If X is the +C value normally returned from a uniform [0,N] random number +C generator then N - 1 - X is the antithetic value. +C +C All generators are initialized to NOT generate antithetic values. +C +C This is a transcription from Pascal to Fortran of routine +C Set_Antithetic from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C QVALUE -> .TRUE. if generator G is to generating antithetic +C values, otherwise .FALSE. +C LOGICAL QVALUE +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETCGN( G ) +C Set GeNerator +C +C Sets the current generator to G. All references to a generato +C are to the current generator. +C +C +C Arguments +C +C +C G --> Number of the current random number generator (1..32) +C INTEGER G +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETGMN( MEANV, COVM, P, PARM) +C SET Generate Multivariate Normal random deviate +C +C +C Function +C +C +C Places P, MEANV, and the Cholesky factoriztion of COVM +C in GENMN. +C +C +C Arguments +C +C +C MEANV --> Mean vector of multivariate normal distribution. +C REAL MEANV(P) +C +C COVM <--> (Input) Covariance matrix of the multivariate +C normal distribution +C (Output) Destroyed on output +C REAL COVM(P,P) +C +C P --> Dimension of the normal, or length of MEANV. +C INTEGER P +C +C PARM <-- Array of parameters needed to generate multivariate norma +C deviates (P, MEANV and Cholesky decomposition of +C COVM). +C 1 : 1 - P +C 2 : P + 1 - MEANV +C P+2 : P*(P+3)/2 + 1 - Cholesky decomposition of COVM +C REAL PARM(P*(P+3)/2 + 1) +C +C********************************************************************** +C********************************************************************** +C +C SUBROUTINE SETSD(ISEED1,ISEED2) +C SET S-ee-D of current generator +C +C Resets the initial seed and state of generator g to ISEED1 and +C ISEED2. The seeds and states of the other generators remain +C unchanged. +C +C This is a transcription from Pascal to Fortran of routine +C Set_Seed from the paper +C +C L'Ecuyer, P. and Cote, S. "Implementing a Random Number Package +C with Splitting Facilities." ACM Transactions on Mathematical +C Software, 17:98-111 (1991) +C +C +C Arguments +C +C +C ISEED1 -> First integer seed +C INTEGER ISEED1 +C +C ISEED2 -> Second integer seed +C INTEGER ISEED1 +C +C**********************************************************************
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/tstbot.for @@ -0,0 +1,94 @@ + PROGRAM tstbot +C********************************************************************** +C +C A test program for the bottom level routines +C +C********************************************************************** +C Set up the random number generator +C .. Local Scalars .. + INTEGER ians,iblock,igen,iseed1,iseed2,itmp,ix,ixgen,nbad +C .. +C .. Local Arrays .. + INTEGER answer(10000),genlst(5) +C .. +C .. External Functions .. + INTEGER ignlgi + EXTERNAL ignlgi +C .. +C .. External Subroutines .. + EXTERNAL getsd,initgn,setall,setcgn +C .. +C .. Data statements .. + DATA genlst/1,5,10,20,32/ +C .. +C .. Executable Statements .. + nbad = 0 + WRITE (*,9000) + + 9000 FORMAT (' For five virual generators of the 32'/ + + ' This test generates 10000 numbers then resets the block'/ + + ' and does it again'/ + + ' Any disagreements are reported -- there should be none'/) +C +C Set up Generators +C + CALL setall(12345,54321) +C +C For a selected set of generators +C + DO 60,ixgen = 1,5 + igen = genlst(ixgen) + CALL setcgn(igen) + WRITE (*,*) ' Testing generator ',igen +C +C Use 10 blocks +C + CALL initgn(-1) + CALL getsd(iseed1,iseed2) + DO 20,iblock = 1,10 +C +C Generate 1000 numbers +C + DO 10,ians = 1,1000 + ix = ians + (iblock-1)*1000 + answer(ix) = ignlgi() + 10 CONTINUE + CALL initgn(+1) + 20 CONTINUE + CALL initgn(-1) +C +C Do it again and compare answers +C + CALL getsd(iseed1,iseed2) +C +C Use 10 blocks +C + DO 50,iblock = 1,10 +C +C Generate 1000 numbers +C + DO 40,ians = 1,1000 + ix = ians + (iblock-1)*1000 +C ANSWER( IX ) = IGNLGI() + itmp = ignlgi() + IF (.NOT. (itmp.NE.answer(ix))) GO TO 30 + WRITE (*,9010) iblock,ians,ix,answer(ix),itmp + + 9010 FORMAT (' Disagreement on regeneration of numbers'/ + + ' Block ',I2,' N within Block ',I2, + + ' Index in answer ',I5/ + + ' Originally Generated ',I10,' Regenerated ', + + I10) + + nbad = nbad + 1 + IF (nbad.GT.10) STOP ' More than 10 mismatches' + 30 CONTINUE + 40 CONTINUE + CALL initgn(+1) + 50 CONTINUE + WRITE (*,*) ' Finished testing generator ',igen + WRITE (*,*) ' Test completed successfully' + 60 CONTINUE + STOP + + END
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/tstgmn.for @@ -0,0 +1,185 @@ + REAL FUNCTION covar(x,y,n) +C .. Scalar Arguments .. + INTEGER n +C .. +C .. Array Arguments .. + REAL x(n),y(n) +C .. +C .. Local Scalars .. + REAL avx,avy,varx,vary,xmax,xmin + INTEGER i +C .. +C .. External Subroutines .. + EXTERNAL stat +C .. +C .. Intrinsic Functions .. + INTRINSIC real +C .. +C .. Executable Statements .. + CALL stat(x,n,avx,varx,xmin,xmax) + CALL stat(y,n,avy,vary,xmin,xmax) + covar = 0.0 + DO 10,i = 1,n + covar = covar + (x(i)-avx)* (y(i)-avy) + 10 CONTINUE + covar = covar/real(n-1) + RETURN + + END + SUBROUTINE prcomp(p,mean,xcovar,answer) + + INTEGER p,maxp + PARAMETER (maxp=10) + REAL mean(p),xcovar(p,p),rcovar(maxp,maxp) + REAL answer(1000,maxp) + REAL rmean(maxp),rvar(maxp) + INTEGER maxobs + PARAMETER (maxobs=1000) + + DO 10,i = 1,p + CALL stat(answer(1,i),maxobs,rmean(i),rvar(i),dum1,dum2) + WRITE (*,*) ' Variable Number',i + WRITE (*,*) ' Mean ',mean(i),' Generated ',rmean(i) + WRITE (*,*) ' Variance ',xcovar(i,i),' Generated',rvar(i) + 10 CONTINUE + WRITE (*,*) ' Covariances' + DO 30,i = 1,p + DO 20,j = 1,i - 1 + WRITE (*,*) ' I = ',i,' J = ',j + rcovar(i,j) = covar(answer(1,i),answer(1,j),maxobs) + WRITE (*,*) ' Covariance ',xcovar(i,j),' Generated ', + + rcovar(i,j) + 20 CONTINUE + 30 CONTINUE + RETURN + + END + SUBROUTINE setcov(p,var,corr,covar) +C Set covariance matrix from variance and common correlation +C .. Scalar Arguments .. + REAL corr + INTEGER p +C .. +C .. Array Arguments .. + REAL covar(p,p),var(p) +C .. +C .. Local Scalars .. + INTEGER i,j +C .. +C .. Intrinsic Functions .. + INTRINSIC sqrt +C .. +C .. Executable Statements .. + DO 40,i = 1,p + DO 30,j = 1,p + IF (.NOT. (i.EQ.j)) GO TO 10 + covar(i,j) = var(i) + GO TO 20 + + 10 covar(i,j) = corr*sqrt(var(i)*var(j)) + 20 CONTINUE + 30 CONTINUE + 40 CONTINUE + RETURN + + END + SUBROUTINE stat(x,n,av,var,xmin,xmax) +C .. Scalar Arguments .. + REAL av,var,xmax,xmin + INTEGER n +C .. +C .. Array Arguments .. + REAL x(n) +C .. +C .. Local Scalars .. + REAL sum + INTEGER i +C .. +C .. Intrinsic Functions .. + INTRINSIC real +C .. +C .. Executable Statements .. + xmin = x(1) + xmax = x(1) + sum = 0.0 + DO 10,i = 1,n + sum = sum + x(i) + IF (x(i).LT.xmin) xmin = x(i) + IF (x(i).GT.xmax) xmax = x(i) + 10 CONTINUE + av = sum/real(n) + sum = 0.0 + DO 20,i = 1,n + sum = sum + (x(i)-av)**2 + 20 CONTINUE + var = sum/real(n-1) + RETURN + + END + PROGRAM tstgmn +C Test Generation of Multivariate Normal Data +C .. Parameters .. + INTEGER maxp + PARAMETER (maxp=10) + INTEGER maxobs + PARAMETER (maxobs=1000) + INTEGER p2 + PARAMETER (p2=maxp*maxp) +C .. +C .. Local Scalars .. + REAL corr + INTEGER i,iobs,is1,is2,j,p + CHARACTER phrase*100 +C .. +C .. Local Arrays .. + REAL answer(1000,maxp),ccovar(p2),covar(p2),mean(maxp),param(500), + + temp(maxp),var(maxp),work(maxp) +C .. +C .. External Subroutines .. + EXTERNAL genmn,phrtsd,prcomp,setall,setcov,setgmn +C .. +C .. Executable Statements .. + WRITE (*,9000) + + 9000 FORMAT ( + + ' Tests Multivariate Normal Generator for Up to 10 Variables' + + / + + ' User inputs means, variances, one correlation that is applied' + + /' to all pairs of variables'/ + + ' 1000 multivariate normal deviates are generated'/ + + ' Means, variances and covariances are calculated for these.' + + ) + + 10 WRITE (*,*) 'Enter number of variables for normal generator' + READ (*,*) p + WRITE (*,*) 'Enter mean vector of length ',p + READ (*,*) (mean(i),i=1,p) + WRITE (*,*) 'Enter variance vector of length ',p + READ (*,*) (var(i),i=1,p) + WRITE (*,*) 'Enter correlation of all variables' + READ (*,*) corr + CALL setcov(p,var,corr,covar) + WRITE (*,*) ' Enter phrase to initialize rn generator' + READ (*,'(a)') phrase + CALL phrtsd(phrase,is1,is2) + CALL setall(is1,is2) + DO 20,i = 1,p2 + ccovar(i) = covar(i) + 20 CONTINUE +C +C Generate Variables +C + CALL setgmn(mean,ccovar,p,param) + DO 40,iobs = 1,maxobs + CALL genmn(param,work,temp) + DO 30,j = 1,p + answer(iobs,j) = work(j) + 30 CONTINUE + 40 CONTINUE + CALL prcomp(p,mean,covar,answer) +C +C Print Comparison of Generated and Reconstructed Values +C + GO TO 10 + + END
new file mode 100644 --- /dev/null +++ b/libcruft/ranlib/tstmid.for @@ -0,0 +1,448 @@ + SUBROUTINE stat(x,n,av,var,xmin,xmax) +C********************************************************************** +C +C SUBROUTINE STAT( X, N, AV, VAR) +C +C compute STATistics +C +C +C Function +C +C +C Computes AVerage and VARiance of array X(N). +C +C********************************************************************** +C .. Scalar Arguments .. + REAL av,var,xmax,xmin + INTEGER n +C .. +C .. Array Arguments .. + REAL x(n) +C .. +C .. Local Scalars .. + REAL sum + INTEGER i +C .. +C .. Intrinsic Functions .. + INTRINSIC real +C .. +C .. Executable Statements .. + xmin = x(1) + xmax = x(1) + sum = 0.0 + DO 10,i = 1,n + sum = sum + x(i) + IF (x(i).LT.xmin) xmin = x(i) + IF (x(i).GT.xmax) xmax = x(i) + 10 CONTINUE + av = sum/real(n) + sum = 0.0 + DO 20,i = 1,n + sum = sum + (x(i)-av)**2 + 20 CONTINUE + var = sum/real(n-1) + RETURN + + END + PROGRAM tstall + IMPLICIT LOGICAL (q) +C Interactive test for PHRTSD +C .. Parameters .. + INTEGER mxwh + PARAMETER (mxwh=10) +C .. +C .. Local Scalars .. + REAL av,avtr,var,vartr,xmin,xmax + INTEGER i,is1,is2,itmp,iwhich,j,mxint,nperm,nrep,ntot + CHARACTER type*4,phrase*100 +C .. +C .. Local Arrays .. + REAL array(1000),param(3) + INTEGER iarray(1000),perm(500) +C .. +C .. External Functions .. + REAL genbet,genchi,genf,gennch,gennf,genunf + INTEGER ignuin,myhand + EXTERNAL genbet,genchi,genf,gennch,gennf,genunf,ignuin,myhand +C .. +C .. External Subroutines .. + EXTERNAL genprm,phrtsd,setall,stat,trstat +C .. +C .. Equivalences .. + EQUIVALENCE (array,iarray) +C .. +C .. Executable Statements .. + WRITE (*,9000) + + 9000 FORMAT (' Tests most generators of specific distributions.'/ + + ' Generates 1000 deviates: reports mean and variance.'/ + + ' Also reports theoretical mean and variance.'/ + + ' If theoretical mean or var doesn''t exist prints -1.'/ + + ' For permutations, generates one permutation of 1..n'/ + + ' and prints it.'/ + + ' For uniform integers asks for upper bound, number of'/ + + ' replicates per integer in 1..upper bound.'/ + + ' Prints table of num times each integer generated.') +C +C Menu for choosing tests +C + 10 WRITE (*,9010) + + 9010 FORMAT (' Enter number corresponding to choice:'/ + + ' (0) Exit this program'/ + + ' (1) Generate Chi-Square deviates'/ + + ' (2) Generate noncentral Chi-Square deviates'/ + + ' (3) Generate F deviates'/ + + ' (4) Generate noncentral F deviates'/ + + ' (5) Generate random permutation'/ + + ' (6) Generate uniform integers'/ + + ' (7) Generate uniform reals'/ + + ' (8) Generate beta deviates'/ + + ' (9) Generate binomial outcomes'/ + + ' (10) Generate Poisson ourcomes'/) + + READ (*,*) iwhich + IF (.NOT. (iwhich.LT.0.OR.iwhich.GT.mxwh)) GO TO 20 + WRITE (*,*) ' Choices are 1..',mxwh,' - try again.' + GO TO 10 + + 20 IF (iwhich.EQ.0) STOP ' Normal termination rn tests' + WRITE (*,*) ' Enter phrase to initialize rn generator' + READ (*,'(a)') phrase + CALL phrtsd(phrase,is1,is2) + CALL setall(is1,is2) + + IF ((1).NE. (iwhich)) GO TO 40 +C +C Chi-square deviates +C + type = 'chis' + WRITE (*,*) ' Enter (real) df for the chi-square generation' + READ (*,*) param(1) + DO 30,i = 1,1000 + array(i) = genchi(param(1)) + 30 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + + 9020 FORMAT (' Mean Generated: ',T30,G15.7,5X,'True:',T60, + + G15.7/' Variance Generated:',T30,G15.7,5X,'True:',T60, + + G15.7/' Minimun: ',T30,G15.7,5X,'Maximum:',T60,G15.7) + + GO TO 280 + + 40 IF ((2).NE. (iwhich)) GO TO 60 + +C +C Noncentral Chi-square deviates +C + type = 'ncch' + WRITE (*,*) ' Enter (real) df' + WRITE (*,*) ' (real) noncentrality parameter' + READ (*,*) param(1),param(2) + DO 50,i = 1,1000 + array(i) = gennch(param(1),param(2)) + 50 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 60 IF ((3).NE. (iwhich)) GO TO 80 + +C +C F deviates +C + type = 'f' + WRITE (*,*) ' Enter (real) df of the numerator' + WRITE (*,*) ' (real) df of the denominator' + READ (*,*) param(1),param(2) + DO 70,i = 1,1000 + array(i) = genf(param(1),param(2)) + 70 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 80 IF ((4).NE. (iwhich)) GO TO 100 + + +C +C Noncentral F deviates +C + type = 'ncf' + WRITE (*,*) ' Enter (real) df of the numerator' + WRITE (*,*) ' (real) df of the denominator' + WRITE (*,*) ' (real) noncentrality parameter' + READ (*,*) param(1),param(2),param(3) + DO 90,i = 1,1000 + array(i) = gennf(param(1),param(2),param(3)) + 90 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 100 IF ((5).NE. (iwhich)) GO TO 140 + +C +C Random permutation +C + 110 WRITE (*,*) ' Enter size of permutation' + READ (*,*) nperm + IF (.NOT. (nperm.LT.1.OR.nperm.GT.500)) GO TO 120 + WRITE (*,*) ' Permutation size must be between 1 and 500 ', + + '- try again!' + GO TO 110 + + 120 WRITE (*,*) ' Random Permutation Generated - Size',nperm + DO 130,i = 1,500 + perm(i) = i + 130 CONTINUE + CALL genprm(perm,nperm) + WRITE (*,*) ' Perm Generated' + WRITE (*,'(20I4)') (perm(i),i=1,nperm) + GO TO 280 + + 140 IF ((6).NE. (iwhich)) GO TO 170 + +C +C Uniform integer +C + WRITE (*,*) ' Enter maximum uniform integer' + READ (*,*) mxint + WRITE (*,*) ' Enter number of replications per integer' + READ (*,*) nrep + DO 150,i = 1,1000 + iarray(i) = 0 + 150 CONTINUE + ntot = mxint*nrep + DO 160,i = 1,ntot + itmp = ignuin(1,mxint) + iarray(itmp) = iarray(itmp) + 1 + 160 CONTINUE + WRITE (*,*) ' Counts of Integers Generated' + WRITE (*,'(20I4)') (iarray(j),j=1,mxint) + GO TO 280 + + 170 IF ((7).NE. (iwhich)) GO TO 190 + +C +C Uniform real +C + type = 'unif' + WRITE (*,*) ' Enter Low then High bound for uniforms' + READ (*,*) param(1),param(2) + DO 180,i = 1,1000 + array(i) = genunf(param(1),param(2)) + 180 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 190 IF ((8).NE. (iwhich)) GO TO 210 + +C +C Beta deviate +C + type = 'beta' + WRITE (*,*) ' Enter A, B for Beta deviate' + READ (*,*) param(1),param(2) + DO 200,i = 1,1000 + array(i) = genbet(param(1),param(2)) + 200 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 210 IF ((9).NE. (iwhich)) GO TO 240 +C +C Binomial outcomes +C + type = 'bin' + WRITE (*,*) ' Enter number of trials, Prob event for ', + + 'binomial outcomes' + READ (*,*) ntry,pevt + DO 220,i = 1,1000 + iarray(i) = ignbin(ntry,pevt) + 220 CONTINUE + DO 230,i = 1,1000 + array(i) = iarray(i) + 230 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + param(1) = ntry + param(2) = pevt + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 240 IF ((10).NE. (iwhich)) GO TO 270 +C +C Poisson outcomes +C + type = 'pois' + WRITE (*,*) ' Enter mean for Poisson generation' + READ (*,*) param(1) + DO 250,i = 1,1000 + iarray(i) = ignpoi(param(1)) + 250 CONTINUE + DO 260,i = 1,1000 + array(i) = iarray(i) + 260 CONTINUE + CALL stat(array,1000,av,var,xmin,xmax) + CALL trstat(type,param,avtr,vartr) + WRITE (*,9020) av,avtr,var,vartr,xmin,xmax + GO TO 280 + + 270 CONTINUE + 280 GO TO 10 + + END + SUBROUTINE trstat(type,parin,av,var) + IMPLICIT INTEGER (i-n),REAL (a-h,o-p,r-z),LOGICAL (q) +C********************************************************************** +C +C SUBROUTINE TRSTAT( TYPE, PARIN, AV, VAR ) +C TRue STATistics +C +C Returns mean and variance for a number of statistical distribution +C as a function of their parameters. +C +C +C Arguments +C +C +C TYPE --> Character string indicating type of distribution +C 'chis' chisquare +C 'ncch' noncentral chisquare +C 'f' F (variance ratio) +C 'ncf' noncentral f +C 'unif' uniform +C 'beta' beta distribution +C CHARACTER*(4) TYPE +C +C PARIN --> Array containing parameters of distribution +C chisquare +C PARIN(1) is df +C noncentral chisquare +C PARIN(1) is df +C PARIN(2) is noncentrality parameter +C F (variance ratio) +C PARIN(1) is df numerator +C PARIN(2) is df denominator +C noncentral F +C PARIN(1) is df numerator +C PARIN(2) is df denominator +C PARIN(3) is noncentrality parameter +C uniform +C PARIN(1) is LOW bound +C PARIN(2) is HIGH bound +C beta +C PARIN(1) is A +C PARIN(2) is B +C REAL PARIN(*) +C binonial +C PARIN(1) is Number of trials +C PARIN(2) is Prob Event at Each Trial +C poisson +C PARIN(1) is Mean +C +C AV <-- Mean of specified distribution with specified parameters +C REAL AV +C +C VAR <-- Variance of specified distribution with specified paramete +C REAL VAR +C +C +C Note +C +C +C AV and Var will be returned -1 if mean or variance is infinite +C +C********************************************************************** +C .. Scalar Arguments .. + REAL av,var + CHARACTER type* (4) +C .. +C .. Array Arguments .. + REAL parin(*) +C .. +C .. Local Scalars .. + REAL a,b,range +C .. +C .. Executable Statements .. + IF (('chis').NE. (type)) GO TO 10 + av = parin(1) + var = 2.0*parin(1) + GO TO 170 + + 10 IF (('ncch').NE. (type)) GO TO 20 + a = parin(1) + parin(2) + b = parin(2)/a + av = a + var = 2.0*a* (1.0+b) + GO TO 170 + + 20 IF (('f').NE. (type)) GO TO 70 + IF (.NOT. (parin(2).LE.2.0001)) GO TO 30 + av = -1.0 + GO TO 40 + + 30 av = parin(2)/ (parin(2)-2.0) + 40 IF (.NOT. (parin(2).LE.4.0001)) GO TO 50 + var = -1.0 + GO TO 60 + + 50 var = (2.0*parin(2)**2* (parin(1)+parin(2)-2.0))/ + + (parin(1)* (parin(2)-2.0)**2* (parin(2)-4.0)) + 60 GO TO 170 + + 70 IF (('ncf').NE. (type)) GO TO 120 + IF (.NOT. (parin(2).LE.2.0001)) GO TO 80 + av = -1.0 + GO TO 90 + + 80 av = (parin(2)* (parin(1)+parin(3)))/ ((parin(2)-2.0)*parin(1)) + 90 IF (.NOT. (parin(2).LE.4.0001)) GO TO 100 + var = -1.0 + GO TO 110 + + 100 a = (parin(1)+parin(3))**2 + (parin(1)+2.0*parin(3))* + + (parin(2)-2.0) + b = (parin(2)-2.0)**2* (parin(2)-4.0) + var = 2.0* (parin(2)/parin(1))**2* (a/b) + 110 GO TO 170 + + 120 IF (('unif').NE. (type)) GO TO 130 + range = parin(2) - parin(1) + av = parin(1) + range/2.0 + var = range**2/12.0 + GO TO 170 + + 130 IF (('beta').NE. (type)) GO TO 140 + av = parin(1)/ (parin(1)+parin(2)) + var = (av*parin(2))/ ((parin(1)+parin(2))* + + (parin(1)+parin(2)+1.0)) + WRITE (*,*) ' A, B, AV, VAR ',parin(1),parin(2),av,var + GO TO 170 + + 140 IF (('bin').NE. (type)) GO TO 150 + av = parin(1)*parin(2) + var = av* (1.0-parin(2)) + GO TO 170 + + 150 IF (('pois').NE. (type)) GO TO 160 + av = parin(1) + var = parin(1) + GO TO 170 + + 160 WRITE (*,*) 'Unimplemented type ',type + STOP 'Unimplemented type in TRSTAT' + + 170 RETURN + + END
new file mode 100644 --- /dev/null +++ b/liboctave/ChangeLog @@ -0,0 +1,876 @@ +Sun Jul 14 17:30:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (Matrix::read, Matrix::write): Convert to use + iostreams and handler data format conversions. Delete old methods + that used stdio. + + * data-conv.h, data-conv.cc (oct_data_conv): New class. + +Fri Jul 12 13:52:44 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mach-info.h: Rename from float-fmt.h. + * mach-info.cc: Rename from float-fmt.cc. + Handle machine information using a singlton class. + * Makefile.in: Update appropriate lists. + +Tue Jul 9 11:49:10 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array-flags.cc: Provide definitions for the flags even if + OCTAVE_SOURCE is not defined. + + * Array.h, Array2.h, Array3.h: BOUNDS_CHECKING now affects + operator(), not elem(). + * Array3.h: Move indexing methods here from Array3.cc. + +Mon Jun 24 02:30:05 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array3.cc (checkelem): Fix typo in call to Array2<T>::elem(). + + * Makefile.in (install-lib): Use INSTALL_PROGRAM instead of + INSTALL_DATA for shared libs. + +Thu Jun 6 09:59:06 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Quad.cc: Include lo-error.h here too. + +Mon May 27 12:41:07 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * file-ops.h: Include sys/types.h here. + +Wed May 22 00:20:24 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * chMatrix.cc (charMatrix::transpose): Provide definition. + + * Array-idx.h (maybe_delete_elements): Correctly compute number of + elements in result. + * Array2-idx.h (maybe_delete_elements): Likewise for number of + rows and columns in result. + +Tue May 21 23:46:09 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleQR.cc (QR::QR): Don't create result from to-be-deleted data. + * CmplxQR.cc (ComplexQR::ComplexQR): Likewise. + +Fri May 17 03:06:02 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install-inc): Install in octincludedir, not includedir. + +Sun May 12 03:40:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (uninstall): Also delete shared library. + Split install into install-libs and install-includes. + (install-inc): If linkdir is a directory, leave it alone. + + * sun-utils.cc (MAIN__): Define for Linux/ELF systems. + +Thu May 2 20:19:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array-idx.h (assign): Handle A(:) = X for A undefined or empty. + * Array2-idx.h (assign): Likewise. + +Tue Apr 30 05:43:06 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2.cc (Array2<T>::range_error): New functions. + + * Array.h (class Array<T>): elem() and operator() are now + equivalent, and do bounds checking by default. + * Array2.cc (class Array2<T>): Likewise. + +Sat Apr 6 21:26:11 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (maintainer-clean, distclean): Also delete + stamp-picdir, stamp-shared, and pic directory. + (stamp-prereq): New target. + +Fri Mar 29 13:44:13 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * NPSOL.h (NPSOL_options::set_option (const char *, int)): + New function. + + * Array.h, Array.cc (Array<T>::range_error ()): New functions. + * Array.h (Array<T>::checkelem): Use them. + + * base-lu.h, base-lu.cc: Parameterize based on types of matrix + elements too. + * dbleLU.h, dbleLU.cc, CmplxLU.h, CmplxLU.cc: Change to match. + + * MDiagArray2.h (MDiagArray2 (const MArray<T>& a)): Delete. + + * Makefile.in (distclean): Delete so_locations, which is created + on DEC Alpha systems. + +Sat Mar 23 04:02:53 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.h (HEAVYWEIGHT_INDEXING): Do define this here if it is not + already defined. + +Fri Mar 22 23:53:58 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pathsearch.cc: Include config.h. + +Wed Mar 20 04:54:03 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2-idx.h (assign (Array2<LT>&, const Array2<RT>&)): Don't + allow M(I, J) = scalar if I or J is empty. + + * Array-idx.h: Delete Array2 and Array3 code (now in Array2-idx.h + and Array3-idx.h). + +Thu Mar 7 10:20:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-error.h: Make comments C friendly. + +Sun Mar 3 14:04:32 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2.h (make_unique): Move all indexing functions here. + * Array2.cc: From here. + + * Array.h, Array2.h (NO_BOUNDS_CHECKING): New macro to control + whether operator() calls elem or checkelem. + + * Array.h (make_unique): New private function. + Move all indexing functions here. + * Array.cc: From here. + + * pathsearch.cc (dir_path::find_all): Index tmp, don't dereference + it too. + + * Array-d.cc, Array-ch.cc, Array-C.cc, Array-s.cc, Array-str.cc, + Array-i.cc, MArray-i.cc, MArray-s.cc, MArray-d.cc, MArray-ch.cc, + MArray-C.cc: Include config.h. + + * Array.h, Array2.h, DiagArray2.h, Array3.h: + Don't define HEAVYWEIGHT_INDEXING here. + +Sat Mar 2 18:39:35 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * base-lu.h, base-lu.cc: New files. + * Makefile.in: Add them to the appropriate lists. + * dbleLU.h, dbleLU.cc, CmplxLU.h, Cmplx.cc: Derive from base_lu. + +Fri Mar 1 08:30:58 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array2.h, Array3.h, DiagArray2.h: New files, extracted from Array.h + * Array2-idx.h, Array3-idx.h: New files, extracted from Array-idx.h + * Array2.cc, Array3.cc, DiagArray2.cc: New files, from Array.cc. + * MArray2.h, MDiagArray2.h: New files, extracted from MArray.h. + * MArray2.cc, MDiagArray2.cc, MArray-defs.h: New files, from MArray.cc. + + * MArray.h (INSTANTIATE_MARRAY_FRIENDS): New macro. + (INSTANTIATE_MARRAY2_FRIENDS): Likewise. + (INSTANTIATE_MDIAGARRAY_FRIENDS): Likewise. + * MArray-C.cc, MArray-ch.cc, MArray-c.cc, MArray-i.cc, MArray-s.cc: + Simplify using new macros. + +Mon Feb 26 03:04:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install): If $(includedir) ends in version string, + make link to name that does not include version info. + + * lo-ieee.cc: Include <cmath> here. + +Fri Feb 16 20:52:34 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-ieee.cc, lo-ieee.h: New files. + * lo-mappers.cc, lo-mappers.h: New files. + * lo-utils.cc, lo-utils.h: New files. + * Makefile.in: Add them to the appropriate lists. + +Thu Feb 15 22:02:17 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (all_integers, too_large_for_float): New functions. + * CMatrix.cc (all_integers, too_large_for_float): New functions. + + * byte-swap.h, data-conv.h, data-conv.cc, float-fmt.h, + float-fmt.cc: New files. + * Makefile.in: Include them in the appropriate lists. + +Wed Feb 14 01:49:47 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (Qzval): New function. + +Tue Feb 13 12:41:54 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * NPSOL.cc (NPSOL_options::set_option): Arg key is now string, not + char*. + + * DASSL.h, DASSL.cc: Do better management of temporary workspace. + Use F77_XFCN to call Fortran subroutine. + * dColVector.cc, CColVector.cc: Likewise. + * dRowVector.cc, CRowVector.cc: Likewise. + * NPSOL.h, NPSOL.cc: Likewise. + * CmplxCHOL.cc: Likewise. + * dbleCHOL.cc: Likewise. + * CMatrix.cc: Likewise. + * dMatrix.cc: Likewise. + * QPSOL.cc: Likewise. + * LSODE.cc: Likewise. + +Sun Feb 11 14:14:26 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleHESS.cc (HESS::init): Dimension of tau is n-1, not n+1. + + * dbleSCHUR.h, dbleSCHUR.cc: Do better management of temporary + workspace. Use F77_XFCN to call Fortran subroutine. + * CmplxAEPBAL.h, CmplxAEPBAL.cc: Likewise. + * CmplxSCHUR.h, CmplxSCHUR.cc: Likewise. + * dbleGEPBAL.h, dbleGEPBAL.cc: Likewise. + * dbleAEPBAL.h, dbleAEPBAL.cc: Likewise. + * CmplxHESS.h, CmplxHESS.cc: Likewise. + * CmplxSVD.h, CmplxSVD.cc: Likewise. + * dbleHESS.h, dbleHESS.cc: Likewise. + * dbleSVD.h, dbleSVD.cc: Likewise. + * EIG.h, EIG.cc; Likewise. + * CollocWt.cc: Likewise. + * NLEqn.cc: Likewise. + * Quad.cc: Likewise. + +Sat Feb 10 12:14:59 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleLU.h, dbleLU.cc: Do better management of temporary workspace. + Use F77_XFCN to call Fortran subroutine. + * CmplxLU.h, CmplxLU.cc: Ditto. + * dbleQR.h, dbleQR.cc: Ditto. + * CmplxQR.h, CmplxQR.cc: Ditto. + * dbleQRP.h, dbleQRP.cc: Ditto. + * CmplxQRP.h, CmplxQRP.cc: Ditto. + + * dir-ops.h (dir_entry::dir): Declare as void*, not DIR*. + (struct DIR): delete forward declaration. + (dir_entry::operator = (const dir_entry$)): Protect against + copying same object. + * dir-ops.cc: Cast dir appropriately. + +Fri Feb 9 16:12:44 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lo-error.cc: Moved to libcruft/misc. + * Makefile.in: Delete it from the list. + + * f77-fcn.c (f77_context, f77_exception_encountered): Delete + definitions (they have been moved to libcruft/misc/f77-extern.cc). + + * Array-flags.h: New file. + * Array-idx.h: Include it here. + * Makefile.in (MATRIX_INC): Add it to the list. + + * Array-flags.cc: Renamed from Array-ext.cc. + (liboctave_dfi_flag): Renamed from dfi_flag. + (liboctave_pcv_flag): Renamed from pcv_flag. + (liboctave_pzo_flag): Renamed from pzo_flag. + (liboctave_rre_flag): Renamed from rre_flag. + * Array-idx.h: Change all uses of dfi_flag, etc. + * Makefile.in (MATRIX_SRC): Change file name here too. + + * Makefile.in (LIBOCTAVE_LFLAGS, LIBOCTAVE_LIBS): New variables. + (stamp-shared): Use them here. + +Tue Feb 6 09:53:41 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * cmd-hist.cc (command_history::ignore_entries): Delete default + argument value. + +Mon Feb 5 12:07:50 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * CmplxAEPBAL.h, CmplxCHOL.h, CmplxDET.h, CmplxHESS.h, CmplxLU.h, + CmplxQR.h, CmplxQRP.h, CmplxSCHUR.h, CmplxSVD.h, dbleAEPBAL.h, + dbleCHOL.h, dbleDET.h, dbleGEPBAL.h, dbleHESS.h, dbleLU.h, + dbleQR.h, dbleQRP.h, dbleSCHUR.h, dbleSVD.h: + Clean up constructors, assigment operator. + +Sun Feb 4 03:12:04 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * NPSOL.cc (do_minimize): Use F77_XFCN to call npsol. + Check f77_exception_encountered on return. + + * f77-fcn.c (f77_exception_encountered): New variable. + (F77_XFCN): Set it. + * f77-fcn.h: Provide declaration. + + * QPSOL.h (QPSOL_options::set_options): Renamed from copy(). + + * NPSOL.h (NPSOL_options::set_options): Renamed from copy(). + + * NLEqn.h (NLEqn_options::set_options): New function. + * Quad.h (Quad_options::set_options): Likewise. + + * LP.h (class LP): Add accessors for LP data. + + * NLEqn.h (NLEqn::n): Delete. + + * NLEqn.h (class NLEqn::n): Likewise. + + * NLP.h (class NLP): Add accessors for NLP data. + + * NPSOL.h (class NPSOL_options): Move constructors, set, and + access functions here. + * NPSOL.cc.cc: From here. + + * QLD.h (class QLD): Add destructor definition. + * Objective.h (class Objective): Likewise. + * ODEFunc.h (class ODEFunc): Likewise. + * NLFunc.h (class NLFunc): Likewise. + * NLEqn.h (class NLEqn): Likewise. + * NLConst.h (class NLConst): Likewise. + * LinConst.h (class LinConst): Likewise. + * LSODE.h (class LSODE_options): Likewise. + * CollocWt.h (class CollocWt): Likewise. + * Bounds.h (class Bounds): Likewise. + + * QLD.cc (QLD::set_default_options): Delete. + + * QP.h (QP): Add accessors for QP data. + Add copy constructor, operator =, and destructor definitions. + + * Range.h, Quad.h, QP.h, QLD.h, Objective.h, NLP.h, NLFunc.h, + NLConst.h, LinConst.h, LSODE.h, LP.h, FEGrid.h, EIG.h, DASSL.h, + DAEFunc.h, CollocWt.h, Bounds.h: + Clean up constructors, assigment operator. + + * dRowVector.cc (RowVector::transpose): Use magic of reference + counting to avoid duplicating the data immediately. + * dColVector.cc (ColumnVector::transpose): Likewise. + * CRowVector.cc (ComplexrowVector::transpose): Likewise. + * CColVector.cc (ComplexColumnVector::transpose): Likewise. + +Sat Feb 3 01:02:36 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * prog-args.h (prog_args::option_argument): New enum. + + * f77-fcn.h: Rename from f77-uscore.h. + (F77_XFCN_ERROR, F77_XFCN): New macros. + * f77-fcn.c: New file. + * Makefile.in (SOURCES): Add it to the list. + + * ODEFunc.h: Clean up. + + * DASSL.cc, DASSL.h: New files. + * Makefile.in: Add them to the appropriate lists. + + * LSODE.cc, LSODE.h: New files. + * Makefile.in: Add them to the appropriate lists. + + * ODE.cc: Delete. + * Makefile.in (SOURCES): Remove from list. + + * base-de.h, DAE.cc: New files. + * Makefile.in: Add them to the appropriate lists. + * ODE.h: Only define interface for ODE classes. + * DAE.h: Only define interface for ODE classes. + + * LPsolve.cc (do_minimize): Print sorry not implemented message. + (LPsolve::set_default_options)): Delete + * LPsolve.h (class LPsolve): Add operator =, copy constructor, and + destructor. + + * LP.h (class LP): Add operator =, copy constructor, and destructor. + + * QPSOL.h (QPSOL::QPSOL (const QPSOL&)): New constructor. + (QPSOL::operator =): Call base class operator = instead of assuming + we know what to copy. + + * base-min.h (size): New function. + + * NLP.h (NLP::size): Delete. + (NLP::NLP (const NLP&)): New constructor. + (NLP::operator =): Call base class operator = instead of assuming + we know what to copy. + + * NPSOL.h, NPSOL.cc (NPSOL::option): Delete. + (class NPSOL): Add operator = and destructor. + + * NPSOL.h: Add NPSOL_options() to list of constructor initalizers. + +Fri Feb 2 22:52:55 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (liboctave.a): Depend on $(PICOBJ). + +Wed Jan 31 05:29:25 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (Givens, Sylvester, Matrix::expm): New functions. + * CMatrix.cc (Givens, Sylvester, ComplexMatrix::expm): Ditto. + +Mon Jan 29 00:00:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * prog-args.h, prog-args.cc: New files. + * Makefile.in: Add them to lists. + + * getopt.h, getopt.c, getopt1.c: New files. + * Makefile.in: Add them to the lists. + + * oct-term.h, oct-term.cc: New files. + * Makefile.in: Add them to the lists. + + * str-vec.cc: New file. + * Makefile.in (SOURCES): Add it to the list. + + * file-ops.cc (oct_tmpnam): Move here from src/utils.cc. + + * tempname.c, tempnam.c: Move here from src directory. + * Makefile.in: Add to lists. + +Sun Jan 28 23:06:19 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * cmd-hist.h, cmd-hist.cc: New files. + * Makefile.in: Add them to lists. + +Thu Jan 25 20:36:05 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-glob.h, oct-glob.cc: New files. + * Makefile.in: Add them to lists. + +Wed Jan 24 01:55:08 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pathsearch.h, pathsearch.cc: New files. + * Makefile.in: Add them to lists. + + * dir-ops.h, dir-ops.cc: New files. + * sysdir.h: Move here from src directory. + * Makefile.in: Add them to lists. + + * Array.h (Array::qsort): Return *this, not void. + * str-vec.h (string_vector::qsort): Likewise. + + * chMatrix.cc (row_as_string): Resize result to eliminate + unnecessary NULs. + +Tue Jan 23 00:40:58 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * safe-xstat.hin, safe-xstat.cin, statdefs.h, file-ops.h, + file-ops.cc, filemode.c, mkdir.c, rmdir.c, rename.c: + Files moved here from src directory. + * Makefile.in: Add them to lists. Include appropriate rules. + + * acosh.c, asinh.c, atanh.c, erf.c, erfc.c, gamma.c, lgamma.c: + Use pointers, not references (this is C code!). + + * oct-math.h: New file. + * acosh.c, asinh.c, atanh.c, erf.c, erfc.c, gamma.c, lgamma.c: + Files moved here from src directory. + * Makefile.in: Add them to lists. + +Sun Jan 21 22:53:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * idx-vector.cc (make_uniq): Fix major brain-o. + + * CmplxSCHUR.h, CmplxSCHUR.cc, dbleSCHUR.h, dbleSCHUR.cc: + Convert to use string class instead of char*. + + * str-vec.h, Array-str.cc: New files. + + * Array.h (Array::qsort): New function. + +Fri Jan 12 01:45:10 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.h: Nest ArrayRep class inside Array class. + Refer to ArrayRep, not ArrayRep<T>. + Move all ArrayRep functions inline. + Don't declare other Array classes as friends of ArrayRep. + * Array.cc: Delete ArrayRep functions. + * Array-idx.h: Refer to ArrayRep, not ArrayRep<T>. + + * Array-C.cc, Array-ch.cc, Array-d.cc, Array-i.cc, Array-s.cc: + Don't instantiate ArrayRep objects. + +Wed Jan 10 04:40:21 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * chMatrix.cc (charMatrix::charMatrix (const string&)): + New constructor. + +Tue Jan 9 04:44:56 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dbleGEPBAL.cc (GEPBALANCE::init): Use string instead of char* + for balance_job arg. + * dbleAEPBAL.cc (AEPBALANCE::init): Likewise. + * CmplxAEPBAL.cc (ComplexAEPBALANCE::init): Likewise. + + * chMatrix.cc (row_as_string): Return string, not const char*. + +Mon Jan 8 03:20:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (clean): If $(SHARED_LIBS), also remove shared libs. + + * chMatrix.cc (row_as_string): Undo previous change. + +Sun Jan 7 19:50:16 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * chMatrix.cc (row_as_string): Do memory management here. Caller + is expected to save string if necessary. + +Sat Jan 6 19:28:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array.h (class DiagArray): Enable nested Proxy class for all + platforms. + + * Array.cc (Array<T>::operator = (const Array<T>&)): If rep == + a.rep, don't mess with count. + * Array.h (Array2<T>& operator = (const Array2<T>&)): Likewise, + don't do anything if reps are the same. + (Array3<T>& operator = (const Array3<T>&) + + * Array.h (ArrayRep<T>::operator = (const ArrayRep<T>&)): + Declare private with no definition to prevent misuse. + + * Array.cc (Array2<T>::insert (const Array2<T>&, int, int)): + Get range check right. + * dMatrix.cc (Matrix::insert (const RowVector&, int, int)): Ditto. + (Matrix::insert (const ColumnVector&, int, int)): Ditto. + (Matrix::insert (const DiagMatrix&, int, int)): Ditto. + * CMatrix.cc (ComplexMatrix::insert (const Matrix&, int, int)): Ditto. + (ComplexMatrix::insert (const RowVector&, int, int)): Ditto. + (ComplexMatrix::insert (const ColumnVector&, int, int)): Ditto. + (ComplexMatrix::insert (const DiagMatrix&, int, int)): Ditto. + (ComplexMatrix::insert (const ComplexRowVector&, int, int)): Ditto. + (ComplexMatrix::insert (const ComplexColumnVector&, int, int)): Ditto. + (ComplexMatrix::insert (const ComplexDiagMatrix&, int, int)): Ditto. + * dRowVector.cc (RowVector::insert (const RowVector&, int)): Ditto. + * dColVector.cc + (ColumnVector::insert (const ColumnVector&, int)): Ditto. + * CRowVector.cc + (ComplexRowVector::insert (const RowVector&, int)): Ditto. + (ComplexRowVector::insert (const ComplexRowVector&, int)): Ditto. + * CColVector.cc + (ComplexColumnVector::insert (const ColumnVector&, int)): Ditto. + (ComplexColumnVector::insert (const ComplexColumnVector&, int)): Ditto. + + * dMatrix.cc (Matrix::insert (const DiagMatrix&, int, int)): + Also fill in zeros, not just the diagonal. + + * CDiagMatrix.cc (ComplexDiagMatrix::fill (double, int, int)): + Use END parameter properly. + (ComplexDiagMatrix::fill (const Complex&, int, int)): Ditto. + * dDiagMatrix.cc (DiagMatrix::fill (double, int, int)): Ditto. + + * Array.h (ArrayRep<T>::ArrayRep (void)): Set count to 1 here. + (ArrayRep<T>::ArrayRep (T *, int)): Likewise. + * Array.cc (ArrayRep<T>::ArrayRep (const ArrayRep<T>&)): + Don't copy count. Set it to 1. + (ArrayRep<T>::ArrayRep (int)): Set count to 1 here. + + * Array.h (Array<T>::Array (T *, int)): After constructing rep, + don't set rep->count to 1 here (now handled by ArrayRep + constructors). + (Array<T>::Array (void)): Ditto. + (Array<T>::Array (int)): Ditto. + (Array<T>::T& elem (int)): Ditto. + * Array-idx.h (Array<T>::maybe_delete_elements (idx_vector&)): Ditto. + (Array2<T>::maybe_delete_elements (idx_vector&, idx_vector&)): Ditto. + * Array.cc: (Array<T>::Array (int, const T&)): Ditto. + (Array<T>::resize (int)): Ditto. + (Array<T>::resize (int, const T&)) :Ditto. + (Array<T>::fortran_vec (void)): Ditto. + (Array2<T>::resize (int, int)): Ditto. + (Array2<T>::resize (int, int, const T&)): Ditto. + (DiagArray<T>::resize (int, int)): Ditto. + (DiagArray<T>::resize (int, int, const T&)): Ditto. + +Sun Dec 31 21:23:26 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Array-ch.cc: Rename from Array-c.cc. + * MArray-ch.cc: Rename from MArray-c.cc. + * chMatrix.cc: Rename from cMatrix.cc. + * chMatrix.h: Rename from cMatrix.h. + * Makefile.in (TI_SRC): Use new names here. + * mx-base.h: Likewise. + +Fri Dec 29 21:45:00 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in: Handle shared libraries. + +Thu Dec 28 14:18:34 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * CRowVector.cc (operator * (ComplexRowVector, ComplexMatrix)): + Correctly compute length of return value. Correct rows and + columns in zgemv call. + * dRowVector.cc (operator * (RowVector, Matrix)): Likewise. + +Tue Dec 26 00:37:57 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (stamp-picdir): New target. + (all): Depend on it. + +Sun Dec 24 03:10:41 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (INCLUDES): Remove QLD.h. + (SOURCES): Remove QLD.cc. + +Wed Dec 20 00:43:46 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc (Matrix::inverse): New arg, force. + If force is nonzero, invert even if matrix is singular. + (ComplexMatrix::inverse): Likewise. + + * dRowVector.cc, mx-inlines.cc, dMatrix.cc, dDiagMatrix.cc, + dColVector.cc,MArray-C.cc, CmplxDET.cc, CRowVector.cc, CMatrix.cc, + CDiagMatrix.cc, CColVector.cc, Array-C.cc, CmplxDET.h, CMatrix.h: + Include "oct-cmplx.h" instead of <Complex.h>. + + * mx-defs.h: Include oct-cmplx.h in place of forward declaration + for class Complex. + + * oct-cmplx.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + + * idx-vector.cc (IDX_VEC_REP::idx_vector_rep): Don't redeclare len. + (IDX_VEC_REP::maybe_convert_one_zero_to_idx): Don't redeclare count. + (IDX_VEC_REP::freeze): Don't redeclare max_val and min_val. + (intcmp, sort_data, make_uniq, copy_data, IDX_VEC_REP::print): + Avoid g++ bugs. + +Tue Nov 14 14:24:16 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Array-idx.h (maybe_delete_elements): Give useful error message. + + * dbleSCHUR.cc, dbleSVD.cc: Include iostream.h. + +Mon Nov 13 08:35:07 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * CDiagMatrix.cc (inverse): Return retval, not *this. + * dDiagMatrix.cc (inverse): Use same method as for Complex case. + +Sat Nov 4 05:06:12 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Array.h, Array.cc, Array-idx.h [HEAVYWEIGHT_INDEXING]: Keep + index vector object with Array, not ArrayRep. + +Fri Nov 3 06:52:38 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Array-idx.h (assign (Array2<T>&, const Array2<T>&): Don't fail + if index is a colon and resizing is maybe needed. + +Tue Oct 31 17:40:01 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * idx-vector.cc (IDX_VEC_REP::is_colon_equiv): Don't return true + if we have a vector of 1's. + + * Array-idx.h (assign (Array2<LT>&, Array2<RT>&): If lhs has no + current orientation, require index and rhs to conform unless + do_fortran_indexing flag is set. + +Sun Oct 15 23:32:08 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Array-d.cc, Array-C.cc, mx-base.h, mx-inlines.cc, dDiagMatrix.h, + CDiagMatrix.h, CMatrix.cc, CMatrix.h, dMatrix.h, mx-defs.h, + cMatrix.h, MArray.cc, MArray.h, MArray-i.cc, MArray-c.cc, + MArray-s.cc, Array.h, Array.cc, Array-c.cc, Array-i.cc, + Array-s.cc, cMatrix.cc, Array-idx.h, dMatrix.cc: + Massive changes to support additional data types. Only charMatrix + is currently used in Octave. + +Thu Oct 12 02:22:36 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Array.cc (Array2<T>::insert (Array2<T>&, int, int): New function. + * CMatrix.cc (ComplexMatrix::insert (ComplexMatrix&, int, int): + Simply call Array2<Complex> version. + * dMatrix.cc (Matrix::insert (Matrix&, int, int): Similarly, just + call Array2<double> version. + + * Array-C.cc, Array-d.cc: Instantiate new assign functions too. + + * Array.h, Array.cc: Massive overhaul to support new way of + handling indexing. + * idx-vector.h, idx-vector.cc: Likewise. + * Array-ext.cc, Array-idx.h: New files. + * Makefile.in: Add them to the appropriate lists. + +Wed Oct 11 00:49:58 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Range.cc (nelem_internal): Use tfloor here, not round. + +Sun Oct 8 18:21:02 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * idx-vector.h, idx-vector.cc: New files, moved from ../src. + * Makefile.in (SOURCES, INCLUDES): Include them in the lists. + +Sat Oct 7 19:07:02 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * CMatrix.cc (pseudo_inverse): Avoid bogus g++ warning. + + * Array.h: Move simple member functions here. + * Array.cc: From here. + +Fri Oct 6 00:36:04 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Range.cc (tfloor, tceil, round): New static functions. + (Range::nelem_internal): Rewrite to use better method. + + * dbleSVD.h (SVD::type): New item, sigma_only. + (type_computed): New var. + * dbleSVD.cc (left_singular_matrix, right_singular_matrix): + Handle possible error condition. + (init): Allow for SVD::sigma_only, save type computed. + * CmplxSVD.cc (left_singular_matrix, right_singular_matrix): + Handle possible error condition. + (init): Allow for SVD::sigma_only, save type computed. + +Wed Oct 4 15:33:35 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Nearly all non-matrix .h and .cc files: + Move short function bodies into class declarations for inlining. + Generally clean up. + + * base-min.h: New file. + * LP.h (class LP): Derive from base_minimizer. + * QLP.h (class QLP): Derive from base_minimizer. + * NLP.h (class NLP): Derive from base_minimizer. + * Makefile.in (INCLUDES): Add base-min.h to the list. + + * Makefile.in (SOURCES): Delete DAEFunc.cc, LP.cc, NLConst.cc, + NLFunc.cc, Objective.cc and QP.cc from list. + +Tue Sep 26 04:14:23 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * dbleSCHUR.cc (select_ana): Remove name of unused parameter. + (SCHUR::SCHUR): Delete unused parameter ord. + * CmplxSCHUR.h (ComplexSCHUR::CmplxSCHUR): Likewise. + + * CRowVector.cc + (ComplexRowVector::operator+ (const Complex&, const RowVector&), + (ComplexRowVector::operator- (const Complex&, const RowVector&), + (ComplexRowVector::operator* (const Complex&, const RowVector&), + (ComplexRowVector::operator/ (const Complex&, const RowVector&)): + Actually do something. + + * dMatrix.cc (Matrix::lssolve (ComplexMatrix&)): Use dummy vars. + (Matrix::lssolve (ComplexMatrix&, int&)): Likewise. + (Matrix::lssolve (ComplexMatrix&, int&, int&)): Likewise. + + * Quad.cc (Quad_options::Quad_options (double, double)): New function. + * (Quad::Quad (integrand_fcn, double, double): Properly initialize + tolerances. + + * DAE.cc (ddassl_f, ddassl_j): Remove names of unused parameters. + * LPsolve.cc (LPsolve::minimize): Likewise. + * NPSOL.cc (NPSOL::option, npsol_confun, npsol_objfun): Likewise. + * ODE.cc (lsode_f, lsode_j): Likewise. + * QPSOL.cc (qphess): Likewise. + +Fri Sep 22 04:14:51 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * dMatrix.cc: Include <cstring>. + + * Array.cc: Try harder to avoid warnings from gcc in functions + that return bogus values after calling the error handler. + +Thu Sep 14 00:56:00 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in: Use `ifndef omit_deps', not `ifndef $(omit_deps)'. + + * Makefile.in (TEMPLATE_SRC): Add Array-i.cc to the list. + +Tue Aug 22 00:41:06 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * DAE.cc (dassl_f): Add UNUSED attribute for unused parameters. + (dassl_j): Likewise. + + * DAE.cc, NLEqn.cc, NPSOL.cc, ODE.cc, CColVector.cc, CMatrix.cc, + dColVector.cc, dMatrix.cc, CmplxLU.cc, dbleLU.cc, QPSOL.cc, + Array.cc, CollocWt.cc, FEGrid.h, LinConst.h: + Update for change in for loop variable scope for gcc 2.7.0. + +Mon Aug 21 19:34:53 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in: Only include dependency files if $(omit_deps) is + not set. + +Mon May 1 13:26:00 1995 John Eaton (jwe@bullwinkle.che.utexas.edu) + + * dbleSCHUR.h dbleSVD.h dbleQRP.h dbleQR.h dbleHESS.h dbleLU.h + dbleCHOL.h dbleGEPBAL.h dbleAEPBAL.h dbleDET.h dDiagMatrix.h + dColVector.h dMatrix.h dRowVector.h Quad.h Range.h QPSOL.h QLD.h + ODEFunc.h QP.h Objective.h NPSOL.h ODE.h NLEqn.h NLFunc.h + NLConst.h LinConst.h LPsolve.h LP.h FSQP.h FEGrid.h EIG.h + DAEFunc.h CollocWt.h DAE.h CmplxSVD.h CmplxQRP.h CmplxSCHUR.h + CmplxHESS.h CmplxDET.h CmplxLU.h CmplxQR.h CmplxCHOL.h + CmplxAEPBAL.h CRowVector.h CDiagMatrix.h Bounds.h CColVector.h + CMatrix.h dbleSCHUR.cc dbleSVD.cc dbleQRP.cc dbleQR.cc + dbleGEPBAL.cc dbleLU.cc dbleHESS.cc dbleDET.cc dbleCHOL.cc + dbleAEPBAL.cc dColVector.cc dRowVector.cc dMatrix.cc + dDiagMatrix.cc QPSOL.cc Range.cc Quad.cc QP.cc ODEFunc.cc QLD.cc + Objective.cc NLEqn.cc ODE.cc NPSOL.cc NLFunc.cc LPsolve.cc + NLConst.cc LinConst.cc FSQP.cc FEGrid.cc LP.cc DAE.cc EIG.cc + CollocWt.cc DAEFunc.cc CmplxSVD.cc CmplxSCHUR.cc CmplxQRP.cc + CmplxLU.cc CmplxQR.cc CmplxHESS.cc CmplxDET.cc CmplxCHOL.cc + CmplxAEPBAL.cc CRowVector.cc CColVector.cc CMatrix.cc + CDiagMatrix.cc Bounds.cc MArray.h MArray.cc Array.cc Array.h + NLP.h: Use pragma interface/implementation. Don't surround + contents in extern "C++". + * lo-error.h sun-utils.h: Don't surround contents in extern "C++". + +Tue Apr 11 10:59:24 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * f77-uscore.h (F77_FCN): Allow for possibility of uppercase + identifiers. + * utils.cc dbleSVD.cc dbleSCHUR.cc dbleQRP.cc dbleQR.cc dbleLU.cc + dbleHESS.cc dbleGEPBAL.cc dbleAEPBAL.cc dRowVector.cc + dColVector.cc QLD.cc CmplxSVD.cc CmplxCHOL.cc CmplxHESS.cc + CmplxQR.cc CmplxQRP.cc QPSOL.cc CmplxAEPBAL.cc CmplxLU.cc + CmplxSCHUR.cc dMatrix.cc CColVector.cc CRowVector.cc dbleCHOL.cc + CollocWt.cc NLEqn.cc EIG.cc DAE.cc ODE.cc CMatrix.cc NPSOL.cc + Quad.cc: Change usage of F77_FCN to match new definition + + * utils.cc dbleSVD.cc dbleSCHUR.cc dbleQRP.cc dbleQR.cc dbleLU.cc + dbleHESS.cc dbleGEPBAL.cc dbleAEPBAL.cc dRowVector.cc + dColVector.cc QLD.cc CmplxSVD.cc CmplxCHOL.cc CmplxHESS.cc + CmplxQR.cc CmplxQRP.cc QPSOL.cc CmplxAEPBAL.cc CmplxLU.cc + CmplxSCHUR.cc dMatrix.cc CColVector.cc CRowVector.cc dbleCHOL.cc + CollocWt.cc NLEqn.cc EIG.cc DAE.cc ODE.cc CMatrix.cc NPSOL.cc + Quad.cc: Where appropriate, declare Fortran subroutines to take + args by reference instead of pointer. Change all callers. + +Sun Apr 9 20:11:56 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * MArray.h (MArray2::~MArray2, MDiagArray::~MDiagArray): New + functions. Make += and -= operators friend functions. + + * Array.h (Array2::~Array2, Array3::~Array3, + DiagArray::~DiagArray): New functions. + +Wed Apr 5 21:21:13 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (EXTRAS): Don't distribute mx-kludge.cc. + (MATRIX_INC): Don't distribute mx-kludge.h. + + * CColVector.h CColVector.cc CDiagMatrix.h CDiagMatrix.cc + CMatrix.h CMatrix.cc CRowVector.h CRowVector.cc dColVector.h + dColVector.cc dDiagMatrix.h dDiagMatrix.cc dMatrix.h dMatrix.cc + dRowVector.h dRowVector.cc: + Derive classes from MArray, MArray2, and MDiagArray, not Array, + Array2, and DiagArray2. + Don't use functions defined in mx-kludge.cc for arithmetic + like-type operations on arrays. + + * MArray.cc: Use the classes defined here like-type mathematical + operations on Array objects. Abuse CPP more. + * Makefile.in (TEMPLATE_SRC): Add it to the list. + (EXTRAS): Delete it from this list. + + * MArray-C.cc, MArray-d.cc: New files. + * Makefile.in (TI_SRC): Add them to the list. + +Tue Apr 4 14:13:46 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * mx-kludge.cc: Abuse CPP even more. + +Mon Apr 3 21:05:30 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Objective.h (objective_function): Add missing const. + (gradient_function): Likewise. + + * CColVector.h CColVector.cc CDiagMatrix.h CDiagMatrix.cc + CMatrix.h CMatrix.cc CRowVector.h CRowVector.cc dColVector.h + dColVector.cc dDiagMatrix.h dDiagMatrix.cc dMatrix.h dMatrix.cc + dRowVector.h dRowVector.cc: + Reorganize to declare and define friends where they should be, + based on the use of private constructors. + +Fri Mar 31 10:09:40 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * CRowVector.h (linspace): Add declaration. + * dRowVector.h (linspace): Likewise. + + * dMatrix.cc (Matrix::inverse, Matrix::determinant, Matrix::solve): + Force result of rcond + 1.0 to be stored. + * CMatrix.cc (ComplexMatrix::inverse, ComplexMatrix::determinant, + ComplexMatrix::solve): Likewise. + +See ChangeLog.1 in the top level directory for earlier changes.
new file mode 100644 --- /dev/null +++ b/make/ChangeLog @@ -0,0 +1,390 @@ +Tue May 14 22:35:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc.make (clean): Also remove pic/*.o. + (distclean): Also remove stamp-picdir and pic. + +Sat Mar 23 04:51:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * common.make: Use separate pattern rule for compiling PIC. + +Fri Feb 2 22:51:32 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * common.make (CPICFLAG): Fix typo. + +Mon Jan 8 22:57:17 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * misc.make (mostlyclean): + If $(SHARED_LIBS), also remove shared libs. + +Fri Dec 29 21:42:33 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * common.make: Handle creating position independent code. + +Thu Sep 14 04:36:44 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * texi.make: Don't fail if makeinfo or tex fail. + + * misc.make (maintainer-clean): Rename from realclean. + +Sun Jan 8 12:16:36 1995 Karl Berry <karl@cs.umb.edu> + + * kpathsea 2.6/dviljk 2.5/dvipsk 5.58f/xdvik 18f. + +Wed Jan 4 12:41:25 1995 Karl Berry <karl@cs.umb.edu> + + * tkpathsea.make (kpathsea): Don't depend on texmf.cnf, since it + doesn't exist at the first make. + +Tue Jan 3 13:43:12 1995 Karl Berry <karl@cs.umb.edu> + + * rdepend.make (depend): paths.h is not in the srcdir. + + * config.make (autoconf): Add acsite.m4. + + * dist.make (top_files): FTP belongs here, not in ln_files. + +Sun Jan 1 14:02:42 1995 Karl Berry <karl@cs.umb.edu> + + * makevars.make (makevars): Include web2cdir. + * paths.make (web2cdir): New directory. Suggested by Joachim. + +Sat Dec 31 14:35:29 1994 Karl Berry <karl@cs.umb.edu> + + * tmtpk.make: Just incorporate this in kpathsea/Makefile.in now. + + * rdepend.make (depend): Depend on ourselves. + +Fri Dec 30 15:50:37 1994 Karl Berry <karl@cs.umb.edu> + + * rdepend.make (depend): Use kpathsea_srcdir, not kpathsea_dir. + From Joachim. + +Wed Dec 28 14:16:50 1994 Karl Berry <karl@cs.umb.edu> + + * dist.make (ln_files): Add FTP. + +Mon Dec 26 10:31:14 1994 Karl Berry <karl@cs.umb.edu> + + * dist.make (dist): Copy aclocal.m4 from acsite.m4. + Suggested by interran@uluru.Stanford.EDU (John Interrante). + +Wed Dec 14 15:17:42 1994 Karl Berry <karl@cs.umb.edu> + + * kpathsea 2.5/dviljk 2.4/dvipsk 5.58e/xdvik 18e. + +Sun Dec 11 13:23:12 1994 Karl Berry <karl@cs.umb.edu> + + * rdepend.make (depend): Remove system include files that are + alone on a line. + +Fri Nov 25 09:21:02 1994 Karl Berry <karl@cs.umb.edu> + + * tmtpk.make (MakeTeXPK): Depend on the new filename. + +Tue Nov 15 15:28:14 1994 Karl Berry <karl@cs.umb.edu> + + * tkpathsea.make (makeargs): Change MAKEARGS to XMAKEARGS. + + * targets.make (makeargs): Don't bother to pass $(SHELL). + +Tue Nov 8 19:12:45 1994 Karl Berry <karl@cs.umb.edu> + + * common.make (CFLAGS): Don't include -g, since now it's automatic. + +Sun Nov 6 15:53:36 1994 Karl Berry <karl@cs.umb.edu> + + * paths.make (prefix, exec_prefix): These value are now @prefix@ + and @exec_prefix@. + + * common.make: Call @SET_MAKE@. + + * misc.make (distclean): Remove config.log and config.cache. + + * programs.make (LDFLAGS): Add @LDFLAGS@. + * common.make (CPPFLAGS): Add @CPPFLAGS@. + (CFLAGS): Add @CFLAGS@. + + * dist.make (top_files): Distribute install-sh, not install.sh, + for Autoconf 2.0. + +Sun Oct 30 16:15:34 1994 Karl Berry <karl@cs.umb.edu> + + * config.make (ac_dir): This is now $(gnu)/share. + +Tue Oct 25 17:48:02 1994 Karl Berry <karl@cs.umb.edu> + + * kpathsea 2.3/dviljk 2.3/dvipsk 5.58c/xdvik 18d. + +Sun Oct 23 17:33:56 1994 Karl Berry <karl@cs.umb.edu> + + * targets.make (MakeTeXPK): Make sed substitutions global. + Reported by wfranzki@hlrserv.hlrz.kfa-juelich.de. + +Mon Oct 17 13:28:41 1994 Karl Berry <karl@cs.umb.edu> + + * paths.make (mfpooldir): Doc fix. + +Fri Oct 14 10:31:35 1994 Karl Berry <karl@cs.umb.edu> + + * kpathsea 2.2/dviljk 2.2/dvipsk 5.58b/xdvik 18c. + +Mon Oct 10 15:31:06 1994 Karl Berry <karl@cs.umb.edu> + + * common.make (.SUFFIXES): Declare .c.o. + + * programs.make (LOADLIBES): Omit LEXLIB here. + +Sun Sep 25 15:54:36 1994 Karl Berry <karl@cs.umb.edu> + + * rdepend.make: Doc fix. + + * library.make: New file. + + * makevars.make (makevars): Remove MAKEARGS from here. + + * programs.make (CCLD, link_command): New variables. + (LOADLIBES): Add proglib, LEXLIB. + +Mon Sep 12 11:06:14 1994 Karl Berry (karl@cs.umb.edu) + + * kpathsea 2.1/dviljk 2.1/dvipsk 5.58a/xdvik 18b. + +Sun Sep 11 14:44:21 1994 Karl Berry (karl@cs.umb.edu) + + * targets.make (install-MakeTeXPK): Install this if it didn't + exist, and mkdirchain $(scriptdir). + + * dist.make (top_files): Include aclocal.m4. + +Sat Sep 10 13:40:10 1994 Karl Berry (karl@cs.umb.edu) + + * texi.make (.texi.dvi): No -o option to texi2dvi. + +Thu Sep 8 14:31:59 1994 Karl Berry (karl@cs.umb.edu) + + * kpathsea 2.0, dviljk 2.0, dvipsk 5.55b, xdvik 18a. + +Tue Sep 6 11:39:06 1994 Karl Berry (karl@cs.umb.edu) + + * targets.make (MakeTeXPK): Use psheaderdir, not psconfigdir, and + depend on ourselves. + +Sat Sep 3 08:37:11 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make (psconfigdir): Toss this. + + * misc.make (distclean): Add MakeTeXPK. + + * rdepend.make: Rename from depend.make. + +Fri Sep 2 13:29:14 1994 Karl Berry (karl@cs.umb.edu) + + * targets.make (makeargs, installargs): Declare these here. + + * makevars.make (makevars): No need for ??_fontdir or psmacrodir. + + * misc.make (TAGS): Omit -t, use -i, for Emacs 19.25's etags. + +Thu Sep 1 17:51:10 1994 Karl Berry (karl@cs.umb.edu) + + * dist.make (top_files): Add install.sh. + +Tue Aug 30 14:46:18 1994 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Touch *.info* if they exist. + +Mon Aug 29 16:28:19 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make (dcfontdir, sauterdir): Move these here, since + everyone has MakeTeXPK now. + +Sun Aug 28 17:09:09 1994 Karl Berry (karl@cs.umb.edu) + + * common.make (INSTALL_FONTS): New variable. + +Thu Aug 25 17:04:43 1994 Karl Berry (karl@cs.umb.edu) + + * kpathsea.make (kpathsea): Also depend on texmf.cnf.in. + + * paths.make (texmf_prefix): Rename to texmf; change uses. + +Sun Aug 21 11:03:48 1994 Karl Berry (karl@cs.umb.edu) + + * programs.make: New file for driver-specific stuff. + + * paths.make (fontnamedir): New definition. + (configdir, headerdir): Prepend with `ps'. + +Sat Aug 13 17:19:53 1994 Karl Berry (karl@cs.umb.edu) + + * misc.make (mostlyclean): Don't remove $(lib), since we've tossed + that. + +Sun Jul 31 14:18:28 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make (DB_DIR, DB_NAME): Remove from here. + +Fri Jul 29 14:56:47 1994 Karl Berry (karl@cs.umb.edu) + + * depend.make (depend): Add dvilj4l.o to the special cases. + +Sun Jul 17 11:37:57 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make (db_dir): Use $TEXMF. + +Mon Jun 27 17:32:47 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make (db_dir): Use $TEXMFROOT. + +Tue Jun 14 12:41:33 1994 Karl Berry (karl@cs.umb.edu) + + * depend.make (depend): No need for depend_encies, I think. + +Mon May 30 13:50:34 1994 Karl Berry (karl@cs.umb.edu) + + * common.make (LDFLAGS): Don't include $(CFLAGS), for Linux's sake. + +Tue May 24 13:26:05 1994 Karl Berry (karl@cs.umb.edu) + + * config.make (stamp-auto, stamp-auto.in): New targets, to avoid + rerunning autoheader/autoconf even when they don't change the main + output files. + +Sun Apr 17 16:11:34 1994 Karl Berry (karl@ra.cs.umb.edu) + + * config.make (configure): Change ; to && in case the cd fails. + +Thu Mar 24 11:12:56 1994 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Don't append kutil/ChangeLog to the source + ChangeLog. + + * misc.make (extraclean): Don't delete patch*, since that kills + patchlevel.h. + +Sat Mar 5 13:48:15 1994 Karl Berry (karl@cs.umb.edu) + + * common.make (LOADLIBES): Include XLOADLIBES. + +Fri Feb 25 14:21:17 1994 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Append kutil/ChangeLog to the top level, not + the main program. + +Thu Feb 24 16:11:37 1994 Karl Berry (karl@cs.umb.edu) + + * misc.make (clean): Remove *.lj here. + + * paths.make ({bh,cg,mt}_fontdir, install_fonts): Add these. + +Mon Feb 21 14:04:26 1994 Karl Berry (karl@cs.umb.edu) + + * misc.make (distclean): remove pool files here. + +Wed Feb 16 15:18:13 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make: Doc fix. + +Sun Jan 23 17:17:37 1994 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Don't fake kpathsea/MACHINES any more, now we + have a real one. + +Fri Jan 14 14:53:12 1994 Karl Berry (karl@cs.umb.edu) + + * paths.make ({tex,mf}pooldir, fmtdir, basedir): Use + $(texmf_prefix)/ini for all these. + +Tue Dec 21 19:23:29 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (LDFLAGS): Don't include $(x_lib_flags) here -- + winds up getting included twice for virmf + +Tue Dec 14 17:40:23 1993 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Dist the top-level and kutil/ChangeLog. + + * paths.make (formatdir): Rename to fmtdir. + (texprefix): Rename to texmf_prefix, change uses accordingly. + +Fri Dec 10 17:50:39 1993 Karl Berry (karl@cs.umb.edu) + + * paths.make (dvipsprefix): Rename to dvips_prefix. + +Sun Nov 14 11:52:33 1993 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Do not depend on depend.make and TAGS, since + web2c doesn't have them. + + * paths.make: Change defaults for new hierarchy. + +Thu Nov 11 11:07:22 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (CPPFLAGS, LDFLAGS): xincludedir, xlibdir, wlibs + names have changed. + +Sun Nov 7 15:22:32 1993 Karl Berry (karl@cs.umb.edu) + + * paths.h: Give dire warning that editing Makefiles will not + rebuild paths.h. + +Fri Oct 29 14:01:57 1993 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): chmod a+rw. + +Thu Oct 28 17:48:01 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (CPPFLAGS): Include -I. before -I$(srcdir). + +Fri Oct 22 13:08:19 1993 Karl Berry (karl@cs.umb.edu) + + * paths.make: Remove the paths, and add the dvips directories. + + * common.make (kpathsea_srcdir{,_parent}): Define. From + simon@lia.di.epfl.ch. + +Tue Oct 19 15:59:03 1993 Karl Berry (karl@cs.umb.edu) + + * config.make (stamp-c-auto): New target. + (c-auto.h): Depend on it. + +Sat Oct 9 07:04:45 1993 Karl Berry (karl@cs.umb.edu) + + * misc.make (mostlyclean): Remove programs. + +Sun Oct 3 12:44:04 1993 Karl Berry (karl@cs.umb.edu) + + * misc.make (extraclean): Also remove .blg and .bbl, .vf and .vpl. + (clean): Remove *.pool. + +Tue Sep 28 13:11:01 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (CPPFLAGS): Add $(xincludedir) again; when did I + remove it? + +Fri Sep 24 07:53:45 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (warn_more) [kpathsea]: Move to kpathsea's Makefile. + + * texi.make (.texi.dvi): New rule. + + * common.make (warn_more): Had -pointer-arith twice. + +Thu Sep 23 17:42:42 1993 Karl Berry (karl@cs.umb.edu) + + * common.make (autoconf): Toss aclocal.m4. + * dist.make (top_files): Ditto. + + * common.make (autoheader): New variable, split off from autoconf. + +Sun Aug 29 11:30:39 1993 Karl Berry (karl@cs.umb.edu) + + * dist.make (dist): Remove MACHINES in kpathsea. + + * common.make (CPPFLAGS): Remove the -I. Why did I put it there? + +Sat Aug 28 07:01:52 1993 Karl Berry (karl@cs.umb.edu) + + * unbackslsh.awk: New file. + + * common.make (CPPFLAGS): Add -I before $(xincludedir).
new file mode 100755 --- /dev/null +++ b/mkinstalldirs @@ -0,0 +1,36 @@ +#!/bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman <friedman@prep.ai.mit.edu> +# Created: 1993-05-16 +# Last modified: Wed Jan 25 09:35:21 1995 +# Public domain + +errstatus=0 + +dirmode=0755 + +for file in ${1+"$@"} ; do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d in ${1+"$@"} ; do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + mkdir "$pathcomp" || errstatus=$? + echo "chmod $dirmode $pathcomp" 1>&2 + chmod $dirmode "$pathcomp" || errstatus=$? + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here
new file mode 100755 --- /dev/null +++ b/move-if-change @@ -0,0 +1,15 @@ +#!/bin/sh +# +# Like mv $1 $2, but if the files are the same, just delete $1. +# Status is 0 if $2 is changed, 1 otherwise. + +if test -r $2; then + if cmp $1 $2 > /dev/null; then + echo $2 is unchanged + rm -f $1 + else + mv -f $1 $2 + fi +else + mv -f $1 $2 +fi
new file mode 100644 --- /dev/null +++ b/scripts/ChangeLog @@ -0,0 +1,303 @@ +Mon Jul 15 16:15:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/bug_report.m: Don't redirect output to /dev/tty in + system command. + +Fri Jul 12 12:24:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * __plr1__.m: Renamed from polar_int_1.m. + * __plr2__.m: Renamed from polar_int_2.m. + * __plr__.m: Renamed from polar_int.m. + * __plt1__.m: Renamed from plot_int_1.m. + * __plt2__.m: Renamed from plot_int_2.m. + * __plt2mm__.m: Renamed from plot_2_m_m_.m. + * __plt2mv__.m: Renamed from plot_2_m_v_.m. + * __plt2ss__.m: Renamed from plot_2_s_s_.m. + * __plt2vm__.m: Renamed from plot_2_v_m_.m. + * __plt2vv__.m: Renamed from plot_2_v_v_.m. + * __plt__.m: Renamed from plot_int.m. + * __pltopt__.m: Renamed from plot_opt.m. + Change all callers. + +Thu Jul 11 17:24:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * All .m files: Add regular Author:, Created:, and Adapted-By: + comments like those found in Emacs lisp files. + +Mon Jun 24 04:16:41 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * All .m files: Change comment style. + +Fri Jun 14 01:42:21 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * bottom_title.m, mplot.m, multiplot.m, oneplot.m, plot_border.m, + subplot.m, subwindow.m, top_title.m: + Print error message if gnuplot_has_multiplot is not true. + +Thu Jun 6 00:18:54 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * plot/figure.m: New function. + +Wed Jun 5 18:19:00 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * strings/strrep.m: New function. + +Thu May 23 15:04:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * strings/bin2dec.m, strings/blanks.m, strings/deblank.m, + strings/dec2bin.m, strings/dec2hex.m, strings/findstr.m, + strings/hex2dec.m, strings/index.m, strings/rindex.m, + strings/split.m, strings/str2mat.m, strings/substr.m: + New functions from Kurt Hornik, heavily modified by jwe. + + * general/reshape.m: Allow strings to be reshaped too. + + * strings/strcmp.m: No longer need to set implicit_str_to_num_ok. + Always return a scalar. + +Wed May 22 19:52:11 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * polynomial/polyfit.m: Make orientation of result compatible with + Matlab. + +Sat May 18 17:32:15 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * polynomial/polyfit.m: Add missing close paren. + +Thu May 16 10:23:11 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * plot/plot_opt.m: Set compatibility arg in call to sscanf. + + * io/scanf.m: Delete. + +Mon May 13 09:37:38 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * statistics/median.m: Fix typo in usage message. + +Wed Apr 24 02:45:52 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/popen2.m: New file. + +Wed Apr 17 18:34:04 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_OUTPUT): Add io/Makefile. + + * io: New directory. + * Makefile.in (SUBDIRS): Add it to the list. + + * miscellaneous/flops.m: New file. + +Fri Mar 22 04:40:48 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/cputime.m: Return three arguments instead of a + vector, for compatibility with previous versions and with Matlab + (which only returns one scalar value). + +Wed Mar 20 05:09:48 1996 Kurt Hornik <Kurt.Hornik@tuwien.ac.at> + + * general/triu.m: Compute lower bound on loop index correctly. + * general/tril.m: Likewise, for upper bound. + +Tue Feb 6 09:29:43 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * image/saveimage.m: For color images, make sure indices into + temporary colormap and result matrix have proper orientation. + Set grey flag correctly. + +Tue Jan 9 00:12:14 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * statistics/std.m: Use better formula (from Jim Van Zandt + jrv@vanzandt.mv.com). + +Sun Jan 7 20:12:14 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * meshgrid.m: New file (from Jim Van Zandt jrv@vanzandt.mv.com). + * mesh.m: Transpose Z if only one arg. + Handle case of all three args being matrices (from Jim Van Zandt + jrv@vanzandt.mv.com). + * meshdom.m: Undo previous change. + +Wed Dec 20 13:48:12 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * configure.in (AC_OUTPUT): Add audio/Makefile + +Thu Nov 16 13:07:07 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * audio: New directory of files from Kurt Hornik and Andreas + Weingessel. + * audio/Makefile.in: New file. + * Makefile.in (SUBDIRS): Add audio to the list. + +Mon Nov 6 07:29:35 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * polynomial/polyfit.m: Use `economy-stle' QR factorization. + +Fri Nov 3 00:38:46 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * plot/mesh.m: Require, length (y) == rows (z) and length (x) == + columns (z), not the other way around. + * plot/meshdom.m: Don't reverse order of elements in y. + +Thu Nov 2 23:56:53 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * plot/axis.m: Return current axis if nargin == 0. + +Tue Oct 31 04:11:28 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * polynomial/roots.m: Updates from Kurt Hornik. + + * polynomial/polyder.m: New file. + + * polynomial/polyderiv.m: Give return value and arg different names. + +Mon Oct 30 23:27:02 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * specfun/betainc.m: New file. + * specfun/gammainc.m: New file. + +Wed Oct 18 23:45:52 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * general/strerror.m: New file. + * general/perror.m: Implement using strerror(). + +Thu Oct 5 03:21:36 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * plot/bottom_title.m plot/mplot.m plot/multiplot.m plot/oneplot.m + plot/plot_border.m plot/subplot.m plot/subwindow.m + plot/top_title.m plot/zlabel.m: New files, from Vinayak Dutt. + + * image/saveimage.m: Round img values first. + +Tue Oct 3 03:55:18 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * control/abcddim.m control/are.m general/tril.m general/triu.m + image/saveimage.m linear-algebra/kron.m linear-algebra/norm.m + linear-algebra/null.m miscellaneous/etime.m plot/contour.m + plot/mesh.m plot/plot_int.m plot/polar_int.m + special-matrix/hankel.m special-matrix/toeplitz.m + tuwien/strfun/split.m: Add missing semicolons. + + * plot/polar_int.m: Use .', not ' to make vectors conform. + + * image/Makefile.in: Don't build or install octtoppm. + + * image/saveimage.m: Rewrite to avoid using octoppm and pbm + routines so that people who don't have the the pbm stuff installed + can still use this function. + +Mon Oct 2 05:10:44 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * image/saveimage.m: Better error checking, clean up a bit. + +Tue Sep 26 00:04:56 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * plot/plot_opt.m: Change more to more_opts as a temporary fix to + avoid conflict with new built-in text-style function more. + + * linear-algebra/norm.m: Also allow 2nd arg == "inf". + + * startup/Makefile.in (install): Also install octaverc in + $localfcnfiledir/startup/octavrc. + +Wed Sep 20 00:01:30 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * mkinstalldirs: New file. + * Makefile.in (DISTFILES): Add it to the list. + + * Makefile.in (DISTFILES): Distribute configure.in and configure. + +Thu Sep 14 03:56:19 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * special-matrix/hankel.m: Compatibility fix. Complain if + r(1) != c(nr), not if r(1) != c(1). + + * signal/filter.m: Doc fix. + +Wed Sep 13 03:19:05 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * miscellaneous/cputime.m: Use new resource structure names (no + ru_ or tv_ prefixes). + +Tue Sep 12 02:20:44 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * time/ctime.m: Fix doc string and usage message. + +Mon Sep 11 18:43:46 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * time/clock.m: Use new time structure names (no tm_ prefix). + +Thu Aug 24 20:53:08 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * control/c2d.m: Make function work for any value of + whitespace_in_literal_matrix. + * control/dare.m: Likewise. + * control/tzero.m: Likewise. + * elfun/gcd.m: Likewise. + * elfun/lcm.m: Likewise. + * general/postpad.m: Likewise. + * general/prepad.m: Likewise. + * linear-algebra/kron.m: Likewise. + * miscellaneous/etime.m: Likewise. + * polynomial/conv.m: Likewise. + * polynomial/deconv.m: Likewise. + * polynomial/poly.m: Likewise. + * polynomial/roots.m: Likewise. + * signal/filter.m: Likewise. + * signal/freqz.m: Likewise. + * signal/fftfilt.m: Likewise. + +Tue Jun 6 22:34:04 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * miscellaneous/is_leap_year.m: Make work for vector args. + +Tue May 2 16:18:33 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * plot/polar_int_2.m: Add missing semicolons. + Set theta = theta', not rho'. + +Sun Apr 30 11:19:11 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * polynomial/roots.m: Make it work for any value of + whitespace_in_literal_matrix. + +Mon Apr 10 09:37:17 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * configure.in: New file. + +Thu Mar 30 13:29:35 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * control/lyap.m: Add missing semicolon. + + * miscellaneous/cputime.m: New function file. + +Wed Mar 29 22:50:49 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * time: New directory. + * time/asctime.m, time/clock.m, time/ctime.m, time/date.m: + New function files. + * time/Makefile.in: New file. + * Makefile.in (SUBDIRS): Add time. + +Thu Mar 23 15:42:26 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * polynomial/polyreduce.m: Make sure initial index is not empty. + +Tue Mar 14 23:38:24 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * plot/plot_int_1.m: Transpose data with .', not '. + +Fri Mar 10 10:40:13 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (install uninstall clean mostlyclean distclean + realclean): Use SUBDIR_FOR_COMMAND. Combine actions. + +Sun Feb 26 22:18:22 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (install): Create ls-R database file. + (uninstall): Delete it. + +Fri Feb 24 10:36:01 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * scripts/image/saveimage.m: Fix typo. + +See ChangeLog.1 in the top level directory for earlier changes.
new file mode 100644 --- /dev/null +++ b/src/ChangeLog @@ -0,0 +1,2612 @@ +Tue Jul 16 10:53:42 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (decode_prompt_string): Swap meanings of \h anbd \H. + +Mon Jul 15 16:01:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * toplev.cc (run_command_and_return_output): Renamed from do_system. + (Fsystem): Make `system ("emacs")' work as one would expect. + +Sun Jul 14 17:34:33 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * file-io.cc (Ffopen, Ffread, Ffwrite): Update doc strings, + correctly handle default architecture and precision args. + + * load-save.cc (mopt_digit_to_float_format): Rename from + get_floating_point_format. + (float_format_to_mopt_digit): New function. + + * oct-stream.cc (octave_base_stream::read, octave_base_stream::write): + Simplify by calling Matrix::read and Matrix::write to do real work + of reading, writing, and format conversion. + + * oct-stream.h (octave_base_stream): Move data_type enum to + liboctave/data-conv.h. Use float_format from + liboctave/mach-info.h instead of arch_type enum. + + * sysdep.h, sysdep.cc (octave_words_big_endian, ten_little_endians): + Delete. Now part of oct_mach_info class in liboctave. + +Tue Jul 9 11:18:59 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * arith-ops.cc, balance.cc, dassl.cc, data.cc, filter.cc, find.cc, + fsolve.cc, load-save.cc, log.cc, lsode.cc, minmax.cc, npsol.cc, + oct-obj.cc, oct-stream.cc, pr-output.cc, pt-cmd.cc, pt-const.cc, + pt-fvc.cc, pt-plot.cc, quad.cc, rand.cc, sighandlers.cc, sort.cc, + syscalls.cc, unwind-prot.cc, xdiv.cc, xpow.cc: + When indexing arrays, use operator() instead of elem() so that + bounds checking can be done consistently. + +Mon Jun 24 02:13:27 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install-oct): Use INSTALL_PROGRAM, instead of + INSTALL_DATA for installing shared libraries. + + * lex.l (grab_help_text): Ignore all initial comment characters, + not just the first. + * variables.cc (gobble_leading_white_space): Likewise. + +Sat Jun 22 22:43:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.h, input.cc (octave_completion_matches_called): New varaible. + (Fcompletion_matches): Set it to true on a successful call. + * toplev.cc (main_loop): If octave_completion_matches_called is + true, don't increment current_command_number. + +Thu Jun 13 03:52:19 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (is_mapper_function_name, + is_builtin_function_name): New functions. + (Fdocument): Use them. + Define as regular function, not a text style function. + +Thu Jun 6 00:09:25 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-plot.cc: Handle new built-in variable `gnuplot_has_frames'. + +Wed Jun 5 14:45:04 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (decode_prompt_string): \h now means the whole host + name and \H is the host name up to the first `.'. + +Thu May 30 23:41:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * fn-cache.cc (octave_fcn_file_name_cache::do_list): Always + recompute the lists of function files instead of trying to cache + them. + +Tue May 28 12:05:24 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc (warn_old_style_preference): New function. + (check_preference): Use it. + + * fn-cache.h: Include <ctime> here. + +Fri May 24 00:57:14 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (completion_matches): Don't return empty string_vectors. + + * octave.cc (long_opts): Add braindead. + +Thu May 23 01:49:33 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (gnu_readline): New optional arg, force_readline. + (get_user_input): Use it. + + * pt-const.cc (OCT_VAL_REP::assign): If converting the rhs to a + numeric value, convert a copy, not the actual object. + (OCT_VAL_REP::do_index): Prevent s([]) from resulting in a string + with zero rows. + + * mappers.cc: Handle toascii here. + * strfns.cc: Not here. + + * mappers.cc: Handle tolower and toupper here. + * mappers.h: Rename can_return_complex_for_real to flag and + overload meaning for ch_mapper. + * pt-fvc.cc (apply_mapper_fcn): Handle overloaded meaning. + + * syscalls.cc (stat): Return 3 values instead of just 1. + (lstat): Likewise. + +Wed May 22 02:34:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-const.cc (OCT_VAL_REP::make_numeric): For string to number + conversions, correctly set type tag before calling force_numeric. + (do_binary_op): Force string to number conversion if both args are + strings and we are doing some sort of comparison operation. + + * Makefile.in (stamp-tinst, stamp-interp): Use SH_TERMLIBS and + SH_LIBS instead of TERMLIBS and LIBS. + + * pt-const.cc (do_unary_op): Add special case to handle + transposing strings. + + * pt-mat.cc (Vstring_fill_char): New variable. + (symbols_of_pt_mat): DEFVAR it. + + * input.cc (generate_struct_completions, + generate_possible_completions): Return string_vector, not char **. + Change all callers. + + * pt-const.cc (lookup_map_element): Use substr() correctly. + +Tue May 21 21:37:17 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + + * octave.cc: New args --no-site-file and --no-init-file. Delete + --ignore-init-file. The flag --norc (-f) implies both + --no-site-file and --no-init-file. + +Fri May 17 01:54:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (Fcompletion_matches): New function. + + * utils.cc (get_fcn_file_names): Delete. + * help.cc (simple_help): Use new file name cache instead of + calling get_fcn_file_names. + * variables.cc (make_name_list): Likewise. + + * fn-cache.h, fn-cache.cc, Map-fnc.cc: New files. + * Makefile.in: Add them to the lists. + + * Makefile.in (uninstall): Install in octincludedir, not includedir. + + * pt-plot.h: Include <csignal> here. + +Thu May 16 10:52:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-stream.cc (octave_stream::oscanf, octave_base_stream::oscanf, + octave_base_stream::do_oscanf): New functions for backward + compatibility with older versions of Octave. + (scanf_format_elt, scanf_format_list): Keep track of width specifier. + * file-io.cc (Fscanf): New function. + (Fscanf, Ffscanf, Fsscanf): Handle compatibility arg. + +Wed May 15 01:00:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-stream.cc (do_scanf): If doing '%c' conversion, unset + ios::skipws on input stream. + + * sighandlers.h, sighandlers.cc (octave_child, octave_child_list): + New classes for keeping track of the child processes we create. + (sigchld_handler): Check in octave_child_list to see if there is + anything we can do for the child that died. + * pager.cc: Register child pager process. + * pt-plot.cc: Likewise, for the plotter. + * Array-oc.cc: New file + * Makefile.in (TI_SRC): Add it to the list. + + * pager.cc (do_sync): Don't check error_state. + (flushing_output_to_pager): New static variable. + (flush_octave_stdout): Use it to avoid doing anything if already + flushing output. + + * sighandlers.cc (sigchld_handler): Call warning instead of + writing directly to cerr. + (sigpipe_handler): Call warning instead of message. + + * octave.cc (main): Call install_signal_handlers, + initialize_file_io, initialize_symbol_tables, and install_builtins + before parsing command line options. + + * user-prefs.h, user-prefs.cc: Delete. + + * utils.cc (check_preference): Move here. + * user-prefs.cc: From here. + + * defaults.cc: New file. Move initialization stuff from + variables.cc. Move DEFVARS for EDITOR, EXEC_PATH, LOADPATH, + IMAGEPATH, and OCTAVE_VERSION here. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + INFO_FILE and INFO_PROGRAM. + * help.cc: Move all of that here. + (symbols_of_help): Add DEFVARS for INFO_FILE and INFO_PROGRAM. + +Tue May 14 00:23:06 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pager.cc (do_sync): Be more defensive about sending stuff to the + external pager. + * sighandlers.cc (sigchld_handler): For now, only wait for + octave_pager_pid. Don't call error(). Do set octave_pager_pid to + -1 if the pager process no longer exists. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + PWD. + * dirfns.cc: Move all of that here. + (symbols_of_dirfns): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + default_save_format and save_precision. + * load-save.cc: Move all of that here. + (symbols_of_load_save): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + warn_divide_by_zero. + * arith-ops.cc: Move all of that here. + (symbols_of_arith_ops): New function. + * variables.cc (install_builtin_variables): Call it. + + * mappers.cc: Add wrappers for ctype is* functions so that they + will work on systems that only define them as macros. + +Mon May 13 00:27:08 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + suppress_verbose_help_message. + * help.cc: Move all of that here. + (symbols_of_help): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + treat_neg_dim_as_zero. + * pt-const.cc: Move all of that here. + + * pager.cc (octave_pager_stream::do_sync): Don't return early if + not interactive. + + * data.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * data.cc (symbols_of_data): New function. Move definition of I, + Inf, J, NaN, e, eps, i, inf, j, nan, pi, realmin, and realmax here. + * variables.cc: From here. + (install_builtin_variables): Call symbols_of_data. + + * file-io.cc (symbols_of_file_io): New function. Move definition + of SEEK_CUR, SEEK_END, SEEK_SET, stdin, stdout, stderr here. + * variables.cc: From here. + (install_builtin_variables): Call symbols_of_file_io. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + do_fortran_indexing, implicit_str_to_num_ok, + ok_to_lose_imaginary_part, prefer_column_vectors, + prefer_zero_one_indexing, print_answer_id_name, + propagate_empty_matrices, resize_on_range_error, and + struct_levels_to_print. + * pt-const.cc: Move all of that here. + (symbols_of_pt_const): New function. + * variables.cc (install_builtin_variables): Call it. + * pt-fvc.cc (tree_identifier::assign): Use Vresize_on_range_error + instead of user_pref.resize_on_range_error here. + * load-save.cc (save_mat_binary_data): Use Vimplicit_str_to_num_ok + instead of user_pref.implicit_str_to_num_ok here. + * utils.cc (empty_arg): Use Vpropagate_empty_matrices instead of + user_pref.propagate_empty_matrices here. + * pt-exp-base.cc (tree_expression::is_logically_true): Likewise.. + + * pt-fcn.cc (symbols_of_pt_fcn): Also move DEFVAR for + default_return_value here. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + ps1, ps2, ps4, and completion_append_char. + * input.cc: Move all of that here. + (symbols_of_input): New function. + * variables.cc (install_builtin_variables): Call it. + * pt-pr-code.cc (indent): Use Vps4 instead of user_pref.ps4 here. + * help.cc (Ftype): Also here. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + automatic_replot, gnuplot_binary, and gnuplot_has_multiplot. + * pt-plot.cc: Move all of that here. + (symbols_of_pt_plot): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + beep_on_error. + * error.cc: Move all of that here. + (symbols_of_error): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + empty_list_elements_ok. + * pt-mat.cc: Move all of that here. + (symbols_of_pt_mat): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + define_all_return_values, return_last_computed_value, and + silent_functions. + * pt-fcn.cc: Move all of that here. + (symbols_of_pt_fcn): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + whitespace_in_literal_matrix. + * lex.l: Move all of that here. + (symbols_of_lex): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + warn_assign_as_truth_value, warn_comma_in_global_decl, + warn_function_name_clash, and warn_missing_semicolon. + * parse.y: Move all of that here. + (symbols_of_parse): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + output_precision, output_max_field_width, print_empty_dimensions, + and split_long_rows. + * pr-output.cc: Move all of that here. + (symbols_of_pr_output): New function. + * variables.cc (install_builtin_variables): Call it. + + * user-prefs.h, user-prefs.cc: Delete all stuff related to + page_screen_output, page_output_immediately, and pager_binary. + * pager.cc: Move all of that here. + + * user-prefs.h (check_preference): Provide declaration. + * user-prefs.cc (check_preference): Make external. + + * toplev.cc (Foctave_config_info): New function. + + * oct-conf.h.in: New file + * Makefile.in (oct-conf.h): New target. + Add it to the appropriate lists. + + * sighandlers.cc (sigchld_handler): Don't complain about wait + returning a negative value. + + * file-io.cc (Fsscanf, Fsprintf): Pass true for second arg of + octave_stream constructor. + + * oct-stream.h (octave_stream): New field, preserve. + (octave_stream::~octave_stream): If preserve, don't delete rep. + + * pager.cc (symbols_of_pager): Set default for + page_output_immediately to 0. + + * toplev.cc (do_system): Correctly handle return_output. + Append ends to output_buf before calling str(). + + * variables.cc: If M_PI and M_E are available, use them. + + * mk-oct-links.in (links_dir): If old link exists, delete it first. + +Sun May 12 01:46:07 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (DISTFILES): List defaults.h.in and oct-gperf.h here. + (INCLUDES): Not here. + (install-inc): New target. + (uninstall): Also delete libraries and include files. + (install-inc): If linkdir is a directory, leave it alone. + (TERMLIBS, LIBPLPLOT, LIBDLFCN): Don't substitute here (now in + Makeconf). + + * oct-stream.cc (octave_base_stream::do_read): Provide initial + value for tmp var. + + * pt-walk.h, pt-pr-code.h, pt-pr-code.cc: New tree-walking classes. + * Makefile.in: Add them to the appropriate lists. + * pt-fvc-base.h, pt-exp-base.cc, pt-fvc-base.cc, pt-mvr-base.cc, + pt-base.cc, pt-mvr.cc, pt-mat.h, pt-mat.cc, pt-fvc.cc, + pt-const.cc, pt-cmd.cc, pt-const.h, pt-misc.cc, pt-plot.cc, + pt-fcn.cc, pt-plot.h, pt-mvr.h, pt-mvr-base.h, pt-misc.h, + pt-fcn.h, pt-exp.h, pt-exp.cc, pt-exp-base.h, pt-fvc.h, pt-cmd.h, + pt-base.h: + Replace print_code stuff with accept() functions. + Add member access functions where necessary. + * help.cc (Ftype): Update to use new method of walking trees to + print text representation of user-defined functions. + + * file-io.cc (Ffscanf): Update doc string. + (Fsscanf): Likewise. + + * oct-stream.cc (octave_base_stream::do_read): Correctly set max_size. + Pad mval with zeros on final resize. + (octave_base_stream::do_scanf): Likewise. + (do_scanf_conv): Correctly resize mval. + +Sat May 11 05:14:09 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pager.cc (octave_pager_buf::sync): Correctly set bypass_pager. + + * lex.l (<MATRIX>{SNLCMT}*\]{S}*): Match SNLCMT, not just SNL. + +Fri May 3 11:05:30 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-const.cc (OCT_VAL_REP::set_index): Complain if type can't be + indexed. + + * input.cc (get_user_input): Don't increment input line number if + input is coming from eval string. + + * user-prefs.cc: Allow empty strings for prompts. + +Thu May 2 10:50:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-mvr.h (class tree_oct_obj): Declare values data member const. + +Sun Apr 28 03:16:52 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * user-prefs.h (user_preferences): New field, + `page_output_immediately'. + * user-prefs.cc (init_user_prefs): Initialize it. + (page_output_immediately): New function. + * pager.cc (syms_of_pager): Add DEFVAR. + (really_flush_to_pager): New file-scope variable. + (flush_octave_stdout): Set and restore it. + (octave_pager_buf::sync): Check it, user_pref.page_screen_output, + and user_pref.page_output_immediately to decide when to really + flush output. + (more_than_a_screenful): New function. If paging but not + immediately, then check this too. + + * pager.cc (default_pager): Move here from variables.cc. If pager + is less and LESS is not in the environment, append useful flags. + (symbols_of_pager): New function. + * variables.cc (install_builtin_variables): Call it. + Delete pager-related DEFVARs. + + * syswait.h (WIFSIGNALLED): Define if sys/wait.h doesn't. + + * sighandlers.cc: Handle SIGCHLD. + + * pager.cc, pager.h: Rewrite. + * pt-mvr.cc, pt-misc.cc, pt-fcn.cc, pt-const.cc, oct-hist.cc, + file-io.cc, help.cc, variables.cc, qpsol.cc, dassl.cc, quad.cc, + npsol.cc, lsode.cc, fsolve.cc, load-save.cc, dirfns.cc, octave.cc, + toplev.cc, error.cc, input.cc: + Write to octave_stdout and octave_diary instead of calling + maybe_page_output() or maybe_write_to_diary_file(). + + * oct-procbuf.h, oct-procbuf.cc: New files. + * procstream.h (class procstreambase): Use octave_procbuf instead + of procbuf from libg++, so we can get pids of subprocesses. + +Fri Apr 26 01:21:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-const.cc (OCT_VAL_REP::do_index): Call maybe_mutate() before + returning. + + * mappers.h (struct Mapper_fcn): Delete. + (struct builtin_mapper_function): New field ch_mapper. + * pt-fvc.h (tree_builtin): Convert type of mapper_fcn from + Mapper_fcn to builtin_mapper_function. + * variables.cc (install_builtin_mapper): Likewise, for arg. + Simplify, since we don't have to do the copying ourselves now. + * pt-fvc.cc (apply_mapper_function): Handle ch_mapper case. + * defun.h (DEFUN_MAPPER): Likewise. + * mappers.cc (install_builtin_mappers): Likewise. + Add ctype is* functions here. + +Thu Apr 25 00:57:06 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * arith-ops.h, defun-int.h, defun.h, dynamic-ld.h, gripes.h, + load-save.h, oct-map.h, oct-obj.h, oct-stream.h, pt-cmd.h, + pt-const.h, pt-exp-base.h, pt-exp.h, pt-fcn.h, pt-fvc-base.h, + pt-fvc.h, pt-mat.h, pt-misc.h, pt-mvr-base.h, pt-mvr.h, pt-plot.h, + symtab.h, toplev.h, utils.h, variables.h, xpow.h, Array-tc.cc, + Map-i.cc, Map-tc.cc, SLList-tc.cc, arith-ops.cc, balance.cc, + bogus.cc, chol.cc, colloc.cc, dassl.cc, data.cc, det.cc, + dirfns.cc, eig.cc, error.cc, expm.cc, fft.cc, fft2.cc, file-io.cc, + filter.cc, find.cc, fsolve.cc, fsqp.cc, givens.cc, gripes.cc, + help.cc, hess.cc, ifft.cc, ifft2.cc, input.cc, inv.cc, + load-save.cc, log.cc, lpsolve.cc, lsode.cc, lu.cc, minmax.cc, + npsol.cc, oct-hist.cc, oct-obj.cc, oct-stream.cc, pager.cc, + pinv.cc, pr-output.cc, pt-cmd.cc, pt-const.cc, pt-exp-base.cc, + pt-exp.cc, pt-fcn.cc, pt-fvc-base.cc, pt-fvc.cc, pt-mat.cc, + pt-misc.cc, pt-mvr-base.cc, pt-mvr.cc, pt-plot.cc, qpsol.cc, + qr.cc, quad.cc, qzval.cc, rand.cc, resource.cc, schur.cc, sort.cc, + strfns.cc, svd.cc, syl.cc, symtab.cc, syscalls.cc, sysdep.cc, + timefns.cc, toplev.cc, utils.cc, variables.cc, xpow.cc, parse.y: + Rename tree_constant -> octave_value. + Rename Octave_object -> octave_value_list. + +Wed Apr 24 22:15:34 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * toplev.cc (Fsystem): Merge functionality of async_system and + sync_system. + + * oct-fstrm.h, oct-iostrm.h, oct-prcstrm.h, oct-stdstrm.h, + oct-stream.h, oct-strstrm.h, oct-fstrm.cc, oct-iostrm.cc, + oct-prcstrm.cc, oct-stdstrm.cc, oct-stream.cc, oct-strstrm.cc, + Array-os.cc: New files. + * Makefile.in: Add them to the appropriate lists. + * file-io.cc: Rewrite to use new stream classes. + +Tue Apr 23 18:59:25 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * gripes.cc (gripe_not_supported): New function. + + * toplev.cc (do_octave_atexit, Fatexit): New functions. + (octave_atexit_functions): New file-scope variable. + * octave.cc (main): Register do_octave_atexit with atexit. + + * variables.cc (install_builtin_variables): Call + symbols_of_syscalls here. + + * syscalls.h, syscalls.cc: New files. + +Mon Apr 22 21:14:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * syscalls.cc: New file. + (Flstat, Fmkfifo, Fstat, Funlink, Fwait, Fwaitpid): Move here. + * file-io.cc: From here. + * Makefile.in (SOURCES): Add syscalls.cc to the list. + +Wed Apr 17 18:34:10 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * file-info.h, file-info.cc: Delete files. + * Makefile.in: Remove from lists. + + * toplev.cc (Fquit): Accept exit status argument. + (Fflops): Delete (now a function file). + +Thu Apr 11 16:20:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lex.l: Recognize `.'. + Update current_input_column even for unrecognized characters. + Return LEXICAL_ERROR for unrecognized characters. + +Mon Apr 8 19:59:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (install_builtin_variables): Split into several + functions to make compiling with g++ go faster and consume less + memory. + +Sun Apr 7 16:25:35 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (Fsave): Print usage if i == argc. + (Fload): Likewise. + +Sat Apr 6 21:26:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (clean): Also delete pic/*.o + (maintainer-clean, distclean): Also remove stamp-picdir, + stamp-tinst, stamp-interp, and pic directory. + (stamp-prereq): New target. + +Wed Apr 3 11:19:30 1996 Rick Niles <niles@axp745.gsfc.nasa.gov> + + * resource.cc: Don't make including sys/resource.h and sys/times.h + mutually exclusive. + +Fri Mar 29 13:43:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (distclean): Delete so_locations, which is created + on DEC Alpha systems. + +Thu Mar 28 02:53:48 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.h (undo_string_escape): Provide extern declaration here. + + * lex.l (NL): Allow \r\n as new line character. + (.): Complain if invalid character is found on input + +Fri Mar 22 03:47:52 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * resource.cc (getrusage): If getrusage is missing, try using + times to at least fill in the cpu time values. If neither one is + available, return 0 for cpu times instead of NaN. + + * sighandlers.cc (octave_signal_mask): New file-scope variable. + (octave_save_signal_mask, octave_restore_signal_mask): New functions. + * toplev.cc (main_loop): Use them. + +Wed Mar 20 01:21:28 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc (get_fcn_file_names (const string&, int)): Resize + retval to value of k, not i. + (get_fcn_file_names (int)): In loop for copying names to retval, + don't increment j twice. + +Mon Mar 18 22:27:19 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in ($(MAKEDEPS)): Depend on oct-gperf.h. + +Fri Mar 1 18:15:52 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * fsolve.cc (fsolve_options): Delete unused argument nargout. + + * filter.cc: Use MArray instead of Array so that automatic + conversions will work again. + +Tue Feb 27 04:49:51 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (looks_like_octave_copyright): Make the strings + that we are trying to match both have length 29. + + * Makefile.in (install-bin): Use $(INSTALL_PROGRAM), not $(INSTALL). + + * load-save.cc (read_mat_binary_data): Make sure name is + NUL terminated. + +Mon Feb 26 18:18:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (whos): Make argv from tmp_args, not args. + + * defun.h (DEFCONSTX): Don't stringify name. + +Sat Feb 24 01:12:59 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install-oct): Make mk-oct-links executable. + * mk-oct-links.in (links_dir): Update to match new format of + DEFUN_DLD_BUILTIN macro. Use LN_S, not just LN. + (links_dir): + + * pr-output.cc (octave_print_internal): New arg, extra_indent, for + versions of this function that take matrices and ranges. + * pt-const.cc (TC_REP::print (ostream&)): Fix printing of structures. + Pass struct_indent to octave_print_internal as appropriate. + (print_with_name (ostream&, const string&, bool)): Handle spacing + around `=' differently for structures. + +Fri Feb 23 04:51:04 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * token.cc (token (double, const string&, int, int)): Store orig_text. + +Tue Feb 20 20:36:01 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (Fclear): Fix off-by-one error. + +Sat Feb 17 16:54:02 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-hist.cc (default_history_file): Append "/.octave_hist" to + return value, not to home_directory. + +Fri Feb 16 18:10:46 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc: (NINT, D_NINT): Move to liboctave. + + * sysdep.cc (octave_ieee_init): Move to liboctave. + + * procstream.h, procstream.cc: Rewrite. + + * pager.cc (cleanup_oprocstream): New static function. + * toplev.cc (cleanup_iprocstream): Likewise. + * dirfns.cc (cleanup_iprocstream): Likewise. + + * unwind-prot.cc (matrix_cleanup, complex_matrix_cleanup): Delete. + +Thu Feb 15 22:03:28 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * oct-obj.cc, oct-obj.h: Move most code to the header. + + * oct-obj.cc (make_argv, all_strings): New member functions. + * utils.cc: Moved from here. + + * load-save.cc: Move byte swapping stuff to liboctave. + Move float format conversion stuff to liboctave. + (all_parts_int, too_large_for_float): Move to liboctave. + + * symtab.cc (valid_identifier): Move here. + * load-save.cc: From here. + + * sysdep.cc: Move floating-point format stuff to liboctave. + * pr-output.cc: Include float-fmt.h here. + +Wed Feb 14 01:49:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * defun.h, defun-dld.h, defun-int.h: Simplify interface for DEFUN, + DEFUN_DLD, DEFVAR, and DEFCONST macros. Change all uses. + + * qzval.cc: Move guts to liboctave. + +Tue Feb 13 10:28:27 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (parse_fcn_file): Also avoid saving history if + input is from a script file. + + * help.cc (Ftype): Call unwind_protect_str for user_pref.ps4. + + * npsol.cc (nonlinear_constraints_ok): Now static. + + * npsol.cc (linear_constraints_ok): Now static. + * qpsol.cc (linear_constraints_ok): Duplicate here. + + * data.cc (Flinspace): Don't print usage message if nargin == 2. + +Sun Feb 11 14:20:32 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mk-oct-links.in: Rename from mk-oct-links. + (LN_S): Use this variable instead of ln. + Set -e option for shell. + Exit with status of last command. + Print message when making link. + * Makefile.in (DISTFILES): Add mk-oct-links.in to the list. + (install-oct): Run ./mk-oct-links, not $(srcdir)/mk-oct-links. + + * variables.cc (install_builtin_variables): Restore accidentally + deleted DEFVAR for save_precision. + +Fri Feb 9 11:24:32 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (INCLUDES): Delete statdefs.h from the list (it's + now in the liboctave directory). + + * toplev.cc (toplevel): Define here. + * octave.cc (toplevel): Not here. + + * toplev.cc (main_loop): New function. + * octave.cc (main): Call it here instead of doing main loop + actions here. + + * user-prefs.cc (do_fortran_indexing): Also set liboctave_dfi_flag. + (prefer_column_vectors): Also set liboctave_pcv_flag. + (prefer_zero_one_indexing): Also set liboctave_pzo_flag. + (resize_on_range_error): Also set liboctave_rre_flag. + + * variables.cc (restore_command_history): New function. + (parse_fcn_file): Use it here in unwind_protect. + + * dynamic-ld.cc (load_octave_oct_file): Reverse sense of test. + (load_octave_builtin): Delete. + (mangle_octave_oct_file_name): Delete. + + * pt-fvc.cc (tree_builtin::eval): Don't try to dynamically load + functions here. + + * pr-output.cc (set_format_style): Decrement argc for first arg too. + + * input.cc (gnu_readline): If readline returns an empty string, + convert it to a string containing a single newline character. + + * octave.cc (octave_argv): Now a static string_vector. + (intern_argv): Use string_vector ops, not charMatrix ops. + * toplev.cc (octave_argv): Delete definition. + * toplev.h (octave_argv): Delete declaration. + +Thu Feb 8 10:58:24 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (conf-dist): New target. + +Tue Feb 6 10:59:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * help.cc (Ftype): Correctly handle structure names. + +Sun Feb 4 02:02:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * qpsol.cc (Fqpsol): Call set_options(), not copy() to set + options for QPSOL objects. + + * npsol.cc (Fnpsol): Call set_options(), not copy() to set + options for NPSOL objects. + + * quad.cc (Fquad): Call set_options(), not copy() to set + options for Quad objects. + + * dynamic-ld.cc (load_octave_builtin): Don't call destructor on string. + (load_octave_oct_file): Likewise. + Check oct_file.empty(), not just oct_file. + + * fsolve.cc (Ffsolve): Call set_options(), not copy() to set + options for NLEqn object. + + * variables.cc (do_who): Properly set match patterns from argument + vector for call to maybe_list. + +Sat Feb 3 03:29:33 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave.cc (long_opts): Properly set second field using new enum. + + * lsode.cc: Change ODE to LSODE where appropriate. + Use LSODE_options, not ODE_options. + + * dassl.cc: Change DAE to DASSL where appropriate. + Use DASSL_options, not ODE_options. + +Fri Feb 2 01:41:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dirfns.cc: Include unistd.h. + + * parse.y, lex.l: Handle matrix lists without ml or mlnm stacks. + * pt-mat.h, pt-mat.cc (tree_matrix): + Rewrite to use SLList instead of home brew list. + * SLList-tm.cc: New file + * Makefile.in: Add it to the lists. + * SLStack-tm.cc: Delete. + * Makefile.in: Delete it from the lists. + + * All pt-* files: Use bool instead of int where appropriate. + + * Makefile.in (DEP_SOURCES_3): Add octave.cc. + + * pt-const.h (class tree_constant::tree_constant_rep): Make + everything in this class public, then it doesn't need to declare + the tree_constant class as a friend. + +Thu Feb 1 01:42:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * lex.h, lex.l, parse.h, parse.y (class lexical_feedback): New + class for lexer flags. Replace lots of global vars with members + of this class. + + * lex.l (class brace_paren_nesting_level): New class to replace + nesting_level stack. nesting_level is now an instance of this + class. + + * lex.l (yum_yum): New typedef. + (ATE_NOTHING): New global var. + (ATE_SPACE_OR_TAB, ATE_NEWLINE): Don't #define these, declare them + as const yum_yum. + (eat_whitespace, eat_continuation): Return yum_yum, not int. + + * lex.l (SHORT_CIRCUIT_LOGICALS): Delete. Always do this for || + and && tokens. + (yy_flex_alloc, yy_flex_realloc, yy_flex_free, next_char_is_space): + Delete. + + * toplev.cc (verbose_flag): Delete definition. + * toplev.h (verbose_flag): And declaration. + * octave.cc (verbose_flag): Now static. + + * lex.l (lookup_identifier): Arg is now string, not char*. + (handle_identifier, is_plot_keyword, is_keyword): Likewise. + (strip_trailing_whitespace): Return value is now string, not char*. + (plot_style_token): Likewise, for both arg and return value. + + * input.cc (octave_gets_line): Delete. + (gnu_readline, octave_gets, octave_read): + Properly handle input when using_readline is either true or false. + Don't limit length of input lines to flex buffer size. + (get_user_input): New function. + + * octave.cc (main): Handle --no-line-editing. + * toplev.h (using_readline): Provide external declaration here. + * input.h: Not here. + * toplev.cc (using_readline): Define here. + * input.cc: Not here. + + * toplev.h (no_line_editing): Delete declaration. + * input.cc (no_line_editing): Delete definition. + +Wed Jan 31 05:28:45 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * input.cc (DEFAULT_ARRAY_SIZE, PROMPT_GROWTH): Delete definitions + of unused macros. + (read_octal): Now static. + + * givens.cc (Fgivens): Use new functions from matrix classes + instead of calling Fortran functions directly. + * syl.cc (Fsyl): Likewise. + * expm.cc (Fexpm): Likewise. + +Mon Jan 29 00:00:48 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave.cc: Use new prog_args class instead of calling getopt + directly. + + * getopt.h, getopt.c, getopt1.c: Move to liboctave directory. + * Makefile: Remove from lists. + + * utils.cc (strconcat, read_until, discard_until): Delete. + + * pager.cc (terminal_columns, terminal_rows): Move to + liboctave/oct-term.cc. + * pager.cc, pr-output.cc: Include oct-term.h. + + * utils.cc (list_in_columns): Moved to liboctave/str-vec.cc. + Change all callers to use new member function syntax. + + * dirfns.cc (absolute_program): Now static. + (absolute_pathname): Delete. + + * pt-plot.cc (save_in_tmp_file): Call oct_tempnam, not + octave_tmp_file_name. Include file-ops.h. + * file-io.cc (do_scanf, Foctave_tmp_file_name): Likewise. + * oct-hist.cc (mk_tmp_hist_file): Likewise. + + * file-io.cc (Foctave_tmp_file_name): Move here. + * utils.cc: From here. + + * utils.cc (octave_tmp_file_name): Move to liboctave/file-ops.cc. + + * tempname.c, tempnam.c: Move to liboctave directory. + * Makefile.in: Remove from lists. + +Sun Jan 28 19:00:52 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * xdiv.cc (all xdiv functions): Return Matrix or ComplexMatrix, + not tree_constant. + + * oct-hist.h, oct-hist.cc, toplev.cc, octave.cc, input.cc, + file-io.cc, user-prefs.cc: Rewrite to use new command_history + class instead of calling readline history functions directly. + + * utils.cc (get_fcn_file_names): Delete num arg. + +Thu Jan 25 20:33:54 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (matches_patterns): Use new glob_match class + instead of calling fnmatch directly. + * symtab.cc (matches_patterns, symbol_table::glob): Likewise. + * variables.cc (Fclear): Likewise. + +Wed Jan 24 02:05:22 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * fnmatch.h fnmatch.c: Delete. + * Makefile.in: Add glob stuff in the appropriate places, remove + fnmatch.h and fnmatch.c from lists. + + * octave.cc (program_invocation_name, program_invocation_short_name): + Maybe declare. + (initialize_globals): Maybe initialize them. + + * octave.cc (initialize_pathsearch): Define here, not in pathsearch.cc. + * pathsearch.h, pathsearch.cc: Remove files. + * Makefile.in: Remove them from the lists. + + * help.cc (simple_help): Ignore directories that don't have any .m + or .oct files. + + * utils.cc (search_path_for_file): Use new dir_path class instead + of calling kpathsea routines directly. + (get_fcn_file_names): Likewise. + * help.cc (simple_help): Likewise. + + * dirfns.cc (make_absolute): Don't convert empty arg to "./". + + * sysdir.h: Move to liboctave directory. + * Makefile.in: Remove from lists. + + * dirfns.cc (Freaddir): Use new dir_entry class instead of calling + readdir directly. Include dir-ops.h, not sysdir.h. + * utils.cc (get_fcn_file_names): Likewise. Delete unnecessary + first arg, change all callers. + +Tue Jan 23 00:43:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * safe-xstat.hin, safe-xstat.cin, statdefs.h, file-ops.h, + file-ops.cc, filemode.c, mkdir.c, rmdir.c, rename.c: + Files moved to liboctave directory. + * Makefile.in: Remove them from lists. Move appropriate rules. + + * acosh.c, asinh.c, atanh.c, erf.c, erfc.c, gamma.c, lgamma.c: + Files moved to liboctave directory. + * Makefile.in: Remove them from lists. + * missing-math.h: Deleted. + * pr-output.cc, sysdep.cc, minmax.cc, mappers.cc, expm.cc, + arith-ops.cc: Include oct-math.h, not cmath or missing-math.h. + +Mon Jan 22 19:33:05 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (Fexist): Use file_stat instead of calling stat + directly. Include file-ops.h, not statdefs.h. + * octave.cc (execute_startup_files): Likewise. + * file-io.cc (file_io_get_file, fopen_internal, popen_internal, Fstat): + Likewise. + (mk_stat_map): Likewise, use file_stat object, not struct stat. + * oct-hist.cc (do_history): Likewise. + + * file-ops.h, file-stat.cc: New files. + * Makefile.in: Include them. + * dirfns.cc: Delete is_newer. Don't include statdefs.h. + * toplev.cc: Don't include statdefs.h. + +Sun Jan 21 22:48:03 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-mvr.h, pt-fvc.h, Map.cc, Map.h, dynamic-ld.h, + pt-fvc-base.cc, SLList-str.cc, pt-fcn.h, pt-fvc-base.h, + SLStack-str.cc, pt-mvr.cc, pt-exp.cc, token.h, token.cc, + user-prefs.h, pt-base.cc, user-prefs.cc, dirfns.h, sysdep.h, + sysdep.cc, input.h, parse.h, lex.l, parse.y, defun.h, mappers.h, + pt-fvc.cc, pt-plot.h, load-save.h, octave.cc, defun-int.h, help.h, + variables.h, oct-map.h, oct-obj.h, oct-obj.cc, pt-const.cc, + oct-map.cc, input.cc, symtab.h, pt-const.h, pathsearch.cc, + pr-output.h, pr-output.cc, toplev.h, timefns.cc, schur.cc, + pt-plot.cc, pager.cc, load-save.cc, dynamic-ld.cc, dirfns.cc, + data.cc, file-info.h, file-info.cc, colloc.cc, utils.h, qpsol.cc, + quad.cc, npsol.cc, lsode.cc, fsolve.cc, dassl.cc, file-io.cc, + help.cc, utils.cc, oct-hist.h, oct-hist.cc, symtab.cc, toplev.cc, + pt-fcn.cc, unwind-prot.h, unwind-prot.cc, variables.cc: + Most functions in these files that deal with character strings + have been converted to use the string class insatead of char*. If + you want more detailed information, you'll have to figure it out + for yourself. + +Sat Jan 20 18:19:12 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dynamic-ld.cc [WITH_DL]: Define RTLD_LAZY to be 1 if it is not + already defined. + +Sun Jan 14 07:48:05 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pt-const.cc (print_as_scalar, print_as_structure): + Make these member functions. + (tree_constant::print_with_name): New function, moved here from + old tree-expr.cc file (where it was called print_constant) and + converted to member function. Change all callers. + +Fri Jan 12 01:54:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave.cc (initialize_globals): Don't do kpathsearch stuff here. + (main): Call initialize_pathsearch() here. + + * pathsearch.cc: New file. + * Makefile.in (SOURCES): Add it to the list + + * oct-hist.h: Rename from octave-hist.h. + * oct-hist.cc: Rename from octave-hist.cc. + * Makefile.in, parse.y, other .cc files: Cope with it. + + * dynamic-ld.cc: Avoid warnings if !WITH_DYNAMIC_LINKING. + + * load-save.cc (save_ascii_data): string::data() returns const char*. + + * utils.h: Don't provide forward declaration for tree_constant. + + * oct-obj.h: Don't include mx-base.h or provide forward + declarations for Matrix and Range types. + + * file-info.h: Don't include oct-obj.h. Do include cstdio. + + * symtab.h: Don't provide forward declaration for ostream. + + * variables.h: Don't provide forward declarations for istream, + ostrstream, tree, builtin_function, or builtin_variable objects. + + * balance.cc, chol.cc, colloc.cc, dassl.cc, det.cc, eig.cc, + expm.cc, fft.cc, fft2.cc, filter.cc, find.cc, fsolve.cc, fsqp.cc, + givens.cc, hess.cc, ifft.cc, ifft2.cc, inv.cc, log.cc, lpsolve.cc, + lsode.cc, lu.cc, minmax.cc, npsol.cc, pinv.cc, qpsol.cc, qr.cc, + quad.cc, qzval.cc, rand.cc, schur.cc, sort.cc, svd.cc, syl.cc: + Clean up #include statements. + + * pt-const.h: Don't include oct-obj.h or tree-base.h. + Provide forward declaration of Octave_object here. + * pt-const.cc: Include oct-obj.h here. + + * pt-mat.h, pt-fcn.h, pt-const.h, pt-misc.h, pt-plot.h, + pt-exp-base.h, pt-cmd.h, pt-fvc-base.h, pt-mvr-base.h, pt-exp.h, + pt-mvr.h, pt-fvc.h: New files, split from tree-expr.h and/or + renamed from other tree-*.h files (pt == parse tree). + * pt-base.cc, pt-const.cc, pt-exp.cc, pt-fvc-base.cc, pt-mat.cc, + pt-mvr-base.cc, pt-plot.cc, pt-cmd.cc, pt-exp-base.cc, pt-fcn.cc, + pt-fvc.cc, pt-misc.cc, pt-mvr.cc: Likewse, split from tree-expr.cc + and/or other tree-*.cc files. + * Makefile.in: Include them in the appropriate lists. + * All: Fix #include statements to match. + + * Array-tc.cc: Don't instantiate ArrayRep objects. + +Thu Jan 11 02:35:19 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (tree_constant::eval (int, int, const Octave_object&)): + Define here instead of in tree-const.h. + +Wed Jan 10 04:34:20 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.h (tree_constant::tree_constant (const string&): + * tree-const.cc (TC_REP::tree_constant_rep (const string&)): + New constructor. + +Tue Jan 9 04:10:29 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * rand.cc (do_rand): Use string_value() result directly instead of + c_str() conversion. + * balance.cc (Fbalance): Likewise. + + * tree-const.cc (TC_REP::string_value()): + Handle new definition of charMatrix::row_as_string() + * load-save.cc (save_ascii_data): Ditto. + (save_binary_data): Ditto. + * pr-output.cc (octave_print_internal): Ditto. + + * balance.cc (Fbalance): + Handle new definition of TC_REP::string_value() + * colloc.cc (Fcolloc): Ditto. + * dassl.cc (Fdassl_options): Ditto. + * data.cc (Fstruct_contains): Ditto. + * dirfns.cc (Fmkdir): Ditto. + (Freaddir): Ditto. + (Frmdir): Ditto. + (Frename): Ditto. + * error.cc (handle_message): Ditto. + * file-io.cc (process_printf_format): Ditto. + (fopen_internal): Ditto. + (file_io_get_file): Ditto. + (return_valid_file): Ditto. + (Flstat): Ditto. + (Fstat): Ditto. + (unlink_internal): Ditto. + (mkfifo_internal): Ditto. + (async_system_internal): Ditto. + (sync_system_internal): Ditto. + (execute_internal): Ditto. + (popen_internal): Ditto. + (fwrite_internal): Ditto. + (fread_internal): Ditto. + (do_printf): Ditto. + (do_scanf): Ditto. + * input.cc (get_user_input): Ditto. + * lsode.cc (Flsode_options): Ditto. + * npsol.cc (Fnpsol_options):Ditto. + * qpsol.cc (Fqpsol_options):Ditto. + * quad.cc (Fquad_options): Ditto. + * rand.cc (do_rand): Ditto. + * schur.cc (Fschur): Ditto. + * sysdep.cc (Fputenv): Ditto. + (Fgetenv): Ditto. + * timefns.cc (extract_tm): Ditto. + (Fstrftime): Ditto. + * toplev.cc (Fsource): Ditto. + (eval_string): Ditto. + (Fsystem): Ditto. + * tree-plot.cc (subplot::handle_plot_data): Ditto. + * variables.cc (is_valid_function): Ditto. + (Fis_global): Ditto. + (Fexist): Ditto. + (builtin_string_variable): Ditto. + * utils.cc (make_argv): Ditto. + (Fundo_string_escapes): Ditto. + +Mon Jan 8 01:54:50 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (install-bin): Use $(LN_S), not just ln. + + * variables.cc (octave_fcn_file_dir): New function. + * tree-expr.cc (mark_as_system_fcn_file): Use it instead of + octave_lib_dir. + + * Makefile.in (clean): If $(SHARED_LIBS), also remove shared libs. + + * pr-output.cc (set_format (const ComplexMatrix&, int&, int&)): + Unconditionally call all_elements_are_int_or_inf_or_nan(). + (set_format (const Matrix&, int&, int&)): Likewise. + +Sun Jan 7 19:12:39 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc (oct_putenv): New function. + * sysdep.cc (Fputenv): Use oct_putenv. + * octave.cc (initialize_globals): Likewise. + +Sat Jan 6 23:22:37 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * sysdep.cc (Fputenv): New function. + + * input.cc (initialize_readline): Call rl_initialize() here. + + * octave.cc: Conditionally define atexit to be on_exit here. + * toplev.cc: Not here. + +Fri Jan 5 14:01:02 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * toplev.cc: Don't include <pwd.h> here. + + * octave-hist.cc, tree-plot.cc, utils.cc: Do include "sysdep.h". + + * dirfns.cc, file-io.cc, help.cc, load-save.cc, octave.cc, + octave-hist.cc, tree-plot.cc, utils.cc: + Don't include <readline/tilde.h>. + * sysdep.h: Do include it here. + + * tree-const.cc (TC_REP::assign (tree_constant&, Octave_object&)): + If we have a matrix or range, call maybe_mutate before returning. + +Sun Dec 31 15:56:18 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * npsol.cc (Fnpsol): Improve doc string. + * qpsol.cc (Fqpsol): Likewise. + +Fri Dec 29 21:46:58 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * defun-dld.h: Make work again for OCTAVE_LITE and + WITH_DYNAMIC_LINKING. + + * Makefile.in: Handle shared libraries. + +Wed Dec 27 17:47:51 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * mk-oct-links: New file. + * Makefile.in (install-oct): Use it. + * f-*.cc: Rename to *.cc. + + * Makefile.in (install-bin, install-lib, install-oct): New targets. + (install): Use them. + +Tue Dec 26 21:38:22 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * toplev.cc (reading_startup_message_printed): Move initialization + here and make extern. + + * dirfns.cc, dynamic-ld.cc, help.cc, input.cc, octave-hist.cc, + octave.cc, sighandlers.cc, sysdep.cc, tree-expr.cc, tree-misc.cc, + utils.cc, variables.cc, parse.y, lex.l: Include toplev.h instead + of octave.h. + * toplev.h: rename from octave.h. + + * octave.cc (main): Delete unused variable saved_sigint_handler. + +Sun Dec 24 00:26:54 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dynamic-ld.cc: Massive re-write to handle dlopen/dlsym and + shl_load/shl_findsym methods of dynamic linking. + + * utils.cc (get_fcn_file_names): Check for .oct files if + WITH_DYNAMIC_LINKING, not WITH_DLD. + + * Makefile.in (LIB, TERMLIBS): Substitute values. + (octave): Add $(LIBS) to link command and use $(TERMLIBS) instead + of -ltermcap. + +Sat Dec 23 21:56:12 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * dynamic-ld.h, dynamic-ld.cc: Remove old unused code. + + * variables.cc (load_fcn_from_file): + Always call load_octave_oct_file. + +Wed Dec 20 00:56:57 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * pr-output.cc (set_real_format, set_real_matrix_format, + set_complex_format, set_complex_matrix_format, set_range_format): + New functions. Ensure the count of the digits to the right of the + decimal point is positive. + + * xpow.cc (xpow (const Matrix&, double)): Print warning if + inverting singular matrix (but return value anyway, in the name of + compatibility). + xpow (const ComplexMatrix&, double)): Likewise. + + * f-inv.cc (Finv): If matrix is singular, return result anyway, in + the name of compatibility. + + * symtab.cc (symbol_record::pop_context): + Don't assert (! context.empty ()). + + * tree-const.cc (TC_REP::char_matrix_value): Don't complain about + type conversion if object is an empty matrix.f + (TC_REP::assign): If rhs is a string, don't convert to numeric + type if rhs is empty or "". + Only widen if rhs is not empty. + Don't return 0x0 char_matrix if it is supposed to be a string. + + * arith-ops.h, mappers.h, pr-output.h, xdiv.h, xpow.h: Include + oct-cmplx.h in place of forward declaration for class Complex. + + * pr-output.cc, mappers.cc, arith-ops.cc, xdiv.cc, xpow.cc, + utils.cc: Include "oct-cmplx.h" instead of <Complex.h>. + + * octave.cc (initialize_error_handlers): Don't call + set_Complex_error_handler(). + (octave_Complex_error_handler): Delete unused function. + Delete declaration for set_Complex_error_handler(). + + * sighandlers.cc (catch_interrupts): New function. + * octave.cc (main): Call catch_interrupts() instead of calling + octave_set_signal_handler() directly. + +Tue Dec 19 03:22:37 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (looks_like_octave_copyright): Also recognize the + string " This program is free software". + +Thu Dec 14 01:54:06 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * octave-hist.cc (clean_up_history): Only write history file if + user_pref.saving_history. + + * octave-hist.cc (initialize_history, clean_up_history, + do_history): Perform tilde expansion on history file name. + + * octave.cc (main): Check `defined (HAVE_ON_EXIT)' not just + `(HAVE_ON_EXIT)'. + + * user-prefs.h (user_preferences): New fields, `history_file' and + `history_size'. + * user-prefs.cc (init_user_prefs): Initialize them. + (sv_history_file, history_size): New functions. + * variables.cc (install_builtin_variables): Initialize user-level + variables history_file and history_size. + * octave-hist.cc (default_history_size): Now extern. + (default_history_file): Likewise. + (octave_hist_size, octave_hist_file): Use user preference + variables instead. + * octave.cc (main): Call initialize_history after + execute_startup_files. + +Fri Dec 8 15:53:59 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * user-prefs.h (user_preferences): New field, `saving_history'. + * user-prefs.cc (init_user_prefs): Initialize it. + (saving_history): New function. + * variables.cc (install_builtin_variables): Initialize user-level + variable saving_history. + * octave.cc (parse_and_execute): Don't reset value of + saving_history here. + (main) Use user_pref.saving_history instead of saving_history. + * variables.cc (parse_fcn_file): Likewise. + * octave-hist.cc (maybe_save_history): Likewise. + Don't save history if input_from_startup_file. + +Mon Nov 27 23:05:52 1995 John W. Eaton <jwe@bevo.che.wisc.edu> + + * resource.cc: Include systime.h before <sys/resource.h>. + +Tue Nov 14 14:09:40 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * error.cc: Include cstring. + + * tree-expr.cc (print_code): Decrement indent level after printing + function body. + + * Makefile.in: Remove references to oct-str.cc, oct-str.h, and + Array-string.cc. + + * tree-const.h: Don't include oct-str.h. + +Mon Nov 6 11:16:49 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * parse.y (make_plot_command, finish_colon_expression, + make_unwind_protect, make_try_command, make_for_command, + make_break_command, make_continue_command, make_return_command, + start_if_command, finish_if_command, make_elseif_clause, + make_simple_assignment, make_multi_val_ret, start_function_def, + frob_function_def, finish_function_def, start_matrix, + finish_matrix): New functions. Use them in the grammar to clean + things up a bit. Possibly convert matrix lists, colon + expressions, binary expressions, and unary expressions to constant + values. + (tree_matrix_type): Delete. + (simple_expr1): Handle all expression stuff here, including + assignments. + (simple_expr): Just check to see that simple_expr1 produced + something useful. + + * tree-plot.cc, tree-plot.h: Move most simple constructors to the + header file. + + * tree-expr.h (tree_expression::is_constant): Move virtual + function definition here. + (tree_fvc::is_constant): From here. + (tree_expression::is_matrix_constant): New virtual function. + (tree_expression::is_range_constant): New virtual function. + * tree-expr.cc (tree_matrix::is_matrix_constant): New function. + * tree-expr.cc (tree_colon_expression::is_range_constant): New + function. + +Fri Nov 3 03:42:04 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * utils.cc, utils.h (jump_to_top_level): Declare as extern "C". + + * tree-const.h (tree_constant::eval ()): Only mutate if printing. + + * tree-const.cc (TC_REP::tree_constant_rep (const Complex&), + TC_REP::tree_constant_rep (const ComplexMatrix&), + TC_REP::tree_constant_rep (const ComplexDiagMatrix&), + TC_REP::tree_constant_rep (const ComplexRowVector&), + TC_REP::tree_constant_rep (const ComplexColumnVector&)): + Also check to see if we can convert to scalar_constant, not just + complex_scalar_constant. + + * user-prefs.h (user_preferences): New field, `exec_path'. + * user-prefs.cc (init_user_prefs): Initialize it. + (sv_exec_path): New function. + * variables.cc (install_builtin_variables): Add DEFUN for EXEC_PATH. + (default_exec_path): New function. + * octave.cc (exec_path): New global variable. + Don't set and putenv() exec path here. + (long_opts): Add --exec-path option. + (main): Handle it. + (initialize_globals): Set default value here. + + * user-prefs.h (user_preferences): New field, `info_prog'. + * user-prefs.cc (init_user_prefs): Initialize it. + (sv_info_prog): New function. + * variables.cc (install_builtin_variables): Add DEFUN for INFO_PROGRAM. + (default_info_prog): New function. + * octave.cc (info_prog): New global variable. + (initialize_globals): Set default value here. + (long_opts): Add --info-prog option. + (main): Handle it. + * help.cc (try_info): Use user_pref.info_prog here. + + * octave.cc (initialize_globals): Put arch_dir and bin_dir ahead + of shell_path when resetting PATH. + +Thu Nov 2 04:30:13 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-rand.cc (Frandn): New function. + (do_initialization): New function. + (do_rand): New function for doing the real work. + (Frand): Use it. + + * octave.cc (parse_and_execute): New arg, warn_for. If given, + print message if file cannot be opened. + Set curr_fcn_file_full_name here. + (Fsource): Pass extra arg to parse_and_execute to get warning message. + + * tree-const.h: Handle line and column info for double, Complex, + and char* constants. + + * parse.y (maybe_convert_to_ans_assign): Pass along line and + column info from expression. + + * parse.y (make_constant): New function. + (simple_expr1, word_list): Use it. + + * input.cc, input.h (curr_fcn_file_full_name): New global. + * variables.cc (load_fcn_from_file): Set it here. + * parse.y (func_def2, yyerror, maybe_warn_missing_semi): Use it. + (func_def2): If !reading_fcn_file, don't call strcmp if + curr_fcn_file_name is 0. + + * octave.cc (Fsource): New function. + (parse_and_execute): Declare file name const char *. + * input.cc (get_input_from_file): Likewise. + +Wed Nov 1 13:54:34 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-filter.cc: New file. + * Makefile.in (DLD_SRC): Add it to the list. + + * sysdep.h (gethostname): Change declaration to match definition + in sysdep.cc. + + * resource.cc: Include sysdep.h here, for octave_NaN. + +Tue Oct 31 02:12:18 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (TC_REP::assign): After converting rhs to a + numeric type, use the converted value, not the original. + + * dirfns.cc (Fpwd): If nargout == 0, print the directory name + instead of returning it. + + * pager.cc (maybe_page_output): Call maybe_write_to_diary_file here. + (flush_output_to_pager): Not here. + +Mon Oct 30 23:39:43 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (install_builtin_commands): Add DEFVAR for + echo_executing_commands. + + * octave-hist.cc (do_edit_history): Handle new echo stuff. + * variables.cc (parse_fcn_file): Likewise. + * octave.cc (parse_and_execute): Likewise. + (main): Likewise. + * input.cc (do_input_echo): + (Fecho): New function. + + * tree-expr.cc (tree_function::print_code_function_header, + tree_function::print_code_function_trailer): New functions. + (tree_function::print_code): Use them. + (tree_function::eval): Likewise, if echoing commands. + * tree-misc.cc (tree_statement::maybe_echo_code): New function. + + * user-prefs.h (user_preferences): New field, echo_executing_commands. + (echo_state): New enum, for various types of echoing we do. + * user-prefs.cc (echo_executing_commands): New function. + + * tree-base.cc (print_code_indent): Print PS4 as line prefix. + * help.cc (Ftype): Add unwind_protect for ps4 and set it to "" + before printing code. + + * tree-misc.h (tree_statement_list): New field, function_body. + (tree_statement_list::mark_as_function_body): New function. + * parse.y (func_def3): Mark function bodies. + + * pr-output.cc (octave_print_internal): Undo string escapes when + printing charMatrix as strings. + +Sat Oct 28 17:38:29 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * utils.h (undo_string_escapes): Add missing const in declaration. + +Fri Oct 27 03:49:44 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * file-io.cc (next_available_file_number): New stack for keeping + track of next available file number. + (get_next_avail_file_num): New function. + (fopen_file_for_user, fopen_internal, popen_internal, + execute_internal): Use it. + +Mon Oct 23 07:00:09 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (TC_REP::convert_to_matrix_type, + tree_constant::convert_to_matrix_type): New arg, make_complex. + (TC_REP::set_index): New arg, rhs_is_complex. Pass it to + convert_to_matrix_type. + (TC_REP::assign): Pass rhs.is_complex_type() to set_index. + +Thu Oct 19 00:38:38 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * xpow.cc: Include <climits>. + + * sysdep.cc (Fpause): Do pause even if not interactive. + + * tree-const.cc (TC_REP::assign): Don't make RHS numeric if both + RHS and LHS are strings. + +Wed Oct 18 22:19:16 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-expm.cc (Fexpm): Avoid taking log of negative number. Also, + don't unnecessarily divide the input matrix by 1.0. + + * input.cc (decode_prompt_string): Recognize \[ and \] too. + (initialize_readline): Bind M-p to history-search-backward and M-n + to history-search-forward. + +Tue Oct 17 04:31:06 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * xpow.cc (xpow): Handle integer powers better for complex^double. + (elem_xpow): Likewise. + + * lex.l ({CCHAR}): If nesting_level.top() is BRACE, return ';', + not '\n'. + +Mon Oct 16 19:03:45 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * help.cc (Fwhich): Fix doc string. + + * variables.cc (Fexist): Update doc string. + +Sun Oct 15 22:19:16 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Another massive set of changes to support character matrices + with indexing. The Octave_str_object class is no longer used. + Anything having to do with Octave_str_object in the following + files has been changed to use charMatrix instead: octave.h, + load-save.cc, octave.cc, strfns.cc, data.cc, pr-output.h, + pr-output.cc, tree-const.h, dirfns.cc, tree-const.cc, + tree-expr.cc. + +Sat Oct 14 22:28:18 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-sort.cc (mx_sort): Don't attempt to sort vectors that have + only one element, or matrices that have only one row. + +Thu Oct 12 02:16:58 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * mappers.cc (install_mapper_functions): Add gammaln as an alias + for lgamma. + + * tree-const.h, tree-const.cc: Massive overhaul of indexing and + indexed assignment functions. + * tc-inlines.h, tc-rep.h: Remove files. + * Makefile.in: Remove mention of them here too. + + * Makefile.in: Include $(TI_SRC) in DEP_SOURCES_3, not + $(TI_SOURCES). + Include $(DLD_SRC) in DEP_SOURCES_3. + Include $(TI_SRC) in DEF_FILES_5. + +Wed Oct 11 01:26:18 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (INCLUDES): Remove tc-inlines.h and tc-rep.h from + the list. + +Mon Oct 9 08:31:04 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * lex.l (next_token_is_bin_op): Do match `.+', `.*', etc. + +Sun Oct 8 18:19:56 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * idx-vector.h, idx-vector.cc: Delete files. + * Makefile.in (SOURCES, INCLUDES): Remove them from lists. + +Fri Oct 6 00:52:06 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-svd.cc (Fsvd): If nargout == 0 or nargout == 1, don't ask for + U and V. + +Wed Oct 4 00:04:57 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-npsol.cc (Fnpsol, Fnpsol_options): Avoid unused variable + warnings if NPSOL_MISSING. + * f-qpsol.cc (Fqpsol, Fqpsol_options): Likewise for QPSOL_MISSING. + + * Makefile.in (DISTFILES): Add octave.gperf. + + * lex.l (next_token_is_bin_op): Don't ever return true for `.' + since that causes problems with things like [ .1 .1 ]. + +Tue Oct 3 05:30:24 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (is_valid_function): Avoid setting error_state if + argument is not a string. + + * parse.y (maybe_warn_missing_semi): New function. + (list1, list): Call it if statement not terminated by semicolon. + * tree-misc.h (tree_statement::line, tree_statement::column): + New functions. + * octave.cc (input_from_command_line_file): New global variable. + (main): Set it. + (parse_and_execute): Unwind-protect it and set it to zero. + (eval_string): Likewise. + * variables.cc (parse_fcn_file): Likewise. + + * user-prefs.cc (warn_missing_semicolon): New function. + * user-prefs.h (user_preferences): New field, warn_missing_semicolon. + * variables.cc (install_builtin_variables): DEFVAR it. + + * tree-expr.cc (tree_expression::is_logically_true): Actually use + argument. + +Mon Oct 2 19:55:48 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (install_builtin_variables): Reduce the default + value of save_precision to 15. + + * variables.cc (builtin_real_scalar_variable): Return 1 for + success, 0 for failure. + + * user-prefs.cc (struct_levels_to_print, set_save_precision, + set_output_max_field_width, set_output_precision): + Change sense of test for builtin_real_scalar_variable return value. + (check_preference): Rename from check_str_pref. Change all callers. + Accept value of 0 to be the same as "false" and nonzero to be the + same as "true". + Delete val to avoid memory leak. + * variables.cc (install_builtin_variables): Change initial values + from "true" to 1, "false" to 0. + + * variables.cc (install_builtin_variables): Add DEFVAR for + gnuplot_has_multiplot. + + * user-prefs.h (user_preferences): New field, + `gnuplot_has_multiplot'. + * user-prefs.cc (init_user_prefs): Initialize it. + (gnuplot_has_multiplot): New function. + +Sat Sep 30 16:52:57 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * oct-gperf.h, octave.gperf: Newfiles. + * Makefile.in (DISTFILES): Add octave.gperf. + (INCLUDES): Add oct-gperf.h. + (oct-gperf.h): New rule. + (local-dist, dist): Depend on oct-gperf.h. + * lex.l (is_keyword): Use perfect hash function to lookup + keywords. + +Fri Sep 29 04:36:04 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * version.h (OCTAVE_NAME_AND_VERSION): Add TARGET_HOST_TYPE to this. + +Thu Sep 28 00:03:51 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-expr.cc (tree_expression::is_logically_true): New function. + * tree-cmd.cc (tree_while_command::eval): Use it instead of + handling the test directly here. + * tree-misc.cc (tree_if_clause::eval): Likewise + + * tree-const.cc (TC_REP::force_numeric): Don't try to print value + of str_obj with %s. + + * error.cc (buffer_error_messages): Rename from + suppress_octave_error_messages. + (error_message_buffer): New global variable. + (verror): Handle buffering of messages. + (handle_message): New function. + (Ferror, Fwarning, Fusage): Use it instead of duplicating code. + + * octave.cc (Feval): Buffer error messages instead of supressing them. + + * lex.l (is_keyword): Recognize `try', `catch', and `end_try_catch'. + * parse.y (TRY, CATCH): New tokens. + (command): Recognize try-catch block. + (end_error): Add cases for unwind_protect_end and try_catch_end. + * token.h (end_tok_type): New field, try_catch_end. + * tree-cmd.h, tree-cmd.cc (tree_try_catch): New class. + * variables.cc (bind_global_error_variable): New Function. + (clear_global_error_variable): Likewise. + (install_builtin_variables): Add DEFCONST for __error_text__. + * help.cc (keywords): Add `try', `catch', and `end_try_catch'. + + * tree-cmd.cc (tree_unwind_protect::eval): Undo previous change. + + * dirfns.cc (Freaddir, Fmkdir, Frmdir): + Do tilde expansion on the argument. + +Tue Sep 26 00:10:29 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * f-dassl.cc, f-fsolve.cc, f-lsode.cc, f-npsol.cc, f-quad.cc: + Don't try to figure out if the user-supplied functions take the + correct number of arguments. Simply let the call fail. + * variables.cc (takes_correct_nargs): Delete unused function. + * tree-expr.cc (tree_builtin::eval): Don't complain for too many + arguments to mapper functions. + * tree-expr.h, tree-expr.cc (tree_builtin, tree_function, tree_fvc): + Delete unused function max_expected_args. + + * defun.h (DEFUN): Delete unnecessary args nargin_min and nargout_max. + New arg unused_arg_flags. + (DEFUN_TEXT): Likewise. + * defun-dld.h (DEFUN_DLD_BUILTIN): Likewise. + * defun-int.h (DEFUN_INTERNAL, DECLARE_FUN, DEFINE_FUN_STRUCT): + Do the real work. + + * data.cc, dirfns.cc, dynamic-ld.cc, error.cc, f-balance.cc, + f-chol.cc, f-colloc.cc, f-dassl.cc, f-det.cc, f-eig.cc, f-expm.cc, + f-fft.cc, f-fft2.cc, f-find.cc, f-fsolve.cc, f-fsqp.cc, + f-givens.cc, f-hess.cc, f-ifft.cc, f-ifft2.cc, f-inv.cc, f-log.cc, + f-lpsolve.cc, f-lsode.cc, f-lu.cc, f-minmax.cc, f-npsol.cc, + f-pinv.cc, f-qpsol.cc, f-qr.cc, f-quad.cc, f-qzval.cc, f-rand.cc, + f-schur.cc, f-sort.cc, f-svd.cc, f-syl.cc, file-io.cc, help.cc, + input.cc, lex.l, load-save.cc, mappers.cc, octave-hist.cc, + octave.cc, octave.h, pager.cc, pr-output.cc, resource.cc, + sighandlers.cc, strfns.cc, sysdep.cc, timefns.cc, token.cc, + tree-const.cc, tree-expr.cc, tree-expr.h, tree-plot.cc, + unwind-prot.cc, unwind-prot.h, utils.cc, variables.cc, + variables.h, version.h, xdiv.cc: + Avoid unused variable warnings. + + * tree-expr.h (tree_oct_obj::print_value (ostream&)): + Delete name of unused arg. + (tree_fvc::save (ostream&, int, int): Likewise. + + * tree-const.h (tree_constant::tree_constant (magic_colon)): + Delete name of unused arg. + (tree_constant::tree_constant (all_va_args)): Likewise + (ColumnVector vector_value (int, int)): Likewise. + (ComplexColumnVector vector_value (int, int)): Likewise. + (Octave_object::eval (int, int, const Octave_object&): Likewise. + + * octave.cc (execute_startup_files): Look for octaverc first in + site/m, then in $(version)/m. + * variables.cc (get_local_site_defaults): New function. + * defaults.h.in (OCTAVE_LOCALFCNFILEDIR, OCTAVE_LOCALSTARTUPFILEDIR): + New macros. + * Makefile.in (defaults.h): Also substitute ${localfcndir}. + +Mon Sep 25 17:01:03 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * variables.cc (install_builtin_variables): Add DEFCONST for "e". + +Fri Sep 22 02:18:45 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * dirfns.cc (Fls): Delete ls_command after using it, not before. + + * input.h, input.cc (gnu_readline): Don't declare gnu_readline + `extern "C"'. + + * sysdep.h: Only declare gethostname if it is missing, then don't + declare it `extern "C"'. + + * dirfns.cc: Don't declare strerror(). + + * input.cc (command_generator): Use malloc, not xmalloc. Don't + declare xmalloc. + (gnu_readline): Don't declare this `extern "C"'. + + * octave-hist.cc: Don't declare history_get(). It is now in + readline/history.h. + + * input.cc: Don't declare history_get(). It is now in + readline/readline.h. + + * resource.cc: Don't surround include of sys/resource.h in + `extern "C" { }'. + + * fnmatch.h [__cplusplus]: Surround contents in `extern "C" { }'. + * load-save.cc, symtab.cc, variables.cc: Don't surround + fnmatch.h include in `extern "C" { }'. + + * help.cc: Don't #undef __FUNCTION_DEF before including + readline/tilde.h. + + * dirfuns.cc, file-io.cc, help.cc, load-save.cc, octave-hist.cc, + sysdep.cc, tree-plot.cc, utils.cc, variables.cc: + Don't surround readline includes in `extern "C" { }'. + + * sysdep.cc: Move all include statements to top of file. + +Tue Sep 19 01:58:21 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * octave.cc (Fsystem): Use iprocstream *, and unwind_protect it. + * pager.cc (flush_output_to_pager): Likewise. + * dirfns.cc (Fls): Likewise. + * tree-plot.cc (plot_stream): Now a pointer. + (open_plot_stream): Deal with it. + (send_to_plot_stream, cleanup_tmp_files, do_external_plotter_cd): + Likewise. + + * procstream.cc (cleanup_iprocstream, cleanup_oprocstream): + New functions. + + * procstream.h, procstream.cc (class iprocstream, class oprocstream): + Keep track of pbuf. Initialize it to 0 in default constructors, + delete it in destructor. Don't call close in destructor. + + * sighandlers.cc (octave_set_signal_handler): New function. + Use this name instead of signal everywhere. + * help.cc (try_info): Likewise. + * pager.cc (flush_output_to_pager): Likewise. + * octave.cc (main): Likewise. + * octave-hist.cc (do_edit_history): Likewise. + + * input.cc (initialize_readline): Set rl_paren_string_delimiters + to avoid treating single quotes as string delimiters when doing + paren matching. + + * Makefile.in (SOURCES): Don't list Map.cc or SLStack.cc here. + + * tree-const.cc: Do include utils.h. + + * sysdep.cc: Don't surround terminal includes in extern "C". + Include them before readline.h. + + * Map.h: Don't include utils.h. + (CHNode::CHNode (const char*, const C&, CHNode *t): + Do strsave() inline. + + * input.cc (generate_possible_completions): Generate name list + even when text == 0. + (operate_and_get_next): Don't declare history_stifled, call + history_is_stifled () instead. + Don't declare history_length, or max_input_history either. + Check (where >= history_length - 1) too, as in recent versions of + bash. + + * user-prefs.h (user_prefs): New field, `completion_append_char'. + * user-prefs.cc (init_user_prefs): Initialize it. + (sv_completion_append_char): New function. + * variables.cc (install_builtin_variables): Install + completion_append_char. + * input.cc (command_generator): Use it. + + * SLList-expr.cc, SLList-misc.cc, SLList-plot.cc, SLList-tc.cc, + DLList-fi.cc: Include config.h. + * DLList-fi.cc: Include file-info.h, not file-io.h. + +Mon Sep 18 11:01:24 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * octave.h (clean_up_and_exit): Tag with NORETURN instead of using + typedef trick. + * error.h (panic): Likewise. + * utils.h (jump_to_top_level): Likewise. + + * file-io.h: Protect from multiple includes with octave_file_io, + not octave_files. + + * file-info.h (class file_info): Convert to using std C++ string + class from char *. + * file-info.cc: Likewise. Don't include utils.h. + * file-io.cc (return_valid_file, fopen_file_for_user, + fflush_internal, do_scanf): Use operator ==, not strcmp. + (close_files): Call error with file.name ().data (), + not file.name (). + (freport_internal): Call form with file.mode ().data () and + file.name ().data (). + + * file-io.cc, file-io.h: Extract file_info class. + * file-info.cc, file-info.h: New files for file_info class. + + * user-prefs.h (user_prefs): New field, `beep_on_error'. + * user-prefs.cc (init_user_prefs): Initialize it. + (beep_on_error): New function. + * variables.cc (install_builtin_variables): Install beep_on_error. + * octave.cc (maximum_braindamage): Set beep_on_error to "true". + * error.cc (verror): Conditionally beep. + (error): Don't reset error_state until after verror is called. + +Sun Sep 17 16:41:25 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (read_mat_binary_data, read_ascii_data, + save_ascii_data, read_binary_data, save_binary_data): + Handle string arrays. + +Fri Sep 15 00:24:19 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * user-prefs.cc (struct_levels_to_print, + set_output_max_field_width, set_output_precision, + set_save_precision): Eliminate unecessary kludge variable. + + * variables.cc (gobble_leading_white_space): New arg, + in_parts. Change all callers. + + * lex.l (HELP_FCN): Delete start state. The `help' command is now + handled the same as any other text-style function. + + * gripes.cc (gripe_invalid_value_specified): New function + * user-prefs.cc: Use it. + + * sysdep.cc (octave_words_big_endian): New global variable. + (ten_little_endians): New function. + (sysdep_init): Call it. + * load-save.cc (words_big_endian): Use this at run-time instead of + depending on WORDS_BIGENDIAN at compile-time. + + * symtab.h (SYMTAB_VARIABLES): New macro. + * variables.cc (Fclear): Use it instead of just + symbol_def::USER_VARIABLE when looking for variables. + + * octave.cc (main): If there is a file to execute, set + program_invocation_name and program_name to the name of the file + and argv to the remaining args. + (intern_argv): Only define argv if there are some remaining + arguments. + + * defun.h (DEFVAR_INT): New macro. + (DEFVAR): Define in terms of DEFVAR_INT. Delete args protect and + eternal. + (DEFCONST): New macro. + * variables.cc (install_builtin_variables): Use DEFCONST where + appropriate, change uses of DEFVAR to match new definition. + + * variables.cc (bind_builtin_variable): New variant that accepts + const tree_constant& value. + (install_builtin_variables): Properly alphabetize DEFVAR for this. + + * octave.cc (short_opts): Prefix with `+' to prevent argv + permutation. + (main): Don't use readline if forced_interactive. + (traditional): New file-scope variable. + (long_opts, usage_string, verbose_usage): Add `--traditional'. + (maximum_braindamage): New function. + (main): Call it if --traditional. + + * input.cc (do_input_echo): Print prompt correctly when + forced_interactive is either true or false. + +Thu Sep 14 00:54:06 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * data.cc (Fstruct_elements): New function. + + * file-io.cc (Fumask): New function. + + * dirfns.cc (Fmkdir, Frmdir, Frename): New functions. + + * Makefile.in: Add rules and dependencies for building safe-stat.o + and safe-lstat.o. + + * mkdir.c, rename.c, rmdir.c: New files. + * Makefile.in (SOURCES): Include them in the list. + + * safe-xstat.hin, safe-xstat.cin: New files + * Makefile.in (DISTFILES): Include them in the list. + + * sighandlers.cc (octave_new_handler): Try to continue on memory + exhausted errors. + (sigfpe_handler): Improve error message. + + * Makefile.in: Use `ifndef omit_deps', not `ifndef $(omit_deps)'. + + * dirfns.cc (Freaddir): New function. + + * f-sort.cc: Complete rewrite. Now uses stable sort algorithm and + correctly handles complex matrices containing columns of all real + numbers. + +Wed Sep 13 03:16:40 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * arith-ops.cc: Unconditionally #define DIVIDE_BY_ZERO_ERROR. + + * variables.cc (install_builtin_variables): Unconditionally + install NaN and nan. + + * mappers.cc (xisinf): Don't do bogus things if isinf, isnan, or + finite are missing. + (xfinite): Likewise. + + * sysdep.cc (octave_ieee_init): Don't set octave_NaN and + octave_Inf if values are not available. + + * resource.cc (mk_ru_map): Don't use ru_ or tv_ as prefixes to + Octave names for the structure members. + +Tue Sep 12 02:04:16 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * procstream.h, procstream.cc: Rewrite. + +Mon Sep 11 18:42:05 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * filemode.c: New file, from Emacs. + * Makefile.in (SOURCES): Add it to the list. + + * file-io.cc (Fstat, Flstat, mk_stat_map): New functions. + + * timefns.cc (mk_tm_map): Don't use tm_ as prefix to Octave names + for these structure members. + (extract_tm): Likewise. + (Flocaltime): Fix doc string to match. + +Thu Sep 7 02:04:27 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (save_user_variables): New function. + * sighandlers.cc (my_friendly_exit): Call it before exiting. + (sigfpe_handler): New function. + (install_signal_handlers) [__alpha__]: Install it. + +Wed Sep 6 14:35:10 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-cmd.cc (tree_unwind_protect::eval): Ignore errors and + suppress error messages while executing first block of + unwind_protect commands. + + * parse.y (end_error): Add missing case for unwind_protect_end. + + * tree-expr.cc (tree_builtin::eval): Complain if no arguments + given for mapper functions. + (tree_fvc::lookup_map_element): Print error message for invalid + structure reference. + +Tue Sep 5 02:04:12 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * file-io.cc, input.cc, load-save.cc, octave.cc, sysdep.cc, + variables.cc, octave-hist.cc, utils.cc, f-schur.cc, f-rand.cc, + f-quad.cc, f-qpsol.cc, f-npsol.cc, f-lsode.cc, f-fsolve.cc, + f-dassl.cc, f-colloc.cc, f-balance.cc, error.cc, data.cc: + Add const qualifiers where appropriate. + + * dirfns.h: Include <ctime>, for time_t. + + * tempname.c, file-io.cc, help.cc, input.cc, octave-hist.cc, + octave.cc, sighandlers.cc, sysdep.cc, tree-expr.cc, tree-misc.cc, + tree-plot.cc, utils.cc, variables.cc, sysdir.h: + Move #include <sys/type.h> inside #ifdef HAVE_UNISTD_H. + + * syswait.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * file-io.cc, sighandlers.cc: Use it instead of including + sys/wait.h directly. + + * octave.cc: Include statdefs.h, not sys/stat.h. + + * sysdir.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * dirfns.cc, utils.cc: Use it instead of including the headers + directly. + + * pathlen.h: New file. + * Makefile.in (INCLUDES): Add it to the list. + * dirfns.cc, input.cc: Use it instead of including sys/param.h + directly. + * utils.cc: Don't include sys/param.h + +Sun Sep 3 18:52:59 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (TC_REP::string_value): Return const char*, not + char *. + + * All .cc, .y, .l, .y files: Include <cctype>, not <ctype.h>, and + so on for all new C++ versions of these standard C headers. + +Thu Aug 31 17:09:38 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * pathsearch.h: Also hide `string'. + + * oct-str.cc, oct-str.h: New files. + * Makefile.in: Add to the appropriate lists. + * tc-rep.h: Change char* to Octave_string* in anonymous union. + * tree-expr.cc (tree_matrix::eval): Handle multiple element strings. + * strfns.cc (toascii): Likewise. + * tree-const.cc (print_as_string): Likewise. + (TC_REP::force_numeric, TC_REP::rows, TC_REP::columns, + TC_REP::double_value, TC_REP::complex_value, TC_REP::matrix_value, + TC_REP::complex_matrix_value, TC_REP::convert_to_str): Likewise. + (TC_REP::print): Call octave_print_internal for string case. + (all_strings): New function. + Fix constructors to use new data structure. + * pr-output.cc (octave_print_internal): Add version for strings. + * Array-string.cc: New file. + + * octave.cc (octave_argv): New global variable. + (intern_argv): New function. + (main): Fix argument parsing to do the right thing for arguments + to executable scripts. + * variables.cc: Add DEFUNs for argv, program_invocation_name, and + program_name. + + * defun.h (DEFVAR): Fix comment. + +Thu Aug 24 00:02:00 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * file-io.cc (fgets_internal): Make second arg optional. Add + optional arg `strip_final_newline'. + (Ffgets): Change to match new definition of fgets_internal. + (Ffgetl): Implement using the new fgets_internal. + + * f-rand.cc (Frand): Update code for sizing return value to match + that used by ones, zeros, and eye. + +Wed Aug 23 19:52:45 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (do_vector_assign): Don't crash for + A(range) = scalar, or A(matrix) = scalar. + + * f-dassl.cc (set_dassl_option): Rename from do_dassl_option. + (show_dassl_option): New function. + (Fdassl_options): Handle single arg. + * f-fsolve.cc (set_fsolve_option): Rename from do_fsolve_option. + (show_fsolve_option): New function. + (Ffsolve_options): Handle single arg. + * f-fsqp.cc (set_fsqp_option): Rename from do_fsqp_option. + (show_fsqp_option): New function. + (Ffsqp_options): Handle single arg. + * f-lpsolve.cc (set_lpsolve_option): Rename from do_lpsolve_option. + (show_lpsolve_option): New function. + (Flpsolve_options): Handle single arg. + * f-lsode.cc (set_lsode_option): Rename from do_lsode_option. + (show_lsode_option): New function. + (Flsode_options): Handle single arg. + * f-npsol.cc (set_npsol_option): Rename from do_npsol_option. + (show_npsol_option): New function. + (Fnpsol_options): Handle single arg. + * f-qpsol.cc (set_qpsol_option): Rename from do_qpsol_option. + (show_qpsol_option): New function. + (Fqpsol_options): Handle single arg. + * f-quad.cc: (set_quad_option): Rename from do_quad_option. + (show_quad_option): New function. + (Fquad_options): Handle single arg. + (Fquad): Doc fix. + +Tue Aug 22 00:38:05 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-plot.cc (do_external_plotter_cd): New function. + * dirfns.cc (octave_change_to_directory): New function. If cd is + successful, also call do_external_plotter_cd(). + (Fcd): Call octave_change_to_directory(), not change_to_directory(). + + * pr-output.cc (pr_any_float): Change declaration of counter to + size_t to avoid gcc warnings. + + * idx-vector.cc, octave-hist.cc, tree-const.cc, tree-expr.cc, + tree-misc.cc, utils.cc, xpow.cc, Map.cc: + Update for change in for loop variable scope for gcc 2.7.0. + +Mon Aug 21 19:34:53 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * tree-const.cc (fortran_style_matrix_assignment): Properly handle + case of complex LHS, real RHS. + + * Makefile.in: Only include dependency files if $(omit_deps) is + not set. + +Wed Jul 5 00:03:58 1995 John Eaton <jwe@bevo.che.wisc.edu> + + * sysdep.cc: Explicitly include string.h. + +Sun Jun 25 00:18:10 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * load-save.cc (too_large_for_float (const Matrix&)): + Extract elements as doubles, not Complex. + +Sat Jun 24 22:59:15 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * pr-output.cc (any_element_is_inf_or_nan): Declare extern, not static. + * f-svd.cc (Fsvd): Call here to avoid trying to take SVD of matrix + containing Inf or NaN values. + + * pr-output.cc (bit_format): New file-scope variable. + (set_format, pr_any_float): Handle bit_format. + (octave_print_internal): Handle bit_format like bank_format. + (init_format_state): Initialize bit_format. + (set_format_style): Allow `format bit' and `format native-bit'. + +Thu Jun 8 15:20:26 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * mappers.cc (arg, imag, signum): If arg is NaN, return NaN. + +Mon May 15 14:47:04 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * pager.cc (Fdiary): Initialize diary_file here, not in the + file-scope declaration. + + * tree-expr.cc (tree_index_expression::eval): + Handle nargin == 0 the same as other cases. + +Tue May 2 10:02:23 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * load-save.cc (do_double_format_conversion): Add missing breaks. + (do_float_format_conversion): Likewise. + +Mon May 1 13:50:24 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (OCTAVE_LIBS): Add @LIBPLPLOT@ to the list. + + * timefns.cc (Ftime): Handle GETTIMEOFDAY_NO_TZ. + + * Makefile.in (SOURCES): Delete tc-rep.cc, tc-rep-ass.cc, and + tc-rep-idx.cc from the list. + + * tree-const.h: Add #pragma interface. + * tree-const.cc: Add contents of tc-rep.cc, tc-rep-ass.cc, and + tc-idx.cc to this file. Add #pragma implementation. This makes + tree-const.cc large, but makes the final binary smaller. + + * unwind-prot.h unwind-prot.cc token.cc token.h procstream.cc + procstream.h idx-vector.cc idx-vector.h symtab.cc symtab.h + oct-map.cc oct-map.h oct-obj.cc oct-obj.h tree-plot.h tree-plot.cc + tree-misc.cc tree-misc.h tree-expr.cc tree-expr.h tree-cmd.cc + tree-cmd.h tree-base.cc tree-base.h: + Add #pragma interface/implementation. + + * Makefile.in (OCTAVE_LIBS): Delete @LIBINFO@ from list. + * help.cc: Don't include info headers or extern declarations for + functions from info. + (try_info): Call info as a subprocess. Delete second arg. + Handle SIGINT here, not in help_from_info(). + (help_from_info): Complain if info doesn't work. + + * defun-dld.h (DEFUN_DLD_BUILTIN) [OCTAVE_LITE && MAKE_BUILTINS]: + If ! WITH_DLD, simply emit a character string constant. + +Fri Apr 28 15:23:06 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * lex.l ({IDENT}{S}*): Don't delete tok. That's handled by + strip_trailing_whitespace() now. + (<HELP_FCN>[^ \t\n]*{S}*|<TEXT_FCN>[^ \t\n\;\,]*{S}*): Ditto. + + * pathsearch.h: Include kpathsea/progname.h. + * octave.cc (initialize_globals): Call kpse_set_progname(). + + * token.h: Declare copy constructor and operator = private. + * token.cc: Abort if copy constructor or operator = is used. + +Thu Apr 27 13:54:39 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tree-expr.cc (lookup_map_element): Don't list default argument + values here too. + + * pr-output.cc (hex_format): New file-scope variable. + (set_format, pr_any_float): Handle hex_format. + (octave_print_internal): Handle hex_format like bank_format. + (init_format_state): Initialize hex_format. + (set_format_style): Allow `format hex' and `format native-hex'. + + * variables.cc (bind_ans): Create ans_id each time with new and + ask tree_simple_assignment_expression to handle cleaning it up. + This apparently plugs a memory leak. + + * help.cc (Ftype): Don't try to print map constants. Handle + references to structure members. + +Wed Apr 26 12:40:59 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * input.cc (generate_struct_completions): New function. + (generate_possible_completions): Likewise. + (looks_like_struct): Likewise. + (command_generator): Handle completion of struct variables. + + * tree-expr.h, tree-expr.cc (tree_fvc::lookup_map_element): + Add insert and silent args. + + * oct-map.cc: New file. + * Makefile.in (SOURCES): Add it to the list. + +Mon Apr 24 09:41:02 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * variables.cc (Fexist): Handle structure references too. + + * tree-const.cc (lookup_map_element (const char*, int, int): + New function. + (lookup_map_element (SLList<char*>&, int, int): New arg, silent. + * tc-rep.cc (lookup_map_element): New arg, silent. If nonzero, + don't call error(). + + * tc-rep.h (is_empty): Define here. + * tree-const.h (is_empty): Hand off to TC_REP::is_empty(). + + * data.cc (Fstruct_contains): Call lookup_map_element on args(0) + instead of extracting the map and calling contains() on it. + + * parse.y (EPLUS, EMINUS): New tokens. + (simple_expr): Handle EPLUS, EMINUS the same as `+' and `-'. + * lex.l (".+", ".-"): New patterns. Match these separately to + disallow using them as unary operators. + + * lex.l (next_token_is_bin_op): Simplify by noting that spacing + only matters for those tokens that can also be unary ops. + +Fri Apr 21 14:34:45 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * load-save.cc (read_ascii_data): Allow reading of empty + matrices. + + * tc-rep-ass.cc (vector_assignment): Only assert that we are not + doing fortran-style indexing and that nr <= 1 || nc <= 1. + (do_vector_assign): Handle assignment of [] when one dimension is + zero and the other is anything. + +Thu Apr 20 13:56:21 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tc-rep-ass.cc (delete_rows, delete_columns): Simply return if + num_to_delete is 0. + + * lex.l (handle_identifier): Don't match plot option keywords + inside parentheses or braces. + + * variables.cc (parse_fcn_file): Also delete tmp_help_txt if + running a script. + + * tree-cmd.h (tree_command): Add destructor. + + * tree-expr.h tree_simple_assignment_expression (lhs_idx_expr): + Hang on to idx_expr, not just its parts so it can be deleted. + (init): Initialize it. + * tree-expr.cc (~tree_simple_assignment_expression): Delete it. + + * tree-expr.h (tree_multi_val_ret, tree_oct_obj, tree_fvc, + tree_identifier, tree_builtin, tree_function): Add destructors. + * tree-expr.cc (tree_function::~tree_function): Delete some stuff. + + * tree-misc.h (tree_va_return_list): Add destructor. + + * octave.cc (__builtin_new, __builtin_delete): Provide our own, + for debugging. + + * utils.cc (strconcat): Don't depend on the return value from + strcat. + (file_in_path): Simplify logic. + + * parse.y (maybe_convert_to_ans_assign): Create ans_id each time + with new and ask tree_simple_assignment_expression to handle + cleaning it up. This apparently plugs a memory leak. + + * lex.l (strip_trailing_whitespace): Declare retval static. + Delete it before saving next string. + + * error.cc (Ferror): Do call error() for empty string args. + (error_1): Don't print anything if fmt is "" or "\n", but do set + the error state appropriately. + + * tree-cmd.cc (tree_unwind_protect::eval): Handle return and break + in the `try' part of the statement. + +Mon Apr 10 19:29:44 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * f-expm.cc, f-givens.cc, f-qzval.cc, f-syl.cc, f-rand.cc: + Where appropriate, declare Fortran functions to take reference + instead of pointer args. Change callers. + + * mappers.cc: Declare Fortran functions to take reference instead + of pointer args. Change callers. + + * gamma.c, lgamma.c, erfc.c, erf.c, atanh.c, asinh.c, acosh.c: + Declare Fortran functions to take reference instead of pointer + args. + +Sun Apr 9 19:38:53 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * file-io.cc (Fpopen, Fpclose, Fexecute, Fsync_system, + Fasync_system, Fwaitpid, Fmkfifo, Funlink): New functions. + + * sighandlers.cc (sigchld_handler): New function. + (install_signal_handlers): Add call to install + sigchld_handler. (This is #if 0'd out, waiting for code to help + determine which child exited and what to do about it). + + * tree-expr.h (tree_oct_obj): New class. + + * tree-expr.h (tree_multi_assignment_expression::preserve): New + data member. Add arg with default value to constructors. Change + callers as necessary. + * tree-expr.cc (~tree_multi_assignment_expression): Conditionally + delete lhs. + + * parse.y (make_multi_val_ret): Pass matrix instead of getting it + from the global matrix list. + (expression): Extract matrix from matrix list before calling + make_multi_val_ret(). + + * parse.y (command): Handle new for loop syntax for structures. + + * tree-plot.h (subplot_list): Include tree_print_code() in + initializer lists for constructors. + * tree-expr.h (tree_statement_list, tree_argument_list, + tree_parameter_list, tree_return_list, tree_global_init_list, + tree_if_command_list, ): Likewise. + + * tree-cmd.h (tree_for_command::id_list): New data member. + (tree_for_command (tree_return_list*, tree_expression*, + tree_statement_list*, int, int)): Likewise. + * tree-cmd.cc (tree_for_command::eval): Handle for loops with + structures. + (do_for_loop_once (tree_return_list*, Octave_object&, int&)): + New form for handling for loops with structures. + + * sysdep.cc (octave_ieee_init): Determine floating point format + here. + (native_float_format): New global variable. + (Fisieee): Compute return value from native_float_format, not by + using preprocessor macros. + * sysdep.h (enum floating_point_format): Move declaration here. + * load-save.cc: From here. + Always define all floating point format conversion routines. + (do_double_format_conversion, do_float_format_conversion): + Use native_float_format instead of preprocessor macros. + +Sat Apr 8 15:41:35 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile (TEMPLATE_SRC): New variable. + (DISTFILES): Add $(TEMPLATE_SRC). + (SOURCES): Delete Map.cc and SLStack.cc from here. + + * variables.cc (install_builtin_variables): Use OCTAVE_VERSION + instead of version_string to initialize OCTAVE_VERSION. + * version.h (version_string): Delete. + + * getopt.c (_getopt_internal): Initialize indfound to avoid warning. + +Fri Apr 7 15:29:41 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tc-inlines.h (REP_RHS_MATRIX): Just check to see if tc is real + or complex. If conversion fails, return. + +Thu Apr 6 00:10:47 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * data.cc (Fstruct_contains): New function. + + * tc-rep.cc (print_code): Add extra parens around while condition + to avoid warning. + * utils.cc (undo_string_escapes): Likewise. + * input.cc (decode_prompt_string): Likewise. Also rewrite if + statement to avoid warning. + +Tue Apr 4 22:54:17 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tree-expr.cc (tree_multi_assignment_expression::eval, + tree_simple_assignment_expression::eval): Call print_constant + even if user_pref.print_answer_id_name is false. + +Mon Apr 3 17:57:14 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tc-inlines.h (TC_REP): Avoid redefinition. + + * tree-const.h (do_binary_op, do_unary_op): Declare as friends of + tree_constant class too. + + * tree-plot.h (subplot_using::have_values): Delete data member. + * tree-plot.cc (subplot_using::eval): Always recompute values. + +Fri Mar 31 10:18:32 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tc-rep.cc (print): Print open brace for structures here. + * tree-expr.cc (print_constant): Not here. + + * symtab.cc (define): Don't delete arg if sv_fcn fails. + + * tree-const.cc (print): New function. Create ostrstream buffer + and pass it to rep->print(). + * tree-const.h (eval (int)): Call print(), not rep->print(). + * tc-rep.cc (structure_indent_level): New file-scope variable. + (print): New arg, output_buf, is stream to print to. + Print values of structure elements too. + + * user-prefs.h (user_preferences): New field, struct_levels_to_print. + * user-prefs.cc (struct_levels_to_print): New function. + * variables.cc (install_builtin_variables): Add DEFVAR for new + variable struct_levels_to_print. + + * tree-const.cc (print_as_scalar, print_as_structure): Move here + from tree-expr.cc and make extern. + + * tree-expr.cc (print_as_structure): New function. + (print_constant): Use it. + + * tree-expr.cc (print_constant): New arg, print_padding. + (tree_simple_assignment_expression::eval): Use print_constant + instead of duplicating code here. + (tree_multi_assignment_expression::eval): Likewise. + +Thu Mar 30 13:24:11 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (SOURCES): Add resource.cc. + * resource.cc: New file, extracted from timefns.cc. + (Fgetrusage): New function. + * timefns.cc (cputime): Delete (now implemented in a function file + using new getrusage function). + +Wed Mar 29 22:52:42 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * Makefile.in (SOURCES): Add strftime.c. + * strftime.c: New file, from sh-utils distribution. + + * timefns.cc (mk_tm_map, extract_tm, Ftime, Fgmtime, Flocaltime, + Fmktime, Fstrftime): New basic time functions. + (Fclock, Fdate): Delete (now implemented in function files using new + time functions). + +Tue Mar 28 17:51:51 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * file-io.cc (return_valid_file, do_printf, do_scanf, + fclose_internal, feof_internal, ferror_internal, fflush_internal, + fgets_internal, fopen_internal, fread_internal, freport_internal, + frewind_internal, fseek_internal, ftell_internal, + fwrite_internal): Declare static. + * file-io.h: Delete extern declarations for them. + +Fri Mar 24 09:52:50 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * pr-output.cc (pr_col_num_header): New function. + (compact_format): New file-scope variable. + (set_format_style): Handle loose and compact formats. + (octave_print_internal (ostream&, const ComplexMatrix&, int)): + Replace duplicate code with call to pr_col_num_header(). + (octave_print_internal (ostream&, const Matrix&, int): Likewise. + (octave_print_internal (ostream&, const Range&, int): Likewise. + +Tue Mar 21 08:44:48 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * mappers.cc (xgamma): Always use Slatec library function. + * (xlgamma): Likewise. + * Makefile.in (SOURCES): Don't include lgamma.c. + +Fri Mar 17 22:38:39 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tc-rep.cc (TC_REP::new): Don't try to keep track of newlist_tail. + Explicitly initialize newlist to zero. + * tree-const.cc (tree_constant::operator new): Likewise. + +Fri Mar 10 12:40:24 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * tree-cmd.cc (quit_loop_now): Declare inline. + (tree_for_command::do_for_loop_once): Split into two versions, one + for the general case and one for when the loop variable is a + simple identifier. + (DO_LOOP): New macro. Move tests outside of loop. + (tree_for_command::eval): Speed up by checking to see if loop + variable is a simple identifier and by using DO_LOOP. + + * tree-const.h: New union of rep and freeptr. The freeptr element + is used for our custom memory management functions. + + * tc-rep.h: Add freeptr element to anonymous union (for our custom + memory management functions). + + * tree-const.cc (newlist, newlist_grow_size, newlist_tail): New + static variables. + (tree_constant::operator new): Always define to allow more + efficient allocation of single tree_constants. + (tree_constant::operator delete): Likewise, handle deletion of the + memory we allocate. + + * tc-rep.cc (newlist, newlist_grow_size, newlist_tail): New static + variables. + (tree_constant::operator new): Always define to allow more + efficient allocation of single tree_constants. + (tree_constant::operator delete): Likewise, handle deletion of the + memory we allocate. + +Fri Mar 3 14:00:08 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * error.cc (verror): Terminate output_buf with ends. + + * statdefs.h: Use C-style comment in first line instead of + C++-style comment. + +Mon Feb 27 10:11:18 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * parse.y (maybe_convert_to_ans_assign): Only lookup ans once. + * variables.cc (bind_ans): New function. + * tree-expr.cc (tree_identifier::eval (int)): Use it here. + (tree_identifier::eval (int, int, const Octave_object&): And here. + + * tree-expr.cc (install_nargin_and_nargout): New function. + * tree-expr.h (tree_function::tree_function (tree_statement_list *, + symbol_table *, int, int)): Call it. + + * tree-expr.cc (tree_function::bind_nargin_and_nargout): New function. + (tree_function::eval): Call it insead of the one from variables.cc. + + * variables.cc (bind_nargin_and_nargout): #if 0 out. + +Sun Feb 26 00:17:06 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * load-save.cc (Fload, Fsave): Free fname returned by tilde_expand(). + * dirfns.cc (Fls): Likewise. + + * tree-expr.cc (tree_multi_assignment_expression::eval (int, int, + const Octave_object&)): Call tree_return_list::operator () (Pix) + explicitly. + + * octave.cc (initialize_globals): Put TEXMF in the environment for + kpthsea. + + * Makefile.in (OCTAVE_LIBS): Use @LIBINFO@ and @LIBREADLINE@, + substituted by configure. Use kpathsea.a, not libkpathsea, so we + don't have to modify the kpathsea Makefile. + +Sat Feb 25 18:59:26 1995 John Eaton <jwe@schoch.che.utexas.edu> + + * pathsearch.cc: New file. + * pathsearch.h: New file. + * Makefile.in (INCLUDES): Include it in the list. + * dynamic-ld.cc, help.cc, utils.cc: Use it instead of repeating + identical code multiple times. + + * variables.cc (install_builtin_variables): Only DEFVAR + suppress_verbose_help_message if USE_GNU_INFO. + + * help.cc (Fhelp): Only handle -i if USE_GNU_INFO. + (additional_help_message): Only print message if USE_GNU_INFO. + (builtin_help): New function. + (help_from_info): New function. Print warning if not USE_GNU_INFO. + +See ChangeLog.1 in the top level directory for earlier changes.
new file mode 100644 --- /dev/null +++ b/test/ChangeLog @@ -0,0 +1,6 @@ +Fri Feb 9 21:40:49 1996 John W. Eaton <jwe@bevo.che.wisc.edu> + + * Makefile.in (OCTAVE_SCRIPT_PATH): Add ../src directory (for .oct + files) and current directory (why not?). + +See ChangeLog.1 in the top level directory for earlier changes.