mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Fix compilation errors.
This commit is contained in:
parent
6c461b3e95
commit
2763a6bb21
@ -56,7 +56,7 @@
|
|||||||
#define UTF8_ACCEPT 0
|
#define UTF8_ACCEPT 0
|
||||||
#define UTF8_REJECT 1
|
#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, // 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, // 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
|
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
|
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
|
static guint32 inline
|
||||||
decode(uint32_t* state, uint32_t* codep, uint32_t byte) {
|
decode(guint32* state, guint32* codep, guint32 byte) {
|
||||||
uint32_t type = utf8d[byte];
|
guint32 type = utf8d[(guint8)byte];
|
||||||
|
|
||||||
*codep = (*state != UTF8_ACCEPT) ?
|
*codep = (*state != UTF8_ACCEPT) ?
|
||||||
(byte & 0x3fu) | (*codep << 6) :
|
(byte & 0x3fu) | (*codep << 6) :
|
||||||
@ -90,19 +90,19 @@ xmlChar*
|
|||||||
checked_char_cast (gchar *val)
|
checked_char_cast (gchar *val)
|
||||||
{
|
{
|
||||||
gchar *p = val;
|
gchar *p = val;
|
||||||
uint32_t prev, curr;
|
guint32 prev, curr;
|
||||||
uint8_t count;
|
guint8 count;
|
||||||
|
|
||||||
for (prev = 0, curr = 0; *p; prev = curr, ++p)
|
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 &&
|
if (*p && *p < 0x20 && *p != 0x09 &&
|
||||||
*p != 0x0a && *p != 0x0d)
|
*p != 0x0a && *p != 0x0d)
|
||||||
{
|
{
|
||||||
*p = '?';
|
*p = '?';
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (*(uint8_t*)p < 0x80)
|
if (*(guint8*)p < 0x80)
|
||||||
continue;
|
continue;
|
||||||
switch (decode(&curr, &codep, *p))
|
switch (decode(&curr, &codep, *p))
|
||||||
{
|
{
|
||||||
|
@ -2247,7 +2247,7 @@ gnc_split_register_auto_calc (SplitRegister *reg, Split *split)
|
|||||||
cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
|
cell = (PriceCell *) gnc_table_layout_get_cell (reg->table->layout,
|
||||||
PRIC_CELL);
|
PRIC_CELL);
|
||||||
price = gnc_price_cell_get_value (cell);
|
price = gnc_price_cell_get_value (cell);
|
||||||
if (price > 0)
|
if (gnc_numeric_positive_p(price))
|
||||||
record_price (reg, account, price);
|
record_price (reg, account, price);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user