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)
|
while((c = getopt(argc, argv, "et")) != -1)
|
||||||
switch(c){
|
switch(c){
|
||||||
case 'e': showend = 1; break;
|
case 'e': showend = 1; break;
|
||||||
case 't': showend = 1; break;
|
case 't': showtab = 1; break;
|
||||||
default: goto usage;
|
default: goto usage;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,11 +27,9 @@ usage: fprintf(stderr, "Usage: %s (-eht)\n", argv[0]);
|
|||||||
}
|
}
|
||||||
|
|
||||||
while((c = getc(stdin)) != EOF){
|
while((c = getc(stdin)) != EOF){
|
||||||
if((c & 0x80) != 0){
|
if((c & 0x80) != 0)
|
||||||
fputs("M-", stdout);
|
fputs("M-", stdout);
|
||||||
c ^= 0x80; /* 0b 1000 0000 */
|
switch(c ^ 0x80 /* 0b 1000 0000 */){
|
||||||
}
|
|
||||||
switch(c){
|
|
||||||
case 0x7f: fputs("^?", stdout);
|
case 0x7f: fputs("^?", stdout);
|
||||||
break;
|
break;
|
||||||
case '\n': if(showend)
|
case '\n': if(showend)
|
||||||
|
Loading…
Reference in New Issue
Block a user