home *** CD-ROM | disk | FTP | other *** search
view JSON data
|
view as text
|
open on a Mac
|
open on a PC
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: 14
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Newsgroup Content (archive/news)
| magic
| Supported |
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| news text
| default
| |
99%
| file
| C source text
| default
| |
98%
| file
| makefile script text
| default
| |
97%
| file
| C source, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| dexmagic
| PrintFox/Pagefox WEAK
| 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/news
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 75 75 | 6e 65 74 21 68 75 73 63 |Path: uu|net!husc|
|00000010| 36 21 68 61 6f 21 6f 64 | 64 6a 6f 62 21 67 61 72 |6!hao!od|djob!gar|
|00000020| 67 6f 79 6c 65 21 69 68 | 6e 70 34 21 63 62 6f 73 |goyle!ih|np4!cbos|
|00000030| 67 64 21 6d 61 6e 64 72 | 69 6c 6c 21 68 61 6c 21 |gd!mandr|ill!hal!|
|00000040| 6e 63 6f 61 73 74 21 61 | 6c 6c 62 65 72 79 0a 46 |ncoast!a|llbery.F|
|00000050| 72 6f 6d 3a 20 72 61 79 | 61 6e 40 61 69 2e 74 6f |rom: ray|an@ai.to|
|00000060| 72 6f 6e 74 6f 2e 65 64 | 75 20 28 52 61 79 61 6e |ronto.ed|u (Rayan|
|00000070| 20 5a 61 63 68 61 72 69 | 61 73 73 65 6e 29 0a 4e | Zachari|assen).N|
|00000080| 65 77 73 67 72 6f 75 70 | 73 3a 20 63 6f 6d 70 2e |ewsgroup|s: comp.|
|00000090| 73 6f 75 72 63 65 73 2e | 6d 69 73 63 0a 53 75 62 |sources.|misc.Sub|
|000000a0| 6a 65 63 74 3a 20 62 7b | 65 6e 2c 64 65 7d 63 6f |ject: b{|en,de}co|
|000000b0| 64 65 0a 4d 65 73 73 61 | 67 65 2d 49 44 3a 20 3c |de.Messa|ge-ID: <|
|000000c0| 36 39 34 32 40 6e 63 6f | 61 73 74 2e 55 55 43 50 |6942@nco|ast.UUCP|
|000000d0| 3e 0a 44 61 74 65 3a 20 | 31 20 4a 61 6e 20 38 38 |>.Date: |1 Jan 88|
|000000e0| 20 30 30 3a 34 36 3a 34 | 31 20 47 4d 54 0a 53 65 | 00:46:4|1 GMT.Se|
|000000f0| 6e 64 65 72 3a 20 61 6c | 6c 62 65 72 79 40 6e 63 |nder: al|lbery@nc|
|00000100| 6f 61 73 74 2e 55 55 43 | 50 0a 4c 69 6e 65 73 3a |oast.UUC|P.Lines:|
|00000110| 20 33 31 38 0a 41 70 70 | 72 6f 76 65 64 3a 20 61 | 318.App|roved: a|
|00000120| 6c 6c 62 65 72 79 40 6e | 63 6f 61 73 74 2e 55 55 |llbery@n|coast.UU|
|00000130| 43 50 0a 58 2d 41 72 63 | 68 69 76 65 3a 20 63 6f |CP.X-Arc|hive: co|
|00000140| 6d 70 2e 73 6f 75 72 63 | 65 73 2e 6d 69 73 63 2f |mp.sourc|es.misc/|
|00000150| 38 37 31 32 2f 31 34 0a | 0a 54 68 65 72 65 20 77 |8712/14.|.There w|
|00000160| 61 73 20 73 6f 6d 65 20 | 74 61 6c 6b 20 61 62 6f |as some |talk abo|
|00000170| 75 74 20 74 68 65 73 65 | 20 70 72 6f 67 72 61 6d |ut these| program|
|00000180| 73 20 6f 76 65 72 20 6f | 6e 20 63 6f 6d 70 2e 6d |s over o|n comp.m|
|00000190| 61 69 6c 2e 6d 69 73 63 | 2e 20 54 68 65 79 0a 61 |ail.misc|. They.a|
|000001a0| 72 65 20 75 73 65 64 20 | 66 6f 72 20 6d 6f 76 69 |re used |for movi|
|000001b0| 6e 67 20 62 79 74 65 73 | 20 61 63 72 6f 73 73 20 |ng bytes| across |
|000001c0| 6e 65 74 77 6f 72 6b 73 | 20 74 68 61 74 20 6d 61 |networks| that ma|
|000001d0| 79 20 6d 61 6e 67 6c 65 | 20 74 68 65 20 64 61 74 |y mangle| the dat|
|000001e0| 61 2e 0a 54 68 65 20 63 | 6f 64 65 20 69 73 20 70 |a..The c|ode is p|
|000001f0| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 2c 20 61 6e |ublic do|main, an|
|00000200| 64 20 74 68 69 73 20 73 | 68 61 72 20 69 73 20 66 |d this s|har is f|
|00000210| 72 6f 6d 20 6f 6e 65 20 | 6f 66 20 74 68 65 20 61 |rom one |of the a|
|00000220| 75 74 68 6f 72 73 2e 0a | 23 21 20 2f 62 69 6e 2f |uthors..|#! /bin/|
|00000230| 73 68 0a 23 20 54 68 69 | 73 20 69 73 20 61 20 73 |sh.# Thi|s is a s|
|00000240| 68 65 6c 6c 20 61 72 63 | 68 69 76 65 2c 20 6d 65 |hell arc|hive, me|
|00000250| 61 6e 69 6e 67 3a 0a 23 | 20 31 2e 20 52 65 6d 6f |aning:.#| 1. Remo|
|00000260| 76 65 20 65 76 65 72 79 | 74 68 69 6e 67 20 61 62 |ve every|thing ab|
|00000270| 6f 76 65 20 74 68 65 20 | 23 21 20 2f 62 69 6e 2f |ove the |#! /bin/|
|00000280| 73 68 20 6c 69 6e 65 2e | 0a 23 20 32 2e 20 53 61 |sh line.|.# 2. Sa|
|00000290| 76 65 20 74 68 65 20 72 | 65 73 75 6c 74 69 6e 67 |ve the r|esulting|
|000002a0| 20 74 65 78 74 20 69 6e | 20 61 20 66 69 6c 65 2e | text in| a file.|
|000002b0| 0a 23 20 33 2e 20 45 78 | 65 63 75 74 65 20 74 68 |.# 3. Ex|ecute th|
|000002c0| 65 20 66 69 6c 65 20 77 | 69 74 68 20 2f 62 69 6e |e file w|ith /bin|
|000002d0| 2f 73 68 20 28 6e 6f 74 | 20 63 73 68 29 20 74 6f |/sh (not| csh) to|
|000002e0| 20 63 72 65 61 74 65 20 | 74 68 65 20 66 69 6c 65 | create |the file|
|000002f0| 73 3a 0a 23 09 52 45 41 | 44 4d 45 0a 23 09 4d 61 |s:.#.REA|DME.#.Ma|
|00000300| 6b 65 66 69 6c 65 0a 23 | 09 63 6f 64 65 72 2e 68 |kefile.#|.coder.h|
|00000310| 0a 23 09 63 72 63 74 61 | 62 2e 63 0a 23 09 62 64 |.#.crcta|b.c.#.bd|
|00000320| 65 63 6f 64 65 2e 63 0a | 23 09 62 65 6e 63 6f 64 |ecode.c.|#.bencod|
|00000330| 65 2e 63 0a 23 20 54 68 | 69 73 20 61 72 63 68 69 |e.c.# Th|is archi|
|00000340| 76 65 20 63 72 65 61 74 | 65 64 3a 20 54 75 65 20 |ve creat|ed: Tue |
|00000350| 44 65 63 20 32 39 20 31 | 31 3a 35 32 3a 34 33 20 |Dec 29 1|1:52:43 |
|00000360| 31 39 38 37 0a 23 20 42 | 79 3a 09 4b 65 6e 20 4c |1987.# B|y:.Ken L|
|00000370| 61 6c 6f 6e 64 65 0a 65 | 78 70 6f 72 74 20 50 41 |alonde.e|xport PA|
|00000380| 54 48 3b 20 50 41 54 48 | 3d 2f 62 69 6e 3a 24 50 |TH; PATH|=/bin:$P|
|00000390| 41 54 48 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |ATH.if t|est -f '|
|000003a0| 52 45 41 44 4d 45 27 0a | 74 68 65 6e 0a 09 65 63 |README'.|then..ec|
|000003b0| 68 6f 20 73 68 61 72 3a | 20 77 69 6c 6c 20 6e 6f |ho shar:| will no|
|000003c0| 74 20 6f 76 65 72 2d 77 | 72 69 74 65 20 65 78 69 |t over-w|rite exi|
|000003d0| 73 74 69 6e 67 20 66 69 | 6c 65 20 22 27 52 45 41 |sting fi|le "'REA|
|000003e0| 44 4d 45 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |DME'".el|se.cat <|
|000003f0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 52 |< \SHAR_|EOF > 'R|
|00000400| 45 41 44 4d 45 27 0a 42 | 65 6e 63 6f 64 65 20 65 |EADME'.B|encode e|
|00000410| 6e 63 6f 64 65 73 20 33 | 20 62 79 74 65 73 20 74 |ncodes 3| bytes t|
|00000420| 6f 20 34 20 63 68 61 72 | 61 63 74 65 72 73 2e 20 |o 4 char|acters. |
|00000430| 20 54 68 65 20 63 6f 64 | 65 20 73 65 74 20 69 73 | The cod|e set is|
|00000440| 20 36 34 0a 65 78 74 72 | 65 6d 65 6c 79 20 68 61 | 64.extr|emely ha|
|00000450| 72 6d 6c 65 73 73 20 63 | 68 61 72 61 63 74 65 72 |rmless c|haracter|
|00000460| 73 20 28 41 2d 5a 61 2d | 7a 30 2d 39 2b 2d 29 20 |s (A-Za-|z0-9+-) |
|00000470| 74 68 61 74 20 73 68 6f | 75 6c 64 20 70 61 73 73 |that sho|uld pass|
|00000480| 20 74 68 72 6f 75 67 68 | 0a 61 6e 79 20 6e 65 74 | through|.any net|
|00000490| 77 6f 72 6b 20 77 69 74 | 68 6f 75 74 20 63 68 61 |work wit|hout cha|
|000004a0| 6e 67 65 2e 20 20 42 75 | 74 20 6a 75 73 74 20 69 |nge. Bu|t just i|
|000004b0| 6e 20 63 61 73 65 2c 20 | 61 20 62 79 74 65 20 63 |n case, |a byte c|
|000004c0| 6f 75 6e 74 20 61 6e 64 | 20 63 79 63 6c 69 63 0a |ount and| cyclic.|
|000004d0| 72 65 64 75 6e 64 61 6e | 63 79 20 63 68 65 63 6b |redundan|cy check|
|000004e0| 20 61 70 70 65 61 72 20 | 61 66 74 65 72 20 74 68 | appear |after th|
|000004f0| 65 20 64 61 74 61 2e 0a | 0a 72 65 67 67 65 72 73 |e data..|.reggers|
|00000500| 40 75 77 6f 2e 55 55 43 | 50 20 28 52 65 67 20 51 |@uwo.UUC|P (Reg Q|
|00000510| 75 69 6e 74 6f 6e 29 0a | 77 61 74 6d 61 74 68 21 |uinton).|watmath!|
|00000520| 6b 77 6c 61 6c 6f 6e 64 | 65 20 28 4b 65 6e 20 4c |kwlalond|e (Ken L|
|00000530| 61 6c 6f 6e 64 65 29 0a | 53 48 41 52 5f 45 4f 46 |alonde).|SHAR_EOF|
|00000540| 0a 66 69 20 23 20 65 6e | 64 20 6f 66 20 6f 76 65 |.fi # en|d of ove|
|00000550| 72 77 72 69 74 69 6e 67 | 20 63 68 65 63 6b 0a 69 |rwriting| check.i|
|00000560| 66 20 74 65 73 74 20 2d | 66 20 27 4d 61 6b 65 66 |f test -|f 'Makef|
|00000570| 69 6c 65 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |ile'.the|n..echo |
|00000580| 73 68 61 72 3a 20 77 69 | 6c 6c 20 6e 6f 74 20 6f |shar: wi|ll not o|
|00000590| 76 65 72 2d 77 72 69 74 | 65 20 65 78 69 73 74 69 |ver-writ|e existi|
|000005a0| 6e 67 20 66 69 6c 65 20 | 22 27 4d 61 6b 65 66 69 |ng file |"'Makefi|
|000005b0| 6c 65 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |le'".els|e.cat <<|
|000005c0| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 4d 61 | \SHAR_E|OF > 'Ma|
|000005d0| 6b 65 66 69 6c 65 27 0a | 44 45 53 54 44 49 52 3d |kefile'.|DESTDIR=|
|000005e0| 2f 75 73 72 2f 6c 69 62 | 2f 6e 65 77 73 0a 23 20 |/usr/lib|/news.# |
|000005f0| 59 6f 75 20 6d 61 79 20 | 6e 65 65 64 20 2d 44 69 |You may |need -Di|
|00000600| 6e 64 65 78 3d 73 74 72 | 63 68 72 20 68 65 72 65 |ndex=str|chr here|
|00000610| 2e 0a 43 46 4c 41 47 53 | 20 3d 20 2d 4f 0a 0a 61 |..CFLAGS| = -O..a|
|00000620| 6c 6c 3a 09 62 64 65 63 | 6f 64 65 20 62 65 6e 63 |ll:.bdec|ode benc|
|00000630| 6f 64 65 0a 0a 62 65 6e | 63 6f 64 65 3a 20 62 65 |ode..ben|code: be|
|00000640| 6e 63 6f 64 65 2e 6f 20 | 63 72 63 74 61 62 2e 6f |ncode.o |crctab.o|
|00000650| 0a 09 63 63 20 24 28 43 | 46 4c 41 47 53 29 20 62 |..cc $(C|FLAGS) b|
|00000660| 65 6e 63 6f 64 65 2e 6f | 20 63 72 63 74 61 62 2e |encode.o| crctab.|
|00000670| 6f 20 2d 6f 20 62 65 6e | 63 6f 64 65 0a 62 64 65 |o -o ben|code.bde|
|00000680| 63 6f 64 65 3a 20 62 64 | 65 63 6f 64 65 2e 6f 20 |code: bd|ecode.o |
|00000690| 63 72 63 74 61 62 2e 6f | 0a 09 63 63 20 24 28 43 |crctab.o|..cc $(C|
|000006a0| 46 4c 41 47 53 29 20 62 | 64 65 63 6f 64 65 2e 6f |FLAGS) b|decode.o|
|000006b0| 20 63 72 63 74 61 62 2e | 6f 20 2d 6f 20 62 64 65 | crctab.|o -o bde|
|000006c0| 63 6f 64 65 0a 63 72 63 | 74 61 62 2e 6f 3a 20 63 |code.crc|tab.o: c|
|000006d0| 72 63 74 61 62 2e 63 0a | 09 63 63 20 2d 63 20 24 |rctab.c.|.cc -c $|
|000006e0| 28 43 46 4c 41 47 53 29 | 20 2d 52 20 63 72 63 74 |(CFLAGS)| -R crct|
|000006f0| 61 62 2e 63 0a 0a 69 6e | 73 74 61 6c 6c 3a 20 61 |ab.c..in|stall: a|
|00000700| 6c 6c 0a 09 69 6e 73 74 | 61 6c 6c 20 2d 73 20 62 |ll..inst|all -s b|
|00000710| 64 65 63 6f 64 65 20 24 | 28 44 45 53 54 44 49 52 |decode $|(DESTDIR|
|00000720| 29 0a 09 69 6e 73 74 61 | 6c 6c 20 2d 73 20 62 65 |)..insta|ll -s be|
|00000730| 6e 63 6f 64 65 20 24 28 | 44 45 53 54 44 49 52 29 |ncode $(|DESTDIR)|
|00000740| 0a 0a 63 6c 65 61 6e 3a | 09 09 0a 09 72 6d 20 2d |..clean:|....rm -|
|00000750| 66 20 62 65 6e 63 6f 64 | 65 20 62 64 65 63 6f 64 |f bencod|e bdecod|
|00000760| 65 20 2a 2e 6f 20 53 48 | 41 52 0a 0a 73 68 61 72 |e *.o SH|AR..shar|
|00000770| 3a 0a 09 73 68 61 72 20 | 52 45 41 44 4d 45 20 4d |:..shar |README M|
|00000780| 61 6b 65 66 69 6c 65 20 | 63 6f 64 65 72 2e 68 20 |akefile |coder.h |
|00000790| 63 72 63 74 61 62 2e 63 | 20 62 64 65 63 6f 64 65 |crctab.c| bdecode|
|000007a0| 2e 63 20 62 65 6e 63 6f | 64 65 2e 63 20 3e 53 48 |.c benco|de.c >SH|
|000007b0| 41 52 0a 53 48 41 52 5f | 45 4f 46 0a 66 69 20 23 |AR.SHAR_|EOF.fi #|
|000007c0| 20 65 6e 64 20 6f 66 20 | 6f 76 65 72 77 72 69 74 | end of |overwrit|
|000007d0| 69 6e 67 20 63 68 65 63 | 6b 0a 69 66 20 74 65 73 |ing chec|k.if tes|
|000007e0| 74 20 2d 66 20 27 63 6f | 64 65 72 2e 68 27 0a 74 |t -f 'co|der.h'.t|
|000007f0| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00000800| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|00000810| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|00000820| 65 20 22 27 63 6f 64 65 | 72 2e 68 27 22 0a 65 6c |e "'code|r.h'".el|
|00000830| 73 65 0a 63 61 74 20 3c | 3c 20 5c 53 48 41 52 5f |se.cat <|< \SHAR_|
|00000840| 45 4f 46 20 3e 20 27 63 | 6f 64 65 72 2e 68 27 0a |EOF > 'c|oder.h'.|
|00000850| 63 68 61 72 20 68 65 61 | 64 65 72 5b 5d 20 3d 20 |char hea|der[] = |
|00000860| 22 44 65 63 6f 64 65 20 | 74 68 65 20 66 6f 6c 6c |"Decode |the foll|
|00000870| 6f 77 69 6e 67 20 77 69 | 74 68 20 62 64 65 63 6f |owing wi|th bdeco|
|00000880| 64 65 5c 6e 22 3b 0a 63 | 68 61 72 20 63 6f 64 65 |de\n";.c|har code|
|00000890| 73 65 74 5b 5d 20 3d 0a | 09 22 41 42 43 44 45 46 |set[] =.|."ABCDEF|
|000008a0| 47 48 49 4a 4b 4c 4d 4e | 4f 50 51 52 53 54 55 56 |GHIJKLMN|OPQRSTUV|
|000008b0| 57 58 59 5a 61 62 63 64 | 65 66 67 68 69 6a 6b 6c |WXYZabcd|efghijkl|
|000008c0| 6d 6e 6f 70 71 72 73 74 | 75 76 77 78 79 7a 30 31 |mnopqrst|uvwxyz01|
|000008d0| 32 33 34 35 36 37 38 39 | 2b 2d 22 3b 0a 0a 23 64 |23456789|+-";..#d|
|000008e0| 65 66 69 6e 65 20 45 4e | 43 4f 44 45 28 63 29 09 |efine EN|CODE(c).|
|000008f0| 63 6f 64 65 73 65 74 5b | 63 5d 0a 0a 65 78 74 65 |codeset[|c]..exte|
|00000900| 72 6e 20 73 68 6f 72 74 | 20 63 72 63 74 61 62 5b |rn short| crctab[|
|00000910| 5d 3b 0a 23 64 65 66 69 | 6e 65 20 43 52 43 28 63 |];.#defi|ne CRC(c|
|00000920| 72 63 2c 20 63 29 09 20 | 63 72 63 20 3d 20 28 63 |rc, c). |crc = (c|
|00000930| 72 63 20 3e 3e 20 38 29 | 20 5e 20 63 72 63 74 61 |rc >> 8)| ^ crcta|
|00000940| 62 5b 28 63 72 63 5e 63 | 29 20 26 20 30 78 66 66 |b[(crc^c|) & 0xff|
|00000950| 5d 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 20 23 20 |].SHAR_E|OF.fi # |
|00000960| 65 6e 64 20 6f 66 20 6f | 76 65 72 77 72 69 74 69 |end of o|verwriti|
|00000970| 6e 67 20 63 68 65 63 6b | 0a 69 66 20 74 65 73 74 |ng check|.if test|
|00000980| 20 2d 66 20 27 63 72 63 | 74 61 62 2e 63 27 0a 74 | -f 'crc|tab.c'.t|
|00000990| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|000009a0| 77 69 6c 6c 20 6e 6f 74 | 20 6f 76 65 72 2d 77 72 |will not| over-wr|
|000009b0| 69 74 65 20 65 78 69 73 | 74 69 6e 67 20 66 69 6c |ite exis|ting fil|
|000009c0| 65 20 22 27 63 72 63 74 | 61 62 2e 63 27 22 0a 65 |e "'crct|ab.c'".e|
|000009d0| 6c 73 65 0a 63 61 74 20 | 3c 3c 20 5c 53 48 41 52 |lse.cat |<< \SHAR|
|000009e0| 5f 45 4f 46 20 3e 20 27 | 63 72 63 74 61 62 2e 63 |_EOF > '|crctab.c|
|000009f0| 27 0a 2f 2a 20 67 65 6e | 65 72 61 74 65 64 20 75 |'./* gen|erated u|
|00000a00| 73 69 6e 67 20 74 68 65 | 20 43 52 43 2d 31 36 20 |sing the| CRC-16 |
|00000a10| 70 6f 6c 79 6e 6f 6d 69 | 61 6c 20 78 5e 31 36 20 |polynomi|al x^16 |
|00000a20| 2b 20 78 5e 31 35 20 2b | 20 78 5e 32 20 2b 20 31 |+ x^15 +| x^2 + 1|
|00000a30| 20 3d 20 30 31 32 30 30 | 30 31 20 2a 2f 0a 73 68 | = 01200|01 */.sh|
|00000a40| 6f 72 74 20 63 72 63 74 | 61 62 5b 32 35 36 5d 20 |ort crct|ab[256] |
|00000a50| 3d 20 7b 0a 09 30 78 30 | 30 30 30 2c 20 30 78 63 |= {..0x0|000, 0xc|
|00000a60| 30 63 31 2c 20 30 78 63 | 31 38 31 2c 20 30 78 30 |0c1, 0xc|181, 0x0|
|00000a70| 31 34 30 2c 20 30 78 63 | 33 30 31 2c 20 30 78 30 |140, 0xc|301, 0x0|
|00000a80| 33 63 30 2c 20 30 78 30 | 32 38 30 2c 20 30 78 63 |3c0, 0x0|280, 0xc|
|00000a90| 32 34 31 2c 0a 09 30 78 | 63 36 30 31 2c 20 30 78 |241,..0x|c601, 0x|
|00000aa0| 30 36 63 30 2c 20 30 78 | 30 37 38 30 2c 20 30 78 |06c0, 0x|0780, 0x|
|00000ab0| 63 37 34 31 2c 20 30 78 | 30 35 30 30 2c 20 30 78 |c741, 0x|0500, 0x|
|00000ac0| 63 35 63 31 2c 20 30 78 | 63 34 38 31 2c 20 30 78 |c5c1, 0x|c481, 0x|
|00000ad0| 30 34 34 30 2c 0a 09 30 | 78 63 63 30 31 2c 20 30 |0440,..0|xcc01, 0|
|00000ae0| 78 30 63 63 30 2c 20 30 | 78 30 64 38 30 2c 20 30 |x0cc0, 0|x0d80, 0|
|00000af0| 78 63 64 34 31 2c 20 30 | 78 30 66 30 30 2c 20 30 |xcd41, 0|x0f00, 0|
|00000b00| 78 63 66 63 31 2c 20 30 | 78 63 65 38 31 2c 20 30 |xcfc1, 0|xce81, 0|
|00000b10| 78 30 65 34 30 2c 0a 09 | 30 78 30 61 30 30 2c 20 |x0e40,..|0x0a00, |
|00000b20| 30 78 63 61 63 31 2c 20 | 30 78 63 62 38 31 2c 20 |0xcac1, |0xcb81, |
|00000b30| 30 78 30 62 34 30 2c 20 | 30 78 63 39 30 31 2c 20 |0x0b40, |0xc901, |
|00000b40| 30 78 30 39 63 30 2c 20 | 30 78 30 38 38 30 2c 20 |0x09c0, |0x0880, |
|00000b50| 30 78 63 38 34 31 2c 0a | 09 30 78 64 38 30 31 2c |0xc841,.|.0xd801,|
|00000b60| 20 30 78 31 38 63 30 2c | 20 30 78 31 39 38 30 2c | 0x18c0,| 0x1980,|
|00000b70| 20 30 78 64 39 34 31 2c | 20 30 78 31 62 30 30 2c | 0xd941,| 0x1b00,|
|00000b80| 20 30 78 64 62 63 31 2c | 20 30 78 64 61 38 31 2c | 0xdbc1,| 0xda81,|
|00000b90| 20 30 78 31 61 34 30 2c | 0a 09 30 78 31 65 30 30 | 0x1a40,|..0x1e00|
|00000ba0| 2c 20 30 78 64 65 63 31 | 2c 20 30 78 64 66 38 31 |, 0xdec1|, 0xdf81|
|00000bb0| 2c 20 30 78 31 66 34 30 | 2c 20 30 78 64 64 30 31 |, 0x1f40|, 0xdd01|
|00000bc0| 2c 20 30 78 31 64 63 30 | 2c 20 30 78 31 63 38 30 |, 0x1dc0|, 0x1c80|
|00000bd0| 2c 20 30 78 64 63 34 31 | 2c 0a 09 30 78 31 34 30 |, 0xdc41|,..0x140|
|00000be0| 30 2c 20 30 78 64 34 63 | 31 2c 20 30 78 64 35 38 |0, 0xd4c|1, 0xd58|
|00000bf0| 31 2c 20 30 78 31 35 34 | 30 2c 20 30 78 64 37 30 |1, 0x154|0, 0xd70|
|00000c00| 31 2c 20 30 78 31 37 63 | 30 2c 20 30 78 31 36 38 |1, 0x17c|0, 0x168|
|00000c10| 30 2c 20 30 78 64 36 34 | 31 2c 0a 09 30 78 64 32 |0, 0xd64|1,..0xd2|
|00000c20| 30 31 2c 20 30 78 31 32 | 63 30 2c 20 30 78 31 33 |01, 0x12|c0, 0x13|
|00000c30| 38 30 2c 20 30 78 64 33 | 34 31 2c 20 30 78 31 31 |80, 0xd3|41, 0x11|
|00000c40| 30 30 2c 20 30 78 64 31 | 63 31 2c 20 30 78 64 30 |00, 0xd1|c1, 0xd0|
|00000c50| 38 31 2c 20 30 78 31 30 | 34 30 2c 0a 09 30 78 66 |81, 0x10|40,..0xf|
|00000c60| 30 30 31 2c 20 30 78 33 | 30 63 30 2c 20 30 78 33 |001, 0x3|0c0, 0x3|
|00000c70| 31 38 30 2c 20 30 78 66 | 31 34 31 2c 20 30 78 33 |180, 0xf|141, 0x3|
|00000c80| 33 30 30 2c 20 30 78 66 | 33 63 31 2c 20 30 78 66 |300, 0xf|3c1, 0xf|
|00000c90| 32 38 31 2c 20 30 78 33 | 32 34 30 2c 0a 09 30 78 |281, 0x3|240,..0x|
|00000ca0| 33 36 30 30 2c 20 30 78 | 66 36 63 31 2c 20 30 78 |3600, 0x|f6c1, 0x|
|00000cb0| 66 37 38 31 2c 20 30 78 | 33 37 34 30 2c 20 30 78 |f781, 0x|3740, 0x|
|00000cc0| 66 35 30 31 2c 20 30 78 | 33 35 63 30 2c 20 30 78 |f501, 0x|35c0, 0x|
|00000cd0| 33 34 38 30 2c 20 30 78 | 66 34 34 31 2c 0a 09 30 |3480, 0x|f441,..0|
|00000ce0| 78 33 63 30 30 2c 20 30 | 78 66 63 63 31 2c 20 30 |x3c00, 0|xfcc1, 0|
|00000cf0| 78 66 64 38 31 2c 20 30 | 78 33 64 34 30 2c 20 30 |xfd81, 0|x3d40, 0|
|00000d00| 78 66 66 30 31 2c 20 30 | 78 33 66 63 30 2c 20 30 |xff01, 0|x3fc0, 0|
|00000d10| 78 33 65 38 30 2c 20 30 | 78 66 65 34 31 2c 0a 09 |x3e80, 0|xfe41,..|
|00000d20| 30 78 66 61 30 31 2c 20 | 30 78 33 61 63 30 2c 20 |0xfa01, |0x3ac0, |
|00000d30| 30 78 33 62 38 30 2c 20 | 30 78 66 62 34 31 2c 20 |0x3b80, |0xfb41, |
|00000d40| 30 78 33 39 30 30 2c 20 | 30 78 66 39 63 31 2c 20 |0x3900, |0xf9c1, |
|00000d50| 30 78 66 38 38 31 2c 20 | 30 78 33 38 34 30 2c 0a |0xf881, |0x3840,.|
|00000d60| 09 30 78 32 38 30 30 2c | 20 30 78 65 38 63 31 2c |.0x2800,| 0xe8c1,|
|00000d70| 20 30 78 65 39 38 31 2c | 20 30 78 32 39 34 30 2c | 0xe981,| 0x2940,|
|00000d80| 20 30 78 65 62 30 31 2c | 20 30 78 32 62 63 30 2c | 0xeb01,| 0x2bc0,|
|00000d90| 20 30 78 32 61 38 30 2c | 20 30 78 65 61 34 31 2c | 0x2a80,| 0xea41,|
|00000da0| 0a 09 30 78 65 65 30 31 | 2c 20 30 78 32 65 63 30 |..0xee01|, 0x2ec0|
|00000db0| 2c 20 30 78 32 66 38 30 | 2c 20 30 78 65 66 34 31 |, 0x2f80|, 0xef41|
|00000dc0| 2c 20 30 78 32 64 30 30 | 2c 20 30 78 65 64 63 31 |, 0x2d00|, 0xedc1|
|00000dd0| 2c 20 30 78 65 63 38 31 | 2c 20 30 78 32 63 34 30 |, 0xec81|, 0x2c40|
|00000de0| 2c 0a 09 30 78 65 34 30 | 31 2c 20 30 78 32 34 63 |,..0xe40|1, 0x24c|
|00000df0| 30 2c 20 30 78 32 35 38 | 30 2c 20 30 78 65 35 34 |0, 0x258|0, 0xe54|
|00000e00| 31 2c 20 30 78 32 37 30 | 30 2c 20 30 78 65 37 63 |1, 0x270|0, 0xe7c|
|00000e10| 31 2c 20 30 78 65 36 38 | 31 2c 20 30 78 32 36 34 |1, 0xe68|1, 0x264|
|00000e20| 30 2c 0a 09 30 78 32 32 | 30 30 2c 20 30 78 65 32 |0,..0x22|00, 0xe2|
|00000e30| 63 31 2c 20 30 78 65 33 | 38 31 2c 20 30 78 32 33 |c1, 0xe3|81, 0x23|
|00000e40| 34 30 2c 20 30 78 65 31 | 30 31 2c 20 30 78 32 31 |40, 0xe1|01, 0x21|
|00000e50| 63 30 2c 20 30 78 32 30 | 38 30 2c 20 30 78 65 30 |c0, 0x20|80, 0xe0|
|00000e60| 34 31 2c 0a 09 30 78 61 | 30 30 31 2c 20 30 78 36 |41,..0xa|001, 0x6|
|00000e70| 30 63 30 2c 20 30 78 36 | 31 38 30 2c 20 30 78 61 |0c0, 0x6|180, 0xa|
|00000e80| 31 34 31 2c 20 30 78 36 | 33 30 30 2c 20 30 78 61 |141, 0x6|300, 0xa|
|00000e90| 33 63 31 2c 20 30 78 61 | 32 38 31 2c 20 30 78 36 |3c1, 0xa|281, 0x6|
|00000ea0| 32 34 30 2c 0a 09 30 78 | 36 36 30 30 2c 20 30 78 |240,..0x|6600, 0x|
|00000eb0| 61 36 63 31 2c 20 30 78 | 61 37 38 31 2c 20 30 78 |a6c1, 0x|a781, 0x|
|00000ec0| 36 37 34 30 2c 20 30 78 | 61 35 30 31 2c 20 30 78 |6740, 0x|a501, 0x|
|00000ed0| 36 35 63 30 2c 20 30 78 | 36 34 38 30 2c 20 30 78 |65c0, 0x|6480, 0x|
|00000ee0| 61 34 34 31 2c 0a 09 30 | 78 36 63 30 30 2c 20 30 |a441,..0|x6c00, 0|
|00000ef0| 78 61 63 63 31 2c 20 30 | 78 61 64 38 31 2c 20 30 |xacc1, 0|xad81, 0|
|00000f00| 78 36 64 34 30 2c 20 30 | 78 61 66 30 31 2c 20 30 |x6d40, 0|xaf01, 0|
|00000f10| 78 36 66 63 30 2c 20 30 | 78 36 65 38 30 2c 20 30 |x6fc0, 0|x6e80, 0|
|00000f20| 78 61 65 34 31 2c 0a 09 | 30 78 61 61 30 31 2c 20 |xae41,..|0xaa01, |
|00000f30| 30 78 36 61 63 30 2c 20 | 30 78 36 62 38 30 2c 20 |0x6ac0, |0x6b80, |
|00000f40| 30 78 61 62 34 31 2c 20 | 30 78 36 39 30 30 2c 20 |0xab41, |0x6900, |
|00000f50| 30 78 61 39 63 31 2c 20 | 30 78 61 38 38 31 2c 20 |0xa9c1, |0xa881, |
|00000f60| 30 78 36 38 34 30 2c 0a | 09 30 78 37 38 30 30 2c |0x6840,.|.0x7800,|
|00000f70| 20 30 78 62 38 63 31 2c | 20 30 78 62 39 38 31 2c | 0xb8c1,| 0xb981,|
|00000f80| 20 30 78 37 39 34 30 2c | 20 30 78 62 62 30 31 2c | 0x7940,| 0xbb01,|
|00000f90| 20 30 78 37 62 63 30 2c | 20 30 78 37 61 38 30 2c | 0x7bc0,| 0x7a80,|
|00000fa0| 20 30 78 62 61 34 31 2c | 0a 09 30 78 62 65 30 31 | 0xba41,|..0xbe01|
|00000fb0| 2c 20 30 78 37 65 63 30 | 2c 20 30 78 37 66 38 30 |, 0x7ec0|, 0x7f80|
|00000fc0| 2c 20 30 78 62 66 34 31 | 2c 20 30 78 37 64 30 30 |, 0xbf41|, 0x7d00|
|00000fd0| 2c 20 30 78 62 64 63 31 | 2c 20 30 78 62 63 38 31 |, 0xbdc1|, 0xbc81|
|00000fe0| 2c 20 30 78 37 63 34 30 | 2c 0a 09 30 78 62 34 30 |, 0x7c40|,..0xb40|
|00000ff0| 31 2c 20 30 78 37 34 63 | 30 2c 20 30 78 37 35 38 |1, 0x74c|0, 0x758|
|00001000| 30 2c 20 30 78 62 35 34 | 31 2c 20 30 78 37 37 30 |0, 0xb54|1, 0x770|
|00001010| 30 2c 20 30 78 62 37 63 | 31 2c 20 30 78 62 36 38 |0, 0xb7c|1, 0xb68|
|00001020| 31 2c 20 30 78 37 36 34 | 30 2c 0a 09 30 78 37 32 |1, 0x764|0,..0x72|
|00001030| 30 30 2c 20 30 78 62 32 | 63 31 2c 20 30 78 62 33 |00, 0xb2|c1, 0xb3|
|00001040| 38 31 2c 20 30 78 37 33 | 34 30 2c 20 30 78 62 31 |81, 0x73|40, 0xb1|
|00001050| 30 31 2c 20 30 78 37 31 | 63 30 2c 20 30 78 37 30 |01, 0x71|c0, 0x70|
|00001060| 38 30 2c 20 30 78 62 30 | 34 31 2c 0a 09 30 78 35 |80, 0xb0|41,..0x5|
|00001070| 30 30 30 2c 20 30 78 39 | 30 63 31 2c 20 30 78 39 |000, 0x9|0c1, 0x9|
|00001080| 31 38 31 2c 20 30 78 35 | 31 34 30 2c 20 30 78 39 |181, 0x5|140, 0x9|
|00001090| 33 30 31 2c 20 30 78 35 | 33 63 30 2c 20 30 78 35 |301, 0x5|3c0, 0x5|
|000010a0| 32 38 30 2c 20 30 78 39 | 32 34 31 2c 0a 09 30 78 |280, 0x9|241,..0x|
|000010b0| 39 36 30 31 2c 20 30 78 | 35 36 63 30 2c 20 30 78 |9601, 0x|56c0, 0x|
|000010c0| 35 37 38 30 2c 20 30 78 | 39 37 34 31 2c 20 30 78 |5780, 0x|9741, 0x|
|000010d0| 35 35 30 30 2c 20 30 78 | 39 35 63 31 2c 20 30 78 |5500, 0x|95c1, 0x|
|000010e0| 39 34 38 31 2c 20 30 78 | 35 34 34 30 2c 0a 09 30 |9481, 0x|5440,..0|
|000010f0| 78 39 63 30 31 2c 20 30 | 78 35 63 63 30 2c 20 30 |x9c01, 0|x5cc0, 0|
|00001100| 78 35 64 38 30 2c 20 30 | 78 39 64 34 31 2c 20 30 |x5d80, 0|x9d41, 0|
|00001110| 78 35 66 30 30 2c 20 30 | 78 39 66 63 31 2c 20 30 |x5f00, 0|x9fc1, 0|
|00001120| 78 39 65 38 31 2c 20 30 | 78 35 65 34 30 2c 0a 09 |x9e81, 0|x5e40,..|
|00001130| 30 78 35 61 30 30 2c 20 | 30 78 39 61 63 31 2c 20 |0x5a00, |0x9ac1, |
|00001140| 30 78 39 62 38 31 2c 20 | 30 78 35 62 34 30 2c 20 |0x9b81, |0x5b40, |
|00001150| 30 78 39 39 30 31 2c 20 | 30 78 35 39 63 30 2c 20 |0x9901, |0x59c0, |
|00001160| 30 78 35 38 38 30 2c 20 | 30 78 39 38 34 31 2c 0a |0x5880, |0x9841,.|
|00001170| 09 30 78 38 38 30 31 2c | 20 30 78 34 38 63 30 2c |.0x8801,| 0x48c0,|
|00001180| 20 30 78 34 39 38 30 2c | 20 30 78 38 39 34 31 2c | 0x4980,| 0x8941,|
|00001190| 20 30 78 34 62 30 30 2c | 20 30 78 38 62 63 31 2c | 0x4b00,| 0x8bc1,|
|000011a0| 20 30 78 38 61 38 31 2c | 20 30 78 34 61 34 30 2c | 0x8a81,| 0x4a40,|
|000011b0| 0a 09 30 78 34 65 30 30 | 2c 20 30 78 38 65 63 31 |..0x4e00|, 0x8ec1|
|000011c0| 2c 20 30 78 38 66 38 31 | 2c 20 30 78 34 66 34 30 |, 0x8f81|, 0x4f40|
|000011d0| 2c 20 30 78 38 64 30 31 | 2c 20 30 78 34 64 63 30 |, 0x8d01|, 0x4dc0|
|000011e0| 2c 20 30 78 34 63 38 30 | 2c 20 30 78 38 63 34 31 |, 0x4c80|, 0x8c41|
|000011f0| 2c 0a 09 30 78 34 34 30 | 30 2c 20 30 78 38 34 63 |,..0x440|0, 0x84c|
|00001200| 31 2c 20 30 78 38 35 38 | 31 2c 20 30 78 34 35 34 |1, 0x858|1, 0x454|
|00001210| 30 2c 20 30 78 38 37 30 | 31 2c 20 30 78 34 37 63 |0, 0x870|1, 0x47c|
|00001220| 30 2c 20 30 78 34 36 38 | 30 2c 20 30 78 38 36 34 |0, 0x468|0, 0x864|
|00001230| 31 2c 0a 09 30 78 38 32 | 30 31 2c 20 30 78 34 32 |1,..0x82|01, 0x42|
|00001240| 63 30 2c 20 30 78 34 33 | 38 30 2c 20 30 78 38 33 |c0, 0x43|80, 0x83|
|00001250| 34 31 2c 20 30 78 34 31 | 30 30 2c 20 30 78 38 31 |41, 0x41|00, 0x81|
|00001260| 63 31 2c 20 30 78 38 30 | 38 31 2c 20 30 78 34 30 |c1, 0x80|81, 0x40|
|00001270| 34 30 0a 7d 3b 0a 53 48 | 41 52 5f 45 4f 46 0a 66 |40.};.SH|AR_EOF.f|
|00001280| 69 20 23 20 65 6e 64 20 | 6f 66 20 6f 76 65 72 77 |i # end |of overw|
|00001290| 72 69 74 69 6e 67 20 63 | 68 65 63 6b 0a 69 66 20 |riting c|heck.if |
|000012a0| 74 65 73 74 20 2d 66 20 | 27 62 64 65 63 6f 64 65 |test -f |'bdecode|
|000012b0| 2e 63 27 0a 74 68 65 6e | 0a 09 65 63 68 6f 20 73 |.c'.then|..echo s|
|000012c0| 68 61 72 3a 20 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |har: wil|l not ov|
|000012d0| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|000012e0| 67 20 66 69 6c 65 20 22 | 27 62 64 65 63 6f 64 65 |g file "|'bdecode|
|000012f0| 2e 63 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |.c'".els|e.cat <<|
|00001300| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 62 64 | \SHAR_E|OF > 'bd|
|00001310| 65 63 6f 64 65 2e 63 27 | 0a 2f 2a 0a 20 2a 20 62 |ecode.c'|./*. * b|
|00001320| 64 65 63 6f 64 65 20 5b | 66 69 6c 65 5d 0a 20 2a |decode [|file]. *|
|00001330| 2f 0a 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 64 69 |/.#inclu|de <stdi|
|00001340| 6f 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 22 63 |o.h>.#in|clude "c|
|00001350| 6f 64 65 72 2e 68 22 0a | 63 68 61 72 20 2a 6d 79 |oder.h".|char *my|
|00001360| 6e 61 6d 65 2c 20 2a 69 | 6e 70 75 74 66 69 6c 65 |name, *i|nputfile|
|00001370| 20 3d 20 22 28 73 74 64 | 69 6e 29 22 3b 0a 0a 6d | = "(std|in)";..m|
|00001380| 61 69 6e 28 61 72 67 63 | 2c 20 61 72 67 76 29 20 |ain(argc|, argv) |
|00001390| 0a 09 63 68 61 72 20 2a | 2a 61 72 67 76 3b 0a 7b |..char *|*argv;.{|
|000013a0| 0a 09 72 65 67 69 73 74 | 65 72 20 6c 6f 6e 67 20 |..regist|er long |
|000013b0| 77 6f 72 64 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |word;..r|egister |
|000013c0| 69 6e 74 20 63 2c 20 62 | 63 6f 75 6e 74 3b 0a 09 |int c, b|count;..|
|000013d0| 72 65 67 69 73 74 65 72 | 20 46 49 4c 45 20 2a 66 |register| FILE *f|
|000013e0| 69 6e 20 3d 20 73 74 64 | 69 6e 2c 20 2a 66 6f 75 |in = std|in, *fou|
|000013f0| 74 20 3d 20 73 74 64 6f | 75 74 3b 09 2f 2a 20 69 |t = stdo|ut;./* i|
|00001400| 6e 20 72 65 67 73 20 66 | 6f 72 20 73 70 65 65 64 |n regs f|or speed|
|00001410| 20 2a 2f 0a 09 72 65 67 | 69 73 74 65 72 20 63 68 | */..reg|ister ch|
|00001420| 61 72 20 2a 6d 61 70 2c | 20 2a 70 3b 0a 09 72 65 |ar *map,| *p;..re|
|00001430| 67 69 73 74 65 72 20 6c | 6f 6e 67 20 6e 62 79 74 |gister l|ong nbyt|
|00001440| 65 73 3b 0a 09 72 65 67 | 69 73 74 65 72 20 69 6e |es;..reg|ister in|
|00001450| 74 20 63 72 63 3b 0a 09 | 6c 6f 6e 67 20 6e 62 79 |t crc;..|long nby|
|00001460| 74 65 73 32 3b 0a 09 69 | 6e 74 20 77 2c 20 63 72 |tes2;..i|nt w, cr|
|00001470| 63 32 3b 0a 09 63 68 61 | 72 20 62 75 66 5b 35 31 |c2;..cha|r buf[51|
|00001480| 32 5d 3b 0a 09 65 78 74 | 65 72 6e 20 63 68 61 72 |2];..ext|ern char|
|00001490| 20 2a 69 6e 64 65 78 28 | 29 3b 0a 0a 09 6d 79 6e | *index(|);...myn|
|000014a0| 61 6d 65 20 3d 20 61 72 | 67 76 5b 30 5d 3b 0a 09 |ame = ar|gv[0];..|
|000014b0| 69 66 20 28 73 69 7a 65 | 6f 66 28 77 6f 72 64 29 |if (size|of(word)|
|000014c0| 20 3c 20 34 29 0a 09 09 | 66 70 72 69 6e 74 66 28 | < 4)...|fprintf(|
|000014d0| 73 74 64 65 72 72 2c 20 | 22 25 73 3a 20 77 6f 72 |stderr, |"%s: wor|
|000014e0| 64 20 73 69 7a 65 20 74 | 6f 6f 20 73 6d 61 6c 6c |d size t|oo small|
|000014f0| 5c 6e 22 2c 20 6d 79 6e | 61 6d 65 29 2c 20 65 78 |\n", myn|ame), ex|
|00001500| 69 74 28 31 29 3b 0a 09 | 69 66 20 28 61 72 67 63 |it(1);..|if (argc|
|00001510| 20 3e 20 32 29 0a 09 09 | 66 70 72 69 6e 74 66 28 | > 2)...|fprintf(|
|00001520| 73 74 64 65 72 72 2c 20 | 22 55 73 61 67 65 3a 20 |stderr, |"Usage: |
|00001530| 25 73 20 5b 66 69 6c 65 | 5d 5c 6e 22 2c 20 6d 79 |%s [file|]\n", my|
|00001540| 6e 61 6d 65 29 2c 20 65 | 78 69 74 28 31 29 3b 0a |name), e|xit(1);.|
|00001550| 09 69 66 20 28 61 72 67 | 63 20 3d 3d 20 32 29 20 |.if (arg|c == 2) |
|00001560| 7b 0a 09 09 69 66 20 28 | 28 66 69 6e 20 3d 20 66 |{...if (|(fin = f|
|00001570| 6f 70 65 6e 28 61 72 67 | 76 5b 31 5d 2c 20 22 72 |open(arg|v[1], "r|
|00001580| 22 29 29 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0a 09 |")) == N|ULL) {..|
|00001590| 09 09 66 70 72 69 6e 74 | 66 28 73 74 64 65 72 72 |..fprint|f(stderr|
|000015a0| 2c 20 22 25 73 3a 20 22 | 2c 20 6d 79 6e 61 6d 65 |, "%s: "|, myname|
|000015b0| 29 3b 0a 09 09 09 70 65 | 72 72 6f 72 28 61 72 67 |);....pe|rror(arg|
|000015c0| 76 5b 31 5d 29 3b 0a 09 | 09 09 65 78 69 74 28 31 |v[1]);..|..exit(1|
|000015d0| 29 3b 0a 09 09 7d 0a 09 | 09 69 6e 70 75 74 66 69 |);...}..|.inputfi|
|000015e0| 6c 65 20 3d 20 61 72 67 | 76 5b 31 5d 3b 0a 09 7d |le = arg|v[1];..}|
|000015f0| 0a 09 2f 2a 20 73 6b 69 | 70 20 74 6f 20 62 65 67 |../* ski|p to beg|
|00001600| 69 6e 6e 69 6e 67 20 6f | 66 20 65 6e 63 6f 64 65 |inning o|f encode|
|00001610| 64 20 64 61 74 61 20 2a | 2f 0a 09 64 6f 20 7b 0a |d data *|/..do {.|
|00001620| 09 09 69 66 20 28 66 67 | 65 74 73 28 62 75 66 2c |..if (fg|ets(buf,|
|00001630| 20 73 69 7a 65 6f 66 20 | 62 75 66 2c 20 66 69 6e | sizeof |buf, fin|
|00001640| 29 20 3d 3d 20 4e 55 4c | 4c 29 0a 09 09 09 66 61 |) == NUL|L)....fa|
|00001650| 74 61 6c 28 22 4d 69 73 | 73 69 6e 67 20 68 65 61 |tal("Mis|sing hea|
|00001660| 64 65 72 22 29 3b 0a 09 | 09 2f 2a 20 74 72 69 6d |der");..|./* trim|
|00001670| 20 74 72 61 69 6c 69 6e | 67 20 62 6c 61 6e 6b 73 | trailin|g blanks|
|00001680| 20 28 73 69 67 68 29 20 | 2a 2f 0a 09 09 70 20 3d | (sigh) |*/...p =|
|00001690| 20 69 6e 64 65 78 28 62 | 75 66 2c 20 27 5c 6e 27 | index(b|uf, '\n'|
|000016a0| 29 3b 0a 09 09 69 66 20 | 28 70 20 3d 3d 20 30 29 |);...if |(p == 0)|
|000016b0| 0a 09 09 09 63 6f 6e 74 | 69 6e 75 65 3b 0a 09 09 |....cont|inue;...|
|000016c0| 77 68 69 6c 65 20 28 2a | 2d 2d 70 20 3d 3d 20 27 |while (*|--p == '|
|000016d0| 20 27 29 0a 09 09 09 3b | 0a 09 09 70 5b 31 5d 20 | ')....;|...p[1] |
|000016e0| 3d 20 27 5c 6e 27 3b 0a | 09 09 70 5b 32 5d 20 3d |= '\n';.|..p[2] =|
|000016f0| 20 27 5c 30 27 3b 0a 09 | 7d 20 77 68 69 6c 65 20 | '\0';..|} while |
|00001700| 28 73 74 72 63 6d 70 28 | 62 75 66 2c 20 68 65 61 |(strcmp(|buf, hea|
|00001710| 64 65 72 29 20 21 3d 20 | 30 29 3b 0a 09 0a 09 2f |der) != |0);..../|
|00001720| 2a 20 64 65 66 69 6e 65 | 20 69 6e 70 75 74 20 6d |* define| input m|
|00001730| 61 70 70 69 6e 67 20 74 | 61 62 6c 65 20 2a 2f 0a |apping t|able */.|
|00001740| 09 6d 61 70 20 3d 20 62 | 75 66 2b 31 3b 0a 09 66 |.map = b|uf+1;..f|
|00001750| 6f 72 20 28 63 20 3d 20 | 30 3b 20 63 20 3c 20 32 |or (c = |0; c < 2|
|00001760| 35 36 3b 20 63 2b 2b 29 | 0a 09 09 6d 61 70 5b 63 |56; c++)|...map[c|
|00001770| 5d 20 3d 20 36 34 3b 09 | 09 2f 2a 20 69 6c 6c 65 |] = 64;.|./* ille|
|00001780| 67 61 6c 20 2a 2f 0a 09 | 66 6f 72 20 28 63 20 3d |gal */..|for (c =|
|00001790| 20 30 3b 20 63 20 3c 20 | 36 34 3b 20 63 2b 2b 29 | 0; c < |64; c++)|
|000017a0| 0a 09 09 6d 61 70 5b 45 | 4e 43 4f 44 45 28 63 29 |...map[E|NCODE(c)|
|000017b0| 5d 20 3d 20 63 3b 0a 09 | 6d 61 70 5b 45 4f 46 5d |] = c;..|map[EOF]|
|000017c0| 20 3d 20 36 35 3b 09 09 | 2f 2a 20 73 70 65 63 69 | = 65;..|/* speci|
|000017d0| 61 6c 20 63 61 73 65 73 | 20 2a 2f 0a 09 6d 61 70 |al cases| */..map|
|000017e0| 5b 27 2f 27 5d 20 3d 20 | 36 36 3b 0a 0a 09 77 6f |['/'] = |66;...wo|
|000017f0| 72 64 20 3d 20 30 3b 0a | 09 62 63 6f 75 6e 74 20 |rd = 0;.|.bcount |
|00001800| 3d 20 34 3b 0a 09 6e 62 | 79 74 65 73 20 3d 20 30 |= 4;..nb|ytes = 0|
|00001810| 3b 0a 09 63 72 63 20 3d | 20 30 3b 0a 23 64 65 66 |;..crc =| 0;.#def|
|00001820| 69 6e 65 20 50 55 54 43 | 28 78 29 20 20 7b 20 63 |ine PUTC|(x) { c|
|00001830| 20 3d 20 28 78 29 20 26 | 20 30 78 66 66 3b 20 43 | = (x) &| 0xff; C|
|00001840| 52 43 28 63 72 63 2c 20 | 63 29 3b 20 70 75 74 63 |RC(crc, |c); putc|
|00001850| 28 63 2c 20 66 6f 75 74 | 29 3b 20 6e 62 79 74 65 |(c, fout|); nbyte|
|00001860| 73 2b 2b 3b 20 7d 0a 09 | 66 6f 72 20 28 3b 3b 29 |s++; }..|for (;;)|
|00001870| 20 7b 0a 09 09 63 20 3d | 20 6d 61 70 5b 67 65 74 | {...c =| map[get|
|00001880| 63 28 66 69 6e 29 5d 3b | 0a 09 09 69 66 20 28 28 |c(fin)];|...if ((|
|00001890| 75 6e 73 69 67 6e 65 64 | 29 63 20 3c 20 36 34 29 |unsigned|)c < 64)|
|000018a0| 20 7b 0a 09 09 09 77 6f | 72 64 20 3c 3c 3d 20 36 | {....wo|rd <<= 6|
|000018b0| 3b 0a 09 09 09 77 6f 72 | 64 20 7c 3d 20 63 3b 0a |;....wor|d |= c;.|
|000018c0| 09 09 09 69 66 20 28 2d | 2d 62 63 6f 75 6e 74 20 |...if (-|-bcount |
|000018d0| 3d 3d 20 30 29 20 7b 0a | 09 09 09 09 50 55 54 43 |== 0) {.|....PUTC|
|000018e0| 28 77 6f 72 64 20 3e 3e | 20 31 36 29 3b 0a 09 09 |(word >>| 16);...|
|000018f0| 09 09 50 55 54 43 28 77 | 6f 72 64 20 3e 3e 20 20 |..PUTC(w|ord >> |
|00001900| 38 29 3b 0a 09 09 09 09 | 50 55 54 43 28 77 6f 72 |8);.....|PUTC(wor|
|00001910| 64 29 3b 0a 09 09 09 09 | 77 6f 72 64 20 3d 20 30 |d);.....|word = 0|
|00001920| 3b 0a 09 09 09 09 62 63 | 6f 75 6e 74 20 3d 20 34 |;.....bc|ount = 4|
|00001930| 3b 0a 09 09 09 7d 0a 09 | 09 09 63 6f 6e 74 69 6e |;....}..|..contin|
|00001940| 75 65 3b 0a 09 09 7d 0a | 09 09 73 77 69 74 63 68 |ue;...}.|..switch|
|00001950| 20 28 63 29 20 7b 0a 0a | 09 09 64 65 66 61 75 6c | (c) {..|..defaul|
|00001960| 74 3a 0a 09 09 09 2f 2a | 0a 09 09 09 20 2a 20 49 |t:..../*|.... * I|
|00001970| 67 6e 6f 72 65 20 73 74 | 75 66 66 20 6e 6f 74 20 |gnore st|uff not |
|00001980| 69 6e 20 74 68 65 20 63 | 6f 64 65 20 73 65 74 2e |in the c|ode set.|
|00001990| 0a 09 09 09 20 2a 2f 0a | 09 09 09 63 6f 6e 74 69 |.... */.|...conti|
|000019a0| 6e 75 65 3b 0a 0a 09 09 | 63 61 73 65 20 36 35 3a |nue;....|case 65:|
|000019b0| 09 2f 2a 20 45 4f 46 20 | 2a 2f 0a 09 09 09 66 61 |./* EOF |*/....fa|
|000019c0| 74 61 6c 28 22 55 6e 65 | 78 70 65 63 74 65 64 20 |tal("Une|xpected |
|000019d0| 45 4f 46 22 29 3b 0a 0a | 09 09 63 61 73 65 20 36 |EOF");..|..case 6|
|000019e0| 36 3a 09 2f 2a 20 27 2f | 27 20 2a 2f 0a 09 09 09 |6:./* '/|' */....|
|000019f0| 2f 2a 20 74 72 61 69 6c | 65 72 20 66 6f 6c 6c 6f |/* trail|er follo|
|00001a00| 77 73 3a 20 25 64 25 78 | 20 2a 2f 0a 09 09 09 63 |ws: %d%x| */....c|
|00001a10| 20 3d 20 67 65 74 63 28 | 66 69 6e 29 3b 0a 09 09 | = getc(|fin);...|
|00001a20| 09 69 66 20 28 66 73 63 | 61 6e 66 28 66 69 6e 2c |.if (fsc|anf(fin,|
|00001a30| 20 22 25 78 22 2c 20 26 | 77 29 20 21 3d 20 31 29 | "%x", &|w) != 1)|
|00001a40| 0a 09 09 09 09 66 61 74 | 61 6c 28 22 43 6f 72 72 |.....fat|al("Corr|
|00001a50| 75 70 74 65 64 20 69 6e | 70 75 74 20 28 74 72 61 |upted in|put (tra|
|00001a60| 69 6c 65 72 29 22 29 3b | 0a 09 09 09 73 77 69 74 |iler)");|....swit|
|00001a70| 63 68 20 28 63 29 20 7b | 0a 09 09 09 63 61 73 65 |ch (c) {|....case|
|00001a80| 20 27 32 27 3a 20 50 55 | 54 43 28 77 20 3e 3e 20 | '2': PU|TC(w >> |
|00001a90| 38 29 3b 0a 09 09 09 63 | 61 73 65 20 27 31 27 3a |8);....c|ase '1':|
|00001aa0| 20 50 55 54 43 28 77 29 | 3b 0a 09 09 09 63 61 73 | PUTC(w)|;....cas|
|00001ab0| 65 20 27 30 27 3a 20 62 | 72 65 61 6b 3b 0a 09 09 |e '0': b|reak;...|
|00001ac0| 09 64 65 66 61 75 6c 74 | 3a 20 66 61 74 61 6c 28 |.default|: fatal(|
|00001ad0| 22 43 6f 72 72 75 70 74 | 65 64 20 69 6e 70 75 74 |"Corrupt|ed input|
|00001ae0| 20 28 74 72 61 69 6c 65 | 72 29 22 29 3b 0a 09 09 | (traile|r)");...|
|00001af0| 09 7d 0a 09 09 09 2f 2a | 0a 09 09 09 20 2a 20 42 |.}..../*|.... * B|
|00001b00| 79 74 65 20 63 6f 75 6e | 74 20 61 6e 64 20 43 52 |yte coun|t and CR|
|00001b10| 43 20 66 6f 6c 6c 6f 77 | 2e 0a 09 09 09 20 2a 2f |C follow|..... */|
|00001b20| 0a 09 09 09 69 66 20 28 | 66 73 63 61 6e 66 28 66 |....if (|fscanf(f|
|00001b30| 69 6e 2c 20 22 25 6c 64 | 25 78 22 2c 20 26 6e 62 |in, "%ld|%x", &nb|
|00001b40| 79 74 65 73 32 2c 20 26 | 63 72 63 32 29 20 21 3d |ytes2, &|crc2) !=|
|00001b50| 20 32 29 0a 09 09 09 09 | 66 61 74 61 6c 28 22 43 | 2).....|fatal("C|
|00001b60| 6f 72 72 75 70 74 65 64 | 20 69 6e 70 75 74 20 28 |orrupted| input (|
|00001b70| 6d 69 73 73 69 6e 67 20 | 62 79 74 65 20 63 6f 75 |missing |byte cou|
|00001b80| 6e 74 2f 43 52 43 29 22 | 29 3b 0a 09 09 09 69 66 |nt/CRC)"|);....if|
|00001b90| 20 28 6e 62 79 74 65 73 | 32 20 21 3d 20 6e 62 79 | (nbytes|2 != nby|
|00001ba0| 74 65 73 29 0a 09 09 09 | 09 66 61 74 61 6c 28 22 |tes)....|.fatal("|
|00001bb0| 43 6f 72 72 75 70 74 65 | 64 20 69 6e 70 75 74 20 |Corrupte|d input |
|00001bc0| 28 62 79 74 65 20 63 6f | 75 6e 74 20 69 73 20 77 |(byte co|unt is w|
|00001bd0| 72 6f 6e 67 29 22 29 3b | 0a 09 09 09 69 66 20 28 |rong)");|....if (|
|00001be0| 63 72 63 32 20 21 3d 20 | 28 63 72 63 20 26 20 30 |crc2 != |(crc & 0|
|00001bf0| 78 66 66 66 66 29 29 0a | 09 09 09 09 66 61 74 61 |xffff)).|....fata|
|00001c00| 6c 28 22 43 6f 72 72 75 | 70 74 65 64 20 69 6e 70 |l("Corru|pted inp|
|00001c10| 75 74 20 28 43 52 43 20 | 6d 69 73 6d 61 74 63 68 |ut (CRC |mismatch|
|00001c20| 29 22 29 3b 0a 09 09 09 | 65 78 69 74 28 30 29 3b |)");....|exit(0);|
|00001c30| 0a 09 09 7d 0a 09 7d 0a | 7d 0a 0a 66 61 74 61 6c |...}..}.|}..fatal|
|00001c40| 28 73 29 0a 09 63 68 61 | 72 20 2a 73 3b 0a 7b 0a |(s)..cha|r *s;.{.|
|00001c50| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00001c60| 20 22 25 73 3a 20 25 73 | 3a 20 25 73 5c 6e 22 2c | "%s: %s|: %s\n",|
|00001c70| 20 6d 79 6e 61 6d 65 2c | 20 69 6e 70 75 74 66 69 | myname,| inputfi|
|00001c80| 6c 65 2c 20 73 29 3b 0a | 09 65 78 69 74 28 32 29 |le, s);.|.exit(2)|
|00001c90| 3b 0a 7d 0a 53 48 41 52 | 5f 45 4f 46 0a 66 69 20 |;.}.SHAR|_EOF.fi |
|00001ca0| 23 20 65 6e 64 20 6f 66 | 20 6f 76 65 72 77 72 69 |# end of| overwri|
|00001cb0| 74 69 6e 67 20 63 68 65 | 63 6b 0a 69 66 20 74 65 |ting che|ck.if te|
|00001cc0| 73 74 20 2d 66 20 27 62 | 65 6e 63 6f 64 65 2e 63 |st -f 'b|encode.c|
|00001cd0| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00001ce0| 72 3a 20 77 69 6c 6c 20 | 6e 6f 74 20 6f 76 65 72 |r: will |not over|
|00001cf0| 2d 77 72 69 74 65 20 65 | 78 69 73 74 69 6e 67 20 |-write e|xisting |
|00001d00| 66 69 6c 65 20 22 27 62 | 65 6e 63 6f 64 65 2e 63 |file "'b|encode.c|
|00001d10| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00001d20| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 62 65 6e 63 |SHAR_EOF| > 'benc|
|00001d30| 6f 64 65 2e 63 27 0a 2f | 2a 0a 20 2a 20 62 65 6e |ode.c'./|*. * ben|
|00001d40| 63 6f 64 65 20 5b 66 69 | 6c 65 5d 0a 20 2a 2f 0a |code [fi|le]. */.|
|00001d50| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00001d60| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 22 63 6f 64 |h>.#incl|ude "cod|
|00001d70| 65 72 2e 68 22 0a 23 64 | 65 66 69 6e 65 20 4d 41 |er.h".#d|efine MA|
|00001d80| 58 50 45 52 4c 49 4e 45 | 20 37 38 09 09 2f 2a 20 |XPERLINE| 78../* |
|00001d90| 6d 61 78 20 63 68 61 72 | 73 2f 6c 69 6e 65 20 2a |max char|s/line *|
|00001da0| 2f 0a 63 68 61 72 20 2a | 6d 79 6e 61 6d 65 3b 0a |/.char *|myname;.|
|00001db0| 0a 6d 61 69 6e 28 61 72 | 67 63 2c 61 72 67 76 29 |.main(ar|gc,argv)|
|00001dc0| 20 0a 09 63 68 61 72 20 | 2a 2a 61 72 67 76 3b 0a | ..char |**argv;.|
|00001dd0| 7b 0a 09 72 65 67 69 73 | 74 65 72 20 46 49 4c 45 |{..regis|ter FILE|
|00001de0| 20 2a 66 69 6e 20 3d 20 | 73 74 64 69 6e 2c 20 2a | *fin = |stdin, *|
|00001df0| 66 6f 75 74 20 3d 20 73 | 74 64 6f 75 74 3b 20 2f |fout = s|tdout; /|
|00001e00| 2a 20 66 61 73 74 65 72 | 20 69 6e 20 61 20 72 65 |* faster| in a re|
|00001e10| 67 69 73 74 65 72 20 2a | 2f 0a 09 72 65 67 69 73 |gister *|/..regis|
|00001e20| 74 65 72 20 69 6e 74 20 | 63 2c 20 62 63 6f 75 6e |ter int |c, bcoun|
|00001e30| 74 2c 20 63 63 6f 75 6e | 74 20 3d 20 4d 41 58 50 |t, ccoun|t = MAXP|
|00001e40| 45 52 4c 49 4e 45 2d 31 | 3b 0a 09 72 65 67 69 73 |ERLINE-1|;..regis|
|00001e50| 74 65 72 20 6c 6f 6e 67 | 20 77 6f 72 64 2c 20 6e |ter long| word, n|
|00001e60| 62 79 74 65 73 3b 0a 09 | 72 65 67 69 73 74 65 72 |bytes;..|register|
|00001e70| 20 69 6e 74 20 63 72 63 | 3b 0a 0a 09 6d 79 6e 61 | int crc|;...myna|
|00001e80| 6d 65 20 3d 20 61 72 67 | 76 5b 30 5d 3b 0a 09 69 |me = arg|v[0];..i|
|00001e90| 66 20 28 73 69 7a 65 6f | 66 28 77 6f 72 64 29 20 |f (sizeo|f(word) |
|00001ea0| 3c 20 34 29 0a 09 09 66 | 70 72 69 6e 74 66 28 73 |< 4)...f|printf(s|
|00001eb0| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 77 6f 72 64 |tderr, "|%s: word|
|00001ec0| 20 73 69 7a 65 20 74 6f | 6f 20 73 6d 61 6c 6c 5c | size to|o small\|
|00001ed0| 6e 22 2c 20 6d 79 6e 61 | 6d 65 29 2c 20 65 78 69 |n", myna|me), exi|
|00001ee0| 74 28 31 29 3b 0a 09 69 | 66 20 28 61 72 67 63 20 |t(1);..i|f (argc |
|00001ef0| 3d 3d 20 32 20 26 26 20 | 28 66 69 6e 20 3d 20 66 |== 2 && |(fin = f|
|00001f00| 6f 70 65 6e 28 61 72 67 | 76 5b 31 5d 2c 20 22 72 |open(arg|v[1], "r|
|00001f10| 22 29 29 20 3d 3d 20 4e | 55 4c 4c 29 20 7b 0a 09 |")) == N|ULL) {..|
|00001f20| 09 66 70 72 69 6e 74 66 | 28 73 74 64 65 72 72 2c |.fprintf|(stderr,|
|00001f30| 20 22 25 73 3a 20 22 2c | 20 6d 79 6e 61 6d 65 29 | "%s: ",| myname)|
|00001f40| 3b 0a 09 09 70 65 72 72 | 6f 72 28 61 72 67 76 5b |;...perr|or(argv[|
|00001f50| 31 5d 29 3b 0a 09 09 65 | 78 69 74 28 31 29 3b 0a |1]);...e|xit(1);.|
|00001f60| 09 7d 0a 09 65 6c 73 65 | 20 69 66 20 28 61 72 67 |.}..else| if (arg|
|00001f70| 63 20 3e 20 32 29 20 7b | 0a 09 09 66 70 72 69 6e |c > 2) {|...fprin|
|00001f80| 74 66 28 73 74 64 65 72 | 72 2c 20 22 55 73 61 67 |tf(stder|r, "Usag|
|00001f90| 65 3a 20 25 73 20 5b 66 | 69 6c 65 5d 5c 6e 22 2c |e: %s [f|ile]\n",|
|00001fa0| 20 6d 79 6e 61 6d 65 29 | 3b 0a 09 09 65 78 69 74 | myname)|;...exit|
|00001fb0| 28 31 29 3b 0a 09 7d 0a | 0a 23 64 65 66 69 6e 65 |(1);..}.|.#define|
|00001fc0| 20 50 55 54 43 28 63 29 | 20 5c 0a 09 70 75 74 63 | PUTC(c)| \..putc|
|00001fd0| 28 63 2c 20 66 6f 75 74 | 29 3b 20 5c 0a 09 69 66 |(c, fout|); \..if|
|00001fe0| 20 28 2d 2d 63 63 6f 75 | 6e 74 20 3d 3d 20 30 29 | (--ccou|nt == 0)|
|00001ff0| 20 7b 20 5c 0a 09 09 70 | 75 74 63 28 27 5c 6e 27 | { \...p|utc('\n'|
|00002000| 2c 20 66 6f 75 74 29 3b | 20 5c 0a 09 09 63 63 6f |, fout);| \...cco|
|00002010| 75 6e 74 20 3d 20 4d 41 | 58 50 45 52 4c 49 4e 45 |unt = MA|XPERLINE|
|00002020| 2d 31 3b 20 5c 0a 09 7d | 0a 0a 09 66 70 75 74 73 |-1; \..}|...fputs|
|00002030| 28 68 65 61 64 65 72 2c | 20 66 6f 75 74 29 3b 0a |(header,| fout);.|
|00002040| 09 77 6f 72 64 20 3d 20 | 30 3b 0a 09 62 63 6f 75 |.word = |0;..bcou|
|00002050| 6e 74 20 3d 20 33 3b 0a | 09 63 72 63 20 3d 20 30 |nt = 3;.|.crc = 0|
|00002060| 3b 0a 09 66 6f 72 20 28 | 6e 62 79 74 65 73 20 3d |;..for (|nbytes =|
|00002070| 20 30 3b 20 28 63 20 3d | 20 67 65 74 63 28 66 69 | 0; (c =| getc(fi|
|00002080| 6e 29 29 20 21 3d 20 45 | 4f 46 3b 20 6e 62 79 74 |n)) != E|OF; nbyt|
|00002090| 65 73 2b 2b 29 20 7b 0a | 09 09 43 52 43 28 63 72 |es++) {.|..CRC(cr|
|000020a0| 63 2c 20 63 29 3b 0a 09 | 09 77 6f 72 64 20 3c 3c |c, c);..|.word <<|
|000020b0| 3d 20 38 3b 0a 09 09 77 | 6f 72 64 20 7c 3d 20 63 |= 8;...w|ord |= c|
|000020c0| 3b 0a 09 09 69 66 20 28 | 2d 2d 62 63 6f 75 6e 74 |;...if (|--bcount|
|000020d0| 20 3d 3d 20 30 29 20 7b | 0a 09 09 09 50 55 54 43 | == 0) {|....PUTC|
|000020e0| 28 45 4e 43 4f 44 45 28 | 28 77 6f 72 64 20 3e 3e |(ENCODE(|(word >>|
|000020f0| 20 31 38 29 20 26 20 30 | 37 37 29 29 3b 0a 09 09 | 18) & 0|77));...|
|00002100| 09 50 55 54 43 28 45 4e | 43 4f 44 45 28 28 77 6f |.PUTC(EN|CODE((wo|
|00002110| 72 64 20 3e 3e 20 31 32 | 29 20 26 20 30 37 37 29 |rd >> 12|) & 077)|
|00002120| 29 3b 0a 09 09 09 50 55 | 54 43 28 45 4e 43 4f 44 |);....PU|TC(ENCOD|
|00002130| 45 28 28 77 6f 72 64 20 | 3e 3e 20 20 36 29 20 26 |E((word |>> 6) &|
|00002140| 20 30 37 37 29 29 3b 0a | 09 09 09 50 55 54 43 28 | 077));.|...PUTC(|
|00002150| 45 4e 43 4f 44 45 28 28 | 77 6f 72 64 20 20 20 20 |ENCODE((|word |
|00002160| 20 20 29 20 26 20 30 37 | 37 29 29 3b 0a 09 09 09 | ) & 07|7));....|
|00002170| 77 6f 72 64 20 3d 20 30 | 3b 0a 09 09 09 62 63 6f |word = 0|;....bco|
|00002180| 75 6e 74 20 3d 20 33 3b | 0a 09 09 7d 0a 09 7d 0a |unt = 3;|...}..}.|
|00002190| 09 2f 2a 0a 09 20 2a 20 | 41 20 74 72 61 69 6c 69 |./*.. * |A traili|
|000021a0| 6e 67 20 2f 20 6d 61 72 | 6b 73 20 65 6e 64 20 6f |ng / mar|ks end o|
|000021b0| 66 20 64 61 74 61 2e 0a | 09 20 2a 20 54 68 65 20 |f data..|. * The |
|000021c0| 6c 61 73 74 20 70 61 72 | 74 69 61 6c 20 65 6e 63 |last par|tial enc|
|000021d0| 6f 64 65 64 20 77 6f 72 | 64 20 66 6f 6c 6c 6f 77 |oded wor|d follow|
|000021e0| 73 20 69 6e 20 68 65 78 | 2c 0a 09 20 2a 20 70 72 |s in hex|,.. * pr|
|000021f0| 65 63 65 64 65 64 20 62 | 79 20 61 20 62 79 74 65 |eceded b|y a byte|
|00002200| 20 63 6f 75 6e 74 2e 0a | 09 20 2a 2f 0a 09 69 66 | count..|. */..if|
|00002210| 20 28 63 63 6f 75 6e 74 | 20 21 3d 20 4d 41 58 50 | (ccount| != MAXP|
|00002220| 45 52 4c 49 4e 45 2d 31 | 29 09 2f 2a 20 61 76 6f |ERLINE-1|)./* avo|
|00002230| 69 64 20 65 6d 70 74 79 | 20 6c 69 6e 65 73 20 2a |id empty| lines *|
|00002240| 2f 0a 09 09 70 75 74 63 | 28 27 5c 6e 27 2c 20 66 |/...putc|('\n', f|
|00002250| 6f 75 74 29 3b 0a 09 66 | 70 72 69 6e 74 66 28 66 |out);..f|printf(f|
|00002260| 6f 75 74 2c 20 22 2f 25 | 64 25 78 5c 6e 22 2c 20 |out, "/%|d%x\n", |
|00002270| 33 2d 62 63 6f 75 6e 74 | 2c 20 77 6f 72 64 29 3b |3-bcount|, word);|
|00002280| 0a 09 2f 2a 0a 09 20 2a | 20 41 6e 64 20 66 69 6e |../*.. *| And fin|
|00002290| 61 6c 6c 79 20 74 68 65 | 20 62 79 74 65 20 63 6f |ally the| byte co|
|000022a0| 75 6e 74 20 61 6e 64 20 | 43 52 43 2e 0a 09 20 2a |unt and |CRC... *|
|000022b0| 2f 0a 09 66 70 72 69 6e | 74 66 28 66 6f 75 74 2c |/..fprin|tf(fout,|
|000022c0| 20 22 25 6c 64 20 25 78 | 5c 6e 22 2c 20 6e 62 79 | "%ld %x|\n", nby|
|000022d0| 74 65 73 2c 20 63 72 63 | 20 26 20 30 78 66 66 66 |tes, crc| & 0xfff|
|000022e0| 66 29 3b 0a 09 65 78 69 | 74 28 30 29 3b 0a 7d 0a |f);..exi|t(0);.}.|
|000022f0| 53 48 41 52 5f 45 4f 46 | 0a 66 69 20 23 20 65 6e |SHAR_EOF|.fi # en|
|00002300| 64 20 6f 66 20 6f 76 65 | 72 77 72 69 74 69 6e 67 |d of ove|rwriting|
|00002310| 20 63 68 65 63 6b 0a 23 | 09 45 6e 64 20 6f 66 20 | check.#|.End of |
|00002320| 73 68 65 6c 6c 20 61 72 | 63 68 69 76 65 0a 65 78 |shell ar|chive.ex|
|00002330| 69 74 20 30 0a | |it 0. | |
+--------+-------------------------+-------------------------+--------+--------+