[goffice] GOFormat: fix EE-compilation.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] GOFormat: fix EE-compilation.
- Date: Fri, 26 Oct 2012 23:31:50 +0000 (UTC)
commit b8d0587a7c642a60cc8e4260631c468eb164d34e
Author: Morten Welinder <terra gnome org>
Date: Fri Oct 26 19:31:28 2012 -0400
GOFormat: fix EE-compilation.
NEWS | 1 +
goffice/utils/go-format.c | 11 ++++-------
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/NEWS b/NEWS
index 333a69c..60ebc06 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,7 @@ Jean:
Morten:
* Namespace cleanup. [#686501]
+ * Fix EE-format compilation. [#686480]
--------------------------------------------------------------------------
goffice 0.9.6:
diff --git a/goffice/utils/go-format.c b/goffice/utils/go-format.c
index c52d9bc..9b45b6f 100644
--- a/goffice/utils/go-format.c
+++ b/goffice/utils/go-format.c
@@ -1958,7 +1958,7 @@ go_format_parse_number_E (GOFormatParseState *pstate)
gboolean append_SI = FALSE;
gboolean simplify_mantissa = TRUE;
int tno_end = pstate->tokens->len;
- int tno_exp_start = pstate->tno_E + 2;
+ int tno_exp_start = pstate->tno_E + 1;
if (tno_exp_start >= tno_end)
return NULL;
@@ -1987,11 +1987,6 @@ go_format_parse_number_E (GOFormatParseState *pstate)
if (use_markup) {
int i;
- pstate->forced_exponent_sign =
- (GET_TOKEN (tno_exp_start).token == '+');
- if (pstate->forced_exponent_sign)
- tno_exp_start++;
-
simplify_mantissa = TRUE;
for (i = 0; i < pstate->tno_E; i++) {
if (GET_TOKEN(i).token == TOK_DECIMAL)
@@ -2004,12 +1999,14 @@ go_format_parse_number_E (GOFormatParseState *pstate)
} else
simplify_mantissa = FALSE;
- switch (GET_TOKEN (pstate->tno_E + 1).token) {
+ switch (GET_TOKEN (tno_exp_start).token) {
case '-':
pstate->forced_exponent_sign = FALSE;
+ tno_exp_start++;
break;
case '+':
pstate->forced_exponent_sign = TRUE;
+ tno_exp_start++;
break;
default:
#ifndef ALLOW_NO_SIGN_AFTER_E
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]