/* Copyright (C) 2014 jaseg * * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE * Version 2, December 2004 * * Everyone is permitted to copy and distribute verbatim or modified * copies of this license document, and changing it is allowed as long * as the name is changed. * * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION * * 0. You just DO WHAT THE FUCK YOU WANT TO. */ #define _GNU_SOURCE //for fmemopen #include #include #include #include #include #include #include #include #include #include #include int main(int argc, char **argv){ char **inputs = argv+1; char **inputs_end = argv+argc; if(inputs == inputs_end){ char *foo[] = {"-"}; inputs = foo; inputs_end = inputs+1; } setlocale(LC_ALL, ""); for(char **filename=inputs; filename 0){ if(strchr("acegmnopqrsuvwxyz", c)) printf("▄"); else if(strchr(".,:; \t\r\n", c)) printf("%lc", c); else printf("█"); } fclose(f); if(c != WEOF && c != 0){ fprintf(stderr, "Error reading input file \"%s\": %s\n", *filename, strerror(errno)); return 2; } } }