/* Public domain 2017 Sam Trenholme */
/* This program exists because "Col" is broken; "col" fails to remove
 * ESC sequences generated by "nroff" correctly.  Since I want to make
 * nroff man pages ASCII text *without* ESC sequences (e.g. Bold), this
 * program exists */
#include <stdio.h>

int main() {
        int a = 0, b = 0;
        while(!feof(stdin)) {
                a = getc(stdin);
                if(a == 0x1b) { b = 5; }
                b--;
                if(b < 1 && a > 0) { printf("%c",a); b = 0; }
        }
}
