mirror of
https://github.com/micropython/micropython.git
synced 2025-07-21 21:11:12 +02:00
py/mpprint: Remove unused "PF_FLAG_NO_TRAILZ" flag.
Looking at the git history, there's no indication that the `PF_FLAG_NO_TRAILZ` flag was ever implemented or that "%!" was used as an `mp_printf` format string in practice. So remove the flag and re-number the other flags. Leave `PF_FLAG_SEP_POS` at 9 (the highest position that probably works with 16-bit integers like the pic16bit port). Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
committed by
Damien George
parent
73b1cbc17a
commit
1a8f4b290b
@@ -413,8 +413,6 @@ int mp_vprintf(const mp_print_t *print, const char *fmt, va_list args) {
|
|||||||
flags |= PF_FLAG_SHOW_SIGN;
|
flags |= PF_FLAG_SHOW_SIGN;
|
||||||
} else if (*fmt == ' ') {
|
} else if (*fmt == ' ') {
|
||||||
flags |= PF_FLAG_SPACE_SIGN;
|
flags |= PF_FLAG_SPACE_SIGN;
|
||||||
} else if (*fmt == '!') {
|
|
||||||
flags |= PF_FLAG_NO_TRAILZ;
|
|
||||||
} else if (*fmt == '0') {
|
} else if (*fmt == '0') {
|
||||||
flags |= PF_FLAG_PAD_AFTER_SIGN;
|
flags |= PF_FLAG_PAD_AFTER_SIGN;
|
||||||
fill = '0';
|
fill = '0';
|
||||||
|
11
py/mpprint.h
11
py/mpprint.h
@@ -31,12 +31,11 @@
|
|||||||
#define PF_FLAG_LEFT_ADJUST (0x001)
|
#define PF_FLAG_LEFT_ADJUST (0x001)
|
||||||
#define PF_FLAG_SHOW_SIGN (0x002)
|
#define PF_FLAG_SHOW_SIGN (0x002)
|
||||||
#define PF_FLAG_SPACE_SIGN (0x004)
|
#define PF_FLAG_SPACE_SIGN (0x004)
|
||||||
#define PF_FLAG_NO_TRAILZ (0x008)
|
#define PF_FLAG_SHOW_PREFIX (0x008)
|
||||||
#define PF_FLAG_SHOW_PREFIX (0x010)
|
#define PF_FLAG_PAD_AFTER_SIGN (0x010)
|
||||||
#define PF_FLAG_PAD_AFTER_SIGN (0x020)
|
#define PF_FLAG_CENTER_ADJUST (0x020)
|
||||||
#define PF_FLAG_CENTER_ADJUST (0x040)
|
#define PF_FLAG_ADD_PERCENT (0x040)
|
||||||
#define PF_FLAG_ADD_PERCENT (0x080)
|
#define PF_FLAG_SHOW_OCTAL_LETTER (0x080)
|
||||||
#define PF_FLAG_SHOW_OCTAL_LETTER (0x100)
|
|
||||||
#define PF_FLAG_SEP_POS (9) // must be above all the above PF_FLAGs
|
#define PF_FLAG_SEP_POS (9) // must be above all the above PF_FLAGs
|
||||||
|
|
||||||
#if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES
|
#if MICROPY_PY_IO && MICROPY_PY_SYS_STDFILES
|
||||||
|
Reference in New Issue
Block a user