diff liboctave/lo-utils.cc @ 6907:c8081f4c094f

[project @ 2007-09-17 17:31:10 by jwe]
author jwe
date Mon, 17 Sep 2007 17:31:10 +0000
parents 935d23e16951
children 93c65f2a5668
line wrap: on
line diff
--- a/liboctave/lo-utils.cc
+++ b/liboctave/lo-utils.cc
@@ -26,6 +26,7 @@
 #include <config.h>
 #endif
 
+#include <cctype>
 #include <cstdlib>
 #include <cstdio>
 
@@ -262,9 +263,11 @@
 {
   double d = 0.0;
 
-  char c1 = 0;
+  char c1 = ' ';
 
-  c1 = is.get ();
+  while (isspace (c1))
+    c1 = is.get ();
+
   switch (c1)
     {
     case '-':
@@ -317,9 +320,10 @@
 
   Complex cx = 0.0;
 
-  char ch = 0;
+  char ch = ' ';
 
-  ch = is.get ();
+  while (isspace (ch))
+    ch = is.get ();
 
   if (ch == '(')
     {