From dcfce59492fb3003a61e161c2bbc32e2072c2ee4 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Mon, 16 Apr 2018 22:37:02 -0400 Subject: Always hexadecimal in uppercase I still haven't been able to actually test scheme's Linux console output... --- bin/fbclock.c | 2 +- bin/pbd.c | 4 ++-- bin/scheme.c | 4 ++-- bin/xx.c | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/fbclock.c b/bin/fbclock.c index 605fa4e0..e8e5fc69 100644 --- a/bin/fbclock.c +++ b/bin/fbclock.c @@ -61,7 +61,7 @@ int main() { if (header.magic != PSF2_MAGIC) { errx( - EX_DATAERR, "%s: invalid header magic %08x", + EX_DATAERR, "%s: invalid header magic %08X", fontPath, header.magic ); } diff --git a/bin/pbd.c b/bin/pbd.c index 80ab036f..13ba62d3 100644 --- a/bin/pbd.c +++ b/bin/pbd.c @@ -59,7 +59,7 @@ static int pbd(void) { struct sockaddr_in addr = { .sin_family = AF_INET, .sin_port = htons(7062), - .sin_addr = { .s_addr = htonl(0x7f000001) }, + .sin_addr = { .s_addr = htonl(0x7F000001) }, }; error = bind(server, (struct sockaddr *)&addr, sizeof(addr)); if (error) err(EX_UNAVAILABLE, "bind"); @@ -93,7 +93,7 @@ static int pbdClient(void) { struct sockaddr_in addr = { .sin_family = AF_INET, .sin_port = htons(7062), - .sin_addr = { .s_addr = htonl(0x7f000001) }, + .sin_addr = { .s_addr = htonl(0x7F000001) }, }; int error = connect(client, (struct sockaddr *)&addr, sizeof(addr)); if (error) err(EX_UNAVAILABLE, "connect"); diff --git a/bin/scheme.c b/bin/scheme.c index 162192fc..6fa52de3 100644 --- a/bin/scheme.c +++ b/bin/scheme.c @@ -121,7 +121,7 @@ static struct Rgb toRgb(struct Hsv hsv) { static void hex(const struct Hsv *hsv, size_t len) { for (size_t i = 0; i < len; ++i) { struct Rgb rgb = toRgb(hsv[i]); - printf("%02x%02x%02x\n", rgb.r, rgb.g, rgb.b); + printf("%02X%02X%02X\n", rgb.r, rgb.g, rgb.b); } } @@ -129,7 +129,7 @@ static void linux(const struct Hsv *hsv, size_t len) { if (len > 16) len = 16; for (size_t i = 0; i < len; ++i) { struct Rgb rgb = toRgb(hsv[i]); - printf("\x1B]P%zx%02x%02x%02x", i, rgb.r, rgb.g, rgb.b); + printf("\x1B]P%zX%02X%02X%02X", i, rgb.r, rgb.g, rgb.b); } } diff --git a/bin/xx.c b/bin/xx.c index 688db8bc..9b2d3ca3 100644 --- a/bin/xx.c +++ b/bin/xx.c @@ -59,7 +59,7 @@ static void dump(FILE *file) { } if (options.offset) { - printf("%08zx: ", offset); + printf("%08zX: ", offset); } for (size_t i = 0; i < sizeof(buf); ++i) { @@ -69,7 +69,7 @@ static void dump(FILE *file) { } } if (i < size) { - printf("%02hhx ", buf[i]); + printf("%02hhX ", buf[i]); } else { printf(" "); } -- cgit 1.4.1 4:58 -0500'>2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe 2021-01-09Add c -t flag to print expression typeJune McEnroe 2021-01-05Update taglineJune McEnroe