gnucash master: Fix compilation errors.
Mike Alexander
mta at code.gnucash.org
Sun Feb 23 00:49:19 EST 2014
Updated via https://github.com/Gnucash/gnucash/commit/2763a6bb (commit)
from https://github.com/Gnucash/gnucash/commit/6c461b3e (commit)
commit 2763a6bb2122b0b4fe5d091b3f671a892a47f12f
Author: Mike Alexander <mta at umich.edu>
Date: Sun Feb 23 00:45:50 2014 -0500
Fix compilation errors.
diff --git a/src/backend/xml/gnc-xml-helper.c b/src/backend/xml/gnc-xml-helper.c
index 70a48cf..d1f3f03 100644
--- a/src/backend/xml/gnc-xml-helper.c
+++ b/src/backend/xml/gnc-xml-helper.c
@@ -56,7 +56,7 @@
#define UTF8_ACCEPT 0
#define UTF8_REJECT 1
-static const uint8_t utf8d[] = {
+static const guint8 utf8d[] = {
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f
@@ -73,9 +73,9 @@ static const uint8_t utf8d[] = {
1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8 18f
};
-static uint32_t inline
-decode(uint32_t* state, uint32_t* codep, uint32_t byte) {
- uint32_t type = utf8d[byte];
+static guint32 inline
+decode(guint32* state, guint32* codep, guint32 byte) {
+ guint32 type = utf8d[(guint8)byte];
*codep = (*state != UTF8_ACCEPT) ?
(byte & 0x3fu) | (*codep << 6) :
@@ -90,19 +90,19 @@ xmlChar*
checked_char_cast (gchar *val)
{
gchar *p = val;
- uint32_t prev, curr;
- uint8_t count;
+ guint32 prev, curr;
+ guint8 count;
for (prev = 0, curr = 0; *p; prev = curr, ++p)
{
- uint32_t codep; /* We don't care, it's a throwaway */
+ guint32 codep; /* We don't care, it's a throwaway */
if (*p && *p < 0x20 && *p != 0x09 &&
*p != 0x0a && *p != 0x0d)
{
*p = '?';
continue;
}
- if (*(uint8_t*)p < 0x80)
+ if (*(guint8*)p < 0x80)
continue;
switch (decode(&curr, &codep, *p))
{
diff --git a/src/register/ledger-core/split-register.c b/src/register/ledger-core/split-register.c
index 62ffc1b..90b831a 100644
--- a/src/register/ledger-core/split-register.c
+++ b/src/register/ledger-core/split-register.c
@@ -2247,7 +2247,7 @@ gnc_split_register_auto_calc (SplitRegister *reg, Split *split)
cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
PRIC_CELL);
price = gnc_price_cell_get_value (cell);
- if (price > 0)
+ if (gnc_numeric_positive_p(price))
record_price (reg, account, price);
}
return TRUE;
Summary of changes:
src/backend/xml/gnc-xml-helper.c | 16 ++++++++--------
src/register/ledger-core/split-register.c | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
More information about the gnucash-changes
mailing list