roken: Unparse wider ints

This commit is contained in:
Nicolas Williams
2021-12-17 13:17:59 -06:00
committed by Luke Howard
parent fc76c83ab1
commit 686d5116de
7 changed files with 238 additions and 100 deletions

View File

@@ -50,20 +50,20 @@ static struct units time_units[] = {
{NULL, 0},
};
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL
parse_time (const char *s, const char *def_unit)
{
return parse_units (s, time_units, def_unit);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
unparse_time (int t, char *s, size_t len)
unparse_time(int64_t t, char *s, size_t len)
{
return unparse_units (t, time_units, s, len);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
unparse_time_approx (int t, char *s, size_t len)
unparse_time_approx(int64_t t, char *s, size_t len)
{
return unparse_units_approx (t, time_units, s, len);
}
@@ -79,20 +79,20 @@ print_time_table (FILE *f)
#undef unparse_time_approx
#undef print_time_table
ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL
ROKEN_LIB_FUNCTION int64_t ROKEN_LIB_CALL
parse_time(const char *s, const char *def_unit)
{
return rk_parse_units(s, time_units, def_unit);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
unparse_time(int t, char *s, size_t len)
unparse_time(int64_t t, char *s, size_t len)
{
return rk_unparse_units(t, time_units, s, len);
}
ROKEN_LIB_FUNCTION size_t ROKEN_LIB_CALL
unparse_time_approx(int t, char *s, size_t len)
unparse_time_approx(int64_t t, char *s, size_t len)
{
return rk_unparse_units_approx(t, time_units, s, len);
}