[Kst] branches/work/kst/portto4/kst/src/datasources/ascii
Peter Kümmel
syntheticpp at gmx.net
Fri Jan 21 12:14:16 CET 2011
SVN commit 1216100 by kuemmel:
AsciiDatasource: also read numbers when they start with a white space
M +4 -1 asciisource.cpp
--- branches/work/kst/portto4/kst/src/datasources/ascii/asciisource.cpp #1216099:1216100
@@ -459,7 +459,7 @@
incol = true;
++i_col;
if (i_col == col) {
- if (isdigit((unsigned char)buffer[ch]) || buffer[ch] == '-' || buffer[ch] == '.' || buffer[ch] == '+') {
+ if (isdigit((unsigned char)buffer[ch]) || buffer[ch] == '-' || buffer[ch] == '.' || buffer[ch] == '+' || isspace((unsigned char)buffer[ch])) {
v[i] = lexc.toDouble(&buffer[0] + ch);
} else if (ch + 2 < bufread && tolower(buffer[ch]) == 'i' &&
tolower(buffer[ch + 1]) == 'n' && tolower(buffer[ch + 2]) == 'f') {
@@ -501,6 +501,9 @@
tolower(buffer[ch + 1]) == 'n' && tolower(buffer[ch + 2]) == 'f') {
v[i] = INF;
found_value = true;
+ } else {
+ qDebug() << "Unredable";
+
}
break;
}
More information about the Kst
mailing list