mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +00:00
[gamecode] Support variable field width and precision
This commit is contained in:
parent
7f4d2215e2
commit
a36f72f7b4
1 changed files with 5 additions and 2 deletions
|
@ -887,7 +887,8 @@ fmt_state_flags (fmt_state_t *state)
|
|||
static void
|
||||
fmt_state_var_field_width (fmt_state_t *state)
|
||||
{
|
||||
// XXX record width
|
||||
(*state->fi)->minFieldWidth = P_INT (pr, state->fmt_count);
|
||||
state->fmt_count++;
|
||||
if (*++state->c == '.') {
|
||||
state->state = fmt_state_precision;
|
||||
} else {
|
||||
|
@ -926,7 +927,9 @@ fmt_state_precision (fmt_state_t *state)
|
|||
static void
|
||||
fmt_state_var_precision (fmt_state_t *state)
|
||||
{
|
||||
// XXX record precision
|
||||
state->c++; // skip over *
|
||||
(*state->fi)->precision = P_INT (pr, state->fmt_count);
|
||||
state->fmt_count++;
|
||||
state->state = fmt_state_modifiers;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue