index 5668ce50abca2ac27e82f8c9b2911cabc97b2a03..066bff8664df8910faf6641b78eb50447c7ec0c5 100644 (file)
@@ -23,7 +23,6 @@ bool *etiq_en; ///< when non-NULL, a token-indexed array, where the related tok
void make_field(struct tic_field *field, const struct tic_etiquette *etiq, char *horodate, char *data)
{
// args come from the bison stack
- int base;
char *rem;
field->horodate = horodate;
@@ -37,13 +36,12 @@ void make_field(struct tic_field *field, const struct tic_etiquette *etiq, char
field->data.s = data;
return;
case T_HEX:
- base = 16;
+ field->data.i = strtoul(data, &rem, 16);
break;
default:
- base = 10;
+ field->data.i = strtol(data, &rem, 10);
break;
}
- field->data.i = (int)strtol(data, &rem, base);
#ifdef TICV01pme
if (U_SANS == etiq->unittype && *data != '0円' && *rem != '0円') {
index 6ee0f9e3600e64fc9ca221cad980916382aca78d..d08af73af36384de636f66d5e194daa560d9cad7 100644 (file)
struct tic_etiquette etiq; ///< the field "etiquette"
union {
char *s;
- int i;
+ long i;
} data; ///< the field data, if any
char *horodate; ///< the field horodate, if any
};
index 597e0a475f1e5b7163799f6cc817785048a80101..74e2a962df040751234e139f712879df4eb5cf90 100644 (file)
};
#ifdef TICV02
-static void print_stge_data(int data)
+static void print_stge_data(long data)
{
const char sep = (tp.optflags & TIC2JSON_OPT_CRFIELD) ? '\n' : ' ';
uint32_t d = (uint32_t)data;
#endif /* TICV02 */
// fallthrough
default:
- ticprintf("%d", field->data.i);
+ ticprintf("%ld", field->data.i);
break;
}