Mercurial > repo
changeset 8743:080039703b36
<pikhq> ` cat >src/pikhqbow.c <<<$\'#include <stdio.h>\\n#include <wchar.h>\\n#include <locale.h>\\n\'\'int main(){wint_t c;int a=0;setlocale(LC_ALL,"C.UTF-8");b:c=fgetwc(stdin);if(c==EOF) return 0;printf("\\x03%d%lc%s",(int[]){4,8,9,11,12,13}[a],c,c==L\'\\\'\',\'\\\'\'?"\\x0f":"",c);if(a++==6)a=0;goto b;}\'
author | HackBot |
---|---|
date | Tue, 05 Jul 2016 05:02:12 +0000 |
parents | 4a8b909c8c76 |
children | 3000f072eaa6 |
files | src/pikhqbow.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pikhqbow.c Tue Jul 05 04:39:57 2016 +0000 +++ b/src/pikhqbow.c Tue Jul 05 05:02:12 2016 +0000 @@ -1,3 +1,4 @@ #include <stdio.h> #include <wchar.h> -int main(){wint_t c;int a=2;b:c=fgetwc(stdin);if(c==EOF) return 0;printf("\x03%02d%s%lc",a,c==L','?",99":"",c);a++;if(a==14)a=2;goto b;} +#include <locale.h> +int main(){wint_t c;int a=0;setlocale(LC_ALL,"C.UTF-8");b:c=fgetwc(stdin);if(c==EOF) return 0;printf("\x03%d%lc%s",(int[]){4,8,9,11,12,13}[a],c,c==L','?"\x0f":"",c);if(a++==6)a=0;goto b;}