commit 201f66eb123d9c24770fef597ae1b3a9686775ab parent 84163f89d21f74d6f9c1e728bdfa05efe58a52e8 Author: Claudio Alessi <smoppy@gmail.com> Date: Sun, 25 Jun 2023 12:12:32 +0200 Also strip the colors in stripformats() Diffstat:
M | circo.c | | | 12 | ++++++++---- |
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/circo.c b/circo.c @@ -1696,13 +1696,17 @@ stripformats(char *s) { ++p; break; case 0x03: /* colors */ - case 0x04: /* hex colors */ - /* TODO: these need actual parsing. To be implemented soon. */ + if(isdigit(*++p) && isdigit(*++p)) + ++p; + if(*p == ',' && isdigit(*++p) && isdigit(*++p)) + ++p; + break; + default: + *s++ = *p++; break; } - - *s++ = *p++; } + *s++ = *p; } void