changeset 6504:7e9a548e8ddf

[project @ 2007-04-06 15:33:32 by jwe]
author jwe
date Fri, 06 Apr 2007 15:33:45 +0000
parents a46d4161213f
children c7901606ba70
files libcruft/ChangeLog libcruft/ranlib/phrtsd.f src/octave.cc
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libcruft/ChangeLog	Fri Apr 06 14:57:21 2007 +0000
+++ b/libcruft/ChangeLog	Fri Apr 06 15:33:45 2007 +0000
@@ -1,3 +1,8 @@
+2007-04-06  John W. Eaton  <jwe@octave.org>
+
+	* ranlib/phrtsd.f (phrtsd): Ensure that the types of the arguments
+	passed to mod are the same even on 64-bit systems.
+
 2007-04-04  John W. Eaton  <jwe@octave.org>
 
 	* Makefules.in: Handle Fortran, C, and C++ sources with separate
--- a/libcruft/ranlib/phrtsd.f	Fri Apr 06 14:57:21 2007 +0000
+++ b/libcruft/ranlib/phrtsd.f	Fri Apr 06 15:33:45 2007 +0000
@@ -41,6 +41,8 @@
      +          '!@#$%^&*()_+[];:''"<>?,./')
       INTEGER twop30
       PARAMETER (twop30=1073741824)
+      INTEGER sixty4
+      PARAMETER (sixty4=64)
 C     ..
 C     .. Scalar Arguments ..
       INTEGER seed1,seed2
@@ -73,7 +75,7 @@
       lphr = lennob(phrase)
       IF (lphr.LT.1) RETURN
       DO 30,i = 1,lphr
-          ichr = mod(index(table,phrase(i:i)),64)
+          ichr = mod(index(table,phrase(i:i)),sixty4)
           IF (ichr.EQ.0) ichr = 63
           DO 10,j = 1,5
               values(j) = ichr - j
--- a/src/octave.cc	Fri Apr 06 14:57:21 2007 +0000
+++ b/src/octave.cc	Fri Apr 06 15:33:45 2007 +0000
@@ -417,7 +417,15 @@
 
   octave_program_name = tmp;
 
-  parse_and_execute (fname, false, "octave");
+  try
+    {
+      parse_and_execute (fname, false, "octave");
+    }
+  catch (std::bad_alloc)
+    {
+      std::cerr << "error: memory exhausted -- execution of "
+		<< fname << " failed\n";
+    }
  
   unwind_protect::run_frame ("execute_command_line_file");
 }