home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 2733
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
100%
| dexvert
| Internet Message Format (text/imf)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news or mail, ASCII text
| default
| |
100%
| TrID
| E-Mail message (Var. 2)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 46 72 6f 6d 3a 20 67 6f | 65 72 40 65 6c 6c 69 73 |From: go|er@ellis|
|00000010| 2e 75 63 68 69 63 61 67 | 6f 2e 65 64 75 20 28 52 |.uchicag|o.edu (R|
|00000020| 69 63 68 61 72 64 20 4c | 2e 20 47 6f 65 72 77 69 |ichard L|. Goerwi|
|00000030| 74 7a 29 0a 4e 65 77 73 | 67 72 6f 75 70 73 3a 20 |tz).News|groups: |
|00000040| 61 6c 74 2e 73 6f 75 72 | 63 65 73 0a 53 75 62 6a |alt.sour|ces.Subj|
|00000050| 65 63 74 3a 20 75 75 65 | 6e 63 6f 64 65 2f 64 65 |ect: uue|ncode/de|
|00000060| 63 6f 64 65 20 66 6f 72 | 20 74 68 65 20 6d 69 6c |code for| the mil|
|00000070| 6c 69 6f 6e 2d 61 6e 64 | 2d 66 69 72 73 74 20 74 |lion-and|-first t|
|00000080| 69 6d 65 2e 2e 2e 0a 4d | 65 73 73 61 67 65 2d 49 |ime....M|essage-I|
|00000090| 44 3a 20 3c 31 39 39 31 | 46 65 62 39 2e 31 36 35 |D: <1991|Feb9.165|
|000000a0| 36 33 36 2e 31 36 36 34 | 32 40 6d 69 64 77 61 79 |636.1664|2@midway|
|000000b0| 2e 75 63 68 69 63 61 67 | 6f 2e 65 64 75 3e 0a 44 |.uchicag|o.edu>.D|
|000000c0| 61 74 65 3a 20 39 20 46 | 65 62 20 39 31 20 31 36 |ate: 9 F|eb 91 16|
|000000d0| 3a 35 36 3a 33 36 20 47 | 4d 54 0a 0a 22 54 68 69 |:56:36 G|MT.."Thi|
|000000e0| 73 22 20 3d 20 75 75 65 | 6e 2f 64 65 63 6f 64 65 |s" = uue|n/decode|
|000000f0| 3a 0a 3e 0a 3e 54 68 69 | 73 20 73 65 65 6d 73 20 |:.>.>Thi|s seems |
|00000100| 74 6f 20 62 65 20 77 61 | 6e 74 65 64 20 66 72 65 |to be wa|nted fre|
|00000110| 71 75 65 6e 74 6c 79 2e | 2e 2e 2e 73 6f 20 68 65 |quently.|...so he|
|00000120| 72 65 27 73 20 73 61 76 | 69 6e 67 20 73 6f 6d 65 |re's sav|ing some|
|00000130| 62 6f 64 79 20 61 20 74 | 72 69 70 0a 3e 74 6f 20 |body a t|rip.>to |
|00000140| 66 69 6e 64 20 74 68 65 | 20 61 72 63 68 69 76 65 |find the| archive|
|00000150| 73 2e 20 54 68 69 73 20 | 69 73 20 61 73 20 73 65 |s. This |is as se|
|00000160| 6e 74 20 74 6f 20 6d 65 | 2e 0a 3e 0a 0a 4f 66 74 |nt to me|..>..Oft|
|00000170| 65 6e 20 61 74 20 45 42 | 43 44 49 43 20 73 69 74 |en at EB|CDIC sit|
|00000180| 65 73 2c 20 75 75 65 6e | 63 6f 64 65 64 20 66 69 |es, uuen|coded fi|
|00000190| 6c 65 73 20 67 65 74 20 | 6d 61 6e 67 6c 65 64 2e |les get |mangled.|
|000001a0| 20 20 54 68 65 72 65 20 | 61 72 65 20 6c 6f 74 73 | There |are lots|
|000001b0| 0a 6f 66 20 77 61 79 73 | 20 61 72 6f 75 6e 64 20 |.of ways| around |
|000001c0| 74 68 69 73 2c 20 62 75 | 74 20 74 68 65 20 6d 6f |this, bu|t the mo|
|000001d0| 73 74 20 70 6f 70 75 6c | 61 72 20 73 65 65 6d 73 |st popul|ar seems|
|000001e0| 20 74 6f 20 62 65 20 78 | 78 65 6e 2f 64 65 63 6f | to be x|xen/deco|
|000001f0| 64 65 2e 0a 48 65 72 65 | 27 73 20 61 20 6c 69 74 |de..Here|'s a lit|
|00000200| 74 6c 65 20 49 63 6f 6e | 20 70 72 6f 67 72 61 6d |tle Icon| program|
|00000210| 20 74 68 61 74 20 77 69 | 6c 6c 20 68 61 6e 64 6c | that wi|ll handl|
|00000220| 65 20 62 6f 74 68 20 78 | 78 65 6e 2f 64 65 63 6f |e both x|xen/deco|
|00000230| 64 65 64 0a 66 69 6c 65 | 73 2c 20 61 6e 64 20 75 |ded.file|s, and u|
|00000240| 75 65 6e 2f 64 65 63 6f | 64 65 64 20 66 69 6c 65 |uen/deco|ded file|
|00000250| 73 20 61 73 20 77 65 6c | 6c 2e 20 20 49 74 20 77 |s as wel|l. It w|
|00000260| 6f 72 6b 73 20 75 6e 64 | 65 72 20 4d 53 2d 44 4f |orks und|er MS-DO|
|00000270| 53 2c 20 69 6e 2d 0a 63 | 69 64 65 6e 74 61 6c 6c |S, in-.c|identall|
|00000280| 79 2c 20 61 73 20 77 65 | 6c 6c 20 61 73 20 55 6e |y, as we|ll as Un|
|00000290| 69 78 2e 0a 0a 2d 52 69 | 63 68 61 72 64 20 28 67 |ix...-Ri|chard (g|
|000002a0| 6f 65 72 40 73 6f 70 68 | 69 73 74 2e 75 63 68 69 |oer@soph|ist.uchi|
|000002b0| 63 61 67 6f 2e 65 64 75 | 29 0a 0a 2d 2d 2d 2d 20 |cago.edu|)..---- |
|000002c0| 43 75 74 20 48 65 72 65 | 20 61 6e 64 20 66 65 65 |Cut Here| and fee|
|000002d0| 64 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |d the fo|llowing |
|000002e0| 74 6f 20 73 68 20 2d 2d | 2d 2d 0a 23 21 2f 62 69 |to sh --|--.#!/bi|
|000002f0| 6e 2f 73 68 0a 23 20 54 | 68 69 73 20 69 73 20 61 |n/sh.# T|his is a|
|00000300| 20 73 68 65 6c 6c 20 61 | 72 63 68 69 76 65 20 28 | shell a|rchive (|
|00000310| 70 72 6f 64 75 63 65 64 | 20 62 79 20 73 68 61 72 |produced| by shar|
|00000320| 20 33 2e 34 39 29 0a 23 | 20 54 6f 20 65 78 74 72 | 3.49).#| To extr|
|00000330| 61 63 74 20 74 68 65 20 | 66 69 6c 65 73 20 66 72 |act the |files fr|
|00000340| 6f 6d 20 74 68 69 73 20 | 61 72 63 68 69 76 65 2c |om this |archive,|
|00000350| 20 73 61 76 65 20 69 74 | 20 74 6f 20 61 20 66 69 | save it| to a fi|
|00000360| 6c 65 2c 20 72 65 6d 6f | 76 65 0a 23 20 65 76 65 |le, remo|ve.# eve|
|00000370| 72 79 74 68 69 6e 67 20 | 61 62 6f 76 65 20 74 68 |rything |above th|
|00000380| 65 20 22 21 2f 62 69 6e | 2f 73 68 22 20 6c 69 6e |e "!/bin|/sh" lin|
|00000390| 65 20 61 62 6f 76 65 2c | 20 61 6e 64 20 74 79 70 |e above,| and typ|
|000003a0| 65 20 22 73 68 20 66 69 | 6c 65 5f 6e 61 6d 65 22 |e "sh fi|le_name"|
|000003b0| 2e 0a 23 0a 23 20 6d 61 | 64 65 20 30 31 2f 32 37 |..#.# ma|de 01/27|
|000003c0| 2f 31 39 39 31 20 32 33 | 3a 35 32 20 55 54 43 20 |/1991 23|:52 UTC |
|000003d0| 62 79 20 67 6f 65 72 40 | 73 6f 70 68 69 73 74 2e |by goer@|sophist.|
|000003e0| 75 63 68 69 63 61 67 6f | 2e 65 64 75 0a 23 20 53 |uchicago|.edu.# S|
|000003f0| 6f 75 72 63 65 20 64 69 | 72 65 63 74 6f 72 79 20 |ource di|rectory |
|00000400| 2f 75 2f 72 69 63 68 61 | 72 64 2f 49 69 65 6e 63 |/u/richa|rd/Iienc|
|00000410| 6f 64 65 0a 23 0a 23 20 | 65 78 69 73 74 69 6e 67 |ode.#.# |existing|
|00000420| 20 66 69 6c 65 73 20 77 | 69 6c 6c 20 4e 4f 54 20 | files w|ill NOT |
|00000430| 62 65 20 6f 76 65 72 77 | 72 69 74 74 65 6e 20 75 |be overw|ritten u|
|00000440| 6e 6c 65 73 73 20 2d 63 | 20 69 73 20 73 70 65 63 |nless -c| is spec|
|00000450| 69 66 69 65 64 0a 23 20 | 54 68 69 73 20 66 6f 72 |ified.# |This for|
|00000460| 6d 61 74 20 72 65 71 75 | 69 72 65 73 20 76 65 72 |mat requ|ires ver|
|00000470| 79 20 6c 69 74 74 6c 65 | 20 69 6e 74 65 6c 6c 69 |y little| intelli|
|00000480| 67 65 6e 63 65 20 61 74 | 20 75 6e 73 68 61 72 20 |gence at| unshar |
|00000490| 74 69 6d 65 2e 0a 23 20 | 22 69 66 20 74 65 73 74 |time..# |"if test|
|000004a0| 22 2c 20 22 63 61 74 22 | 2c 20 22 72 6d 22 2c 20 |", "cat"|, "rm", |
|000004b0| 22 65 63 68 6f 22 2c 20 | 22 74 72 75 65 22 2c 20 |"echo", |"true", |
|000004c0| 61 6e 64 20 22 73 65 64 | 22 20 6d 61 79 20 62 65 |and "sed|" may be|
|000004d0| 20 6e 65 65 64 65 64 2e | 0a 23 0a 23 20 20 20 20 | needed.|.#.# |
|000004e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000510| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000520| 20 20 20 20 20 20 0a 23 | 20 20 20 20 20 20 20 20 | .#| |
|00000530| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000560| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000570| 20 20 0a 23 0a 23 20 54 | 68 69 73 20 73 68 61 72 | .#.# T|his shar|
|00000580| 20 63 6f 6e 74 61 69 6e | 73 3a 0a 23 20 6c 65 6e | contain|s:.# len|
|00000590| 67 74 68 20 20 6d 6f 64 | 65 20 20 20 20 20 20 20 |gth mod|e |
|000005a0| 6e 61 6d 65 0a 23 20 2d | 2d 2d 2d 2d 2d 20 2d 2d |name.# -|----- --|
|000005b0| 2d 2d 2d 2d 2d 2d 2d 2d | 20 2d 2d 2d 2d 2d 2d 2d |--------| -------|
|000005c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000005e0| 2d 2d 2d 0a 23 20 20 20 | 36 35 31 35 20 2d 72 2d |---.# |6515 -r-|
|000005f0| 2d 72 2d 2d 72 2d 2d 20 | 69 69 65 6e 63 6f 64 65 |-r--r-- |iiencode|
|00000600| 2e 69 63 6e 0a 23 20 20 | 20 36 31 30 33 20 2d 72 |.icn.# | 6103 -r|
|00000610| 2d 2d 72 2d 2d 72 2d 2d | 20 69 69 64 65 63 6f 64 |--r--r--| iidecod|
|00000620| 65 2e 69 63 6e 0a 23 20 | 20 20 31 35 37 33 20 2d |e.icn.# | 1573 -|
|00000630| 72 77 2d 72 2d 2d 72 2d | 2d 20 52 45 41 44 4d 45 |rw-r--r-|- README|
|00000640| 0a 23 0a 69 66 20 74 65 | 73 74 20 2d 72 20 5f 73 |.#.if te|st -r _s|
|00000650| 68 61 72 5f 73 65 71 5f | 2e 74 6d 70 3b 20 74 68 |har_seq_|.tmp; th|
|00000660| 65 6e 0a 09 65 63 68 6f | 20 27 4d 75 73 74 20 75 |en..echo| 'Must u|
|00000670| 6e 70 61 63 6b 20 61 72 | 63 68 69 76 65 73 20 69 |npack ar|chives i|
|00000680| 6e 20 73 65 71 75 65 6e | 63 65 21 27 0a 09 65 63 |n sequen|ce!'..ec|
|00000690| 68 6f 20 50 6c 65 61 73 | 65 20 75 6e 70 61 63 6b |ho Pleas|e unpack|
|000006a0| 20 70 61 72 74 20 60 63 | 61 74 20 5f 73 68 61 72 | part `c|at _shar|
|000006b0| 5f 73 65 71 5f 2e 74 6d | 70 60 20 6e 65 78 74 0a |_seq_.tm|p` next.|
|000006c0| 09 65 78 69 74 20 31 0a | 66 69 0a 23 20 3d 3d 3d |.exit 1.|fi.# ===|
|000006d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 20 69 69 65 6e 63 |========|== iienc|
|000006e0| 6f 64 65 2e 69 63 6e 20 | 3d 3d 3d 3d 3d 3d 3d 3d |ode.icn |========|
|000006f0| 3d 3d 3d 3d 3d 3d 0a 69 | 66 20 74 65 73 74 20 2d |======.i|f test -|
|00000700| 66 20 27 69 69 65 6e 63 | 6f 64 65 2e 69 63 6e 27 |f 'iienc|ode.icn'|
|00000710| 20 2d 61 20 58 22 24 31 | 22 20 21 3d 20 58 22 2d | -a X"$1|" != X"-|
|00000720| 63 22 3b 20 74 68 65 6e | 0a 09 65 63 68 6f 20 27 |c"; then|..echo '|
|00000730| 78 20 2d 20 73 6b 69 70 | 70 69 6e 67 20 69 69 65 |x - skip|ping iie|
|00000740| 6e 63 6f 64 65 2e 69 63 | 6e 20 28 46 69 6c 65 20 |ncode.ic|n (File |
|00000750| 61 6c 72 65 61 64 79 20 | 65 78 69 73 74 73 29 27 |already |exists)'|
|00000760| 0a 09 72 6d 20 2d 66 20 | 5f 73 68 61 72 5f 77 6e |..rm -f |_shar_wn|
|00000770| 74 5f 2e 74 6d 70 0a 65 | 6c 73 65 0a 3e 20 5f 73 |t_.tmp.e|lse.> _s|
|00000780| 68 61 72 5f 77 6e 74 5f | 2e 74 6d 70 0a 65 63 68 |har_wnt_|.tmp.ech|
|00000790| 6f 20 27 78 20 2d 20 65 | 78 74 72 61 63 74 69 6e |o 'x - e|xtractin|
|000007a0| 67 20 69 69 65 6e 63 6f | 64 65 2e 69 63 6e 20 28 |g iienco|de.icn (|
|000007b0| 54 65 78 74 29 27 0a 73 | 65 64 20 27 73 2f 5e 58 |Text)'.s|ed 's/^X|
|000007c0| 2f 2f 27 20 3c 3c 20 27 | 53 48 41 52 5f 45 4f 46 |//' << '|SHAR_EOF|
|000007d0| 27 20 3e 20 27 69 69 65 | 6e 63 6f 64 65 2e 69 63 |' > 'iie|ncode.ic|
|000007e0| 6e 27 20 26 26 0a 58 23 | 23 23 23 23 23 23 23 23 |n' &&.X#|########|
|000007f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000800| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000810| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000820| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000830| 23 23 23 0a 58 23 0a 58 | 23 09 4e 61 6d 65 3a 09 |###.X#.X|#.Name:.|
|00000840| 20 69 69 65 6e 63 6f 64 | 65 2e 69 63 6e 0a 58 23 | iiencod|e.icn.X#|
|00000850| 0a 58 23 09 54 69 74 6c | 65 3a 09 20 69 69 65 6e |.X#.Titl|e:. iien|
|00000860| 63 6f 64 65 20 28 70 6f | 72 74 20 6f 66 20 74 68 |code (po|rt of th|
|00000870| 65 20 55 6e 69 78 2f 43 | 20 75 75 65 6e 63 6f 64 |e Unix/C| uuencod|
|00000880| 65 20 70 72 6f 67 72 61 | 6d 20 74 6f 20 49 63 6f |e progra|m to Ico|
|00000890| 6e 29 0a 58 23 0a 58 23 | 09 41 75 74 68 6f 72 3a |n).X#.X#|.Author:|
|000008a0| 09 20 52 69 63 68 61 72 | 64 20 4c 2e 20 47 6f 65 |. Richar|d L. Goe|
|000008b0| 72 77 69 74 7a 0a 58 23 | 0a 58 23 09 56 65 72 73 |rwitz.X#|.X#.Vers|
|000008c0| 69 6f 6e 3a 20 31 2e 37 | 0a 58 23 0a 58 23 23 23 |ion: 1.7|.X#.X###|
|000008d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000008e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000008f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000900| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00000910| 23 23 23 23 23 23 23 23 | 23 0a 58 23 0a 58 23 20 |########|#.X#.X# |
|00000920| 20 54 68 69 73 20 69 73 | 20 61 6e 20 49 63 6f 6e | This is| an Icon|
|00000930| 20 70 6f 72 74 20 6f 66 | 20 74 68 65 20 55 6e 69 | port of| the Uni|
|00000940| 78 2f 43 20 75 75 65 6e | 63 6f 64 65 20 75 74 69 |x/C uuen|code uti|
|00000950| 6c 69 74 79 2e 20 20 53 | 69 6e 63 65 0a 58 23 20 |lity. S|ince.X# |
|00000960| 20 75 75 65 6e 63 6f 64 | 65 20 69 73 20 70 75 62 | uuencod|e is pub|
|00000970| 6c 69 63 6c 79 20 64 69 | 73 74 72 69 62 75 74 61 |licly di|stributa|
|00000980| 62 6c 65 20 42 53 44 20 | 63 6f 64 65 2c 20 49 20 |ble BSD |code, I |
|00000990| 73 69 6d 70 6c 79 20 67 | 72 61 62 62 65 64 20 61 |simply g|rabbed a|
|000009a0| 0a 58 23 20 20 63 6f 70 | 79 2c 20 61 6e 64 20 72 |.X# cop|y, and r|
|000009b0| 65 77 72 6f 74 65 20 69 | 74 20 69 6e 20 49 63 6f |ewrote i|t in Ico|
|000009c0| 6e 2e 20 20 54 68 65 20 | 6f 6e 6c 79 20 62 61 73 |n. The |only bas|
|000009d0| 69 63 20 66 75 6e 63 74 | 69 6f 6e 61 6c 20 63 68 |ic funct|ional ch|
|000009e0| 61 6e 67 65 73 20 49 0a | 58 23 20 20 6d 61 64 65 |anges I.|X# made|
|000009f0| 20 74 6f 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 | to the |program |
|00000a00| 77 65 72 65 3a 20 20 31 | 29 20 54 6f 20 73 69 6d |were: 1|) To sim|
|00000a10| 70 6c 69 66 79 20 74 68 | 65 20 6e 6f 74 69 6f 6e |plify th|e notion|
|00000a20| 20 6f 66 20 66 69 6c 65 | 20 6d 6f 64 65 0a 58 23 | of file| mode.X#|
|00000a30| 20 20 28 65 76 65 72 79 | 74 68 69 6e 67 20 69 73 | (every|thing is|
|00000a40| 20 65 6e 63 6f 64 65 64 | 20 77 69 74 68 20 30 36 | encoded| with 06|
|00000a50| 34 34 20 70 65 72 6d 69 | 73 73 69 6f 6e 73 29 2c |44 permi|ssions),|
|00000a60| 20 61 6e 64 20 32 29 20 | 74 6f 20 61 64 64 20 73 | and 2) |to add s|
|00000a70| 75 70 2d 0a 58 23 20 20 | 70 6f 72 74 20 66 6f 72 |up-.X# |port for|
|00000a80| 20 78 78 65 6e 63 6f 64 | 65 20 66 6f 72 6d 61 74 | xxencod|e format|
|00000a90| 20 28 77 68 69 63 68 20 | 77 69 6c 6c 20 67 65 6e | (which |will gen|
|00000aa0| 65 72 61 6c 6c 79 20 70 | 61 73 73 20 75 6e 73 63 |erally p|ass unsc|
|00000ab0| 61 74 68 65 64 20 65 76 | 65 6e 0a 58 23 20 20 74 |athed ev|en.X# t|
|00000ac0| 68 72 6f 75 67 68 20 45 | 42 43 44 49 43 20 73 69 |hrough E|BCDIC si|
|00000ad0| 74 65 73 29 2e 0a 58 23 | 0a 58 23 20 20 49 69 65 |tes)..X#|.X# Iie|
|00000ae0| 6e 63 6f 64 65 27 73 20 | 75 73 61 67 65 20 69 73 |ncode's |usage is|
|00000af0| 20 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 | compati|ble with|
|00000b00| 20 74 68 61 74 20 6f 66 | 20 74 68 65 20 55 6e 69 | that of| the Uni|
|00000b10| 78 20 75 75 65 6e 63 6f | 64 65 0a 58 23 20 20 63 |x uuenco|de.X# c|
|00000b20| 6f 6d 6d 61 6e 64 2c 20 | 69 2e 65 2e 20 61 20 66 |ommand, |i.e. a f|
|00000b30| 69 72 73 74 20 28 6f 70 | 74 69 6f 6e 61 6c 29 20 |irst (op|tional) |
|00000b40| 61 72 67 75 6d 65 6e 74 | 20 67 69 76 65 73 20 74 |argument| gives t|
|00000b50| 68 65 20 6e 61 6d 65 20 | 74 68 65 20 66 69 6c 65 |he name |the file|
|00000b60| 0a 58 23 20 20 74 6f 20 | 62 65 20 65 6e 63 6f 64 |.X# to |be encod|
|00000b70| 65 64 2e 20 20 49 66 20 | 74 68 69 73 20 69 73 20 |ed. If |this is |
|00000b80| 6f 6d 69 74 74 65 64 2c | 20 69 69 65 6e 63 6f 64 |omitted,| iiencod|
|00000b90| 65 20 6a 75 73 74 20 75 | 73 65 73 20 74 68 65 20 |e just u|ses the |
|00000ba0| 73 74 61 6e 64 61 72 64 | 0a 58 23 20 20 69 6e 70 |standard|.X# inp|
|00000bb0| 75 74 2e 20 20 54 68 65 | 20 73 65 63 6f 6e 64 20 |ut. The| second |
|00000bc0| 61 72 67 75 6d 65 6e 74 | 20 73 70 65 63 69 66 69 |argument| specifi|
|00000bd0| 65 73 20 74 68 65 20 6e | 61 6d 65 20 74 68 65 20 |es the n|ame the |
|00000be0| 65 6e 63 6f 64 65 64 20 | 66 69 6c 65 0a 58 23 20 |encoded |file.X# |
|00000bf0| 20 73 68 6f 75 6c 64 20 | 62 65 20 67 69 76 65 6e | should |be given|
|00000c00| 20 77 68 65 6e 20 69 74 | 20 69 73 20 75 6c 74 69 | when it| is ulti|
|00000c10| 6d 61 74 65 6c 79 20 64 | 65 63 6f 64 65 64 2e 0a |mately d|ecoded..|
|00000c20| 58 23 0a 58 23 20 20 45 | 78 74 65 6e 73 69 6f 6e |X#.X# E|xtension|
|00000c30| 73 20 74 6f 20 74 68 65 | 20 62 61 73 65 20 75 75 |s to the| base uu|
|00000c40| 65 6e 63 6f 64 65 20 63 | 6f 6d 6d 61 6e 64 20 6f |encode c|ommand o|
|00000c50| 70 74 69 6f 6e 73 20 69 | 6e 63 6c 75 64 65 20 2d |ptions i|nclude -|
|00000c60| 78 20 61 6e 64 20 2d 6f | 2e 0a 58 23 20 20 41 6e |x and -o|..X# An|
|00000c70| 20 2d 78 20 74 65 6c 6c | 73 20 69 69 65 6e 63 6f | -x tell|s iienco|
|00000c80| 64 65 20 74 6f 20 75 73 | 65 20 78 78 65 6e 63 6f |de to us|e xxenco|
|00000c90| 64 65 20 28 72 61 74 68 | 65 72 20 74 68 61 6e 20 |de (rath|er than |
|00000ca0| 75 75 65 6e 63 6f 64 65 | 29 20 66 6f 72 6d 61 74 |uuencode|) format|
|00000cb0| 2e 0a 58 23 20 20 4f 70 | 74 69 6f 6e 20 2d 6f 20 |..X# Op|tion -o |
|00000cc0| 63 61 75 73 65 73 20 74 | 68 65 20 66 6f 6c 6c 6f |causes t|he follo|
|00000cd0| 77 69 6e 67 20 61 72 67 | 75 6d 65 6e 74 20 74 6f |wing arg|ument to|
|00000ce0| 20 62 65 20 75 73 65 64 | 20 61 73 20 74 68 65 20 | be used| as the |
|00000cf0| 66 69 6c 65 0a 58 23 20 | 20 69 69 65 6e 63 6f 64 |file.X# | iiencod|
|00000d00| 65 20 69 73 20 74 6f 20 | 77 72 69 74 65 20 69 74 |e is to |write it|
|00000d10| 73 20 6f 75 74 70 75 74 | 20 74 6f 20 28 74 68 65 |s output| to (the|
|00000d20| 20 64 65 66 61 75 6c 74 | 20 69 73 20 26 6f 75 74 | default| is &out|
|00000d30| 70 75 74 29 2e 20 20 4e | 6f 74 65 0a 58 23 20 20 |put). N|ote.X# |
|00000d40| 74 68 61 74 2c 20 6f 6e | 20 73 79 73 74 65 6d 73 |that, on| systems|
|00000d50| 20 77 69 74 68 20 6e 65 | 77 6c 69 6e 65 20 74 72 | with ne|wline tr|
|00000d60| 61 6e 73 6c 61 74 69 6f | 6e 20 28 65 2e 67 2e 20 |anslatio|n (e.g. |
|00000d70| 4d 53 2d 44 4f 53 29 2c | 20 74 68 65 20 2d 6f 0a |MS-DOS),| the -o.|
|00000d80| 58 23 20 20 61 72 67 75 | 6d 65 6e 74 20 73 68 6f |X# argu|ment sho|
|00000d90| 75 6c 64 20 61 6c 77 61 | 79 73 20 62 65 20 75 73 |uld alwa|ys be us|
|00000da0| 65 64 2e 0a 58 23 0a 58 | 23 20 20 20 20 69 69 65 |ed..X#.X|# iie|
|00000db0| 6e 63 6f 64 65 20 5b 69 | 6e 66 69 6c 65 5d 20 5b |ncode [i|nfile] [|
|00000dc0| 2d 78 5d 20 72 65 6d 6f | 74 65 2d 66 69 6c 65 6e |-x] remo|te-filen|
|00000dd0| 61 6d 65 20 5b 2d 6f 5d | 20 6f 75 74 70 75 74 2d |ame [-o]| output-|
|00000de0| 66 69 6c 65 6e 61 6d 65 | 0a 58 23 0a 58 23 20 20 |filename|.X#.X# |
|00000df0| 42 55 47 53 3a 20 20 53 | 6c 6f 77 2e 20 20 49 20 |BUGS: S|low. I |
|00000e00| 64 65 63 69 64 65 64 20 | 74 6f 20 67 6f 20 66 6f |decided |to go fo|
|00000e10| 72 20 63 6c 61 72 69 74 | 79 20 61 6e 64 20 73 79 |r clarit|y and sy|
|00000e20| 6d 6d 65 74 72 79 2c 20 | 72 61 74 68 65 72 20 74 |mmetry, |rather t|
|00000e30| 68 61 6e 0a 58 23 20 20 | 73 70 65 65 64 2c 20 61 |han.X# |speed, a|
|00000e40| 6e 64 20 73 6f 20 6f 70 | 74 65 64 20 74 6f 20 64 |nd so op|ted to d|
|00000e50| 6f 20 74 68 69 6e 67 73 | 20 6c 69 6b 65 20 75 73 |o things| like us|
|00000e60| 65 20 69 73 68 69 66 74 | 28 69 2c 6a 29 20 69 6e |e ishift|(i,j) in|
|00000e70| 73 74 65 61 64 20 6f 66 | 0a 58 23 20 20 73 74 72 |stead of|.X# str|
|00000e80| 61 69 67 68 74 20 6d 75 | 6c 74 69 70 6c 69 63 61 |aight mu|ltiplica|
|00000e90| 74 69 6f 6e 20 28 77 68 | 69 63 68 20 75 6e 64 65 |tion (wh|ich unde|
|00000ea0| 72 20 49 63 6f 6e 20 76 | 38 20 69 73 20 6d 75 63 |r Icon v|8 is muc|
|00000eb0| 68 20 66 61 73 74 65 72 | 29 2e 20 20 4e 6f 74 65 |h faster|). Note|
|00000ec0| 0a 58 23 20 20 74 68 61 | 74 20 49 20 66 6f 6c 6c |.X# tha|t I foll|
|00000ed0| 6f 77 65 64 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |owed the| format |
|00000ee0| 6f 66 20 74 68 65 20 6e | 65 77 65 73 74 20 42 53 |of the n|ewest BS|
|00000ef0| 44 20 72 65 6c 65 61 73 | 65 2c 20 77 68 69 63 68 |D releas|e, which|
|00000f00| 20 72 65 66 75 73 65 73 | 0a 58 23 20 20 74 6f 20 | refuses|.X# to |
|00000f10| 6f 75 74 70 75 74 20 73 | 70 61 63 65 73 2e 20 20 |output s|paces. |
|00000f20| 49 66 20 79 6f 75 20 77 | 61 6e 74 20 74 6f 20 63 |If you w|ant to c|
|00000f30| 68 61 6e 67 65 20 74 68 | 69 6e 67 73 20 62 61 63 |hange th|ings bac|
|00000f40| 6b 20 61 72 6f 75 6e 64 | 20 73 6f 20 74 68 61 74 |k around| so that|
|00000f50| 0a 58 23 20 20 73 70 61 | 63 65 73 20 61 72 65 20 |.X# spa|ces are |
|00000f60| 6f 75 74 70 75 74 2c 20 | 6c 6f 6f 6b 20 66 6f 72 |output, |look for|
|00000f70| 20 74 68 65 20 73 74 72 | 69 6e 67 20 22 42 53 44 | the str|ing "BSD|
|00000f80| 22 20 69 6e 20 6d 79 20 | 63 6f 6d 6d 65 6e 74 73 |" in my |comments|
|00000f90| 2c 20 61 6e 64 0a 58 23 | 20 20 74 68 65 6e 20 28 |, and.X#| then (|
|00000fa0| 75 6e 29 63 6f 6d 6d 65 | 6e 74 20 74 68 65 20 61 |un)comme|nt the a|
|00000fb0| 70 70 72 6f 70 72 69 61 | 74 65 20 73 65 63 74 69 |ppropria|te secti|
|00000fc0| 6f 6e 73 20 6f 66 20 63 | 6f 64 65 2e 0a 58 23 0a |ons of c|ode..X#.|
|00000fd0| 58 23 20 20 4e 4f 54 45 | 20 4f 4e 20 4d 53 2d 44 |X# NOTE| ON MS-D|
|00000fe0| 4f 53 3a 20 20 53 79 73 | 74 65 6d 73 20 66 6f 72 |OS: Sys|tems for|
|00000ff0| 20 77 68 69 63 68 20 6e | 65 77 6c 69 6e 65 20 74 | which n|ewline t|
|00001000| 72 61 6e 73 6c 61 74 69 | 6f 6e 20 69 73 20 6e 65 |ranslati|on is ne|
|00001010| 63 65 73 73 61 72 79 0a | 58 23 20 20 63 61 6e 20 |cessary.|X# can |
|00001020| 65 6e 63 6f 64 65 20 66 | 69 6c 65 73 2e 20 20 54 |encode f|iles. T|
|00001030| 68 65 20 70 72 6f 62 6c | 65 6d 20 69 73 20 74 68 |he probl|em is th|
|00001040| 61 74 2c 20 73 69 6e 63 | 65 20 69 69 65 6e 63 6f |at, sinc|e iienco|
|00001050| 64 65 20 73 65 6e 64 73 | 20 63 6f 64 65 64 0a 58 |de sends| coded.X|
|00001060| 23 20 20 66 69 6c 65 73 | 20 74 6f 20 74 68 65 20 |# files| to the |
|00001070| 73 74 61 6e 64 61 72 64 | 20 6f 75 74 70 75 74 2c |standard| output,|
|00001080| 20 69 74 20 69 73 20 69 | 6d 70 6f 73 73 69 62 6c | it is i|mpossibl|
|00001090| 65 20 74 6f 20 61 76 6f | 69 64 20 73 65 6e 64 69 |e to avo|id sendi|
|000010a0| 6e 67 20 6f 75 74 0a 58 | 23 20 20 4f 53 2d 73 70 |ng out.X|# OS-sp|
|000010b0| 65 63 69 66 69 63 20 73 | 65 71 75 65 6e 63 65 73 |ecific s|equences|
|000010c0| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 65 | at the |end of e|
|000010d0| 61 63 68 20 6c 69 6e 65 | 2e 20 20 57 68 69 6c 65 |ach line|. While|
|000010e0| 20 6d 6f 73 74 20 75 75 | 64 65 63 6f 64 65 0a 58 | most uu|decode.X|
|000010f0| 23 20 20 70 72 6f 67 72 | 61 6d 73 20 77 69 6c 6c |# progr|ams will|
|00001100| 20 62 65 20 61 62 6c 65 | 20 74 6f 20 68 61 6e 64 | be able| to hand|
|00001110| 6c 65 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |le the r|esulting|
|00001120| 20 66 69 6c 65 2c 20 74 | 68 65 79 20 77 69 6c 6c | file, t|hey will|
|00001130| 20 6e 6f 74 0a 58 23 20 | 20 61 6c 77 61 79 73 20 | not.X# | always |
|00001140| 64 65 63 6f 64 65 20 74 | 68 65 20 66 69 6c 65 20 |decode t|he file |
|00001150| 2a 6e 61 6d 65 2a 20 70 | 72 6f 70 65 72 6c 79 2e |*name* p|roperly.|
|00001160| 20 20 42 69 6e 61 72 79 | 20 66 69 6c 65 73 20 73 | Binary| files s|
|00001170| 69 6d 70 6c 79 20 77 6f | 6e 27 74 0a 58 23 20 20 |imply wo|n't.X# |
|00001180| 77 6f 72 6b 2c 20 75 6e | 6c 65 73 73 20 74 68 65 |work, un|less the|
|00001190| 20 70 72 6f 67 72 61 6d | 20 69 73 20 6d 6f 64 69 | program| is modi|
|000011a0| 66 69 65 64 20 74 6f 20 | 77 72 69 74 65 20 74 6f |fied to |write to|
|000011b0| 20 61 20 66 69 6c 65 20 | 69 6e 73 74 65 61 64 20 | a file |instead |
|000011c0| 6f 66 0a 58 23 20 20 74 | 68 65 20 73 74 61 6e 64 |of.X# t|he stand|
|000011d0| 61 72 64 20 6f 75 74 70 | 75 74 2e 20 20 49 66 20 |ard outp|ut. If |
|000011e0| 79 6f 75 20 64 6f 20 74 | 68 69 73 2c 20 6d 61 6b |you do t|his, mak|
|000011f0| 65 20 73 75 72 65 20 79 | 6f 75 20 6f 70 65 6e 20 |e sure y|ou open |
|00001200| 74 68 65 20 66 69 6c 65 | 0a 58 23 20 20 66 6f 72 |the file|.X# for|
|00001210| 20 77 72 69 74 69 6e 67 | 20 69 6e 20 75 6e 74 72 | writing| in untr|
|00001220| 61 6e 73 6c 61 74 65 64 | 20 6d 6f 64 65 2e 20 20 |anslated| mode. |
|00001230| 49 66 20 73 6f 6d 65 6f | 6e 65 20 6d 6f 64 69 66 |If someo|ne modif|
|00001240| 69 65 73 20 74 68 69 73 | 20 70 72 6f 67 72 61 6d |ies this| program|
|00001250| 0a 58 23 20 20 73 6f 20 | 74 68 61 74 20 69 74 20 |.X# so |that it |
|00001260| 77 6f 72 6b 73 20 72 65 | 61 6c 6c 79 20 77 69 6c |works re|ally wil|
|00001270| 6c 20 75 6e 64 65 72 20 | 44 4f 53 2c 20 70 6c 65 |l under |DOS, ple|
|00001280| 61 73 65 20 73 65 6e 64 | 20 6d 65 20 74 68 65 20 |ase send| me the |
|00001290| 72 65 73 75 6c 74 73 2e | 0a 58 23 0a 58 23 23 23 |results.|.X#.X###|
|000012a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000012b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000012c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000012d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000012e0| 23 23 23 23 23 23 23 23 | 23 0a 58 23 0a 58 23 20 |########|#.X#.X# |
|000012f0| 20 53 65 65 20 61 6c 73 | 6f 3a 20 69 69 64 65 63 | See als|o: iidec|
|00001300| 6f 64 65 2e 69 63 6e 0a | 58 23 0a 58 23 23 23 23 |ode.icn.|X#.X####|
|00001310| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001320| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001330| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001340| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00001350| 23 23 23 23 23 23 23 23 | 0a 58 0a 58 0a 58 70 72 |########|.X.X.Xpr|
|00001360| 6f 63 65 64 75 72 65 20 | 6d 61 69 6e 28 61 29 0a |ocedure |main(a).|
|00001370| 58 0a 58 20 20 20 20 6c | 6f 63 61 6c 20 6f 66 73 |X.X l|ocal ofs|
|00001380| 2c 20 69 6e 5f 66 69 6c | 65 6e 61 6d 65 2c 20 6f |, in_fil|ename, o|
|00001390| 75 74 5f 66 69 6c 65 6e | 61 6d 65 2c 20 69 6e 2c |ut_filen|ame, in,|
|000013a0| 20 6f 75 74 2c 20 69 73 | 5f 78 78 2c 20 72 65 6d | out, is|_xx, rem|
|000013b0| 6f 74 65 6e 61 6d 65 0a | 58 0a 58 20 20 20 20 75 |otename.|X.X u|
|000013c0| 73 61 67 65 20 3a 3d 20 | 22 75 73 61 67 65 3a 20 |sage := |"usage: |
|000013d0| 20 69 69 65 6e 63 6f 64 | 65 20 5b 69 6e 66 69 6c | iiencod|e [infil|
|000013e0| 65 5d 20 5b 2d 78 5d 20 | 5f 0a 58 09 72 65 6d 6f |e] [-x] |_.X.remo|
|000013f0| 74 65 2d 66 69 6c 65 6e | 61 6d 65 09 5b 2d 6f 20 |te-filen|ame.[-o |
|00001400| 6f 75 74 70 75 74 2d 66 | 69 6c 65 6e 61 6d 65 5d |output-f|ilename]|
|00001410| 22 0a 58 0a 58 20 20 20 | 20 23 20 50 61 72 73 65 |".X.X | # Parse|
|00001420| 20 61 72 67 75 6d 65 6e | 74 73 2e 0a 58 20 20 20 | argumen|ts..X |
|00001430| 20 6f 66 73 20 3a 3d 20 | 30 0a 58 20 20 20 20 77 | ofs := |0.X w|
|00001440| 68 69 6c 65 20 28 6f 66 | 73 20 2b 3a 3d 20 31 29 |hile (of|s +:= 1)|
|00001450| 20 3c 3d 20 2a 61 20 64 | 6f 20 7b 0a 58 20 20 20 | <= *a d|o {.X |
|00001460| 20 20 20 20 20 63 61 73 | 65 20 61 5b 6f 66 73 5d | cas|e a[ofs]|
|00001470| 20 6f 66 20 7b 0a 58 09 | 20 20 20 20 22 2d 78 22 | of {.X.| "-x"|
|00001480| 20 20 20 20 3a 20 69 73 | 5f 78 78 20 3a 3d 20 31 | : is|_xx := 1|
|00001490| 0a 58 09 20 20 20 20 22 | 2d 6f 22 20 20 20 20 3a |.X. "|-o" :|
|000014a0| 20 6f 75 74 5f 66 69 6c | 65 6e 61 6d 65 20 3a 3d | out_fil|ename :=|
|000014b0| 20 61 5b 6f 66 73 20 2b | 3a 3d 20 31 5d 20 7c 20 | a[ofs +|:= 1] | |
|000014c0| 73 74 6f 70 28 75 73 61 | 67 65 29 0a 58 09 20 20 |stop(usa|ge).X. |
|000014d0| 20 20 64 65 66 61 75 6c | 74 20 3a 20 7b 0a 58 09 | defaul|t : {.X.|
|000014e0| 09 69 66 20 6e 6f 74 20 | 28 2f 69 6e 5f 66 69 6c |.if not |(/in_fil|
|000014f0| 65 6e 61 6d 65 20 3a 3d | 20 61 5b 6f 66 73 5d 29 |ename :=| a[ofs])|
|00001500| 20 74 68 65 6e 0a 58 09 | 09 20 20 20 20 72 65 6d | then.X.|. rem|
|00001510| 6f 74 65 6e 61 6d 65 20 | 3a 3d 20 61 5b 6f 66 73 |otename |:= a[ofs|
|00001520| 5d 0a 58 09 20 20 20 20 | 7d 0a 58 09 7d 0a 58 20 |].X. |}.X.}.X |
|00001530| 20 20 20 7d 0a 58 0a 58 | 20 20 20 20 23 20 49 66 | }.X.X| # If|
|00001540| 20 72 65 6d 6f 74 65 6e | 61 6d 65 20 69 73 20 6e | remoten|ame is n|
|00001550| 75 6c 6c 2c 20 73 65 74 | 20 69 74 20 74 6f 20 69 |ull, set| it to i|
|00001560| 6e 5f 66 69 6c 65 6e 61 | 6d 65 2e 20 20 49 66 20 |n_filena|me. If |
|00001570| 69 74 27 73 20 73 74 69 | 6c 6c 0a 58 20 20 20 20 |it's sti|ll.X |
|00001580| 23 20 6e 75 6c 6c 2c 20 | 74 68 65 6e 20 61 62 6f |# null, |then abo|
|00001590| 72 74 20 77 69 74 68 20 | 75 73 61 67 65 20 6d 65 |rt with |usage me|
|000015a0| 73 73 61 67 65 2e 0a 58 | 20 20 20 20 69 66 20 2f |ssage..X| if /|
|000015b0| 28 2f 72 65 6d 6f 74 65 | 6e 61 6d 65 20 3a 3d 3a |(/remote|name :=:|
|000015c0| 20 69 6e 5f 66 69 6c 65 | 6e 61 6d 65 29 20 74 68 | in_file|name) th|
|000015d0| 65 6e 20 7b 0a 58 20 20 | 20 20 20 20 20 20 77 72 |en {.X | wr|
|000015e0| 69 74 65 28 26 65 72 72 | 6f 75 74 2c 75 73 61 67 |ite(&err|out,usag|
|000015f0| 65 29 0a 58 20 20 20 20 | 20 20 20 20 65 78 69 74 |e).X | exit|
|00001600| 28 32 29 0a 58 20 20 20 | 20 7d 0a 58 0a 58 20 20 |(2).X | }.X.X |
|00001610| 20 20 23 20 49 66 20 6e | 6f 20 69 6e 70 75 74 20 | # If n|o input |
|00001620| 66 69 6c 65 6e 61 6d 65 | 20 77 61 73 20 73 75 70 |filename| was sup|
|00001630| 70 6c 69 65 64 2c 20 75 | 73 65 20 26 69 6e 70 75 |plied, u|se &inpu|
|00001640| 74 2e 0a 58 20 20 20 20 | 69 66 20 2f 69 6e 5f 66 |t..X |if /in_f|
|00001650| 69 6c 65 6e 61 6d 65 20 | 74 68 65 6e 0a 58 09 2f |ilename |then.X./|
|00001660| 69 6e 20 3a 3d 20 26 69 | 6e 70 75 74 0a 58 20 20 |in := &i|nput.X |
|00001670| 20 20 65 6c 73 65 0a 58 | 09 69 6e 20 3a 3d 20 6f | else.X|.in := o|
|00001680| 70 65 6e 28 69 6e 5f 66 | 69 6c 65 6e 61 6d 65 29 |pen(in_f|ilename)|
|00001690| 20 7c 0a 58 09 73 74 6f | 70 28 26 65 72 72 6f 75 | |.X.sto|p(&errou|
|000016a0| 74 2c 22 43 61 6e 27 74 | 20 6f 70 65 6e 20 69 6e |t,"Can't| open in|
|000016b0| 70 75 74 20 66 69 6c 65 | 2c 20 22 2c 69 6e 5f 66 |put file|, ",in_f|
|000016c0| 69 6c 65 6e 61 6d 65 2c | 22 2e 5c 6e 22 2c 75 73 |ilename,|".\n",us|
|000016d0| 61 67 65 29 0a 58 0a 58 | 20 20 20 20 23 20 49 66 |age).X.X| # If|
|000016e0| 20 61 6e 20 6f 75 74 70 | 75 74 20 66 69 6c 65 6e | an outp|ut filen|
|000016f0| 61 6d 65 20 77 61 73 20 | 73 70 65 63 69 66 69 65 |ame was |specifie|
|00001700| 64 2c 20 6f 70 65 6e 20 | 69 74 20 66 6f 72 20 77 |d, open |it for w|
|00001710| 72 69 74 69 6e 67 2e 0a | 58 20 20 20 20 69 66 20 |riting..|X if |
|00001720| 5c 6f 75 74 5f 66 69 6c | 65 6e 61 6d 65 20 74 68 |\out_fil|ename th|
|00001730| 65 6e 0a 58 09 6f 75 74 | 20 3a 3d 20 6f 70 65 6e |en.X.out| := open|
|00001740| 28 6f 75 74 5f 66 69 6c | 65 6e 61 6d 65 2c 20 22 |(out_fil|ename, "|
|00001750| 77 75 22 29 20 7c 0a 58 | 09 20 20 20 20 73 74 6f |wu") |.X|. sto|
|00001760| 70 28 22 43 61 6e 27 74 | 20 6f 70 65 6e 20 6f 75 |p("Can't| open ou|
|00001770| 74 70 75 74 20 66 69 6c | 65 2c 20 22 2c 6f 75 74 |tput fil|e, ",out|
|00001780| 5f 66 69 6c 65 6e 61 6d | 65 2c 22 2e 5c 6e 22 2c |_filenam|e,".\n",|
|00001790| 75 73 61 67 65 29 0a 58 | 20 20 20 20 23 20 53 65 |usage).X| # Se|
|000017a0| 74 20 6e 75 6c 6c 20 6f | 75 74 20 74 6f 20 26 6f |t null o|ut to &o|
|000017b0| 75 74 70 75 74 3b 20 61 | 64 76 69 73 65 20 44 4f |utput; a|dvise DO|
|000017c0| 53 20 75 73 65 72 73 20 | 74 6f 20 75 73 65 20 2d |S users |to use -|
|000017d0| 6f 20 6f 70 74 69 6f 6e | 2e 0a 58 20 20 20 20 65 |o option|..X e|
|000017e0| 6c 73 65 20 7b 0a 58 09 | 6f 75 74 20 3a 3d 20 26 |lse {.X.|out := &|
|000017f0| 6f 75 74 70 75 74 0a 58 | 09 69 66 20 66 69 6e 64 |output.X|.if find|
|00001800| 28 22 4d 53 2d 44 4f 53 | 22 2c 26 66 65 61 74 75 |("MS-DOS|",&featu|
|00001810| 72 65 73 29 20 74 68 65 | 6e 0a 58 09 20 20 20 20 |res) the|n.X. |
|00001820| 77 72 69 74 65 28 26 65 | 72 72 6f 75 74 2c 20 22 |write(&e|rrout, "|
|00001830| 4f 6b 61 79 2c 20 62 75 | 74 20 74 68 65 20 2d 6f |Okay, bu|t the -o|
|00001840| 20 6f 70 74 69 6f 6e 20 | 69 73 20 72 65 63 6f 6d | option |is recom|
|00001850| 6d 65 6e 64 65 64 20 66 | 6f 72 20 44 4f 53 2e 22 |mended f|or DOS."|
|00001860| 29 0a 58 20 20 20 20 7d | 0a 58 0a 58 20 20 20 20 |).X }|.X.X |
|00001870| 23 20 54 68 69 73 20 67 | 65 6e 65 72 69 63 20 76 |# This g|eneric v|
|00001880| 65 72 73 69 6f 6e 20 6f | 66 20 75 75 65 6e 63 6f |ersion o|f uuenco|
|00001890| 64 65 20 74 72 65 61 74 | 73 20 66 69 6c 65 20 6d |de treat|s file m|
|000018a0| 6f 64 65 73 20 69 6e 20 | 61 20 70 72 69 6d 69 74 |odes in |a primit|
|000018b0| 69 76 65 0a 58 20 20 20 | 20 23 20 6d 61 6e 6e 65 |ive.X | # manne|
|000018c0| 72 20 73 6f 20 61 73 20 | 74 6f 20 62 65 20 75 73 |r so as |to be us|
|000018d0| 61 62 6c 65 20 69 6e 20 | 61 20 6e 75 6d 62 65 72 |able in |a number|
|000018e0| 20 6f 66 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 | of envi|ronments|
|000018f0| 2e 20 20 50 6c 65 61 73 | 65 0a 58 20 20 20 20 23 |. Pleas|e.X #|
|00001900| 20 64 6f 6e 27 74 20 67 | 65 74 20 66 61 6e 63 79 | don't g|et fancy|
|00001910| 20 61 6e 64 20 63 68 61 | 6e 67 65 20 74 68 69 73 | and cha|nge this|
|00001920| 20 75 6e 6c 65 73 73 20 | 79 6f 75 20 70 6c 61 6e | unless |you plan|
|00001930| 20 6f 6e 20 6b 65 65 70 | 69 6e 67 20 79 6f 75 72 | on keep|ing your|
|00001940| 0a 58 20 20 20 20 23 20 | 6d 6f 64 69 66 69 65 64 |.X # |modified|
|00001950| 20 76 65 72 73 69 6f 6e | 20 6f 6e 2d 73 69 74 65 | version| on-site|
|00001960| 20 28 6f 72 20 65 6c 73 | 65 20 6d 6f 64 69 66 79 | (or els|e modify|
|00001970| 69 6e 67 20 74 68 65 20 | 63 6f 64 65 20 69 6e 20 |ing the |code in |
|00001980| 73 75 63 68 20 61 0a 58 | 20 20 20 20 23 20 77 61 |such a.X| # wa|
|00001990| 79 20 61 73 20 74 6f 20 | 61 76 6f 69 64 20 64 65 |y as to |avoid de|
|000019a0| 70 65 6e 64 65 6e 63 65 | 20 6f 6e 20 61 20 73 70 |pendence| on a sp|
|000019b0| 65 63 69 66 69 63 20 6f | 70 65 72 61 74 69 6e 67 |ecific o|perating|
|000019c0| 20 73 79 73 74 65 6d 29 | 2e 0a 58 20 20 20 20 77 | system)|..X w|
|000019d0| 72 69 74 65 73 28 6f 75 | 74 2c 20 22 62 65 67 69 |rites(ou|t, "begi|
|000019e0| 6e 20 36 34 34 20 22 2c | 72 65 6d 6f 74 65 6e 61 |n 644 ",|remotena|
|000019f0| 6d 65 2c 22 5c 6e 22 29 | 0a 58 0a 58 20 20 20 20 |me,"\n")|.X.X |
|00001a00| 65 6e 63 6f 64 65 28 6f | 75 74 2c 20 69 6e 2c 20 |encode(o|ut, in, |
|00001a10| 69 73 5f 78 78 29 0a 58 | 0a 58 20 20 20 20 77 72 |is_xx).X|.X wr|
|00001a20| 69 74 65 73 28 6f 75 74 | 2c 20 22 65 6e 64 5c 6e |ites(out|, "end\n|
|00001a30| 22 29 0a 58 0a 58 20 20 | 20 20 65 76 65 72 79 20 |").X.X | every |
|00001a40| 63 6c 6f 73 65 28 69 6e | 7c 6f 75 74 29 0a 58 20 |close(in||out).X |
|00001a50| 20 20 20 65 78 69 74 28 | 30 29 0a 58 0a 58 65 6e | exit(|0).X.Xen|
|00001a60| 64 0a 58 0a 58 0a 58 0a | 58 70 72 6f 63 65 64 75 |d.X.X.X.|Xprocedu|
|00001a70| 72 65 20 65 6e 63 6f 64 | 65 28 6f 75 74 2c 20 69 |re encod|e(out, i|
|00001a80| 6e 2c 20 69 73 5f 78 78 | 29 0a 58 0a 58 20 20 20 |n, is_xx|).X.X |
|00001a90| 20 23 20 43 6f 70 79 20 | 66 72 6f 6d 20 69 6e 20 | # Copy |from in |
|00001aa0| 74 6f 20 73 74 61 6e 64 | 61 72 64 20 6f 75 74 70 |to stand|ard outp|
|00001ab0| 75 74 2c 20 65 6e 63 6f | 64 69 6e 67 20 61 73 20 |ut, enco|ding as |
|00001ac0| 79 6f 75 20 67 6f 20 61 | 6c 6f 6e 67 2e 0a 58 0a |you go a|long..X.|
|00001ad0| 58 20 20 20 20 6c 6f 63 | 61 6c 20 6c 69 6e 65 0a |X loc|al line.|
|00001ae0| 58 0a 58 20 20 20 20 69 | 66 20 5c 69 73 5f 78 78 |X.X i|f \is_xx|
|00001af0| 20 74 68 65 6e 0a 58 09 | 45 4e 43 20 3a 3d 20 78 | then.X.|ENC := x|
|00001b00| 78 45 4e 43 0a 58 0a 58 | 20 20 20 20 23 20 31 20 |xENC.X.X| # 1 |
|00001b10| 28 75 70 20 74 6f 29 20 | 34 35 20 63 68 61 72 61 |(up to) |45 chara|
|00001b20| 63 74 65 72 20 73 65 67 | 6d 65 6e 74 0a 58 20 20 |cter seg|ment.X |
|00001b30| 20 20 77 68 69 6c 65 20 | 6c 69 6e 65 20 3a 3d 20 | while |line := |
|00001b40| 72 65 61 64 73 28 69 6e | 2c 20 34 35 29 20 64 6f |reads(in|, 45) do|
|00001b50| 20 7b 0a 58 09 77 72 69 | 74 65 73 28 6f 75 74 2c | {.X.wri|tes(out,|
|00001b60| 20 45 4e 43 28 2a 6c 69 | 6e 65 29 29 0a 58 09 6c | ENC(*li|ne)).X.l|
|00001b70| 69 6e 65 20 3f 20 7b 0a | 58 09 20 20 20 20 77 68 |ine ? {.|X. wh|
|00001b80| 69 6c 65 20 6f 75 74 64 | 65 63 28 6d 6f 76 65 28 |ile outd|ec(move(|
|00001b90| 33 29 2c 20 6f 75 74 29 | 0a 58 09 20 20 20 20 70 |3), out)|.X. p|
|00001ba0| 6f 73 28 30 29 20 7c 20 | 6f 75 74 64 65 63 28 6c |os(0) | |outdec(l|
|00001bb0| 65 66 74 28 74 61 62 28 | 30 29 2c 20 33 2c 20 22 |eft(tab(|0), 3, "|
|00001bc0| 20 22 29 2c 20 6f 75 74 | 29 0a 58 09 7d 0a 58 09 | "), out|).X.}.X.|
|00001bd0| 77 72 69 74 65 73 28 6f | 75 74 2c 20 22 5c 6e 22 |writes(o|ut, "\n"|
|00001be0| 29 0a 58 20 20 20 20 7d | 0a 58 20 20 20 20 23 20 |).X }|.X # |
|00001bf0| 55 75 65 6e 63 6f 64 65 | 20 61 64 64 73 20 61 20 |Uuencode| adds a |
|00001c00| 73 70 61 63 65 20 61 6e | 64 20 6e 65 77 6c 69 6e |space an|d newlin|
|00001c10| 65 20 68 65 72 65 2c 20 | 77 68 69 63 68 20 69 73 |e here, |which is|
|00001c20| 20 64 65 63 6f 64 65 64 | 20 6c 61 74 65 72 0a 58 | decoded| later.X|
|00001c30| 20 20 20 20 23 20 61 73 | 20 61 20 7a 65 72 6f 2d | # as| a zero-|
|00001c40| 6c 65 6e 67 74 68 20 6c | 69 6e 65 20 28 73 69 67 |length l|ine (sig|
|00001c50| 6e 61 6c 73 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |nals the| end of |
|00001c60| 74 68 65 20 64 65 63 6f | 64 65 64 20 74 65 78 74 |the deco|ded text|
|00001c70| 29 2e 0a 58 20 20 20 20 | 23 20 77 72 69 74 65 73 |)..X |# writes|
|00001c80| 28 22 20 5c 6e 22 29 0a | 58 20 20 20 20 23 20 54 |(" \n").|X # T|
|00001c90| 68 65 20 6e 65 77 20 42 | 53 44 20 63 6f 64 65 20 |he new B|SD code |
|00001ca0| 28 63 6f 6d 70 61 74 69 | 62 6c 65 20 77 69 74 68 |(compati|ble with|
|00001cb0| 20 74 68 65 20 6f 6c 64 | 29 20 61 76 6f 69 64 73 | the old|) avoids|
|00001cc0| 20 6f 75 74 70 75 74 74 | 69 6e 67 0a 58 20 20 20 | outputt|ing.X |
|00001cd0| 20 23 20 73 70 61 63 65 | 73 20 62 79 20 77 72 69 | # space|s by wri|
|00001ce0| 74 69 6e 67 20 61 20 60 | 20 28 73 65 65 20 61 6c |ting a `| (see al|
|00001cf0| 73 6f 20 68 6f 77 20 69 | 74 20 68 61 6e 64 6c 65 |so how i|t handle|
|00001d00| 73 20 45 4e 43 28 29 20 | 62 65 6c 6f 77 29 2e 0a |s ENC() |below)..|
|00001d10| 58 20 20 20 20 69 66 20 | 5c 69 73 5f 78 78 0a 58 |X if |\is_xx.X|
|00001d20| 20 20 20 20 74 68 65 6e | 20 77 72 69 74 65 73 28 | then| writes(|
|00001d30| 6f 75 74 2c 20 22 2b 5c | 6e 22 29 0a 58 20 20 20 |out, "+\|n").X |
|00001d40| 20 65 6c 73 65 20 77 72 | 69 74 65 73 28 6f 75 74 | else wr|ites(out|
|00001d50| 2c 20 22 60 5c 6e 22 29 | 0a 58 20 20 20 20 0a 58 |, "`\n")|.X .X|
|00001d60| 65 6e 64 0a 58 0a 58 0a | 58 0a 58 70 72 6f 63 65 |end.X.X.|X.Xproce|
|00001d70| 64 75 72 65 20 6f 75 74 | 64 65 63 28 73 2c 20 6f |dure out|dec(s, o|
|00001d80| 75 74 29 0a 58 0a 58 20 | 20 20 20 23 20 4f 75 74 |ut).X.X | # Out|
|00001d90| 70 75 74 20 6f 6e 65 20 | 67 72 6f 75 70 20 6f 66 |put one |group of|
|00001da0| 20 33 20 62 79 74 65 73 | 20 28 73 29 20 74 6f 20 | 3 bytes| (s) to |
|00001db0| 73 74 61 6e 64 61 72 64 | 20 6f 75 74 70 75 74 2e |standard| output.|
|00001dc0| 20 20 54 68 69 73 20 69 | 73 20 6f 6e 65 0a 58 20 | This i|s one.X |
|00001dd0| 20 20 20 23 20 63 61 73 | 65 20 77 68 65 72 65 20 | # cas|e where |
|00001de0| 43 20 69 73 20 61 63 74 | 75 61 6c 6c 79 20 6d 6f |C is act|ually mo|
|00001df0| 72 65 20 65 6c 65 67 61 | 6e 74 20 74 68 61 6e 20 |re elega|nt than |
|00001e00| 49 63 6f 6e 2e 20 20 4e | 6f 74 65 20 77 65 6c 6c |Icon. N|ote well|
|00001e10| 21 0a 58 0a 58 20 20 20 | 20 6c 6f 63 61 6c 20 63 |!.X.X | local c|
|00001e20| 31 2c 20 63 32 2c 20 63 | 33 2c 20 63 34 0a 58 0a |1, c2, c|3, c4.X.|
|00001e30| 58 20 20 20 20 63 31 20 | 3a 3d 20 69 73 68 69 66 |X c1 |:= ishif|
|00001e40| 74 28 6f 72 64 28 73 5b | 31 5d 29 2c 2d 32 29 0a |t(ord(s[|1]),-2).|
|00001e50| 58 20 20 20 20 63 32 20 | 3a 3d 20 69 6f 72 28 69 |X c2 |:= ior(i|
|00001e60| 61 6e 64 28 69 73 68 69 | 66 74 28 6f 72 64 28 73 |and(ishi|ft(ord(s|
|00001e70| 5b 31 5d 29 2c 2b 34 29 | 2c 20 38 72 30 36 30 29 |[1]),+4)|, 8r060)|
|00001e80| 2c 0a 58 09 20 20 20 20 | 20 20 69 61 6e 64 28 69 |,.X. | iand(i|
|00001e90| 73 68 69 66 74 28 6f 72 | 64 28 73 5b 32 5d 29 2c |shift(or|d(s[2]),|
|00001ea0| 2d 34 29 2c 20 38 72 30 | 31 37 29 29 0a 58 20 20 |-4), 8r0|17)).X |
|00001eb0| 20 20 63 33 20 3a 3d 20 | 69 6f 72 28 69 61 6e 64 | c3 := |ior(iand|
|00001ec0| 28 69 73 68 69 66 74 28 | 6f 72 64 28 73 5b 32 5d |(ishift(|ord(s[2]|
|00001ed0| 29 2c 2b 32 29 2c 20 38 | 72 30 37 34 29 2c 0a 58 |),+2), 8|r074),.X|
|00001ee0| 09 20 20 20 20 20 20 69 | 61 6e 64 28 69 73 68 69 |. i|and(ishi|
|00001ef0| 66 74 28 6f 72 64 28 73 | 5b 33 5d 29 2c 2d 36 29 |ft(ord(s|[3]),-6)|
|00001f00| 2c 20 38 72 30 30 33 29 | 29 0a 58 20 20 20 20 63 |, 8r003)|).X c|
|00001f10| 34 20 3a 3d 20 69 61 6e | 64 28 6f 72 64 28 73 5b |4 := ian|d(ord(s[|
|00001f20| 33 5d 29 2c 38 72 30 37 | 37 29 0a 58 20 20 20 20 |3]),8r07|7).X |
|00001f30| 65 76 65 72 79 20 77 72 | 69 74 65 73 28 6f 75 74 |every wr|ites(out|
|00001f40| 2c 20 45 4e 43 28 63 31 | 20 7c 20 63 32 20 7c 20 |, ENC(c1| | c2 | |
|00001f50| 63 33 20 7c 20 63 34 29 | 29 0a 58 0a 58 20 20 20 |c3 | c4)|).X.X |
|00001f60| 20 72 65 74 75 72 6e 0a | 58 0a 58 65 6e 64 0a 58 | return.|X.Xend.X|
|00001f70| 0a 58 0a 58 0a 58 70 72 | 6f 63 65 64 75 72 65 20 |.X.X.Xpr|ocedure |
|00001f80| 45 4e 43 28 63 29 0a 58 | 0a 58 20 20 20 20 23 20 |ENC(c).X|.X # |
|00001f90| 45 4e 43 20 69 73 20 74 | 68 65 20 62 61 73 69 63 |ENC is t|he basic|
|00001fa0| 20 31 20 63 68 61 72 61 | 63 74 65 72 20 65 6e 63 | 1 chara|cter enc|
|00001fb0| 6f 64 69 6e 67 20 70 72 | 6f 63 65 64 75 72 65 20 |oding pr|ocedure |
|00001fc0| 74 6f 20 6d 61 6b 65 20 | 61 20 63 68 61 72 0a 58 |to make |a char.X|
|00001fd0| 20 20 20 20 23 20 70 72 | 69 6e 74 69 6e 67 2e 0a | # pr|inting..|
|00001fe0| 58 0a 58 20 20 20 20 23 | 20 4e 65 77 20 42 53 44 |X.X #| New BSD|
|00001ff0| 20 63 6f 64 65 20 64 6f | 65 73 6e 27 74 20 6f 75 | code do|esn't ou|
|00002000| 74 70 75 74 20 73 70 61 | 63 65 73 2e 2e 2e 0a 58 |tput spa|ces....X|
|00002010| 20 20 20 20 72 65 74 75 | 72 6e 20 22 20 22 20 7e | retu|rn " " ~|
|00002020| 3d 3d 20 63 68 61 72 28 | 69 61 6e 64 28 63 2c 20 |== char(|iand(c, |
|00002030| 38 72 30 37 37 29 20 2b | 20 33 32 29 20 7c 20 22 |8r077) +| 32) | "|
|00002040| 60 22 0a 58 20 20 20 20 | 23 20 2e 2e 2e 74 68 65 |`".X |# ...the|
|00002050| 20 77 61 79 20 74 68 65 | 20 6f 6c 64 20 63 6f 64 | way the| old cod|
|00002060| 65 20 64 6f 65 73 3a 0a | 58 20 20 20 20 23 20 72 |e does:.|X # r|
|00002070| 65 74 75 72 6e 20 63 68 | 61 72 28 69 61 6e 64 28 |eturn ch|ar(iand(|
|00002080| 63 2c 20 38 72 30 37 37 | 29 20 2b 20 33 32 29 0a |c, 8r077|) + 32).|
|00002090| 58 0a 58 65 6e 64 0a 58 | 0a 58 0a 58 0a 58 70 72 |X.Xend.X|.X.X.Xpr|
|000020a0| 6f 63 65 64 75 72 65 20 | 78 78 45 4e 43 28 63 29 |ocedure |xxENC(c)|
|000020b0| 0a 58 0a 58 20 20 20 20 | 23 20 45 4e 43 20 69 73 |.X.X |# ENC is|
|000020c0| 20 74 68 65 20 62 61 73 | 69 63 20 31 20 63 68 61 | the bas|ic 1 cha|
|000020d0| 72 61 63 74 65 72 20 65 | 6e 63 6f 64 69 6e 67 20 |racter e|ncoding |
|000020e0| 70 72 6f 63 65 64 75 72 | 65 20 74 6f 20 6d 61 6b |procedur|e to mak|
|000020f0| 65 20 61 20 63 68 61 72 | 0a 58 20 20 20 20 23 20 |e a char|.X # |
|00002100| 70 72 69 6e 74 69 6e 67 | 2e 0a 58 0a 58 20 20 20 |printing|..X.X |
|00002110| 20 6c 6f 63 61 6c 20 6b | 2c 20 6f 72 64 76 61 6c | local k|, ordval|
|00002120| 0a 58 20 20 20 20 73 74 | 61 74 69 63 20 6f 72 64 |.X st|atic ord|
|00002130| 74 62 6c 0a 58 20 20 20 | 20 69 6e 69 74 69 61 6c |tbl.X | initial|
|00002140| 20 7b 0a 58 09 6f 72 64 | 76 61 6c 20 3a 3d 20 2d | {.X.ord|val := -|
|00002150| 31 0a 58 09 6f 72 64 74 | 62 6c 20 3a 3d 20 74 61 |1.X.ordt|bl := ta|
|00002160| 62 6c 65 28 29 0a 58 09 | 65 76 65 72 79 20 6b 20 |ble().X.|every k |
|00002170| 3a 3d 20 21 22 2b 2d 30 | 31 32 33 34 35 36 37 38 |:= !"+-0|12345678|
|00002180| 39 41 42 43 44 45 46 47 | 48 49 4a 4b 4c 4d 4e 4f |9ABCDEFG|HIJKLMNO|
|00002190| 50 51 52 53 54 5f 0a 58 | 09 09 20 20 20 20 20 55 |PQRST_.X|.. U|
|000021a0| 56 57 58 59 5a 61 62 63 | 64 65 66 67 68 69 6a 6b |VWXYZabc|defghijk|
|000021b0| 6c 6d 6e 6f 70 71 72 73 | 74 75 76 77 78 79 7a 22 |lmnopqrs|tuvwxyz"|
|000021c0| 0a 58 09 64 6f 20 69 6e | 73 65 72 74 28 6f 72 64 |.X.do in|sert(ord|
|000021d0| 74 62 6c 2c 20 6f 72 64 | 76 61 6c 20 2b 3a 3d 20 |tbl, ord|val +:= |
|000021e0| 31 2c 20 6b 29 0a 58 09 | 6f 76 65 72 73 69 7a 65 |1, k).X.|oversize|
|000021f0| 73 20 3a 3d 20 30 0a 58 | 20 20 20 20 7d 0a 58 0a |s := 0.X| }.X.|
|00002200| 58 20 20 20 20 72 65 74 | 75 72 6e 20 6f 72 64 74 |X ret|urn ordt|
|00002210| 62 6c 5b 69 61 6e 64 28 | 63 2c 20 38 72 30 37 37 |bl[iand(|c, 8r077|
|00002220| 29 5d 0a 58 0a 58 65 6e | 64 0a 53 48 41 52 5f 45 |)].X.Xen|d.SHAR_E|
|00002230| 4f 46 0a 74 72 75 65 20 | 7c 7c 20 65 63 68 6f 20 |OF.true ||| echo |
|00002240| 27 72 65 73 74 6f 72 65 | 20 6f 66 20 69 69 65 6e |'restore| of iien|
|00002250| 63 6f 64 65 2e 69 63 6e | 20 66 61 69 6c 65 64 27 |code.icn| failed'|
|00002260| 0a 72 6d 20 2d 66 20 5f | 73 68 61 72 5f 77 6e 74 |.rm -f _|shar_wnt|
|00002270| 5f 2e 74 6d 70 0a 66 69 | 0a 23 20 3d 3d 3d 3d 3d |_.tmp.fi|.# =====|
|00002280| 3d 3d 3d 3d 3d 3d 3d 3d | 20 69 69 64 65 63 6f 64 |========| iidecod|
|00002290| 65 2e 69 63 6e 20 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |e.icn ==|========|
|000022a0| 3d 3d 3d 3d 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |====.if |test -f |
|000022b0| 27 69 69 64 65 63 6f 64 | 65 2e 69 63 6e 27 20 2d |'iidecod|e.icn' -|
|000022c0| 61 20 58 22 24 31 22 20 | 21 3d 20 58 22 2d 63 22 |a X"$1" |!= X"-c"|
|000022d0| 3b 20 74 68 65 6e 0a 09 | 65 63 68 6f 20 27 78 20 |; then..|echo 'x |
|000022e0| 2d 20 73 6b 69 70 70 69 | 6e 67 20 69 69 64 65 63 |- skippi|ng iidec|
|000022f0| 6f 64 65 2e 69 63 6e 20 | 28 46 69 6c 65 20 61 6c |ode.icn |(File al|
|00002300| 72 65 61 64 79 20 65 78 | 69 73 74 73 29 27 0a 09 |ready ex|ists)'..|
|00002310| 72 6d 20 2d 66 20 5f 73 | 68 61 72 5f 77 6e 74 5f |rm -f _s|har_wnt_|
|00002320| 2e 74 6d 70 0a 65 6c 73 | 65 0a 3e 20 5f 73 68 61 |.tmp.els|e.> _sha|
|00002330| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 63 68 6f 20 |r_wnt_.t|mp.echo |
|00002340| 27 78 20 2d 20 65 78 74 | 72 61 63 74 69 6e 67 20 |'x - ext|racting |
|00002350| 69 69 64 65 63 6f 64 65 | 2e 69 63 6e 20 28 54 65 |iidecode|.icn (Te|
|00002360| 78 74 29 27 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |xt)'.sed| 's/^X//|
|00002370| 27 20 3c 3c 20 27 53 48 | 41 52 5f 45 4f 46 27 20 |' << 'SH|AR_EOF' |
|00002380| 3e 20 27 69 69 64 65 63 | 6f 64 65 2e 69 63 6e 27 |> 'iidec|ode.icn'|
|00002390| 20 26 26 0a 58 23 23 23 | 23 23 23 23 23 23 23 23 | &&.X###|########|
|000023a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000023e0| 23 0a 58 23 0a 58 23 09 | 4e 61 6d 65 3a 09 20 69 |#.X#.X#.|Name:. i|
|000023f0| 69 64 65 63 6f 64 65 2e | 69 63 6e 0a 58 23 0a 58 |idecode.|icn.X#.X|
|00002400| 23 09 54 69 74 6c 65 3a | 09 20 69 69 64 65 63 6f |#.Title:|. iideco|
|00002410| 64 65 20 28 70 6f 72 74 | 20 6f 66 20 74 68 65 20 |de (port| of the |
|00002420| 55 6e 69 78 2f 43 20 75 | 75 64 65 63 6f 64 65 20 |Unix/C u|udecode |
|00002430| 70 72 6f 67 72 61 6d 20 | 74 6f 20 49 63 6f 6e 29 |program |to Icon)|
|00002440| 0a 58 23 0a 58 23 09 41 | 75 74 68 6f 72 3a 09 20 |.X#.X#.A|uthor:. |
|00002450| 52 69 63 68 61 72 64 20 | 4c 2e 20 47 6f 65 72 77 |Richard |L. Goerw|
|00002460| 69 74 7a 0a 58 23 0a 58 | 23 09 56 65 72 73 69 6f |itz.X#.X|#.Versio|
|00002470| 6e 3a 20 31 2e 37 0a 58 | 23 0a 58 23 23 23 23 23 |n: 1.7.X|#.X#####|
|00002480| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002490| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000024a0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000024b0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000024c0| 23 23 23 23 23 23 23 0a | 58 23 0a 58 23 20 20 54 |#######.|X#.X# T|
|000024d0| 68 69 73 20 69 73 20 61 | 6e 20 49 63 6f 6e 20 70 |his is a|n Icon p|
|000024e0| 6f 72 74 20 6f 66 20 74 | 68 65 20 55 6e 69 78 2f |ort of t|he Unix/|
|000024f0| 43 20 75 75 64 65 63 6f | 64 65 20 75 74 69 6c 69 |C uudeco|de utili|
|00002500| 74 79 2e 20 20 53 69 6e | 63 65 0a 58 23 20 20 75 |ty. Sin|ce.X# u|
|00002510| 75 64 65 63 6f 64 65 20 | 69 73 20 70 75 62 6c 69 |udecode |is publi|
|00002520| 63 6c 79 20 64 69 73 74 | 72 69 62 75 74 61 62 6c |cly dist|ributabl|
|00002530| 65 20 42 53 44 20 63 6f | 64 65 2c 20 49 20 73 69 |e BSD co|de, I si|
|00002540| 6d 70 6c 79 20 67 72 61 | 62 62 65 64 20 61 0a 58 |mply gra|bbed a.X|
|00002550| 23 20 20 63 6f 70 79 2c | 20 61 6e 64 20 72 65 77 |# copy,| and rew|
|00002560| 72 6f 74 65 20 69 74 20 | 69 6e 20 49 63 6f 6e 2e |rote it |in Icon.|
|00002570| 20 20 54 68 65 20 6f 6e | 6c 79 20 62 61 73 69 63 | The on|ly basic|
|00002580| 20 66 75 6e 63 74 69 6f | 6e 61 6c 20 63 68 61 6e | functio|nal chan|
|00002590| 67 65 73 20 49 0a 58 23 | 20 20 6d 61 64 65 20 74 |ges I.X#| made t|
|000025a0| 6f 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 77 65 |o the pr|ogram we|
|000025b0| 72 65 3a 20 20 31 29 20 | 54 6f 20 73 69 6d 70 6c |re: 1) |To simpl|
|000025c0| 69 66 79 20 74 68 65 20 | 6e 6f 74 69 6f 6e 20 6f |ify the |notion o|
|000025d0| 66 20 66 69 6c 65 20 6d | 6f 64 65 0a 58 23 20 20 |f file m|ode.X# |
|000025e0| 28 65 76 65 72 79 74 68 | 69 6e 67 20 69 73 20 65 |(everyth|ing is e|
|000025f0| 6e 63 6f 64 65 64 20 77 | 69 74 68 20 30 36 34 34 |ncoded w|ith 0644|
|00002600| 20 70 65 72 6d 69 73 73 | 69 6f 6e 73 29 2c 20 61 | permiss|ions), a|
|00002610| 6e 64 20 32 29 20 74 6f | 20 61 64 64 20 61 0a 58 |nd 2) to| add a.X|
|00002620| 23 20 20 63 6f 6d 6d 61 | 6e 64 2d 6c 69 6e 65 20 |# comma|nd-line |
|00002630| 73 77 69 74 63 68 20 66 | 6f 72 20 78 78 65 6e 63 |switch f|or xxenc|
|00002640| 6f 64 65 64 20 66 69 6c | 65 73 20 28 73 69 6d 69 |oded fil|es (simi|
|00002650| 6c 61 72 20 74 6f 20 75 | 75 65 6e 63 6f 64 65 64 |lar to u|uencoded|
|00002660| 0a 58 23 20 20 66 69 6c | 65 73 2c 20 62 75 74 20 |.X# fil|es, but |
|00002670| 63 61 70 61 62 6c 65 20 | 6f 66 20 70 61 73 73 69 |capable |of passi|
|00002680| 6e 67 20 75 6e 73 63 61 | 74 68 65 64 20 74 68 72 |ng unsca|thed thr|
|00002690| 6f 75 67 68 20 6e 6f 6e | 2d 41 53 43 49 49 20 45 |ough non|-ASCII E|
|000026a0| 42 43 44 49 43 0a 58 23 | 20 20 73 69 74 65 73 29 |BCDIC.X#| sites)|
|000026b0| 2e 0a 58 23 0a 58 23 20 | 20 20 20 20 20 20 20 20 |..X#.X# | |
|000026c0| 75 73 61 67 65 3a 20 20 | 69 69 64 65 63 6f 64 65 |usage: |iidecode|
|000026d0| 20 5b 69 6e 66 69 6c 65 | 5d 20 5b 2d 78 5d 0a 58 | [infile|] [-x].X|
|000026e0| 23 0a 58 23 20 20 55 73 | 61 67 65 20 69 73 20 63 |#.X# Us|age is c|
|000026f0| 6f 6d 70 61 74 69 62 6c | 65 20 77 69 74 68 20 74 |ompatibl|e with t|
|00002700| 68 61 74 20 6f 66 20 74 | 68 65 20 55 4e 49 58 20 |hat of t|he UNIX |
|00002710| 75 75 64 65 63 6f 64 65 | 20 63 6f 6d 6d 61 6e 64 |uudecode| command|
|00002720| 2c 20 69 2e 65 2e 20 61 | 0a 58 23 20 20 66 69 72 |, i.e. a|.X# fir|
|00002730| 73 74 20 28 6f 70 74 69 | 6f 6e 61 6c 29 20 61 72 |st (opti|onal) ar|
|00002740| 67 75 6d 65 6e 74 20 67 | 69 76 65 73 20 74 68 65 |gument g|ives the|
|00002750| 20 6e 61 6d 65 20 74 68 | 65 20 66 69 6c 65 20 74 | name th|e file t|
|00002760| 6f 20 62 65 20 64 65 63 | 6f 64 65 64 2e 0a 58 23 |o be dec|oded..X#|
|00002770| 20 20 49 66 20 74 68 69 | 73 20 69 73 20 6f 6d 69 | If thi|s is omi|
|00002780| 74 74 65 64 2c 20 69 69 | 64 65 63 6f 64 65 20 6a |tted, ii|decode j|
|00002790| 75 73 74 20 75 73 65 73 | 20 74 68 65 20 73 74 61 |ust uses| the sta|
|000027a0| 6e 64 61 72 64 20 69 6e | 70 75 74 2e 20 20 54 68 |ndard in|put. Th|
|000027b0| 65 20 2d 78 0a 58 23 20 | 20 73 77 69 74 63 68 20 |e -x.X# | switch |
|000027c0| 28 70 65 63 75 6c 69 61 | 72 20 74 6f 20 69 69 64 |(peculia|r to iid|
|000027d0| 65 63 6f 64 65 29 20 66 | 6f 72 63 65 73 20 75 73 |ecode) f|orces us|
|000027e0| 65 20 6f 66 20 74 68 65 | 20 74 68 65 20 78 78 64 |e of the| the xxd|
|000027f0| 65 63 6f 64 69 6e 67 0a | 58 23 20 20 61 6c 67 6f |ecoding.|X# algo|
|00002800| 72 69 74 68 6d 2e 20 20 | 49 66 20 79 6f 75 20 74 |rithm. |If you t|
|00002810| 72 79 20 74 6f 20 64 65 | 63 6f 64 65 20 61 6e 20 |ry to de|code an |
|00002820| 78 78 65 6e 63 6f 64 65 | 64 20 66 69 6c 65 20 77 |xxencode|d file w|
|00002830| 69 74 68 6f 75 74 20 73 | 70 65 63 69 2d 0a 58 23 |ithout s|peci-.X#|
|00002840| 20 20 2d 78 20 6f 6e 20 | 74 68 65 20 63 6f 6d 6d | -x on |the comm|
|00002850| 61 6e 64 20 6c 69 6e 65 | 2c 20 69 69 64 65 63 6f |and line|, iideco|
|00002860| 64 65 20 77 69 6c 6c 20 | 74 72 79 20 74 6f 20 66 |de will |try to f|
|00002870| 6f 72 67 65 20 61 68 65 | 61 64 20 61 6e 79 77 61 |orge ahe|ad anywa|
|00002880| 79 2e 0a 58 23 20 20 49 | 66 20 69 74 20 74 68 69 |y..X# I|f it thi|
|00002890| 6e 6b 73 20 79 6f 75 27 | 76 65 20 6d 61 64 65 20 |nks you'|ve made |
|000028a0| 61 20 6d 69 73 74 61 6b | 65 2c 20 69 69 64 65 63 |a mistak|e, iidec|
|000028b0| 6f 64 65 20 77 69 6c 6c | 20 69 6e 66 6f 72 6d 20 |ode will| inform |
|000028c0| 79 6f 75 20 61 66 74 65 | 72 0a 58 23 20 20 74 68 |you afte|r.X# th|
|000028d0| 65 20 64 65 63 6f 64 65 | 20 69 73 20 66 69 6e 69 |e decode| is fini|
|000028e0| 73 68 65 64 2e 0a 58 23 | 0a 58 23 20 20 42 55 47 |shed..X#|.X# BUG|
|000028f0| 53 3a 20 20 53 6c 6f 77 | 2e 20 20 49 20 64 65 63 |S: Slow|. I dec|
|00002900| 69 64 65 64 20 74 6f 20 | 67 6f 20 66 6f 72 20 63 |ided to |go for c|
|00002910| 6c 61 72 69 74 79 20 61 | 6e 64 20 73 79 6d 6d 65 |larity a|nd symme|
|00002920| 74 72 79 2c 20 72 61 74 | 68 65 72 20 74 68 61 6e |try, rat|her than|
|00002930| 0a 58 23 20 20 73 70 65 | 65 64 2c 20 61 6e 64 20 |.X# spe|ed, and |
|00002940| 73 6f 20 6f 70 74 65 64 | 20 74 6f 20 64 6f 20 74 |so opted| to do t|
|00002950| 68 69 6e 67 73 20 6c 69 | 6b 65 20 75 73 65 20 69 |hings li|ke use i|
|00002960| 73 68 69 66 74 28 69 2c | 6a 29 20 69 6e 73 74 65 |shift(i,|j) inste|
|00002970| 61 64 20 6f 66 0a 58 23 | 20 20 73 74 72 61 69 67 |ad of.X#| straig|
|00002980| 68 74 20 6d 75 6c 74 69 | 70 6c 69 63 61 74 69 6f |ht multi|plicatio|
|00002990| 6e 20 28 77 68 69 63 68 | 20 75 6e 64 65 72 20 49 |n (which| under I|
|000029a0| 63 6f 6e 20 76 38 20 69 | 73 20 6d 75 63 68 20 66 |con v8 i|s much f|
|000029b0| 61 73 74 65 72 29 2e 0a | 58 23 0a 58 23 23 23 23 |aster)..|X#.X####|
|000029c0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000029d0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000029e0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|000029f0| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a00| 23 23 23 23 23 23 23 23 | 0a 58 23 0a 58 23 20 20 |########|.X#.X# |
|00002a10| 53 65 65 20 61 6c 73 6f | 3a 20 69 69 65 6e 63 6f |See also|: iienco|
|00002a20| 64 65 2e 69 63 6e 0a 58 | 23 0a 58 23 23 23 23 23 |de.icn.X|#.X#####|
|00002a30| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a40| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a50| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a60| 23 23 23 23 23 23 23 23 | 23 23 23 23 23 23 23 23 |########|########|
|00002a70| 23 23 23 23 23 23 23 0a | 58 0a 58 0a 58 67 6c 6f |#######.|X.X.Xglo|
|00002a80| 62 61 6c 20 6f 76 65 72 | 73 69 7a 65 73 0a 58 0a |bal over|sizes.X.|
|00002a90| 58 70 72 6f 63 65 64 75 | 72 65 20 6d 61 69 6e 28 |Xprocedu|re main(|
|00002aa0| 61 29 0a 58 0a 58 20 20 | 20 20 6c 6f 63 61 6c 20 |a).X.X | local |
|00002ab0| 41 52 47 2c 20 69 6e 2c | 20 6f 75 74 2c 20 64 65 |ARG, in,| out, de|
|00002ac0| 73 74 2c 20 69 73 5f 78 | 78 0a 58 0a 58 20 20 20 |st, is_x|x.X.X |
|00002ad0| 20 23 20 43 68 65 63 6b | 20 66 6f 72 20 63 6f 72 | # Check| for cor|
|00002ae0| 72 65 63 74 20 6e 75 6d | 62 65 72 20 6f 66 20 61 |rect num|ber of a|
|00002af0| 72 67 73 2e 0a 58 20 20 | 20 20 69 66 20 2a 61 20 |rgs..X | if *a |
|00002b00| 3e 20 32 20 74 68 65 6e | 20 7b 0a 58 09 77 72 69 |> 2 then| {.X.wri|
|00002b10| 74 65 28 26 65 72 72 6f | 75 74 2c 22 75 73 61 67 |te(&erro|ut,"usag|
|00002b20| 65 3a 20 20 69 69 64 65 | 63 6f 64 65 20 5b 69 6e |e: iide|code [in|
|00002b30| 66 69 6c 65 5d 20 5b 2d | 78 5d 22 29 0a 58 09 65 |file] [-|x]").X.e|
|00002b40| 78 69 74 20 28 32 29 0a | 58 20 20 20 20 7d 0a 58 |xit (2).|X }.X|
|00002b50| 0a 58 20 20 20 20 23 20 | 43 68 65 63 6b 20 66 6f |.X # |Check fo|
|00002b60| 72 20 6f 70 74 69 6f 6e | 61 6c 20 69 6e 70 75 74 |r option|al input|
|00002b70| 20 66 69 6c 65 6e 61 6d | 65 20 61 6e 64 20 2d 78 | filenam|e and -x|
|00002b80| 0a 58 20 20 20 20 65 76 | 65 72 79 20 41 52 47 20 |.X ev|ery ARG |
|00002b90| 3a 3d 20 21 61 20 64 6f | 20 7b 0a 58 09 69 66 20 |:= !a do| {.X.if |
|00002ba0| 41 52 47 20 3d 3d 20 22 | 2d 78 22 20 74 68 65 6e |ARG == "|-x" then|
|00002bb0| 0a 58 09 20 20 20 20 69 | 73 5f 78 78 20 3a 3d 20 |.X. i|s_xx := |
|00002bc0| 31 0a 58 09 65 6c 73 65 | 20 7b 0a 58 09 20 20 20 |1.X.else| {.X. |
|00002bd0| 20 69 66 20 6e 6f 74 20 | 28 69 6e 20 3a 3d 20 6f | if not |(in := o|
|00002be0| 70 65 6e 28 41 52 47 2c | 20 22 72 22 29 29 20 74 |pen(ARG,| "r")) t|
|00002bf0| 68 65 6e 20 7b 0a 58 09 | 09 77 72 69 74 65 28 26 |hen {.X.|.write(&|
|00002c00| 65 72 72 6f 75 74 2c 22 | 43 61 6e 27 74 20 6f 70 |errout,"|Can't op|
|00002c10| 65 6e 20 69 6e 70 75 74 | 20 66 69 6c 65 2c 20 22 |en input| file, "|
|00002c20| 2c 61 5b 31 5d 2c 22 2e | 22 29 0a 58 09 09 77 72 |,a[1],".|").X..wr|
|00002c30| 69 74 65 28 26 65 72 72 | 6f 75 74 2c 22 75 73 61 |ite(&err|out,"usa|
|00002c40| 67 65 3a 20 20 69 69 64 | 65 63 6f 64 65 20 5b 69 |ge: iid|ecode [i|
|00002c50| 6e 66 69 6c 65 5d 20 5b | 2d 78 5d 22 29 0a 58 09 |nfile] [|-x]").X.|
|00002c60| 09 65 78 69 74 28 31 29 | 0a 58 09 20 20 20 20 7d |.exit(1)|.X. }|
|00002c70| 0a 58 09 7d 0a 58 20 20 | 20 20 7d 0a 58 20 20 20 |.X.}.X | }.X |
|00002c80| 20 2f 69 6e 20 3a 3d 20 | 26 69 6e 70 75 74 0a 58 | /in := |&input.X|
|00002c90| 0a 58 20 20 20 20 23 20 | 46 69 6e 64 20 74 68 65 |.X # |Find the|
|00002ca0| 20 22 62 65 67 69 6e 22 | 20 6c 69 6e 65 2c 20 61 | "begin"| line, a|
|00002cb0| 6e 64 20 64 65 74 65 72 | 6d 69 6e 65 20 74 68 65 |nd deter|mine the|
|00002cc0| 20 64 65 73 74 69 6e 61 | 74 69 6f 6e 20 66 69 6c | destina|tion fil|
|00002cd0| 65 20 6e 61 6d 65 2e 0a | 58 20 20 20 20 21 69 6e |e name..|X !in|
|00002ce0| 20 3f 20 7b 0a 58 09 74 | 61 62 28 6d 61 74 63 68 | ? {.X.t|ab(match|
|00002cf0| 28 22 62 65 67 69 6e 20 | 22 29 29 20 26 0a 58 09 |("begin |")) &.X.|
|00002d00| 74 61 62 28 6d 61 6e 79 | 28 26 64 69 67 69 74 73 |tab(many|(&digits|
|00002d10| 29 29 20 20 20 26 09 23 | 20 6d 6f 64 65 20 69 67 |)) &.#| mode ig|
|00002d20| 6e 6f 72 65 64 0a 58 09 | 74 61 62 28 6d 61 6e 79 |nored.X.|tab(many|
|00002d30| 28 27 20 27 29 29 20 20 | 20 20 20 20 20 26 0a 58 |(' ')) | &.X|
|00002d40| 09 64 65 73 74 20 3a 3d | 20 74 72 69 6d 28 74 61 |.dest :=| trim(ta|
|00002d50| 62 28 30 29 2c 27 5c 72 | 27 29 20 23 20 63 6f 6e |b(0),'\r|') # con|
|00002d60| 63 65 73 73 69 6f 6e 20 | 74 6f 20 4d 53 2d 44 4f |cession |to MS-DO|
|00002d70| 53 0a 58 20 20 20 20 7d | 0a 58 0a 58 20 20 20 20 |S.X }|.X.X |
|00002d80| 23 20 49 66 20 64 65 73 | 74 20 69 73 20 6e 75 6c |# If des|t is nul|
|00002d90| 6c 2c 20 74 68 65 20 62 | 65 67 69 6e 20 6c 69 6e |l, the b|egin lin|
|00002da0| 65 20 65 69 74 68 65 72 | 20 69 73 6e 27 74 20 70 |e either| isn't p|
|00002db0| 72 65 73 65 6e 74 2c 20 | 6f 72 20 69 73 0a 58 20 |resent, |or is.X |
|00002dc0| 20 20 20 23 20 63 6f 72 | 72 75 70 74 20 28 77 68 | # cor|rupt (wh|
|00002dd0| 69 63 68 20 6e 65 63 65 | 73 73 69 74 61 74 65 73 |ich nece|ssitates|
|00002de0| 20 6f 75 72 20 61 62 6f | 72 74 69 6e 67 20 77 69 | our abo|rting wi|
|00002df0| 74 68 20 61 6e 20 65 72 | 72 6f 72 20 6d 73 67 2e |th an er|ror msg.|
|00002e00| 29 2e 0a 58 20 20 20 20 | 69 66 20 2f 64 65 73 74 |)..X |if /dest|
|00002e10| 20 74 68 65 6e 20 7b 0a | 58 09 77 72 69 74 65 28 | then {.|X.write(|
|00002e20| 26 65 72 72 6f 75 74 2c | 22 4e 6f 20 62 65 67 69 |&errout,|"No begi|
|00002e30| 6e 20 6c 69 6e 65 2e 22 | 29 0a 58 09 65 78 69 74 |n line."|).X.exit|
|00002e40| 28 33 29 0a 58 20 20 20 | 20 7d 0a 58 0a 58 20 20 |(3).X | }.X.X |
|00002e50| 20 20 23 20 54 69 6c 64 | 65 20 65 78 70 61 6e 73 | # Tild|e expans|
|00002e60| 69 6f 6e 20 69 73 20 68 | 65 61 76 69 6c 79 20 55 |ion is h|eavily U|
|00002e70| 6e 69 78 20 64 65 70 65 | 6e 64 65 6e 74 2c 20 61 |nix depe|ndent, a|
|00002e80| 6e 64 20 77 65 20 63 61 | 6e 27 74 20 61 6c 77 61 |nd we ca|n't alwa|
|00002e90| 79 73 0a 58 20 20 20 20 | 23 20 73 61 66 65 6c 79 |ys.X |# safely|
|00002ea0| 20 77 72 69 74 65 20 74 | 68 65 20 66 69 6c 65 20 | write t|he file |
|00002eb0| 74 6f 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 64 |to the c|urrent d|
|00002ec0| 69 72 65 63 74 6f 72 79 | 2e 20 20 4f 75 72 20 6f |irectory|. Our o|
|00002ed0| 6e 6c 79 20 63 68 6f 69 | 63 65 0a 58 20 20 20 20 |nly choi|ce.X |
|00002ee0| 23 20 69 73 20 74 6f 20 | 61 62 6f 72 74 2e 0a 58 |# is to |abort..X|
|00002ef0| 20 20 20 20 69 66 20 6d | 61 74 63 68 28 22 7e 22 | if m|atch("~"|
|00002f00| 2c 64 65 73 74 29 20 74 | 68 65 6e 20 7b 0a 58 09 |,dest) t|hen {.X.|
|00002f10| 77 72 69 74 65 28 26 65 | 72 72 6f 75 74 2c 22 50 |write(&e|rrout,"P|
|00002f20| 6c 65 61 73 65 20 72 65 | 6d 6f 76 65 20 7e 20 66 |lease re|move ~ f|
|00002f30| 72 6f 6d 20 69 6e 70 75 | 74 20 66 69 6c 65 20 62 |rom inpu|t file b|
|00002f40| 65 67 69 6e 20 6c 69 6e | 65 2e 22 29 0a 58 09 65 |egin lin|e.").X.e|
|00002f50| 78 69 74 28 34 29 0a 58 | 20 20 20 20 7d 0a 58 20 |xit(4).X| }.X |
|00002f60| 20 20 20 20 20 20 0a 58 | 20 20 20 20 6f 75 74 20 | .X| out |
|00002f70| 3a 3d 20 6f 70 65 6e 28 | 64 65 73 74 2c 20 22 77 |:= open(|dest, "w|
|00002f80| 75 22 29 0a 58 20 20 20 | 20 64 65 63 6f 64 65 28 |u").X | decode(|
|00002f90| 69 6e 2c 20 6f 75 74 2c | 20 69 73 5f 78 78 29 09 |in, out,| is_xx).|
|00002fa0| 23 20 64 65 63 6f 64 65 | 20 63 68 65 63 6b 73 20 |# decode| checks |
|00002fb0| 66 6f 72 20 22 65 6e 64 | 22 20 6c 69 6e 65 0a 58 |for "end|" line.X|
|00002fc0| 20 20 20 20 69 66 20 6e | 6f 74 20 6d 61 74 63 68 | if n|ot match|
|00002fd0| 28 22 65 6e 64 22 2c 20 | 21 69 6e 29 20 74 68 65 |("end", |!in) the|
|00002fe0| 6e 20 7b 0a 58 09 77 72 | 69 74 65 28 26 65 72 72 |n {.X.wr|ite(&err|
|00002ff0| 6f 75 74 2c 22 4e 6f 20 | 65 6e 64 20 6c 69 6e 65 |out,"No |end line|
|00003000| 2e 5c 6e 22 29 0a 58 09 | 65 78 69 74 28 35 29 0a |.\n").X.|exit(5).|
|00003010| 58 20 20 20 20 7d 0a 58 | 0a 58 20 20 20 20 23 20 |X }.X|.X # |
|00003020| 43 68 65 63 6b 20 67 6c | 6f 62 61 6c 20 76 61 72 |Check gl|obal var|
|00003030| 69 61 62 6c 65 20 6f 76 | 65 72 73 69 7a 65 73 20 |iable ov|ersizes |
|00003040| 28 73 65 74 20 62 79 20 | 44 45 43 29 20 74 6f 20 |(set by |DEC) to |
|00003050| 73 65 65 20 69 66 20 77 | 65 20 75 73 65 64 20 74 |see if w|e used t|
|00003060| 68 65 0a 58 20 20 20 20 | 23 20 63 6f 72 72 65 63 |he.X |# correc|
|00003070| 74 20 64 65 63 6f 64 69 | 6e 67 20 61 6c 67 6f 72 |t decodi|ng algor|
|00003080| 69 74 68 6d 2e 0a 58 20 | 20 20 20 69 66 20 5c 69 |ithm..X | if \i|
|00003090| 73 5f 78 78 20 74 68 65 | 6e 20 7b 0a 58 09 69 66 |s_xx the|n {.X.if|
|000030a0| 20 6f 76 65 72 73 69 7a | 65 73 20 3d 20 30 20 74 | oversiz|es = 0 t|
|000030b0| 68 65 6e 20 7b 0a 58 09 | 20 20 20 20 77 72 69 74 |hen {.X.| writ|
|000030c0| 65 28 26 65 72 72 6f 75 | 74 2c 20 22 49 6e 70 75 |e(&errou|t, "Inpu|
|000030d0| 74 20 66 69 6c 65 20 61 | 70 70 65 61 72 73 20 74 |t file a|ppears t|
|000030e0| 6f 20 68 61 76 65 20 62 | 65 65 6e 20 75 75 65 6e |o have b|een uuen|
|000030f0| 63 6f 64 65 64 2e 22 29 | 0a 58 09 20 20 20 20 77 |coded.")|.X. w|
|00003100| 72 69 74 65 28 26 65 72 | 72 6f 75 74 2c 20 22 54 |rite(&er|rout, "T|
|00003110| 72 79 20 69 6e 76 6f 6b | 69 6e 67 20 69 69 64 65 |ry invok|ing iide|
|00003120| 63 6f 64 65 20 77 69 74 | 68 6f 75 74 20 74 68 65 |code wit|hout the|
|00003130| 20 2d 78 20 61 72 67 2e | 22 29 0a 58 09 7d 0a 58 | -x arg.|").X.}.X|
|00003140| 20 20 20 20 7d 0a 58 20 | 20 20 20 65 6c 73 65 20 | }.X | else |
|00003150| 7b 0a 58 09 69 66 20 6f | 76 65 72 73 69 7a 65 73 |{.X.if o|versizes|
|00003160| 20 3e 20 31 20 74 68 65 | 6e 20 7b 0a 58 09 20 20 | > 1 the|n {.X. |
|00003170| 20 20 77 72 69 74 65 28 | 26 65 72 72 6f 75 74 2c | write(|&errout,|
|00003180| 20 22 49 6e 70 75 74 20 | 66 69 6c 65 20 69 73 20 | "Input |file is |
|00003190| 65 69 74 68 65 72 20 63 | 6f 72 72 75 70 74 2c 20 |either c|orrupt, |
|000031a0| 6f 72 20 78 78 65 6e 63 | 6f 64 65 64 2e 22 29 0a |or xxenc|oded.").|
|000031b0| 58 09 20 20 20 20 77 72 | 69 74 65 28 26 65 72 72 |X. wr|ite(&err|
|000031c0| 6f 75 74 2c 20 22 50 6c | 65 61 73 65 20 63 68 65 |out, "Pl|ease che|
|000031d0| 63 6b 20 74 68 65 20 6f | 75 74 70 75 74 3b 20 74 |ck the o|utput; t|
|000031e0| 72 79 20 74 68 65 20 2d | 78 20 6f 70 74 69 6f 6e |ry the -|x option|
|000031f0| 2e 22 29 0a 58 09 7d 0a | 58 20 20 20 20 7d 0a 58 |.").X.}.|X }.X|
|00003200| 0a 58 20 20 20 20 65 76 | 65 72 79 20 63 6c 6f 73 |.X ev|ery clos|
|00003210| 65 28 5c 69 6e 20 7c 20 | 6f 75 74 29 0a 58 0a 58 |e(\in | |out).X.X|
|00003220| 20 20 20 20 65 78 69 74 | 28 30 29 0a 58 0a 58 65 | exit|(0).X.Xe|
|00003230| 6e 64 0a 58 0a 58 0a 58 | 0a 58 70 72 6f 63 65 64 |nd.X.X.X|.Xproced|
|00003240| 75 72 65 20 64 65 63 6f | 64 65 28 69 6e 2c 20 6f |ure deco|de(in, o|
|00003250| 75 74 2c 20 69 73 5f 78 | 78 29 0a 58 20 20 20 20 |ut, is_x|x).X |
|00003260| 0a 58 20 20 20 20 23 20 | 43 6f 70 79 20 66 72 6f |.X # |Copy fro|
|00003270| 6d 20 69 6e 20 74 6f 20 | 6f 75 74 2c 20 64 65 63 |m in to |out, dec|
|00003280| 6f 64 69 6e 67 20 61 73 | 20 79 6f 75 20 67 6f 20 |oding as| you go |
|00003290| 61 6c 6f 6e 67 2e 0a 58 | 0a 58 20 20 20 20 6c 6f |along..X|.X lo|
|000032a0| 63 61 6c 20 6c 69 6e 65 | 2c 20 63 68 75 6e 6b 0a |cal line|, chunk.|
|000032b0| 58 0a 58 20 20 20 20 69 | 66 20 5c 69 73 5f 78 78 |X.X i|f \is_xx|
|000032c0| 20 74 68 65 6e 0a 58 09 | 44 45 43 20 3a 3d 20 78 | then.X.|DEC := x|
|000032d0| 78 44 45 43 0a 58 0a 58 | 20 20 20 20 77 68 69 6c |xDEC.X.X| whil|
|000032e0| 65 20 6c 69 6e 65 20 3a | 3d 20 72 65 61 64 28 69 |e line :|= read(i|
|000032f0| 6e 29 20 64 6f 20 7b 0a | 58 0a 58 09 69 66 20 2a |n) do {.|X.X.if *|
|00003300| 6c 69 6e 65 20 3d 20 30 | 20 74 68 65 6e 20 7b 0a |line = 0| then {.|
|00003310| 58 09 20 20 20 20 77 72 | 69 74 65 28 26 65 72 72 |X. wr|ite(&err|
|00003320| 6f 75 74 2c 22 53 68 6f | 72 74 20 66 69 6c 65 2e |out,"Sho|rt file.|
|00003330| 5c 6e 22 29 0a 58 09 20 | 20 20 20 65 78 69 74 28 |\n").X. | exit(|
|00003340| 31 30 29 0a 58 09 7d 0a | 58 0a 58 09 6c 69 6e 65 |10).X.}.|X.X.line|
|00003350| 20 3f 20 7b 0a 58 09 20 | 20 20 20 6e 20 3a 3d 20 | ? {.X. | n := |
|00003360| 44 45 43 28 6f 72 64 28 | 6d 6f 76 65 28 31 29 29 |DEC(ord(|move(1))|
|00003370| 29 0a 58 0a 58 09 20 20 | 20 20 69 66 20 6e 6f 74 |).X.X. | if not|
|00003380| 20 28 28 2a 6c 69 6e 65 | 2d 31 29 20 25 20 34 20 | ((*line|-1) % 4 |
|00003390| 3d 20 30 2c 20 6e 20 3c | 3d 20 28 28 2a 6c 69 6e |= 0, n <|= ((*lin|
|000033a0| 65 20 2f 20 34 29 2a 33 | 29 29 20 74 68 65 6e 20 |e / 4)*3|)) then |
|000033b0| 7b 0a 58 09 09 77 72 69 | 74 65 28 26 65 72 72 6f |{.X..wri|te(&erro|
|000033c0| 75 74 2c 22 53 68 6f 72 | 74 20 61 6e 64 2f 6f 72 |ut,"Shor|t and/or|
|000033d0| 20 63 6f 72 72 75 70 74 | 20 6c 69 6e 65 3a 5c 6e | corrupt| line:\n|
|000033e0| 22 2c 6c 69 6e 65 29 0a | 58 09 09 69 66 20 2f 69 |",line).|X..if /i|
|000033f0| 73 5f 78 78 20 26 20 6f | 76 65 72 73 69 7a 65 73 |s_xx & o|versizes|
|00003400| 20 3e 20 31 20 74 68 65 | 6e 0a 58 09 09 20 20 20 | > 1 the|n.X.. |
|00003410| 20 77 72 69 74 65 28 26 | 65 72 72 6f 75 74 2c 22 | write(&|errout,"|
|00003420| 54 72 79 20 2d 78 20 6f | 70 74 69 6f 6e 3f 22 29 |Try -x o|ption?")|
|00003430| 0a 58 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.X | |
|00003440| 20 20 65 78 69 74 28 31 | 35 29 0a 58 20 20 20 20 | exit(1|5).X |
|00003450| 20 20 20 20 20 20 20 20 | 7d 0a 58 0a 58 09 20 20 | |}.X.X. |
|00003460| 20 20 23 20 55 75 65 6e | 63 6f 64 65 20 73 69 67 | # Uuen|code sig|
|00003470| 6e 61 6c 73 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |nals the| end of |
|00003480| 74 68 65 20 63 6f 64 65 | 64 20 74 65 78 74 20 62 |the code|d text b|
|00003490| 79 20 61 20 73 70 61 63 | 65 0a 58 09 20 20 20 20 |y a spac|e.X. |
|000034a0| 23 20 61 6e 64 20 61 20 | 6c 69 6e 65 20 28 69 2e |# and a |line (i.|
|000034b0| 65 2e 20 61 20 7a 65 72 | 6f 2d 6c 65 6e 67 74 68 |e. a zer|o-length|
|000034c0| 20 6c 69 6e 65 2c 20 63 | 6f 64 65 64 20 61 73 20 | line, c|oded as |
|000034d0| 61 20 73 70 61 63 65 29 | 2e 0a 58 09 20 20 20 20 |a space)|..X. |
|000034e0| 69 66 20 6e 20 3c 3d 20 | 30 20 74 68 65 6e 20 62 |if n <= |0 then b|
|000034f0| 72 65 61 6b 0a 58 09 20 | 20 20 20 0a 58 09 20 20 |reak.X. | .X. |
|00003500| 20 20 77 68 69 6c 65 20 | 28 6e 20 3e 20 30 29 20 | while |(n > 0) |
|00003510| 64 6f 20 7b 0a 58 09 09 | 63 68 75 6e 6b 20 3a 3d |do {.X..|chunk :=|
|00003520| 20 6d 6f 76 65 28 34 29 | 20 7c 20 74 61 62 28 30 | move(4)| | tab(0|
|00003530| 29 0a 58 09 09 6f 75 74 | 64 65 63 28 63 68 75 6e |).X..out|dec(chun|
|00003540| 6b 2c 20 6f 75 74 2c 20 | 6e 29 0a 58 09 09 6e 20 |k, out, |n).X..n |
|00003550| 2d 3a 3d 20 33 0a 58 09 | 20 20 20 20 7d 0a 58 09 |-:= 3.X.| }.X.|
|00003560| 7d 0a 58 20 20 20 20 7d | 0a 58 20 20 20 20 0a 58 |}.X }|.X .X|
|00003570| 20 20 20 20 72 65 74 75 | 72 6e 0a 58 0a 58 65 6e | retu|rn.X.Xen|
|00003580| 64 0a 58 0a 58 0a 58 0a | 58 70 72 6f 63 65 64 75 |d.X.X.X.|Xprocedu|
|00003590| 72 65 20 6f 75 74 64 65 | 63 28 73 2c 20 66 2c 20 |re outde|c(s, f, |
|000035a0| 6e 29 0a 58 0a 58 20 20 | 20 20 23 20 4f 75 74 70 |n).X.X | # Outp|
|000035b0| 75 74 20 61 20 67 72 6f | 75 70 20 6f 66 20 33 20 |ut a gro|up of 3 |
|000035c0| 62 79 74 65 73 20 28 34 | 20 69 6e 70 75 74 20 63 |bytes (4| input c|
|000035d0| 68 61 72 61 63 74 65 72 | 73 29 2e 20 20 4e 20 69 |haracter|s). N i|
|000035e0| 73 20 75 73 65 64 20 74 | 6f 0a 58 20 20 20 20 23 |s used t|o.X #|
|000035f0| 20 74 65 6c 6c 20 75 73 | 20 6e 6f 74 20 74 6f 20 | tell us| not to |
|00003600| 6f 75 74 70 75 74 20 61 | 6c 6c 20 6f 66 20 74 68 |output a|ll of th|
|00003610| 65 20 63 68 61 72 73 20 | 61 74 20 74 68 65 20 65 |e chars |at the e|
|00003620| 6e 64 20 6f 66 20 74 68 | 65 20 66 69 6c 65 2e 0a |nd of th|e file..|
|00003630| 58 0a 58 20 20 20 20 6c | 6f 63 61 6c 20 63 31 2c |X.X l|ocal c1,|
|00003640| 20 63 32 2c 20 63 33 0a | 58 0a 58 20 20 20 20 63 | c2, c3.|X.X c|
|00003650| 31 20 3a 3d 20 69 61 6e | 64 28 0a 58 09 20 20 20 |1 := ian|d(.X. |
|00003660| 20 20 20 20 69 6f 72 28 | 0a 58 09 09 20 20 20 69 | ior(|.X.. i|
|00003670| 73 68 69 66 74 28 44 45 | 43 28 6f 72 64 28 73 5b |shift(DE|C(ord(s[|
|00003680| 31 5d 29 29 2c 2b 32 29 | 2c 0a 58 09 09 20 20 20 |1])),+2)|,.X.. |
|00003690| 69 73 68 69 66 74 28 44 | 45 43 28 6f 72 64 28 73 |ishift(D|EC(ord(s|
|000036a0| 5b 32 5d 29 29 2c 2d 34 | 29 0a 58 09 09 20 20 20 |[2])),-4|).X.. |
|000036b0| 29 2c 0a 58 09 20 20 20 | 20 20 20 20 38 72 30 33 |),.X. | 8r03|
|000036c0| 37 37 29 0a 58 20 20 20 | 20 63 32 20 3a 3d 20 69 |77).X | c2 := i|
|000036d0| 61 6e 64 28 0a 58 09 20 | 20 20 20 20 20 20 69 6f |and(.X. | io|
|000036e0| 72 28 0a 58 09 09 20 20 | 20 69 73 68 69 66 74 28 |r(.X.. | ishift(|
|000036f0| 44 45 43 28 6f 72 64 28 | 73 5b 32 5d 29 29 2c 2b |DEC(ord(|s[2])),+|
|00003700| 34 29 2c 0a 58 09 09 20 | 20 20 69 73 68 69 66 74 |4),.X.. | ishift|
|00003710| 28 44 45 43 28 6f 72 64 | 28 73 5b 33 5d 29 29 2c |(DEC(ord|(s[3])),|
|00003720| 2d 32 29 0a 58 09 09 20 | 20 20 29 2c 0a 58 09 20 |-2).X.. | ),.X. |
|00003730| 20 20 20 20 20 20 38 72 | 30 33 37 37 29 0a 58 20 | 8r|0377).X |
|00003740| 20 20 20 63 33 20 3a 3d | 20 69 61 6e 64 28 0a 58 | c3 :=| iand(.X|
|00003750| 09 20 20 20 20 20 20 20 | 69 6f 72 28 0a 58 09 09 |. |ior(.X..|
|00003760| 20 20 20 69 73 68 69 66 | 74 28 44 45 43 28 6f 72 | ishif|t(DEC(or|
|00003770| 64 28 73 5b 33 5d 29 29 | 2c 2b 36 29 2c 0a 58 09 |d(s[3]))|,+6),.X.|
|00003780| 09 20 20 20 44 45 43 28 | 6f 72 64 28 73 5b 34 5d |. DEC(|ord(s[4]|
|00003790| 29 29 0a 58 09 09 20 20 | 20 29 2c 0a 58 09 20 20 |)).X.. | ),.X. |
|000037a0| 20 20 20 20 20 38 72 30 | 33 37 37 29 0a 58 0a 58 | 8r0|377).X.X|
|000037b0| 20 20 20 20 69 66 20 28 | 6e 20 3e 3d 20 31 29 20 | if (|n >= 1) |
|000037c0| 74 68 65 6e 0a 58 09 77 | 72 69 74 65 73 28 66 2c |then.X.w|rites(f,|
|000037d0| 63 68 61 72 28 63 31 29 | 29 0a 58 20 20 20 20 69 |char(c1)|).X i|
|000037e0| 66 20 28 6e 20 3e 3d 20 | 32 29 20 74 68 65 6e 0a |f (n >= |2) then.|
|000037f0| 58 09 77 72 69 74 65 73 | 28 66 2c 63 68 61 72 28 |X.writes|(f,char(|
|00003800| 63 32 29 29 0a 58 20 20 | 20 20 69 66 20 28 6e 20 |c2)).X | if (n |
|00003810| 3e 3d 20 33 29 20 74 68 | 65 6e 0a 58 09 77 72 69 |>= 3) th|en.X.wri|
|00003820| 74 65 73 28 66 2c 63 68 | 61 72 28 63 33 29 29 0a |tes(f,ch|ar(c3)).|
|00003830| 58 0a 58 65 6e 64 09 0a | 58 0a 58 0a 58 0a 58 70 |X.Xend..|X.X.X.Xp|
|00003840| 72 6f 63 65 64 75 72 65 | 20 44 45 43 28 63 29 0a |rocedure| DEC(c).|
|00003850| 58 0a 58 20 20 20 20 23 | 20 67 6c 6f 62 61 6c 20 |X.X #| global |
|00003860| 6f 76 65 72 73 69 7a 65 | 73 0a 58 20 20 20 20 69 |oversize|s.X i|
|00003870| 6e 69 74 69 61 6c 20 6f | 76 65 72 73 69 7a 65 73 |nitial o|versizes|
|00003880| 20 3a 3d 20 30 0a 58 0a | 58 20 20 20 20 23 20 43 | := 0.X.|X # C|
|00003890| 6f 75 6e 74 20 63 68 61 | 72 61 63 74 65 72 73 20 |ount cha|racters |
|000038a0| 6c 65 78 69 63 61 6c 6c | 79 20 67 72 65 61 74 65 |lexicall|y greate|
|000038b0| 72 20 6f 72 20 65 71 75 | 61 6c 20 74 6f 20 27 61 |r or equ|al to 'a|
|000038c0| 2e 27 0a 58 20 20 20 20 | 23 20 49 66 20 77 65 20 |.'.X |# If we |
|000038d0| 67 65 74 20 61 20 6c 6f | 74 20 6f 66 20 74 68 65 |get a lo|t of the|
|000038e0| 73 65 2c 20 74 68 65 20 | 66 69 6c 65 20 69 73 20 |se, the |file is |
|000038f0| 63 6f 72 72 75 70 74 2c | 20 6f 72 20 70 65 72 68 |corrupt,| or perh|
|00003900| 61 70 73 0a 58 20 20 20 | 20 23 20 78 78 65 6e 63 |aps.X | # xxenc|
|00003910| 6f 64 65 64 20 28 69 6e | 20 77 68 69 63 68 20 63 |oded (in| which c|
|00003920| 61 73 65 20 2d 78 20 73 | 68 6f 75 6c 64 20 68 61 |ase -x s|hould ha|
|00003930| 76 65 20 62 65 65 6e 20 | 73 70 65 63 69 66 69 65 |ve been |specifie|
|00003940| 64 29 2e 0a 58 20 20 20 | 20 69 66 20 63 20 3e 3d |d)..X | if c >=|
|00003950| 20 39 37 20 74 68 65 6e | 0a 58 09 6f 76 65 72 73 | 97 then|.X.overs|
|00003960| 69 7a 65 73 20 2b 3a 3d | 20 31 0a 58 0a 58 20 20 |izes +:=| 1.X.X |
|00003970| 20 20 23 20 53 75 62 74 | 72 61 63 74 20 33 32 20 | # Subt|ract 32 |
|00003980| 61 6e 64 20 6d 61 73 6b | 20 6f 66 66 20 73 65 76 |and mask| off sev|
|00003990| 65 6e 74 68 20 61 6e 64 | 20 68 69 67 68 65 72 20 |enth and| higher |
|000039a0| 62 69 74 73 2e 0a 58 20 | 20 20 20 72 65 74 75 72 |bits..X | retur|
|000039b0| 6e 20 69 61 6e 64 28 63 | 20 2d 20 33 32 2c 20 38 |n iand(c| - 32, 8|
|000039c0| 72 30 37 37 29 0a 58 0a | 58 65 6e 64 0a 58 0a 58 |r077).X.|Xend.X.X|
|000039d0| 0a 58 0a 58 70 72 6f 63 | 65 64 75 72 65 20 78 78 |.X.Xproc|edure xx|
|000039e0| 44 45 43 28 63 29 0a 58 | 0a 58 20 20 20 20 6c 6f |DEC(c).X|.X lo|
|000039f0| 63 61 6c 20 6b 2c 20 6f | 72 64 76 61 6c 0a 58 20 |cal k, o|rdval.X |
|00003a00| 20 20 20 73 74 61 74 69 | 63 20 6f 72 64 74 62 6c | stati|c ordtbl|
|00003a10| 0a 58 20 20 20 20 23 20 | 67 6c 6f 62 61 6c 20 6f |.X # |global o|
|00003a20| 76 65 72 73 69 7a 65 73 | 0a 58 20 20 20 20 69 6e |versizes|.X in|
|00003a30| 69 74 69 61 6c 20 7b 0a | 58 09 6f 72 64 76 61 6c |itial {.|X.ordval|
|00003a40| 20 3a 3d 20 2d 31 0a 58 | 09 6f 72 64 74 62 6c 20 | := -1.X|.ordtbl |
|00003a50| 3a 3d 20 74 61 62 6c 65 | 28 29 0a 58 09 65 76 65 |:= table|().X.eve|
|00003a60| 72 79 20 6b 20 3a 3d 20 | 6f 72 64 28 21 22 2b 2d |ry k := |ord(!"+-|
|00003a70| 30 31 32 33 34 35 36 37 | 38 39 41 42 43 44 45 46 |01234567|89ABCDEF|
|00003a80| 47 48 49 4a 4b 4c 4d 4e | 4f 50 51 52 53 54 5f 0a |GHIJKLMN|OPQRST_.|
|00003a90| 58 09 09 20 20 20 20 20 | 20 20 20 20 55 56 57 58 |X.. | UVWX|
|00003aa0| 59 5a 61 62 63 64 65 66 | 67 68 69 6a 6b 6c 6d 6e |YZabcdef|ghijklmn|
|00003ab0| 6f 70 71 72 73 74 75 76 | 77 78 79 7a 22 29 0a 58 |opqrstuv|wxyz").X|
|00003ac0| 09 64 6f 20 69 6e 73 65 | 72 74 28 6f 72 64 74 62 |.do inse|rt(ordtb|
|00003ad0| 6c 2c 20 6b 2c 20 6f 72 | 64 76 61 6c 20 2b 3a 3d |l, k, or|dval +:=|
|00003ae0| 20 31 29 0a 58 09 6f 76 | 65 72 73 69 7a 65 73 20 | 1).X.ov|ersizes |
|00003af0| 3a 3d 20 30 0a 58 20 20 | 20 20 7d 0a 58 0a 58 20 |:= 0.X | }.X.X |
|00003b00| 20 20 20 23 20 4d 61 73 | 6b 20 6f 66 66 20 65 69 | # Mas|k off ei|
|00003b10| 67 68 74 68 20 61 6e 64 | 20 68 69 67 68 65 72 20 |ghth and| higher |
|00003b20| 62 69 74 73 2e 0a 58 20 | 20 20 20 6e 65 77 5f 63 |bits..X | new_c|
|00003b30| 20 3a 3d 20 69 61 6e 64 | 28 63 2c 20 38 72 31 37 | := iand|(c, 8r17|
|00003b40| 37 29 0a 58 0a 58 20 20 | 20 20 23 20 43 6f 75 6e |7).X.X | # Coun|
|00003b50| 74 20 63 68 61 72 61 63 | 74 65 72 73 20 6c 65 78 |t charac|ters lex|
|00003b60| 69 63 61 6c 6c 79 20 67 | 72 65 61 74 65 72 20 6f |ically g|reater o|
|00003b70| 72 20 65 71 75 61 6c 20 | 74 6f 20 27 61 2e 27 0a |r equal |to 'a.'.|
|00003b80| 58 20 20 20 20 23 20 49 | 66 20 77 65 20 66 69 6e |X # I|f we fin|
|00003b90| 64 20 6e 6f 6e 65 20 6f | 66 20 74 68 65 73 65 2c |d none o|f these,|
|00003ba0| 20 74 68 65 20 66 69 6c | 65 20 70 72 6f 62 61 62 | the fil|e probab|
|00003bb0| 6c 79 20 77 61 73 6e 27 | 74 20 78 78 65 6e 63 6f |ly wasn'|t xxenco|
|00003bc0| 64 65 64 2e 0a 58 20 20 | 20 20 69 66 20 6e 65 77 |ded..X | if new|
|00003bd0| 5f 63 20 3e 3d 20 39 37 | 20 74 68 65 6e 0a 58 09 |_c >= 97| then.X.|
|00003be0| 6f 76 65 72 73 69 7a 65 | 73 20 2b 3a 3d 20 31 0a |oversize|s +:= 1.|
|00003bf0| 58 0a 58 20 20 20 20 23 | 20 4d 61 70 20 74 6f 20 |X.X #| Map to |
|00003c00| 30 2d 36 33 20 72 61 6e | 67 65 20 28 30 30 31 31 |0-63 ran|ge (0011|
|00003c10| 31 31 31 31 20 6f 72 20 | 6c 65 73 73 29 2c 20 6d |1111 or |less), m|
|00003c20| 61 73 6b 20 6f 66 66 20 | 65 78 74 72 61 20 62 69 |ask off |extra bi|
|00003c30| 74 73 2e 0a 58 20 20 20 | 20 72 65 74 75 72 6e 20 |ts..X | return |
|00003c40| 69 61 6e 64 28 6f 72 64 | 74 62 6c 5b 6e 65 77 5f |iand(ord|tbl[new_|
|00003c50| 63 5d 2c 20 38 72 30 37 | 37 29 0a 58 0a 58 65 6e |c], 8r07|7).X.Xen|
|00003c60| 64 0a 53 48 41 52 5f 45 | 4f 46 0a 74 72 75 65 20 |d.SHAR_E|OF.true |
|00003c70| 7c 7c 20 65 63 68 6f 20 | 27 72 65 73 74 6f 72 65 ||| echo |'restore|
|00003c80| 20 6f 66 20 69 69 64 65 | 63 6f 64 65 2e 69 63 6e | of iide|code.icn|
|00003c90| 20 66 61 69 6c 65 64 27 | 0a 72 6d 20 2d 66 20 5f | failed'|.rm -f _|
|00003ca0| 73 68 61 72 5f 77 6e 74 | 5f 2e 74 6d 70 0a 66 69 |shar_wnt|_.tmp.fi|
|00003cb0| 0a 23 20 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |.# =====|========|
|00003cc0| 20 52 45 41 44 4d 45 20 | 3d 3d 3d 3d 3d 3d 3d 3d | README |========|
|00003cd0| 3d 3d 3d 3d 3d 3d 0a 69 | 66 20 74 65 73 74 20 2d |======.i|f test -|
|00003ce0| 66 20 27 52 45 41 44 4d | 45 27 20 2d 61 20 58 22 |f 'READM|E' -a X"|
|00003cf0| 24 31 22 20 21 3d 20 58 | 22 2d 63 22 3b 20 74 68 |$1" != X|"-c"; th|
|00003d00| 65 6e 0a 09 65 63 68 6f | 20 27 78 20 2d 20 73 6b |en..echo| 'x - sk|
|00003d10| 69 70 70 69 6e 67 20 52 | 45 41 44 4d 45 20 28 46 |ipping R|EADME (F|
|00003d20| 69 6c 65 20 61 6c 72 65 | 61 64 79 20 65 78 69 73 |ile alre|ady exis|
|00003d30| 74 73 29 27 0a 09 72 6d | 20 2d 66 20 5f 73 68 61 |ts)'..rm| -f _sha|
|00003d40| 72 5f 77 6e 74 5f 2e 74 | 6d 70 0a 65 6c 73 65 0a |r_wnt_.t|mp.else.|
|00003d50| 3e 20 5f 73 68 61 72 5f | 77 6e 74 5f 2e 74 6d 70 |> _shar_|wnt_.tmp|
|00003d60| 0a 65 63 68 6f 20 27 78 | 20 2d 20 65 78 74 72 61 |.echo 'x| - extra|
|00003d70| 63 74 69 6e 67 20 52 45 | 41 44 4d 45 20 28 54 65 |cting RE|ADME (Te|
|00003d80| 78 74 29 27 0a 73 65 64 | 20 27 73 2f 5e 58 2f 2f |xt)'.sed| 's/^X//|
|00003d90| 27 20 3c 3c 20 27 53 48 | 41 52 5f 45 4f 46 27 20 |' << 'SH|AR_EOF' |
|00003da0| 3e 20 27 52 45 41 44 4d | 45 27 20 26 26 0a 58 0a |> 'READM|E' &&.X.|
|00003db0| 58 49 6e 63 6c 75 64 65 | 64 20 69 6e 20 74 68 69 |XInclude|d in thi|
|00003dc0| 73 20 70 61 63 6b 61 67 | 65 20 61 72 65 20 74 77 |s packag|e are tw|
|00003dd0| 6f 20 49 63 6f 6e 20 73 | 6f 75 72 63 65 20 66 69 |o Icon s|ource fi|
|00003de0| 6c 65 73 2c 20 69 69 65 | 6e 63 6f 64 65 2e 69 63 |les, iie|ncode.ic|
|00003df0| 6e 20 61 6e 64 0a 58 69 | 69 64 65 63 6f 64 65 2e |n and.Xi|idecode.|
|00003e00| 69 63 6e 2e 20 20 57 68 | 65 6e 20 63 6f 6d 70 69 |icn. Wh|en compi|
|00003e10| 6c 65 64 2c 20 74 68 65 | 73 65 20 77 69 6c 6c 20 |led, the|se will |
|00003e20| 79 69 65 6c 64 20 69 63 | 6f 64 65 20 66 69 6c 65 |yield ic|ode file|
|00003e30| 73 20 77 68 69 63 68 0a | 58 65 6d 75 6c 61 74 65 |s which.|Xemulate|
|00003e40| 20 74 68 65 20 55 6e 69 | 78 20 75 75 65 6e 63 6f | the Uni|x uuenco|
|00003e50| 64 65 20 61 6e 64 20 75 | 75 64 65 63 6f 64 65 20 |de and u|udecode |
|00003e60| 63 6f 6d 6d 61 6e 64 73 | 2e 20 20 54 68 65 79 20 |commands|. They |
|00003e70| 61 72 65 20 73 75 70 70 | 6f 73 65 64 20 74 6f 0a |are supp|osed to.|
|00003e80| 58 62 65 20 63 6f 6d 70 | 6c 65 74 65 6c 79 20 63 |Xbe comp|letely c|
|00003e90| 6f 6d 70 61 74 69 62 6c | 65 20 77 69 74 68 20 61 |ompatibl|e with a|
|00003ea0| 6c 6c 20 65 78 69 73 74 | 69 6e 67 20 75 75 65 6e |ll exist|ing uuen|
|00003eb0| 2f 64 65 63 6f 64 65 20 | 76 65 72 73 69 6f 6e 73 |/decode |versions|
|00003ec0| 2c 20 61 6e 64 0a 58 61 | 72 65 20 70 61 74 74 65 |, and.Xa|re patte|
|00003ed0| 72 6e 65 64 20 61 66 74 | 65 72 20 6c 61 74 65 73 |rned aft|er lates|
|00003ee0| 74 20 70 75 62 6c 69 63 | 6c 79 20 64 69 73 74 72 |t public|ly distr|
|00003ef0| 69 62 75 74 61 62 6c 65 | 20 42 53 44 20 43 20 73 |ibutable| BSD C s|
|00003f00| 6f 75 72 63 65 20 63 6f | 64 65 2e 0a 58 0a 58 46 |ource co|de..X.XF|
|00003f10| 6f 72 20 74 68 6f 73 65 | 20 77 68 6f 20 61 72 65 |or those| who are|
|00003f20| 20 77 6f 72 6b 69 6e 67 | 20 61 74 20 73 69 74 65 | working| at site|
|00003f30| 73 20 73 75 62 6a 65 63 | 74 20 74 6f 20 74 68 65 |s subjec|t to the|
|00003f40| 20 76 69 63 69 73 73 69 | 74 75 64 65 73 20 6f 66 | vicissi|tudes of|
|00003f50| 0a 58 41 53 43 49 49 3c | 2d 3e 45 42 43 44 49 43 |.XASCII<|->EBCDIC|
|00003f60| 20 74 72 61 6e 73 6c 61 | 74 69 6f 6e 2c 20 61 6e | transla|tion, an|
|00003f70| 20 65 78 74 72 61 20 73 | 77 69 74 63 68 20 28 2d | extra s|witch (-|
|00003f80| 78 29 20 69 73 20 69 6e | 63 6c 75 64 65 64 20 74 |x) is in|cluded t|
|00003f90| 68 61 74 0a 58 6d 61 6b | 65 73 20 69 69 65 6e 63 |hat.Xmak|es iienc|
|00003fa0| 6f 64 65 2f 69 69 64 65 | 63 6f 64 65 20 70 72 6f |ode/iide|code pro|
|00003fb0| 64 75 63 65 2f 65 78 74 | 72 61 63 74 20 78 78 65 |duce/ext|ract xxe|
|00003fc0| 6e 63 6f 64 65 2d 66 6f | 72 6d 61 74 20 66 69 6c |ncode-fo|rmat fil|
|00003fd0| 65 73 20 28 77 68 69 63 | 68 0a 58 64 6f 20 6e 6f |es (whic|h.Xdo no|
|00003fe0| 74 20 67 65 74 20 6d 61 | 6e 67 6c 65 64 20 77 68 |t get ma|ngled wh|
|00003ff0| 65 6e 20 6d 6f 76 69 6e | 67 20 74 68 72 6f 75 67 |en movin|g throug|
|00004000| 68 20 6e 6f 6e 2d 41 53 | 43 49 49 20 73 69 74 65 |h non-AS|CII site|
|00004010| 73 29 2e 20 20 42 65 66 | 6f 72 65 20 75 73 69 6e |s). Bef|ore usin|
|00004020| 67 0a 58 74 68 69 73 20 | 73 77 69 74 63 68 20 77 |g.Xthis |switch w|
|00004030| 69 74 68 20 74 68 65 20 | 75 75 65 6e 63 6f 64 65 |ith the |uuencode|
|00004040| 20 63 6f 6d 6d 61 6e 64 | 2c 20 6d 61 6b 65 20 73 | command|, make s|
|00004050| 75 72 65 20 74 68 61 74 | 20 74 68 65 20 70 65 72 |ure that| the per|
|00004060| 73 6f 6e 20 74 6f 0a 58 | 72 65 63 65 69 76 65 20 |son to.X|receive |
|00004070| 74 68 65 20 63 6f 64 65 | 64 20 74 72 61 6e 73 6d |the code|d transm|
|00004080| 69 73 73 69 6f 6e 20 63 | 61 6e 20 75 6e 70 61 63 |ission c|an unpac|
|00004090| 6b 20 78 78 65 6e 63 6f | 64 65 64 20 66 69 6c 65 |k xxenco|ded file|
|000040a0| 73 2e 0a 58 0a 58 49 69 | 65 6e 63 6f 64 65 20 61 |s..X.XIi|encode a|
|000040b0| 6e 64 20 69 69 64 65 63 | 6f 64 65 20 68 61 76 65 |nd iidec|ode have|
|000040c0| 20 62 65 65 6e 20 74 65 | 73 74 65 64 20 75 6e 64 | been te|sted und|
|000040d0| 65 72 20 55 6e 69 78 20 | 61 6e 64 20 58 65 6e 69 |er Unix |and Xeni|
|000040e0| 78 2c 20 61 6e 64 20 77 | 6f 72 6b 0a 58 66 69 6e |x, and w|ork.Xfin|
|000040f0| 65 2e 20 20 54 68 65 79 | 20 68 61 76 65 20 72 65 |e. They| have re|
|00004100| 63 65 69 76 65 64 20 62 | 72 69 65 66 20 74 65 73 |ceived b|rief tes|
|00004110| 74 69 6e 67 20 75 6e 64 | 65 72 20 4d 53 2d 44 4f |ting und|er MS-DO|
|00004120| 53 2c 20 61 6e 64 20 61 | 70 70 65 61 72 20 74 6f |S, and a|ppear to|
|00004130| 0a 58 77 6f 72 6b 20 74 | 68 65 72 65 20 61 73 20 |.Xwork t|here as |
|00004140| 77 65 6c 6c 2e 0a 58 0a | 58 46 6f 72 20 73 79 73 |well..X.|XFor sys|
|00004150| 74 65 6d 73 20 77 68 69 | 63 68 20 75 73 65 20 73 |tems whi|ch use s|
|00004160| 6f 6d 65 20 6f 74 68 65 | 72 20 73 65 71 75 65 6e |ome othe|r sequen|
|00004170| 63 65 20 69 6e 20 70 6c | 61 63 65 20 6f 66 20 55 |ce in pl|ace of U|
|00004180| 4e 49 58 20 4c 46 73 20 | 28 65 2e 67 2e 0a 58 4d |NIX LFs |(e.g..XM|
|00004190| 53 2d 44 4f 53 29 2c 20 | 74 68 65 72 65 20 69 73 |S-DOS), |there is|
|000041a0| 20 61 20 73 70 65 63 69 | 61 6c 20 69 69 65 6e 63 | a speci|al iienc|
|000041b0| 6f 64 65 20 73 77 69 74 | 63 68 2c 20 2d 6f 20 66 |ode swit|ch, -o f|
|000041c0| 69 6c 65 6e 61 6d 65 2c | 20 77 68 69 63 68 0a 58 |ilename,| which.X|
|000041d0| 64 69 72 65 63 74 73 20 | 69 69 65 6e 63 6f 64 65 |directs |iiencode|
|000041e0| 20 74 6f 20 73 65 6e 64 | 20 69 74 73 20 6f 75 74 | to send| its out|
|000041f0| 70 75 74 20 74 6f 20 66 | 69 6c 65 6e 61 6d 65 20 |put to f|ilename |
|00004200| 69 6e 73 74 65 61 64 20 | 6f 66 20 26 6f 75 74 70 |instead |of &outp|
|00004210| 75 74 2e 0a 58 54 68 69 | 73 20 6d 61 6b 65 73 20 |ut..XThi|s makes |
|00004220| 69 74 20 70 6f 73 73 69 | 62 6c 65 20 74 6f 20 73 |it possi|ble to s|
|00004230| 74 72 69 70 20 6f 75 74 | 20 74 72 61 69 6c 69 6e |trip out| trailin|
|00004240| 67 20 63 61 72 72 69 61 | 67 65 20 72 65 74 75 72 |g carria|ge retur|
|00004250| 6e 73 2c 20 61 6e 64 0a | 58 77 72 69 74 65 20 61 |ns, and.|Xwrite a|
|00004260| 6e 20 6f 75 74 70 75 74 | 20 66 69 6c 65 20 69 6e |n output| file in|
|00004270| 20 55 4e 49 58 20 66 6f | 72 6d 61 74 2e 0a 58 0a | UNIX fo|rmat..X.|
|00004280| 58 49 69 65 6e 2f 64 65 | 63 6f 64 65 20 61 72 65 |XIien/de|code are|
|00004290| 20 77 72 69 74 74 65 6e | 20 69 6e 20 49 63 6f 6e | written| in Icon|
|000042a0| 2c 20 77 68 69 63 68 20 | 69 73 20 65 78 74 72 65 |, which |is extre|
|000042b0| 6d 65 6c 79 20 70 6f 72 | 74 61 62 6c 65 2e 20 20 |mely por|table. |
|000042c0| 41 6e 79 6f 6e 65 0a 58 | 77 69 74 68 20 61 6e 20 |Anyone.X|with an |
|000042d0| 49 63 6f 6e 20 69 6e 74 | 65 72 70 72 65 74 65 72 |Icon int|erpreter|
|000042e0| 20 6f 72 20 63 6f 6d 70 | 69 6c 65 72 20 63 61 6e | or comp|iler can|
|000042f0| 20 69 6e 73 74 61 6c 6c | 20 74 68 65 6d 2e 20 20 | install| them. |
|00004300| 41 6e 64 2c 20 73 69 6e | 63 65 0a 58 49 63 6f 6e |And, sin|ce.XIcon|
|00004310| 20 69 73 20 66 72 65 65 | 20 28 6f 62 74 61 69 6e | is free| (obtain|
|00004320| 61 62 6c 65 20 66 72 6f | 6d 20 74 68 65 20 55 2e |able fro|m the U.|
|00004330| 20 6f 66 20 41 72 69 7a | 6f 6e 61 20 61 74 20 63 | of Ariz|ona at c|
|00004340| 73 2e 61 72 69 7a 6f 6e | 61 2e 65 64 75 29 2c 0a |s.arizon|a.edu),.|
|00004350| 58 74 68 65 20 70 72 6f | 67 72 61 6d 73 20 72 65 |Xthe pro|grams re|
|00004360| 61 6c 6c 79 20 61 72 65 | 20 77 69 74 68 6f 75 74 |ally are| without|
|00004370| 20 63 6f 73 74 20 6f 66 | 20 61 6e 79 20 6b 69 6e | cost of| any kin|
|00004380| 64 2e 0a 58 0a 58 4e 6f | 74 65 3a 20 20 54 68 65 |d..X.XNo|te: The|
|00004390| 79 20 61 72 65 6e 27 74 | 20 76 65 72 79 20 66 61 |y aren't| very fa|
|000043a0| 73 74 20 65 73 70 65 63 | 69 61 6c 6c 79 20 77 68 |st espec|ially wh|
|000043b0| 65 6e 20 74 68 65 20 2d | 78 20 73 77 69 74 63 68 |en the -|x switch|
|000043c0| 20 69 73 20 75 73 65 64 | 2e 0a 58 0a 58 2d 52 69 | is used|..X.X-Ri|
|000043d0| 63 68 61 72 64 20 28 67 | 6f 65 72 40 73 6f 70 68 |chard (g|oer@soph|
|000043e0| 69 73 74 2e 75 63 68 69 | 63 61 67 6f 2e 65 64 75 |ist.uchi|cago.edu|
|000043f0| 29 0a 58 0a 53 48 41 52 | 5f 45 4f 46 0a 74 72 75 |).X.SHAR|_EOF.tru|
|00004400| 65 20 7c 7c 20 65 63 68 | 6f 20 27 72 65 73 74 6f |e || ech|o 'resto|
|00004410| 72 65 20 6f 66 20 52 45 | 41 44 4d 45 20 66 61 69 |re of RE|ADME fai|
|00004420| 6c 65 64 27 0a 72 6d 20 | 2d 66 20 5f 73 68 61 72 |led'.rm |-f _shar|
|00004430| 5f 77 6e 74 5f 2e 74 6d | 70 0a 66 69 0a 65 78 69 |_wnt_.tm|p.fi.exi|
|00004440| 74 20 30 0a | |t 0. | |
+--------+-------------------------+-------------------------+--------+--------+