changeset 6206:cb8c62c78b42

[project @ 2006-12-06 20:10:02 by jwe]
author jwe
date Wed, 06 Dec 2006 20:10:03 +0000
parents 312bd3576844
children 3c92b8d892dd
files src/ChangeLog src/input.cc src/input.h src/mappers.cc
diffstat 4 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Dec 06 19:31:28 2006 +0000
+++ b/src/ChangeLog	Wed Dec 06 20:10:03 2006 +0000
@@ -1,3 +1,13 @@
+2006-12-06  John W. Eaton  <jwe@octave.org>
+
+2006-12-06  Michael Goffioul  <michael.goffioul@swing.be>
+
+	* mappers.cc (install_mapper_functions): Undefine isascii before
+	the DEFUN_MAPPER for it.
+
+	* input.cc (get_user_input): Prevent out of bounds array access
+	when checking for EOL.
+
 2006-12-05  John W. Eaton  <jwe@octave.org>
 
 	* ls-oct-ascii.cc (extract_keyword): If no match and looking for
--- a/src/input.cc	Wed Dec 06 19:31:28 2006 +0000
+++ b/src/input.cc	Wed Dec 06 20:10:03 2006 +0000
@@ -283,7 +283,7 @@
 
 	  size_t len = retval.length ();
 
-	  if (retval[len-1] != '\n')
+	  if (len > 0 && retval[len-1] != '\n')
 	    retval.append ("\n");
 	}
     }
--- a/src/input.h	Wed Dec 06 19:31:28 2006 +0000
+++ b/src/input.h	Wed Dec 06 20:10:03 2006 +0000
@@ -31,7 +31,6 @@
 #include <string>
 
 #include "oct-time.h"
-#include "ov-list.h"
 #include "pager.h"
 
 class octave_value;
--- a/src/mappers.cc	Wed Dec 06 19:31:28 2006 +0000
+++ b/src/mappers.cc	Wed Dec 06 20:10:03 2006 +0000
@@ -414,6 +414,10 @@
 or @code{islower (@var{s})} is true).\n\
 @end deftypefn");
 
+#ifdef isascii
+#undef isascii
+#endif
+
   DEFUN_MAPPER (isascii, xisascii, 0, 0, 0, 0, 0, 0.0, 0.0, 0, 0,
     "-*- texinfo -*-\n\
 @deftypefn {Mapping Function} {} isascii (@var{s})\n\