From fd4f25d3308eb3c693e789b087ec3cbe882f7075 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Fri, 27 Sep 2013 16:19:44 +0000 Subject: [PATCH] fixed a bug in xli reader --- qse/include/qse/cmn/str.h | 24 ++++++++++++------------ qse/lib/xli/read.c | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qse/include/qse/cmn/str.h b/qse/include/qse/cmn/str.h index 6a3b7ba4..d32203e2 100644 --- a/qse/include/qse/cmn/str.h +++ b/qse/include/qse/cmn/str.h @@ -173,8 +173,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( qse_char_t __ston_c = *__ston_ptr; \ if (__ston_c == QSE_T(' ') || \ __ston_c == QSE_T('\t')) { __ston_ptr++; continue; } \ - if (__ston_c == QSE_T('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_T('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_T('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_T('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; (__ston_v = QSE_CHARTONUM(*__ston_ptr, base)) < base; __ston_ptr++) { \ @@ -195,8 +195,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( if (__ston_c == QSE_T(' ') || __ston_c == QSE_T('\t')) { \ __ston_ptr++; continue; \ } \ - if (__ston_c == QSE_T('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_T('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_T('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_T('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; __ston_ptr < __ston_end && \ @@ -221,8 +221,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( qse_mchar_t __ston_c = *__ston_ptr; \ if (__ston_c == QSE_MT(' ') || \ __ston_c == QSE_MT('\t')) { __ston_ptr++; continue; } \ - if (__ston_c == QSE_MT('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_MT('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_MT('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_MT('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; (__ston_v = QSE_MCHARTONUM(*__ston_ptr, base)) < base; __ston_ptr++) { \ @@ -243,8 +243,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( if (__ston_c == QSE_MT(' ') || __ston_c == QSE_MT('\t')) { \ __ston_ptr++; continue; \ } \ - if (__ston_c == QSE_MT('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_MT('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_MT('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_MT('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; __ston_ptr < __ston_end && \ @@ -269,8 +269,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( qse_wchar_t __ston_c = *__ston_ptr; \ if (__ston_c == QSE_WT(' ') || \ __ston_c == QSE_WT('\t')) { __ston_ptr++; continue; } \ - if (__ston_c == QSE_WT('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_WT('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_WT('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_WT('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; (__ston_v = QSE_WCHARTONUM(*__ston_ptr, base)) < base; __ston_ptr++) { \ @@ -291,8 +291,8 @@ typedef qse_wchar_t* (*qse_wcssubst_t) ( if (__ston_c == QSE_WT(' ') || __ston_c == QSE_WT('\t')) { \ __ston_ptr++; continue; \ } \ - if (__ston_c == QSE_WT('-')) { __ston_f++; __ston_ptr++; } \ - if (__ston_c == QSE_WT('+')) { __ston_ptr++; } \ + else if (__ston_c == QSE_WT('-')) { __ston_f++; __ston_ptr++; } \ + else if (__ston_c == QSE_WT('+')) { __ston_ptr++; } \ break; \ } \ for (value = 0; __ston_ptr < __ston_end && \ diff --git a/qse/lib/xli/read.c b/qse/lib/xli/read.c index ad45196d..3a54134c 100644 --- a/qse/lib/xli/read.c +++ b/qse/lib/xli/read.c @@ -475,7 +475,7 @@ retry: { all_digits = 0; } - else if (lead_digit && QSE_ISDIGIT(c)) + else if (QSE_ISDIGIT(c)) { /* nothing to do */ }