summary refs log tree commit diff
path: root/bin/pbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pbd.c')
-rw-r--r--bin/pbd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/pbd.c b/bin/pbd.c
index 0d38334a..006281d1 100644
--- a/bin/pbd.c
+++ b/bin/pbd.c
@@ -27,6 +27,8 @@
 #include <sysexits.h>
 #include <unistd.h>
 
+typedef unsigned char byte;
+
 static void spawn(const char *cmd, const char *arg, int dest, int src) {
 	pid_t pid = fork();
 	if (pid < 0) err(EX_OSERR, "fork");
@@ -106,7 +108,7 @@ static int pbdClient(char c) {
 }
 
 static void copy(int out, int in) {
-	char buf[4096];
+	byte buf[4096];
 	ssize_t readSize;
 	while (0 < (readSize = read(in, buf, sizeof(buf)))) {
 		ssize_t writeSize = write(out, buf, readSize);
@@ -127,7 +129,7 @@ static int pbpaste(void) {
 	return EX_OK;
 }
 
-static int open1(char *url) {
+static int open1(const char *url) {
 	if (!url) return EX_USAGE;
 	int client = pbdClient('o');
 	ssize_t size = write(client, url, strlen(url));
bc7a1c1a5&follow=1'>Update Care with time-to-ID and piercingsJune McEnroe 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe There is not that much distinct stuff here anymore. 2022-07-03Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe