1
0

light golf

This commit is contained in:
dtb 2023-12-19 01:17:39 -07:00
parent e0ccb05777
commit b4dfd1c546

View File

@ -17,7 +17,7 @@ int main(int argc, char *argv[]){
while((c = getopt(argc, argv, "et")) != -1)
switch(c){
case 'e': showend = 1; break;
case 't': showend = 1; break;
case 't': showtab = 1; break;
default: goto usage;
}
@ -27,11 +27,9 @@ usage: fprintf(stderr, "Usage: %s (-eht)\n", argv[0]);
}
while((c = getc(stdin)) != EOF){
if((c & 0x80) != 0){
if((c & 0x80) != 0)
fputs("M-", stdout);
c ^= 0x80; /* 0b 1000 0000 */
}
switch(c){
switch(c ^ 0x80 /* 0b 1000 0000 */){
case 0x7f: fputs("^?", stdout);
break;
case '\n': if(showend)