mkhaw@teknowledge-vaxc.ARPA (Mike Khaw) (10/05/88)
The algorithm used by the vn newsreader to (un)rot13 doesn't work correctly for every character. Specifically, I find that "k" and "m" get mapped to non-printing characters. I replaced vn's algorithm with the one used by rn. The fix is really too short for a patch. Just replace the rot_line() function in reader.c with the following version: <--- cut here ---> static rot_line (s) unsigned char *s; { /* short circuit if no rot */ if (Rot == 0) return; for ( ; *s != '\0'; ++s) { /* adapted from rn's rot algorithm */ *s += isalpha(*s) ? ((*s & 31) <= 13) ? Rot : -Rot : 0; } } <--- cut here ---> Mike Khaw -- internet: mkhaw@teknowledge.arpa uucp: {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge.arpa hardcopy: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303