iron out bugs
This commit is contained in:
parent
ddcca1fc66
commit
145071d309
@ -32,6 +32,10 @@ option prints tab characters as "^I" rather than a literal horizontal tab.
|
|||||||
Npc prints a debug message and exits with the appropriate sysexits(3) error
|
Npc prints a debug message and exits with the appropriate sysexits(3) error
|
||||||
code in the event of an error, otherwise it exits successfully.
|
code in the event of an error, otherwise it exits successfully.
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
|
||||||
|
Npc operates in single-byte chunks regardless of intended encoding.
|
||||||
|
|
||||||
.SH STANDARDS
|
.SH STANDARDS
|
||||||
|
|
||||||
None.
|
None.
|
||||||
|
@ -31,12 +31,12 @@ usage: fprintf(stderr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
while((c = getc(stdin)) != EOF){
|
while((c = getc(stdin)) != EOF){
|
||||||
if(c > 127){
|
if((c & 0x80) != 0){
|
||||||
fputs("M-", stdout);
|
fputs("M-", stdout);
|
||||||
c -= 128;
|
c ^= 0x80; /* 0b 1000 0000 */
|
||||||
}
|
}
|
||||||
switch(c){
|
switch(c){
|
||||||
case 127: fputs("^?", stdout);
|
case 0x7f: fputs("^?", stdout);
|
||||||
break;
|
break;
|
||||||
case '\n': if(showend)
|
case '\n': if(showend)
|
||||||
putc('$', stdout);
|
putc('$', stdout);
|
||||||
|
Loading…
Reference in New Issue
Block a user