summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/aes.c4
-rw-r--r--bin/psfed.c5
-rw-r--r--bin/shotty.c10
-rw-r--r--bin/ttpre.c2
4 files changed, 12 insertions, 9 deletions
diff --git a/bin/aes.c b/bin/aes.c
index 1472338f..705970dc 100644
--- a/bin/aes.c
+++ b/bin/aes.c
@@ -36,7 +36,7 @@ static const wchar_t Table[128] = {
 
 static void enwiden(const char *ch) {
 	for (; *ch; ++ch) {
-		if ((byte)*ch < 128) printf("%lc", Table[(byte)*ch]);
+		if ((byte)*ch < 128) printf("%lc", (wint_t)Table[(byte)*ch]);
 		else printf("%c", *ch);
 	}
 }
@@ -45,7 +45,7 @@ int main(int argc, char *argv[]) {
 	setlocale(LC_CTYPE, "");
 	for (int i = 1; i < argc; ++i) {
 		enwiden(argv[i]);
-		if (i < argc - 1) printf("%lc", Table[' ']);
+		if (i < argc - 1) printf("%lc", (wint_t)Table[' ']);
 		else printf("\n");
 	}
 	if (argc > 1) return EXIT_SUCCESS;
diff --git a/bin/psfed.c b/bin/psfed.c
index 18627a83..4f46b500 100644
--- a/bin/psfed.c
+++ b/bin/psfed.c
@@ -289,7 +289,10 @@ static void normalInc(uint32_t n) {
 }
 static void normalPrint(const char *prefix) {
 	if (normal.index <= 256) {
-		printf("%s: %02X '%lc'\n", prefix, normal.index, CP437[normal.index]);
+		printf(
+			"%s: %02X '%lc'\n",
+			prefix, normal.index, (wint_t)CP437[normal.index]
+		);
 	} else {
 		printf("%s: %02X\n", prefix, normal.index);
 	}
diff --git a/bin/shotty.c b/bin/shotty.c
index 41cb4e97..c458f5d2 100644
--- a/bin/shotty.c
+++ b/bin/shotty.c
@@ -98,7 +98,7 @@ static void span(const struct Style *prev, const struct Cell *cell) {
 		break; case '&': printf("&amp;");
 		break; case '<': printf("&lt;");
 		break; case '>': printf("&gt;");
-		break; default:  printf("%lc", cell->ch);
+		break; default:  printf("%lc", (wint_t)cell->ch);
 	}
 }
 
@@ -150,7 +150,7 @@ static char updateNUL(wchar_t ch) {
 				return NUL;
 			}
 			if (x + width > cols) {
-				warnx("cannot fit '%lc'", ch);
+				warnx("cannot fit '%lc'", (wint_t)ch);
 				return NUL;
 			}
 
@@ -218,7 +218,7 @@ static char updateESC(wchar_t ch) {
 		case '>': return NUL;
 		case CSI: return CSI;
 		case OSC: return OSC;
-		default: warnx("unhandled ESC %lc", ch); return NUL;
+		default: warnx("unhandled ESC %lc", (wint_t)ch); return NUL;
 	}
 }
 
@@ -350,7 +350,7 @@ static char updateCSI(wchar_t ch) {
 		}
 
 		break; case 't': // ignore
-		break; default: warnx("unhandled CSI %lc", ch);
+		break; default: warnx("unhandled CSI %lc", (wint_t)ch);
 	}
 
 	if (opts.debug) {
@@ -361,7 +361,7 @@ static char updateCSI(wchar_t ch) {
 		if (ch < 128 && Name[ch]) {
 			printf("%s\n", Name[ch]);
 		} else {
-			printf("%lc\n", ch);
+			printf("%lc\n", (wint_t)ch);
 		}
 		html();
 	}
diff --git a/bin/ttpre.c b/bin/ttpre.c
index be000c42..4917be37 100644
--- a/bin/ttpre.c
+++ b/bin/ttpre.c
@@ -24,7 +24,7 @@ static void put(wchar_t ch) {
 		break; case L'&': printf("&amp;");
 		break; case L'<': printf("&lt;");
 		break; case L'>': printf("&gt;");
-		break; default:   printf("%lc", ch);
+		break; default:   printf("%lc", (wint_t)ch);
 	}
 }