changeset 3176:fccab8e7d35f

[project @ 1998-05-18 20:33:31 by jwe]
author jwe
date Mon, 18 May 1998 20:33:42 +0000
parents 096940972434
children d81db29f8b2b
files ChangeLog Makefile.in README.Windows aclocal.m4 configure.in doc/ChangeLog doc/interpreter/Makefile.in doc/interpreter/install.texi emacs/octave-mod.el install-octave.in kpathsea/ChangeLog kpathsea/acklibtool.m4 libcruft/ChangeLog libcruft/fftpack/passb3.f libcruft/fftpack/passb5.f libcruft/fftpack/passf3.f libcruft/fftpack/passf5.f liboctave/Array-b.cc liboctave/CMatrix.cc liboctave/ChangeLog liboctave/dMatrix.cc liboctave/mx-op-defs.h mkoctfile.in octMakefile.in scripts/linear-algebra/dot.m src/ChangeLog src/DLD-FUNCTIONS/getrusage.cc src/input.cc src/oct-procbuf.cc src/pager.cc src/version.h
diffstat 31 files changed, 182 insertions(+), 82 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,41 @@
+Mon May 18 11:33:45 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* mkoctfile.in: Fix typos in case statement.
+
+Fri May 15 00:34:54 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* configure.in: Make sure install-octave is executable.
+
+	* install-octave.in (oct_files): Don't cd to src.
+	(have_find): Delete variable (assume all systems have find).
+
+Thu May 14 10:29:30 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* aclocal.m4 (OCTAVE_SET_DEFAULT): Allow values to come from the
+	environment.
+
+	* Makefile.in (binary-dist): Don't set LDFLAGS to -static.
+	Run configure with --enable-shared and --enable-lite-kernel.
+
+	* octMakefile.in (DISTFILES): Include README.MachTen in the list.
+	(XBINDISTFILES): Include README.MachTen in the list.
+	Delete README.NLP from the list
+	* README.MachTen: New file.
+
+	* configure.in: Add -mno-fp-in-toc on ibm-aix4 systems.
+	From Philippe.Defert@cern.ch <Philippe.Defert@cern.ch>.
+
+Tue May  5 14:43:36 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* aclocal.m4 (OCTAVE_PROG_G77): Compile trivial program instead of
+	just running ${f77-f77} -v on nothing.
+	Convert all uses of $F77 to ${F77-f77}.
+
+Mon May  4 12:08:36 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* emacs/octave-mod.el (octave-mode): Make comment-multi-line local
+	and set to nil.
+
 Tue Apr 28 14:28:14 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* aclocal.m4 (OCTAVE_FLIBS): Really do skip -lkernel32.
--- a/Makefile.in
+++ b/Makefile.in
@@ -24,14 +24,14 @@
 
 binary-dist: FORCE
 	@if test -f configure && test -f octMakefile.in; then \
-	  ./configure --disable-shared --disable-dl --disable-shl; \
+	  ./configure --enable-shared --enable-lite-kernel ; \
 	else \
 	  echo ""; \
 	  echo "*** You must run make binary-dist in the source directory."; \
 	  echo ""; \
 	  exit 1; \
 	fi
-	$(MAKE) -f octMakefile CFLAGS=-O CXXFLAGS=-O LDFLAGS=-static all
+	$(MAKE) -f octMakefile CFLAGS=-O CXXFLAGS=-O all
 	$(MAKE) -f octMakefile binary-dist
 
 # Maybe this message will prevent people from asking why the
--- a/README.Windows
+++ b/README.Windows
@@ -115,6 +115,21 @@
   Then you can set your LOADPATH to include /D_DRIVE/subdir instead of
   //d/subdir.
 
+* If you see error messages like the following:
+
+    The heap has been split, CYGWIN can't fork this process. Increase
+    the heap_chunk_size in the registry and try again.
+
+  you can increase the heap size by saving the follwoing text to a
+  file (delete the leading white space) and then double click on the
+  file.  Try changing the value to something larger than 4 (MB).
+
+    REGEDIT4
+
+    [HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0]
+    "heap_chunk_in_mb"=dword:00000004
+
+
 If you know of solutions for any of the problems mentioned above,
 please contact bug-octave@bevo.che.wisc.edu.
 
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -40,7 +40,7 @@
 dnl
 dnl OCTAVE_SET_DEFAULT
 AC_DEFUN(OCTAVE_SET_DEFAULT,
-[ifelse($#, 2, [$1=$2
+[ifelse($#, 2, [: ${$1=$2}
 ])dnl
 AC_MSG_RESULT([defining $1 to be $$1])
 AC_SUBST($1)])
@@ -80,8 +80,9 @@
 [if $use_g77; then
   octave_cv_f77_is_g77=yes
 else
-  f77_output=`$F77 -v 2>&1 | grep "GNU F77"`
-  if test -n "$f77_output"; then
+  echo "      END" > conftest.f
+  foutput=`${F77-f77} -v 2>&1 | grep "GNU F77"`
+  if test -n "$foutput"; then
     octave_cv_f77_is_g77=yes
   else
     octave_cv_f77_is_g77=no
@@ -292,7 +293,7 @@
 dnl
 dnl OCTAVE_F77_UPPERCASE_NAMES()
 AC_DEFUN(OCTAVE_F77_UPPERCASE_NAMES,
-[AC_MSG_CHECKING([whether $F77 uses uppercase external names])
+[AC_MSG_CHECKING([whether ${F77-f77} uses uppercase external names])
 AC_CACHE_VAL(octave_cv_f77_uppercase_names,
 [octave_cv_f77_uppercase_names=no
 cat > conftest.f <<EOF
@@ -314,7 +315,7 @@
 dnl
 dnl OCTAVE_F77_APPEND_UNDERSCORE()
 AC_DEFUN(OCTAVE_F77_APPEND_UNDERSCORE,
-[AC_MSG_CHECKING([whether $F77 appends underscores to external names])
+[AC_MSG_CHECKING([whether ${F77-f77} appends underscores to external names])
 AC_REQUIRE([OCTAVE_F77_UPPERCASE_NAMES])
 AC_CACHE_VAL(octave_cv_f77_append_underscore,
 [octave_cv_f77_append_underscore=no
@@ -357,7 +358,7 @@
     AC_MSG_WARN([assuming ${F77-f77} cross compiler is f2c compatible])
   fi
 else
-  AC_CACHE_CHECK([$F77/f2c compatibility], octave_cv_f2c_f77_compat,
+  AC_CACHE_CHECK([${F77-f77}/f2c compatibility], octave_cv_f2c_f77_compat,
   [trap 'rm -f ftest* ctest* core; exit 1' 1 3 15
   octave_cv_f2c_f77_compat=no
   cat > ftest.f <<EOF
--- a/configure.in
+++ b/configure.in
@@ -21,7 +21,7 @@
 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 ### 02111-1307, USA. 
 
-AC_REVISION($Revision: 1.304 $)
+AC_REVISION($Revision: 1.305 $)
 AC_PREREQ(2.9)
 AC_INIT(src/octave.cc)
 AC_CONFIG_HEADER(config.h)
@@ -248,6 +248,13 @@
       XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mieee-with-inexact"
       AC_MSG_RESULT([adding -mieee-with-inexact to XTRA_CXXFLAGS])])
   ;;
+  *ibm-aix4*)
+    OCTAVE_CC_FLAG(-mno-fp-in-toc, [
+      XTRA_CFLAGS="$XTRA_CFLAGS -mno-fp-in-toc"])
+
+    OCTAVE_CXX_FLAG(-mno-fp-in-toc, [
+      XTRA_CXXFLAGS="$XTRA_CXXFLAGS -mno-fp-in-toc"])
+  ;;
 esac
 
 ### Octave doesn't use run-time type identification or exceptions yet,
@@ -1121,6 +1128,8 @@
   libcruft/specfun/Makefile libcruft/slatec-fn/Makefile
   libcruft/slatec-err/Makefile libcruft/villad/Makefile)
 
+chmod 755 install-octave
+
 ### Print a summary so that important information isn't missed.
 
 if test -z "$F77"; then
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 14 21:04:40 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* interpreter/Makefile.in (../../BUGS, ../../INSTALL): Add
+	--no-validate to makeinfo args.
+
 Wed Jul  2 16:41:04 1997  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* refcard/Makefile.in: Remove .tex files from binary distributions.
--- a/doc/interpreter/Makefile.in
+++ b/doc/interpreter/Makefile.in
@@ -67,12 +67,16 @@
 	-dvips -o octave.ps octave.dvi
 
 ../../INSTALL.OCTAVE: install.texi
-	-makeinfo -D INSTALLONLY --no-headers --no-split --output INSTALL \
+	rm -f INSTALL
+	-makeinfo -D INSTALLONLY \
+	  --no-validate --no-headers --no-split --output INSTALL \
 	  -I$(srcdir) -I$(srcdir)/.. $(srcdir)/install.texi
 	mv INSTALL ../../INSTALL.OCTAVE
 
 ../../BUGS: bugs.texi
-	-makeinfo -D BUGSONLY --no-headers --no-split --output BUGS \
+	rm -f BUGS
+	-makeinfo -D BUGSONLY \
+	  --no-validate --no-headers --no-split --output BUGS \
 	  -I$(srcdir) -I$(srcdir)/.. $(srcdir)/bugs.texi
 	mv BUGS ../../BUGS
 
--- a/doc/interpreter/install.texi
+++ b/doc/interpreter/install.texi
@@ -442,14 +442,6 @@
 @email{bug-octave@@bevo.che.wisc.edu} if you are interested in helping
 make a binary distribution available for your system.)
 
-Also, binary distributions are limited to static binaries that do not
-support dynamic linking.  For earlier versions of Octave, I tried
-distributing dynamically linked binaries but that proved to be too much
-trouble to support.  If you want to have a copy of Octave that includes
-all the features described in this manual, you will have to build it
-from the sources yourself, or find someone else who is willing to do it
-for you.
-
 @menu
 * Installing Octave from a Binary Distribution::  
 * Creating a Binary Distribution::  
@@ -569,6 +561,6 @@
 @end example
 
 This will create a compressed tar file ready for distribution.
-It will contain statically linked binaries and have a name like
+It will have a name like
 @file{octave-@value{VERSION}-@value{TARGETHOSTTYPE}.tar.gz}
 @end itemize
--- a/emacs/octave-mod.el
+++ b/emacs/octave-mod.el
@@ -517,6 +517,9 @@
   (make-local-variable 'imenu-generic-expression)
   (setq imenu-generic-expression octave-mode-imenu-generic-expression)
 
+  (make-local-variable 'comment-multi-line)
+  (setq comment-multi-line nil)
+
   (octave-add-octave-menu)
   (octave-initialize-completions)
   (run-hooks 'octave-mode-hook))
--- a/install-octave.in
+++ b/install-octave.in
@@ -37,13 +37,6 @@
   exit 1
 fi
 
-have_find=true
-case "$canonical_host_type" in
-  *-*-cygwin32)
-    have_find=false
-  ;;
-esac
-
 distdir=`pwd`
 
 # Check whether to use -n or \c to keep echo from printing a newline
@@ -246,37 +239,32 @@
   done
 fi
 
-if $have_find; then
-  oct_files=`find . -name '*.oct' -print`
-  if test -n "$oct_files"; then
-    echo "installing .oct files in $octfiledir"
-    cd src
-    for f in $oct_files
+oct_files=`find . -name '*.oct' -print`
+if test -n "$oct_files"; then
+  echo "installing .oct files in $octfiledir"
+  for f in $oct_files
+  do
+    file=`basename $f`
+    cp $f $octfiledir/$file
+    chmod 755 $octfiledir/$file
+  done
+  if test -f links-to-make; then
+    cat links-to-make | while read src dest
     do
-      file=`basename $f`
-      cp $f $octfiledir/$file
-      chmod 755 $octfiledir/$file
+      if test -n "$src" && test -n "$dest"; then
+	cd $octfiledir
+	ln $src $dest
+      fi
     done
-    if test -f links-to-make; then
-      cat links-to-make | while read src dest
-      do
-	if test -n "$src" && test -n "$dest"; then
-	  cd $octfiledir
-	  ln $src $dest
-	fi
-      done
-    fi
-    cd $distdir
   fi
+  cd $distdir
 fi
 
 echo "installing .m files in $fcnfiledir"
 cd scripts
 tar cf - . | ( cd $fcnfiledir ; tar xf - )
-if $have_find; then
-  find $fcnfiledir -type f -print | xargs chmod 0644
-  find $fcnfiledir -name '*.img' -print | xargs rm -f
-fi
+find $fcnfiledir -type f -print | xargs chmod 0644
+find $fcnfiledir -name '*.img' -print | xargs rm -f
 cd $distdir
 
 echo "installing image files in $imagedir"
--- a/kpathsea/ChangeLog
+++ b/kpathsea/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 14 12:20:47 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* acklibtool.m4: For use with Octave, disable support for shared
+	libraries.
+
 Thu Apr 23 15:08:40 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* withenable.ac (texmfmain): Don't print warning if main temf
--- a/kpathsea/acklibtool.m4
+++ b/kpathsea/acklibtool.m4
@@ -1,5 +1,5 @@
 dnl Autoconf support for Klibtool.
-dnl $Id: acklibtool.m4,v 1.4 1998-05-04 16:36:19 jwe Exp $
+dnl $Id: acklibtool.m4,v 1.5 1998-05-18 20:33:34 jwe Exp $
 dnl
 dnl
 dnl Find the script, check for subprogs, etc.
@@ -20,14 +20,18 @@
   exit 1
 fi
 #
+## For use with Octave, ignore these options and only build static libraries.
+##
 ## Argument parsing: we support --enable-shared and --enable-static.
-AC_ARG_ENABLE(shared,
-[  --enable-shared              build shared libraries [default=no]],,
-  enable_shared=no)
-#
-AC_ARG_ENABLE(static,
-[  --enable-static              build static libraries [default=yes]],,
-  enable_static=yes)
+#AC_ARG_ENABLE(shared,
+#[  --enable-shared              build shared libraries [default=no]],,
+#  enable_shared=no)
+##
+#AC_ARG_ENABLE(static,
+#[  --enable-static              build static libraries [default=yes]],,
+#  enable_static=yes)
+enable_shared=no
+enable_static=yes
 #
 # If they explicitly --enable-static, make that the link type.
 # More commonly, they will just --enable-shared; make that the link type.
--- a/libcruft/ChangeLog
+++ b/libcruft/ChangeLog
@@ -1,3 +1,9 @@
+Mon May 11 12:33:42 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* fftpack/passb3.f, fftpack/passb5.f, fftpack/passf3.f,
+	fftpack/passf5.f: Use double precision constants in data
+	statements.
+
 Tue Apr 14 14:01:22 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* slatec-fn/xdgamit.f (xdgamit): New file.
--- a/libcruft/fftpack/passb3.f
+++ b/libcruft/fftpack/passb3.f
@@ -2,7 +2,7 @@
       implicit double precision (a-h,o-z)
       dimension       cc(ido,3,l1)           ,ch(ido,l1,3)           ,
      1                wa1(1)     ,wa2(1)
-      data taur,taui /-.5,.866025403784439/
+      data taur,taui /-.5,.866025403784439d0/
       if (ido .ne. 2) go to 102
       do 101 k=1,l1
          tr2 = cc(1,2,k)+cc(1,3,k)
--- a/libcruft/fftpack/passb5.f
+++ b/libcruft/fftpack/passb5.f
@@ -2,8 +2,8 @@
       implicit double precision (a-h,o-z)
       dimension       cc(ido,5,l1)           ,ch(ido,l1,5)           ,
      1                wa1(1)     ,wa2(1)     ,wa3(1)     ,wa4(1)
-      data tr11,ti11,tr12,ti12 /.309016994374947,.951056516295154,
-     1-.809016994374947,.587785252292473/
+      data tr11,ti11,tr12,ti12 /.309016994374947d0,.951056516295154d0,
+     1-.809016994374947d0,.587785252292473d0/
       if (ido .ne. 2) go to 102
       do 101 k=1,l1
          ti5 = cc(2,2,k)-cc(2,5,k)
--- a/libcruft/fftpack/passf3.f
+++ b/libcruft/fftpack/passf3.f
@@ -2,7 +2,7 @@
       implicit double precision (a-h,o-z)
       dimension       cc(ido,3,l1)           ,ch(ido,l1,3)           ,
      1                wa1(1)     ,wa2(1)
-      data taur,taui /-.5,-.866025403784439/
+      data taur,taui /-.5d0,-.866025403784439d0/
       if (ido .ne. 2) go to 102
       do 101 k=1,l1
          tr2 = cc(1,2,k)+cc(1,3,k)
--- a/libcruft/fftpack/passf5.f
+++ b/libcruft/fftpack/passf5.f
@@ -2,8 +2,8 @@
       implicit double precision (a-h,o-z)
       dimension       cc(ido,5,l1)           ,ch(ido,l1,5)           ,
      1                wa1(1)     ,wa2(1)     ,wa3(1)     ,wa4(1)
-      data tr11,ti11,tr12,ti12 /.309016994374947,-.951056516295154,
-     1-.809016994374947,-.587785252292473/
+      data tr11,ti11,tr12,ti12 /.309016994374947d0,-.951056516295154d0,
+     1-.809016994374947d0,-.587785252292473d0/
       if (ido .ne. 2) go to 102
       do 101 k=1,l1
          ti5 = cc(2,2,k)-cc(2,5,k)
--- a/liboctave/Array-b.cc
+++ b/liboctave/Array-b.cc
@@ -38,7 +38,7 @@
 
 template class Array2<bool>;
 
-template void assign (Array2<bool>&, const Array2<bool>&);
+template int assign (Array2<bool>&, const Array2<bool>&);
 
 #include "DiagArray2.h"
 #include "DiagArray2.cc"
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -50,6 +50,7 @@
 #include "lo-utils.h"
 #include "mx-base.h"
 #include "mx-cm-dm.h"
+#include "mx-dm-cm.h"
 #include "mx-cm-s.h"
 #include "mx-inlines.cc"
 #include "oct-cmplx.h"
--- a/liboctave/ChangeLog
+++ b/liboctave/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 14 11:50:24 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* mx-op-defs.h (MDM_MULTIPLY_OP): Compute result if dm_nc > 0, not
+	if dm_nc == 0.
+
 Thu Apr 23 16:15:37 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* pathsearch.h (dir_path::p_orig): New field.
--- a/liboctave/dMatrix.cc
+++ b/liboctave/dMatrix.cc
@@ -46,6 +46,7 @@
 #include "lo-utils.h"
 #include "mx-base.h"
 #include "mx-m-dm.h"
+#include "mx-dm-m.h"
 #include "mx-inlines.cc"
 #include "oct-cmplx.h"
 
--- a/liboctave/mx-op-defs.h
+++ b/liboctave/mx-op-defs.h
@@ -40,8 +40,6 @@
 #define FBM boolMatrix (1, 1, false)
 #define NBM boolMatrix ()
 
-#if 0
-
 // vector by scalar operations.
 
 #define VS_BIN_OP_DECLS(R, V, S) \
@@ -593,7 +591,7 @@
     { \
       r.resize (m_nr, dm_nc, 0.0); \
  \
-      if (m_nr > 0 && m_nc > 0 && dm_nc == 0) \
+      if (m_nr > 0 && m_nc > 0 && dm_nc > 0) \
 	{ \
 	  for (int j = 0; j < dm.length (); j++) \
 	    { \
@@ -751,8 +749,6 @@
 #define DMDM_OP_DECLS(R, DM1, DM2) \
   DMDM_BIN_OP_DECLS (R, DM1, DM2)
 
-#endif
-
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***
--- a/mkoctfile.in
+++ b/mkoctfile.in
@@ -103,10 +103,10 @@
       exit 0
     ;;
     -I*)
-      incflags="$incflags $1";;
+      incflags="$incflags $1"
     ;;
     -[lL]*)
-      ldflags="$ldflags $1";;
+      ldflags="$ldflags $1"
     ;;
     -o | --output)
       shift
--- a/octMakefile.in
+++ b/octMakefile.in
@@ -25,8 +25,8 @@
 
 DISTFILES = $(CONF_DISTFILES) \
 	BUGS COPYING INSTALL INSTALL.OCTAVE NEWS NEWS.[0-9] PROJECTS \
-	README README.Linux README.Windows ROADMAP SENDING-PATCHES \
-	THANKS move-if-change octave-sh octave-bug.in \
+	README README.Linux README.Windows README.MachTen ROADMAP \
+	SENDING-PATCHES THANKS move-if-change octave-sh octave-bug.in \
 	install-octave.in mkinstalldirs mkoctfile.in texi2dvi \
 	ChangeLog ChangeLog.[0-9]
 
@@ -49,7 +49,7 @@
 	test doc emacs examples
 
 XBINDISTFILES = BUGS COPYING INSTALL INSTALL.OCTAVE NEWS NEWS.[0-9] \
-	PROJECTS README README.Linux README.NLP README.Windows \
+	PROJECTS README README.Linux README.Windows README.MachTen \
 	SENDING-PATCHES THANKS octave-sh install-octave mkinstalldirs \
 	ChangeLog ChangeLog.[0-9]
 
--- a/scripts/linear-algebra/dot.m
+++ b/scripts/linear-algebra/dot.m
@@ -37,9 +37,9 @@
       endif
     else
       if (y_nr == 1)
-	z = y * x';
+	z = y * x;
       else
-	z = y * x;
+	z = y' * x;
       endif
     endif
   else
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
+Thu May 14 16:23:15 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* DLD-FUNCTIONS/getrusage.cc: Include sys/types.h too.
+
+Mon May 11 00:38:45 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* pager.cc (Fdiary): Don't forget to set write_to_diary file if
+	just given a file name.
+
+	* input.cc (octave_gets): Only send new line character to
+	octave_diary if current_input_line is empty or doesn't already end
+	with a new line character..
+	Don't send input from function files or	scripts to octave_diary.
+
 Sun May  3 19:54:38 1998  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* lex.l (reset_parser): Also call yyrestart if forced_interactive
--- a/src/DLD-FUNCTIONS/getrusage.cc
+++ b/src/DLD-FUNCTIONS/getrusage.cc
@@ -26,6 +26,10 @@
 
 #include "systime.h"
 
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
--- a/src/input.cc
+++ b/src/input.cc
@@ -222,12 +222,18 @@
       if (! input_from_startup_file)
 	command_history::add (current_input_line);
 
-      octave_diary << current_input_line;
+      if (! (reading_fcn_file || reading_script_file))
+	{
+	  octave_diary << current_input_line;
+
+	  if (current_input_line[current_input_line.length () - 1] != '\n')
+	    octave_diary << "\n";
+	}
 
       do_input_echo (current_input_line);
     }
-
-  octave_diary << "\n";
+  else if (! (reading_fcn_file || reading_script_file))
+    octave_diary << "\n";
   
   return retval;
 }
--- a/src/oct-procbuf.cc
+++ b/src/oct-procbuf.cc
@@ -39,6 +39,7 @@
 #include "lo-utils.h"
 #include "oct-procbuf.h"
 #include "syswait.h"
+#include "variables.h"
 
 #include "defun.h"
 #include "gripes.h"
@@ -206,7 +207,8 @@
 static void
 symbols_of_oct_procbuf (void)
 {
-  DEFVAR (kluge_procbuf_delay, Vkluge_procbuf_delay, 0, kluge_procbuf_delay,
+  DEFVAR (kluge_procbuf_delay, static_cast<double> (Vkluge_procbuf_delay),
+	  0, kluge_procbuf_delay,
     "number of microseconds to delay in the parent after forking");
 }
 
--- a/src/pager.cc
+++ b/src/pager.cc
@@ -384,6 +384,7 @@
 	else
 	  {
 	    diary_file = arg;
+	    write_to_diary_file = true;
 	    open_diary_file ();
 	  }
       }
--- a/src/version.h
+++ b/src/version.h
@@ -23,7 +23,7 @@
 #if !defined (octave_version_h)
 #define octave_version_h 1
 
-#define OCTAVE_VERSION "2.1.6"
+#define OCTAVE_VERSION "2.1.7"
 
 #define OCTAVE_COPYRIGHT \
   "Copyright (C) 1996, 1997, 1998 John W. Eaton."