summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--bin/ttpre.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/ttpre.c b/bin/ttpre.c
index 48f24d8f..52e30f54 100644
--- a/bin/ttpre.c
+++ b/bin/ttpre.c
@@ -17,7 +17,6 @@
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <string.h>
 #include <wchar.h>
 
 static void put(const char *tag, wchar_t ch) {
@@ -35,18 +34,19 @@ static void push(wchar_t ch) {
 	static wchar_t q[3];
 	if (q[1] == L'\b' && q[0] == L'_') {
 		put("i", q[2]);
-		memset(q, 0, sizeof(q));
+		q[0] = q[1] = q[2] = 0;
 	} else if (q[1] == L'\b' && q[0] == q[2]) {
 		put("b", q[2]);
-		memset(q, 0, sizeof(q));
+		q[0] = q[1] = q[2] = 0;
 	} else if (q[0]) {
 		put(NULL, q[0]);
 	}
-	memmove(q, &q[1], sizeof(q) - sizeof(wchar_t));
+	q[0] = q[1];
+	q[1] = q[2];
 	q[2] = ch;
 }
 
-int main() {
+int main(void) {
 	setlocale(LC_CTYPE, "");
 	printf("<pre>");
 	wchar_t ch;
='2020-02-22 01:48:07 -0500'>2020-02-22Add See Ya LaterJune McEnroe 2020-02-20Remove wiki scriptJune McEnroe 2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe 2020-01-28Change scout sensitivity to 1.4June McEnroe 2020-01-28Import shows.txtJune McEnroe