light golf
This commit is contained in:
parent
e0ccb05777
commit
b4dfd1c546
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user