Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/3/85; site ukma.UUCP Path: utzoo!watmath!clyde!cbosgd!ukma!sean From: sean@ukma.UUCP (Sean Casey) Newsgroups: net.unix,net.jokes Subject: Re: Saving rotated jokes unrotated Message-ID: <1810@ukma.UUCP> Date: Fri, 24-May-85 20:07:36 EDT Article-I.D.: ukma.1810 Posted: Fri May 24 20:07:36 1985 Date-Received: Sat, 25-May-85 09:38:24 EDT References: <184@weitek.UUCP> Reply-To: sean@ukma.UUCP (Sean Casey) Organization: The White Tower @ The Univ. of KY Lines: 52 Keywords: It can be done, but gawd is it ugly... Xref: watmath net.unix:4623 net.jokes:12393 In article <184@weitek.UUCP> neal@weitek.UUCP (Neal Bedard) writes: > > The one way I have found thus far to get at joke rotation is to >invoke `postnews' (on our 4.2 Bsd site) and go thru the motions of posting >text to net.jokes. YECCHH!!!... >...Voila! rotated joke saved in readable form. >Maybe someone knows a better way. I'm listening... I whipped this filter together in about 10 minutes. It simply does ROT13 rotation. It could probably be done better. Compile with: cc -O -o unrot unrot.c ------------------------- CUT HERE ------------------------------------- /* * unrot.c * * Simple filter to unrotate text which has been encrypted * with rot13 (caesar) encryption. * * Sean Casey, 1985 * */ #include main() { register int c; while ((c = getchar()) != EOF) { if ( c >= 'A' && c <= 'Z') { c += 13; if ( c > 'Z' ) c -= 26; } else { if ( c >= 'a' && c <= 'z') { c += 13; if ( c > 'z' ) c -= 26; } } putchar(c); } } ------------------------------ CUT HERE ------------------------------------ -- - Sean Casey UUCP: {cbosgd,anlams,hasmed}!ukma!sean - Department of Mathematics ARPA: ukma!sean@ANL-MCS.ARPA - University of Kentucky