From owner-aurora-editor@sfu.ca Sat Apr 19 21:39:30 1997 From: Glenn Singgalang Tarigan Message-Id: <199704200117.SAA07480@fraser> Subject: =AML= ROT13 revised encoder To: aurora-editor@sfu.ca (Aurora Mailing List), tarigan@sfu.ca (Glenn Tarigan) Date: Sat, 19 Apr 1997 18:17:01 -0700 (PDT) X-Mailer: ELM [version 2.4 PL24] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit A while ago, I posted a ROT13 encoder. Unfortunately, it converted all uppercase letters to lowercase, and it was inefficiently coded. So here's my new version. {-----BEGIN------------------------------------------------------} //-------------------------------------------------------------------- // ROT13.AML : ROT13 Encoder/Decoder for Aurora v3.0c // Written by : Glenn Tarigan 97.04.19 // // This macro will substitute the letters of the text in a marked block. // Use it once to encode text; use it again to reverse the operation. // The following shows the correspondence between letters: // abcdefghijklmnopqrstuvwxyz // nopqrstuvwxyzabcdefghijklm // Example: in ROT13, the letter "a" is changed to "n", "b" to "o", etc. // // Usage: // Run it from the macro picklist . //-------------------------------------------------------------------- include bootpath "define.aml" // test for edit windows if not wintype? "edit" then msgbox "Edit windows only!" return end stopmark // close a partially marked block pushcursor gotomark col (getmarkleft) source = 'abcdefghijklmnopqrstuvwxyzabcdefghijklm' + 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM' while find '[a-zA-Z]' 'xb*' do ovltext source [(poschar (getchar) source) + 13] right end popcursor {-------END-----------------------------------------------} Glenn -- HP200LX EO P=X MI -- 1997.04.19 1805.50 PST PGP 0xB7764059 777bits 1D 3C 6B F9 B2 47 2A 12 48 D7 18 56 17 7F 80 8C