diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-20 07:40:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-05-21 08:13:37 +0900 |
| commit | f0e1d575f26a907d6c005a7c229328b2c067f5b1 (patch) | |
| tree | 9bb215693da84cf3923452c3ac501c5a0e58cfab | |
| parent | 8f73ee2e823a5113b9b6a5d26ade10cd976cc6db (diff) | |
| download | mruby-f0e1d575f26a907d6c005a7c229328b2c067f5b1.tar.gz mruby-f0e1d575f26a907d6c005a7c229328b2c067f5b1.zip | |
sprintf.c: remove specifiers `%a` and `%A`.
`fmt_fp.c` does not support those specifiers. In addition, I believe no
one uses hexadecimal representation of float values.
| -rw-r--r-- | mrbgems/mruby-sprintf/src/sprintf.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c index 3fd052d5d..de8dbc513 100644 --- a/mrbgems/mruby-sprintf/src/sprintf.c +++ b/mrbgems/mruby-sprintf/src/sprintf.c @@ -326,10 +326,6 @@ get_hash(mrb_state *mrb, mrb_value *hash, mrb_int argc, const mrb_value *argv) * | equal to the precision, or in dd.dddd form otherwise. * | The precision specifies the number of significant digits. * G | Equivalent to 'g', but use an uppercase 'E' in exponent form. - * a | Convert floating-point argument as [-]0xh.hhhhp[+-]dd, - * | which is consisted from optional sign, "0x", fraction part - * | as hexadecimal, "p", and exponential part as decimal. - * A | Equivalent to 'a', but use uppercase 'X' and 'P'. * * Field | Other Format * ------+-------------------------------------------------------------- @@ -364,7 +360,7 @@ get_hash(mrb_state *mrb, mrb_value *hash, mrb_int argc, const mrb_value *argv) * | | For the conversions 'x', 'X', 'b' and 'B' * | | on non-zero, prefix the result with "0x", * | | "0X", "0b" and "0B", respectively. - * | | For 'a', 'A', 'e', 'E', 'f', 'g', and 'G', + * | | For 'e', 'E', 'f', 'g', and 'G', * | | force a decimal point to be added, * | | even if no digits follow. * | | For 'g' and 'G', do not remove trailing zeros. @@ -1052,9 +1048,7 @@ retry: case 'g': case 'G': case 'e': - case 'E': - case 'a': - case 'A': { + case 'E': { mrb_value val = GETARG(); double fval; mrb_int need = 6; |
