ongoing work to support 0x, 0o, 0b
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-22 22:04:18 +09:00
parent 261970a1a4
commit 8a277c77c0
4 changed files with 30 additions and 55 deletions

View File

@ -1365,17 +1365,17 @@ static int fmt_outv (hcl_t* hcl, hcl_fmtout_t* fmtout, va_list ap)
{
if (base == 2)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'b', 1);
}
if (base == 8)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'o', 1);
}
else if (base == 16)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'x', 1);
}
}
@ -2713,17 +2713,17 @@ static HCL_INLINE int format_stack_args (hcl_t* hcl, hcl_fmtout_t* fmtout, hcl_o
{
if (radix == 2)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'b', 1);
}
if (radix == 8)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'o', 1);
}
else if (radix == 16)
{
PUT_OOCH (hcl, fmtout, '#', 1);
PUT_OOCH (hcl, fmtout, '0', 1);
PUT_OOCH (hcl, fmtout, 'x', 1);
}
}