1
0

iron out bugs

This commit is contained in:
dtb 2023-12-19 01:07:41 -07:00
parent ddcca1fc66
commit 145071d309
2 changed files with 7 additions and 3 deletions

View File

@ -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
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
None.

View File

@ -31,12 +31,12 @@ usage: fprintf(stderr,
}
while((c = getc(stdin)) != EOF){
if(c > 127){
if((c & 0x80) != 0){
fputs("M-", stdout);
c -= 128;
c ^= 0x80; /* 0b 1000 0000 */
}
switch(c){
case 127: fputs("^?", stdout);
case 0x7f: fputs("^?", stdout);
break;
case '\n': if(showend)
putc('$', stdout);