[Kst] extragear/graphics/kst/kst/datasources/ascii
Matthew D Truch
matt at truch.net
Thu Nov 17 17:42:33 CET 2005
SVN commit 481042 by truch:
Allow positive numbers to start with a '+'.
Sometimes, for reasons no known to me, people make damn sure you don't
think they have a negative number by putting a + in front to mark it
as positive. These people have been known to work in the Spectrum
Analyizer division at Stanford Research Systems.
M +2 -2 ascii.cpp
--- trunk/extragear/graphics/kst/kst/datasources/ascii/ascii.cpp #481041:481042
@@ -522,7 +522,7 @@
incol = true;
++i_col;
if (i_col == col) {
- if (isdigit(_tmpBuf[ch]) || _tmpBuf[ch] == '-' || _tmpBuf[ch] == '.') {
+ if (isdigit(_tmpBuf[ch]) || _tmpBuf[ch] == '-' || _tmpBuf[ch] == '.' || _tmpBuf[ch] == '+') {
v[i] = atof(_tmpBuf + ch);
} else if (ch + 2 < bufread && tolower(_tmpBuf[ch]) == 'i' &&
tolower(_tmpBuf[ch + 1]) == 'n' && tolower(_tmpBuf[ch + 2]) == 'f') {
@@ -556,7 +556,7 @@
incol = true;
++i_col;
if (i_col == col) {
- if (isdigit(_tmpBuf[ch]) || _tmpBuf[ch] == '-' || _tmpBuf[ch] == '.') {
+ if (isdigit(_tmpBuf[ch]) || _tmpBuf[ch] == '-' || _tmpBuf[ch] == '.' || _tmpBuf[ch] == '+') {
v[i] = atof(_tmpBuf + ch);
} else if (ch + 2 < bufread && tolower(_tmpBuf[ch]) == 'i' &&
tolower(_tmpBuf[ch + 1]) == 'n' && tolower(_tmpBuf[ch + 2]) == 'f') {
More information about the Kst
mailing list