37 |
{"", -1, -1, -1, -1, -1, 0000, -1, -1}, |
{"", -1, -1, -1, -1, -1, 0000, -1, -1}, |
38 |
}; |
}; |
39 |
|
|
40 |
|
/* Common formats. */ |
41 |
|
const struct fmt_spec f8_2 = {FMT_F, 8, 2}; |
42 |
|
|
43 |
/* Parses the alphabetic prefix of the current token as a format |
/* Parses the alphabetic prefix of the current token as a format |
44 |
specifier name. Returns the corresponding format specifier |
specifier name. Returns the corresponding format specifier |
45 |
type if successful, or -1 on failure. If ALLOW_XT is zero, |
type if successful, or -1 on failure. If ALLOW_XT is zero, |
445 |
return type; |
return type; |
446 |
return -1; |
return -1; |
447 |
} |
} |
448 |
|
|
449 |
|
/* Returns an input format specification with type TYPE, width W, |
450 |
|
and D decimals. */ |
451 |
|
struct fmt_spec |
452 |
|
make_input_format (int type, int w, int d) |
453 |
|
{ |
454 |
|
struct fmt_spec f; |
455 |
|
f.type = type; |
456 |
|
f.w = w; |
457 |
|
f.d = d; |
458 |
|
assert (check_input_specifier (&f, 0)); |
459 |
|
return f; |
460 |
|
} |
461 |
|
|
462 |
|
/* Returns an output format specification with type TYPE, width |
463 |
|
W, and D decimals. */ |
464 |
|
struct fmt_spec |
465 |
|
make_output_format (int type, int w, int d) |
466 |
|
{ |
467 |
|
struct fmt_spec f; |
468 |
|
f.type = type; |
469 |
|
f.w = w; |
470 |
|
f.d = d; |
471 |
|
assert (check_output_specifier (&f, 0)); |
472 |
|
return f; |
473 |
|
} |