summary refs log tree commit diff
path: root/www/text.causal.agency/colb.c
blob: 5faabc3abda7284a9ef9038b23a942489c0e418c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <locale.h>
#include <stdio.h>
#include <wchar.h>
int main(void) {
	setlocale(LC_CTYPE, "en_US.UTF-8");
	wint_t next, prev = WEOF;
	while (WEOF != (next = getwchar())) {
		if (next == L'\b') {
			prev = WEOF;
		} else {
			if (prev != WEOF) putwchar(prev);
			prev = next;
		}
	}
	if (prev != WEOF) putwchar(prev);
}
his is only my third book of the year :( I need some more novellas to read, but the other books I have from the library currently are also thick. 2022-03-22Source ~/.profile.local if it existsJune McEnroe 2022-03-18Publish "Addendum 2021"June McEnroe 2022-03-16Remove wcwidth portJune McEnroe DYLD_FORCE_FLAT_NAMESPACE no longer exists in macOS 12 so this approach doesn't work anymore. Moved to <https://git.causal.agency/jorts/tree/wcwidth> and compiled into <https://git.causal.agency/jorts/tree/ncurses>. 2022-03-16Remove -j4 from ./PlanJune McEnroe Plan learned to set this automatically! 2022-03-15Rewrite Linux install.sh for DebianJune McEnroe 2022-03-15Remove dashJune McEnroe