Browse Source

src/core/perfmodel/perfmodel_nan.c: consider all space characters, and give back last character as it is not a space character

Nathalie Furmento 11 years ago
parent
commit
f5c4a34f23
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/core/perfmodel/perfmodel_nan.c

+ 4 - 2
src/core/perfmodel/perfmodel_nan.c

@@ -23,15 +23,17 @@
 #include <string.h>
 #include <string.h>
 #include <config.h>
 #include <config.h>
 #include <core/perfmodel/perfmodel.h>
 #include <core/perfmodel/perfmodel.h>
+#include <ctype.h>
 
 
 #ifdef STARPU_HAVE_WINDOWS
 #ifdef STARPU_HAVE_WINDOWS
 static
 static
 void _starpu_read_spaces(FILE *f)
 void _starpu_read_spaces(FILE *f)
 {
 {
 	int c = getc(f);
 	int c = getc(f);
-	if (c == ' ')
+	if (isspace(c))
 	{
 	{
-		while (c == ' ') c = getc(f);
+		while (isspace(c)) c = getc(f);
+		ungetc(c, f);
 	}
 	}
 	else
 	else
 	{
 	{