else return (CAST_IN(a) > CAST_IN(b))?(1):(-1);
}
-char *fc_print_dec(const void *a)
+char *fc_print_dec(const void *a, char *buf, int buflen)
{
- static char buf[100];
-
- snprintf(buf, 100, "%1.30Lg", CAST_IN(a));
+ snprintf(buf, buflen, "%1.30Lg", CAST_IN(a));
return buf;
}
void fc_get_inf(void);
void fc_calc(const void *a, const void *b, int opcode);
-char *fc_print_dec(const void *a);
+char *fc_print_dec(const void *a, char *buf, int buflen);
int fc_comp(const void *a, const void *b);
#endif /* _FLTCALC_H_ */
tarval *tv;
char *str;
int offset;
+ char buf[100];
tv = XP_GETARG(tarval *, 0);
switch (get_mode_sort(tv->mode))
return XPF1R("0x%s", str + offset);
case float_number:
- return XPF1R("%s", fc_print_dec(tv->value));
+ return XPF1R("%s", fc_print_dec(tv->value, buf, sizeof(buf)));
case reference:
if (tv->value != NULL)