home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: Tape Archive
(archive/tar).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| Tape Archive (archive/tar)
| magic
| Supported |
100%
| file
| tar archive
| default
| |
99%
| file
| tar archive (V7), file zmodem/, mode 775 , uid 62 , gid 25 , size 0 , seconds 5224744126
| default
| |
98%
| file
| data
| default
| |
100%
| TrID
| Sybase iAnywhere database files
| default (weak)
| |
100%
| dearkID
| deark: tar
| default
| |
100%
| siegfried
| x-fmt/265 Tape Archive Format
| default
| |
100%
| lsar
| Tar
| default (weak)
| |
100%
| gt2
| TAR Archiv gefunden (Auflistung ist deaktiviert)
| default
| |
100%
| disktype
| Pre-POSIX tar archive
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 7a 6d 6f 64 65 6d 2f 00 | 00 00 00 00 00 00 00 00 |zmodem/.|........|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000060| 00 00 00 00 20 20 20 37 | 37 35 20 00 20 20 20 20 |.... 7|75 . |
|00000070| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00000080| 20 20 20 20 20 20 30 20 | 20 35 32 32 34 37 34 34 | 0 | 5224744|
|00000090| 31 32 36 20 20 20 35 33 | 30 32 00 20 00 00 00 00 |126 53|02. ....|
|000000a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000000f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000001f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000200| 7a 6d 6f 64 65 6d 2f 72 | 62 73 62 2e 63 00 00 00 |zmodem/r|bsb.c...|
|00000210| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000260| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00000270| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00000280| 20 20 33 32 36 30 37 20 | 20 35 32 32 34 37 34 33 | 32607 | 5224743|
|00000290| 33 37 31 20 20 20 36 35 | 31 32 00 20 00 00 00 00 |371 65|12. ....|
|000002a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000002f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000300| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000310| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000320| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000330| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000340| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000350| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000360| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000370| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000380| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000390| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000003f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000400| 2f 2a 0a 20 2a 0a 20 2a | 20 2d 72 65 76 20 30 34 |/*. *. *| -rev 04|
|00000410| 2d 31 36 2d 38 37 0a 20 | 2a 20 20 54 68 69 73 20 |-16-87. |* This |
|00000420| 66 69 6c 65 20 63 6f 6e | 74 61 69 6e 73 20 55 6e |file con|tains Un|
|00000430| 69 78 20 73 70 65 63 69 | 66 69 63 20 63 6f 64 65 |ix speci|fic code|
|00000440| 20 66 6f 72 20 73 65 74 | 74 69 6e 67 20 74 65 72 | for set|ting ter|
|00000450| 6d 69 6e 61 6c 20 6d 6f | 64 65 73 2c 0a 20 2a 20 |minal mo|des,. * |
|00000460| 20 76 65 72 79 20 6c 69 | 74 74 6c 65 20 69 73 20 | very li|ttle is |
|00000470| 73 70 65 63 69 66 69 63 | 20 74 6f 20 5a 4d 4f 44 |specific| to ZMOD|
|00000480| 45 4d 20 6f 72 20 59 4d | 4f 44 45 4d 20 70 65 72 |EM or YM|ODEM per|
|00000490| 20 73 65 20 28 74 68 61 | 74 20 63 6f 64 65 20 69 | se (tha|t code i|
|000004a0| 73 20 69 6e 0a 20 2a 20 | 20 73 7a 2e 63 20 61 6e |s in. * | sz.c an|
|000004b0| 64 20 72 7a 2e 63 29 2e | 20 20 54 68 65 20 43 52 |d rz.c).| The CR|
|000004c0| 43 2d 31 36 20 72 6f 75 | 74 69 6e 65 73 20 75 73 |C-16 rou|tines us|
|000004d0| 65 64 20 62 79 20 58 4d | 4f 44 45 4d 2c 20 59 4d |ed by XM|ODEM, YM|
|000004e0| 4f 44 45 4d 2c 20 61 6e | 64 20 5a 4d 4f 44 45 4d |ODEM, an|d ZMODEM|
|000004f0| 0a 20 2a 20 20 61 72 65 | 20 61 6c 73 6f 20 69 6e |. * are| also in|
|00000500| 20 74 68 69 73 20 66 69 | 6c 65 2c 20 61 20 66 61 | this fi|le, a fa|
|00000510| 73 74 20 74 61 62 6c 65 | 20 64 72 69 76 65 6e 20 |st table| driven |
|00000520| 6d 61 63 72 6f 20 76 65 | 72 73 69 6f 6e 0a 20 2a |macro ve|rsion. *|
|00000530| 0a 20 2a 20 20 20 54 68 | 69 73 20 66 69 6c 65 20 |. * Th|is file |
|00000540| 69 73 20 23 69 6e 63 6c | 75 64 65 64 20 73 6f 20 |is #incl|uded so |
|00000550| 74 68 65 20 6d 61 69 6e | 20 66 69 6c 65 20 63 61 |the main| file ca|
|00000560| 6e 20 73 65 74 20 70 61 | 72 61 6d 65 74 65 72 73 |n set pa|rameters|
|00000570| 20 73 75 63 68 20 61 73 | 20 48 4f 57 4d 41 4e 59 | such as| HOWMANY|
|00000580| 2e 0a 20 2a 20 20 20 53 | 65 65 20 74 68 65 20 6d |.. * S|ee the m|
|00000590| 61 69 6e 20 66 69 6c 65 | 73 20 28 72 7a 2e 63 2f |ain file|s (rz.c/|
|000005a0| 73 7a 2e 63 29 20 66 6f | 72 20 63 6f 6d 70 69 6c |sz.c) fo|r compil|
|000005b0| 65 20 69 6e 73 74 72 75 | 63 74 69 6f 6e 73 2e 0a |e instru|ctions..|
|000005c0| 20 2a 2f 0a 0a 23 69 66 | 64 65 66 20 56 37 0a 23 | */..#if|def V7.#|
|000005d0| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 74 79 70 |include |<sys/typ|
|000005e0| 65 73 2e 68 3e 0a 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|000005f0| 73 79 73 2f 73 74 61 74 | 2e 68 3e 0a 23 69 6e 63 |sys/stat|.h>.#inc|
|00000600| 6c 75 64 65 20 3c 73 67 | 74 74 79 2e 68 3e 0a 23 |lude <sg|tty.h>.#|
|00000610| 64 65 66 69 6e 65 20 4f | 53 20 22 56 37 2f 42 53 |define O|S "V7/BS|
|00000620| 44 22 0a 23 65 6e 64 69 | 66 0a 0a 23 69 66 6e 64 |D".#endi|f..#ifnd|
|00000630| 65 66 20 4f 53 0a 23 69 | 66 6e 64 65 66 20 55 53 |ef OS.#i|fndef US|
|00000640| 47 0a 23 64 65 66 69 6e | 65 20 55 53 47 0a 23 65 |G.#defin|e USG.#e|
|00000650| 6e 64 69 66 0a 23 65 6e | 64 69 66 0a 0a 23 69 66 |ndif.#en|dif..#if|
|00000660| 64 65 66 20 55 53 47 0a | 23 69 6e 63 6c 75 64 65 |def USG.|#include|
|00000670| 20 3c 73 79 73 2f 74 79 | 70 65 73 2e 68 3e 0a 23 | <sys/ty|pes.h>.#|
|00000680| 69 6e 63 6c 75 64 65 20 | 3c 73 79 73 2f 73 74 61 |include |<sys/sta|
|00000690| 74 2e 68 3e 0a 23 69 6e | 63 6c 75 64 65 20 3c 74 |t.h>.#in|clude <t|
|000006a0| 65 72 6d 69 6f 2e 68 3e | 0a 23 69 6e 63 6c 75 64 |ermio.h>|.#includ|
|000006b0| 65 20 3c 73 79 73 2f 69 | 6f 63 74 6c 2e 68 3e 0a |e <sys/i|octl.h>.|
|000006c0| 23 64 65 66 69 6e 65 20 | 4f 53 20 22 53 59 53 20 |#define |OS "SYS |
|000006d0| 49 49 49 2f 56 22 0a 23 | 65 6e 64 69 66 0a 0a 23 |III/V".#|endif..#|
|000006e0| 69 66 20 48 4f 57 4d 41 | 4e 59 20 20 3e 20 32 35 |if HOWMA|NY > 25|
|000006f0| 35 0a 48 6f 77 6d 61 6e | 79 20 6d 75 73 74 20 62 |5.Howman|y must b|
|00000700| 65 20 32 35 35 20 6f 72 | 20 6c 65 73 73 0a 23 65 |e 255 or| less.#e|
|00000710| 6e 64 69 66 0a 0a 73 74 | 72 75 63 74 20 7b 0a 09 |ndif..st|ruct {..|
|00000720| 75 6e 73 69 67 6e 65 64 | 20 62 61 75 64 72 3b 0a |unsigned| baudr;.|
|00000730| 09 69 6e 74 20 73 70 65 | 65 64 63 6f 64 65 3b 0a |.int spe|edcode;.|
|00000740| 7d 20 73 70 65 65 64 73 | 5b 5d 20 3d 20 7b 0a 09 |} speeds|[] = {..|
|00000750| 31 31 30 2c 09 42 31 31 | 30 2c 0a 09 33 30 30 2c |110,.B11|0,..300,|
|00000760| 09 42 33 30 30 2c 0a 09 | 36 30 30 2c 09 42 36 30 |.B300,..|600,.B60|
|00000770| 30 2c 0a 09 31 32 30 30 | 2c 09 42 31 32 30 30 2c |0,..1200|,.B1200,|
|00000780| 0a 09 32 34 30 30 2c 09 | 42 32 34 30 30 2c 0a 09 |..2400,.|B2400,..|
|00000790| 34 38 30 30 2c 09 42 34 | 38 30 30 2c 0a 09 39 36 |4800,.B4|800,..96|
|000007a0| 30 30 2c 09 42 39 36 30 | 30 2c 0a 09 31 39 32 30 |00,.B960|0,..1920|
|000007b0| 30 2c 09 45 58 54 41 2c | 0a 09 39 36 30 30 2c 09 |0,.EXTA,|..9600,.|
|000007c0| 45 58 54 42 2c 0a 09 30 | 2c 0a 7d 3b 0a 0a 69 6e |EXTB,..0|,.};..in|
|000007d0| 74 20 54 77 6f 73 74 6f | 70 3b 09 09 2f 2a 20 55 |t Twosto|p;../* U|
|000007e0| 73 65 20 74 77 6f 20 73 | 74 6f 70 20 62 69 74 73 |se two s|top bits|
|000007f0| 20 2a 2f 0a 0a 73 74 61 | 74 69 63 20 75 6e 73 69 | */..sta|tic unsi|
|00000800| 67 6e 65 64 0a 67 65 74 | 73 70 65 65 64 28 63 6f |gned.get|speed(co|
|00000810| 64 65 29 0a 7b 0a 09 72 | 65 67 69 73 74 65 72 20 |de).{..r|egister |
|00000820| 6e 3b 0a 0a 09 66 6f 72 | 20 28 6e 3d 30 3b 20 73 |n;...for| (n=0; s|
|00000830| 70 65 65 64 73 5b 6e 5d | 2e 62 61 75 64 72 3b 20 |peeds[n]|.baudr; |
|00000840| 2b 2b 6e 29 0a 09 09 69 | 66 20 28 73 70 65 65 64 |++n)...i|f (speed|
|00000850| 73 5b 6e 5d 2e 73 70 65 | 65 64 63 6f 64 65 20 3d |s[n].spe|edcode =|
|00000860| 3d 20 63 6f 64 65 29 0a | 09 09 09 72 65 74 75 72 |= code).|...retur|
|00000870| 6e 20 73 70 65 65 64 73 | 5b 6e 5d 2e 62 61 75 64 |n speeds|[n].baud|
|00000880| 72 3b 0a 09 72 65 74 75 | 72 6e 20 30 3b 0a 7d 0a |r;..retu|rn 0;.}.|
|00000890| 0a 0a 0a 23 69 66 64 65 | 66 20 49 43 41 4e 4f 4e |...#ifde|f ICANON|
|000008a0| 0a 73 74 72 75 63 74 20 | 74 65 72 6d 69 6f 20 6f |.struct |termio o|
|000008b0| 6c 64 74 74 79 2c 20 74 | 74 79 3b 0a 23 65 6c 73 |ldtty, t|ty;.#els|
|000008c0| 65 0a 73 74 72 75 63 74 | 20 73 67 74 74 79 62 20 |e.struct| sgttyb |
|000008d0| 6f 6c 64 74 74 79 2c 20 | 74 74 79 3b 0a 73 74 72 |oldtty, |tty;.str|
|000008e0| 75 63 74 20 74 63 68 61 | 72 73 20 6f 6c 64 74 63 |uct tcha|rs oldtc|
|000008f0| 68 2c 20 74 63 68 3b 0a | 23 65 6e 64 69 66 0a 0a |h, tch;.|#endif..|
|00000900| 69 6e 74 20 69 6f 66 64 | 20 3d 20 30 3b 09 09 2f |int iofd| = 0;../|
|00000910| 2a 20 46 69 6c 65 20 64 | 65 73 63 72 69 70 74 6f |* File d|escripto|
|00000920| 72 20 66 6f 72 20 69 6f | 63 74 6c 73 20 26 20 72 |r for io|ctls & r|
|00000930| 65 61 64 73 20 2a 2f 0a | 0a 2f 2a 0a 20 2a 20 6d |eads */.|./*. * m|
|00000940| 6f 64 65 28 6e 29 0a 20 | 2a 20 20 33 3a 20 73 61 |ode(n). |* 3: sa|
|00000950| 76 65 20 6f 6c 64 20 74 | 74 79 20 73 74 61 74 2c |ve old t|ty stat,|
|00000960| 20 73 65 74 20 72 61 77 | 20 6d 6f 64 65 20 77 69 | set raw| mode wi|
|00000970| 74 68 20 66 6c 6f 77 20 | 63 6f 6e 74 72 6f 6c 0a |th flow |control.|
|00000980| 20 2a 20 20 32 3a 20 73 | 65 74 20 61 20 63 62 72 | * 2: s|et a cbr|
|00000990| 65 61 6b 2c 20 58 4f 4e | 2f 58 4f 46 46 20 63 6f |eak, XON|/XOFF co|
|000009a0| 6e 74 72 6f 6c 20 6d 6f | 64 65 20 69 66 20 75 73 |ntrol mo|de if us|
|000009b0| 69 6e 67 20 50 72 6f 2d | 59 41 4d 27 73 20 2d 67 |ing Pro-|YAM's -g|
|000009c0| 20 6f 70 74 69 6f 6e 0a | 20 2a 20 20 31 3a 20 73 | option.| * 1: s|
|000009d0| 61 76 65 20 6f 6c 64 20 | 74 74 79 20 73 74 61 74 |ave old |tty stat|
|000009e0| 2c 20 73 65 74 20 72 61 | 77 20 6d 6f 64 65 20 0a |, set ra|w mode .|
|000009f0| 20 2a 20 20 30 3a 20 72 | 65 73 74 6f 72 65 20 6f | * 0: r|estore o|
|00000a00| 72 69 67 69 6e 61 6c 20 | 74 74 79 20 6d 6f 64 65 |riginal |tty mode|
|00000a10| 0a 20 2a 2f 0a 6d 6f 64 | 65 28 6e 29 0a 7b 0a 09 |. */.mod|e(n).{..|
|00000a20| 73 74 61 74 69 63 20 64 | 69 64 30 20 3d 20 46 41 |static d|id0 = FA|
|00000a30| 4c 53 45 3b 0a 0a 09 76 | 66 69 6c 65 28 22 6d 6f |LSE;...v|file("mo|
|00000a40| 64 65 3a 25 64 22 2c 20 | 6e 29 3b 0a 09 73 77 69 |de:%d", |n);..swi|
|00000a50| 74 63 68 28 6e 29 20 7b | 0a 23 69 66 64 65 66 20 |tch(n) {|.#ifdef |
|00000a60| 55 53 47 0a 09 63 61 73 | 65 20 32 3a 09 2f 2a 20 |USG..cas|e 2:./* |
|00000a70| 43 62 72 65 61 6b 20 6d | 6f 64 65 20 75 73 65 64 |Cbreak m|ode used|
|00000a80| 20 62 79 20 73 62 20 77 | 68 65 6e 20 2d 67 20 64 | by sb w|hen -g d|
|00000a90| 65 74 65 63 74 65 64 20 | 2a 2f 0a 09 09 69 66 28 |etected |*/...if(|
|00000aa0| 21 64 69 64 30 29 0a 09 | 09 09 28 76 6f 69 64 29 |!did0)..|..(void)|
|00000ab0| 20 69 6f 63 74 6c 28 69 | 6f 66 64 2c 20 54 43 47 | ioctl(i|ofd, TCG|
|00000ac0| 45 54 41 2c 20 26 6f 6c | 64 74 74 79 29 3b 0a 09 |ETA, &ol|dtty);..|
|00000ad0| 09 74 74 79 20 3d 20 6f | 6c 64 74 74 79 3b 0a 0a |.tty = o|ldtty;..|
|00000ae0| 09 09 74 74 79 2e 63 5f | 69 66 6c 61 67 20 3d 20 |..tty.c_|iflag = |
|00000af0| 42 52 4b 49 4e 54 7c 49 | 58 4f 4e 3b 0a 0a 09 09 |BRKINT|I|XON;....|
|00000b00| 74 74 79 2e 63 5f 6f 66 | 6c 61 67 20 3d 20 30 3b |tty.c_of|lag = 0;|
|00000b10| 09 2f 2a 20 54 72 61 6e | 73 70 61 72 65 6e 74 20 |./* Tran|sparent |
|00000b20| 6f 75 74 70 75 74 20 2a | 2f 0a 0a 09 09 74 74 79 |output *|/....tty|
|00000b30| 2e 63 5f 63 66 6c 61 67 | 20 26 3d 20 7e 50 41 52 |.c_cflag| &= ~PAR|
|00000b40| 45 4e 42 3b 09 2f 2a 20 | 44 69 73 61 62 6c 65 20 |ENB;./* |Disable |
|00000b50| 70 61 72 69 74 79 20 2a | 2f 0a 09 09 74 74 79 2e |parity *|/...tty.|
|00000b60| 63 5f 63 66 6c 61 67 20 | 7c 3d 20 43 53 38 3b 09 |c_cflag ||= CS8;.|
|00000b70| 2f 2a 20 53 65 74 20 63 | 68 61 72 61 63 74 65 72 |/* Set c|haracter|
|00000b80| 20 73 69 7a 65 20 3d 20 | 38 20 2a 2f 0a 09 09 69 | size = |8 */...i|
|00000b90| 66 20 28 54 77 6f 73 74 | 6f 70 29 0a 09 09 09 74 |f (Twost|op)....t|
|00000ba0| 74 79 2e 63 5f 63 66 6c | 61 67 20 7c 3d 20 43 53 |ty.c_cfl|ag |= CS|
|00000bb0| 54 4f 50 42 3b 09 2f 2a | 20 53 65 74 20 74 77 6f |TOPB;./*| Set two|
|00000bc0| 20 73 74 6f 70 20 62 69 | 74 73 20 2a 2f 0a 0a 09 | stop bi|ts */...|
|00000bd0| 09 74 74 79 2e 63 5f 6c | 66 6c 61 67 20 3d 20 0a |.tty.c_l|flag = .|
|00000be0| 23 69 66 64 65 66 20 58 | 43 4c 55 44 45 0a 09 09 |#ifdef X|CLUDE...|
|00000bf0| 20 20 58 43 4c 55 44 45 | 20 7c 0a 23 65 6e 64 69 | XCLUDE| |.#endi|
|00000c00| 66 0a 09 09 20 20 5a 6d | 6f 64 65 6d 20 3f 20 30 |f... Zm|odem ? 0|
|00000c10| 20 3a 20 49 53 49 47 3b | 0a 0a 09 09 74 74 79 2e | : ISIG;|....tty.|
|00000c20| 63 5f 63 63 5b 56 49 4e | 54 52 5d 20 3d 20 30 33 |c_cc[VIN|TR] = 03|
|00000c30| 30 3b 09 09 2f 2a 20 49 | 6e 74 65 72 72 75 70 74 |0;../* I|nterrupt|
|00000c40| 20 63 68 61 72 20 2a 2f | 0a 09 09 74 74 79 2e 63 | char */|...tty.c|
|00000c50| 5f 63 63 5b 56 4d 49 4e | 5d 20 3d 20 31 3b 0a 0a |_cc[VMIN|] = 1;..|
|00000c60| 09 09 28 76 6f 69 64 29 | 20 69 6f 63 74 6c 28 69 |..(void)| ioctl(i|
|00000c70| 6f 66 64 2c 20 54 43 53 | 45 54 41 57 2c 20 26 74 |ofd, TCS|ETAW, &t|
|00000c80| 74 79 29 3b 0a 09 09 64 | 69 64 30 20 3d 20 54 52 |ty);...d|id0 = TR|
|00000c90| 55 45 3b 0a 09 09 72 65 | 74 75 72 6e 20 4f 4b 3b |UE;...re|turn OK;|
|00000ca0| 0a 09 63 61 73 65 20 31 | 3a 0a 09 63 61 73 65 20 |..case 1|:..case |
|00000cb0| 33 3a 0a 09 09 69 66 28 | 21 64 69 64 30 29 0a 09 |3:...if(|!did0)..|
|00000cc0| 09 09 28 76 6f 69 64 29 | 20 69 6f 63 74 6c 28 69 |..(void)| ioctl(i|
|00000cd0| 6f 66 64 2c 20 54 43 47 | 45 54 41 2c 20 26 6f 6c |ofd, TCG|ETA, &ol|
|00000ce0| 64 74 74 79 29 3b 0a 09 | 09 74 74 79 20 3d 20 6f |dtty);..|.tty = o|
|00000cf0| 6c 64 74 74 79 3b 0a 0a | 09 09 74 74 79 2e 63 5f |ldtty;..|..tty.c_|
|00000d00| 69 66 6c 61 67 20 3d 20 | 6e 3d 3d 33 20 3f 20 28 |iflag = |n==3 ? (|
|00000d10| 49 47 4e 42 52 4b 7c 49 | 58 4f 46 46 29 20 3a 20 |IGNBRK|I|XOFF) : |
|00000d20| 49 47 4e 42 52 4b 3b 0a | 0a 09 09 20 2f 2a 20 4e |IGNBRK;.|... /* N|
|00000d30| 6f 20 65 63 68 6f 2c 20 | 63 72 6c 66 20 6d 61 70 |o echo, |crlf map|
|00000d40| 70 69 6e 67 2c 20 49 4e | 54 52 2c 20 51 55 49 54 |ping, IN|TR, QUIT|
|00000d50| 2c 20 64 65 6c 61 79 73 | 2c 20 6e 6f 20 65 72 61 |, delays|, no era|
|00000d60| 73 65 2f 6b 69 6c 6c 20 | 2a 2f 0a 09 09 74 74 79 |se/kill |*/...tty|
|00000d70| 2e 63 5f 6c 66 6c 61 67 | 20 26 3d 20 7e 28 45 43 |.c_lflag| &= ~(EC|
|00000d80| 48 4f 20 7c 20 49 43 41 | 4e 4f 4e 20 7c 20 49 53 |HO | ICA|NON | IS|
|00000d90| 49 47 29 3b 0a 23 69 66 | 64 65 66 20 58 43 4c 55 |IG);.#if|def XCLU|
|00000da0| 44 45 0a 09 09 74 74 79 | 2e 63 5f 6c 66 6c 61 67 |DE...tty|.c_lflag|
|00000db0| 20 7c 3d 20 58 43 4c 55 | 44 45 3b 0a 23 65 6e 64 | |= XCLU|DE;.#end|
|00000dc0| 69 66 0a 0a 09 09 74 74 | 79 2e 63 5f 6f 66 6c 61 |if....tt|y.c_ofla|
|00000dd0| 67 20 3d 20 30 3b 09 2f | 2a 20 54 72 61 6e 73 70 |g = 0;./|* Transp|
|00000de0| 61 72 65 6e 74 20 6f 75 | 74 70 75 74 20 2a 2f 0a |arent ou|tput */.|
|00000df0| 0a 09 09 74 74 79 2e 63 | 5f 63 66 6c 61 67 20 26 |...tty.c|_cflag &|
|00000e00| 3d 20 7e 50 41 52 45 4e | 42 3b 09 2f 2a 20 53 61 |= ~PAREN|B;./* Sa|
|00000e10| 6d 65 20 62 61 75 64 20 | 72 61 74 65 2c 20 64 69 |me baud |rate, di|
|00000e20| 73 61 62 6c 65 20 70 61 | 72 69 74 79 20 2a 2f 0a |sable pa|rity */.|
|00000e30| 09 09 74 74 79 2e 63 5f | 63 66 6c 61 67 20 7c 3d |..tty.c_|cflag |=|
|00000e40| 20 43 53 38 3b 09 2f 2a | 20 53 65 74 20 63 68 61 | CS8;./*| Set cha|
|00000e50| 72 61 63 74 65 72 20 73 | 69 7a 65 20 3d 20 38 20 |racter s|ize = 8 |
|00000e60| 2a 2f 0a 09 09 69 66 20 | 28 54 77 6f 73 74 6f 70 |*/...if |(Twostop|
|00000e70| 29 0a 09 09 09 74 74 79 | 2e 63 5f 63 66 6c 61 67 |)....tty|.c_cflag|
|00000e80| 20 7c 3d 20 43 53 54 4f | 50 42 3b 09 2f 2a 20 53 | |= CSTO|PB;./* S|
|00000e90| 65 74 20 74 77 6f 20 73 | 74 6f 70 20 62 69 74 73 |et two s|top bits|
|00000ea0| 20 2a 2f 0a 23 69 66 64 | 65 66 20 4e 46 47 56 4d | */.#ifd|ef NFGVM|
|00000eb0| 49 4e 0a 09 09 74 74 79 | 2e 63 5f 63 63 5b 56 4d |IN...tty|.c_cc[VM|
|00000ec0| 49 4e 5d 20 3d 20 31 3b | 20 2f 2a 20 54 68 69 73 |IN] = 1;| /* This|
|00000ed0| 20 6d 61 6e 79 20 63 68 | 61 72 73 20 73 61 74 69 | many ch|ars sati|
|00000ee0| 73 66 69 65 73 20 72 65 | 61 64 73 20 2a 2f 0a 23 |sfies re|ads */.#|
|00000ef0| 65 6c 73 65 0a 09 09 74 | 74 79 2e 63 5f 63 63 5b |else...t|ty.c_cc[|
|00000f00| 56 4d 49 4e 5d 20 3d 20 | 48 4f 57 4d 41 4e 59 3b |VMIN] = |HOWMANY;|
|00000f10| 20 2f 2a 20 54 68 69 73 | 20 6d 61 6e 79 20 63 68 | /* This| many ch|
|00000f20| 61 72 73 20 73 61 74 69 | 73 66 69 65 73 20 72 65 |ars sati|sfies re|
|00000f30| 61 64 73 20 2a 2f 0a 23 | 65 6e 64 69 66 0a 09 09 |ads */.#|endif...|
|00000f40| 74 74 79 2e 63 5f 63 63 | 5b 56 54 49 4d 45 5d 20 |tty.c_cc|[VTIME] |
|00000f50| 3d 20 31 3b 09 2f 2a 20 | 6f 72 20 69 6e 20 74 68 |= 1;./* |or in th|
|00000f60| 69 73 20 6d 61 6e 79 20 | 74 65 6e 74 68 73 20 6f |is many |tenths o|
|00000f70| 66 20 73 65 63 6f 6e 64 | 73 20 2a 2f 0a 09 09 28 |f second|s */...(|
|00000f80| 76 6f 69 64 29 20 69 6f | 63 74 6c 28 69 6f 66 64 |void) io|ctl(iofd|
|00000f90| 2c 20 54 43 53 45 54 41 | 57 2c 20 26 74 74 79 29 |, TCSETA|W, &tty)|
|00000fa0| 3b 0a 09 09 64 69 64 30 | 20 3d 20 54 52 55 45 3b |;...did0| = TRUE;|
|00000fb0| 0a 09 09 42 61 75 64 72 | 61 74 65 20 3d 20 67 65 |...Baudr|ate = ge|
|00000fc0| 74 73 70 65 65 64 28 74 | 74 79 2e 63 5f 63 66 6c |tspeed(t|ty.c_cfl|
|00000fd0| 61 67 20 26 20 43 42 41 | 55 44 29 3b 0a 09 09 72 |ag & CBA|UD);...r|
|00000fe0| 65 74 75 72 6e 20 4f 4b | 3b 0a 23 65 6e 64 69 66 |eturn OK|;.#endif|
|00000ff0| 0a 23 69 66 64 65 66 20 | 56 37 0a 09 63 61 73 65 |.#ifdef |V7..case|
|00001000| 20 32 3a 09 2f 2a 20 20 | 54 68 69 73 20 64 6f 65 | 2:./* |This doe|
|00001010| 73 6e 27 74 20 77 6f 72 | 6b 20 2e 2e 2e 20 2a 2f |sn't wor|k ... */|
|00001020| 0a 09 09 70 72 69 6e 74 | 66 28 22 4e 6f 20 6d 6f |...print|f("No mo|
|00001030| 64 65 28 32 29 20 69 6e | 20 56 37 2f 42 53 44 21 |de(2) in| V7/BSD!|
|00001040| 22 29 3b 20 62 69 62 69 | 28 39 39 29 3b 0a 09 09 |"); bibi|(99);...|
|00001050| 69 66 28 21 64 69 64 30 | 29 20 7b 0a 09 09 09 69 |if(!did0|) {....i|
|00001060| 6f 63 74 6c 28 69 6f 66 | 64 2c 20 54 49 4f 43 45 |octl(iof|d, TIOCE|
|00001070| 58 43 4c 2c 20 30 29 3b | 0a 09 09 09 69 6f 63 74 |XCL, 0);|....ioct|
|00001080| 6c 28 69 6f 66 64 2c 20 | 54 49 4f 43 47 45 54 50 |l(iofd, |TIOCGETP|
|00001090| 2c 20 26 6f 6c 64 74 74 | 79 29 3b 0a 09 09 09 69 |, &oldtt|y);....i|
|000010a0| 6f 63 74 6c 28 69 6f 66 | 64 2c 20 54 49 4f 43 47 |octl(iof|d, TIOCG|
|000010b0| 45 54 43 2c 20 26 6f 6c | 64 74 63 68 29 3b 0a 09 |ETC, &ol|dtch);..|
|000010c0| 09 7d 0a 09 09 74 74 79 | 20 3d 20 6f 6c 64 74 74 |.}...tty| = oldtt|
|000010d0| 79 3b 0a 09 09 74 63 68 | 20 3d 20 6f 6c 64 74 63 |y;...tch| = oldtc|
|000010e0| 68 3b 0a 09 09 74 63 68 | 2e 74 5f 69 6e 74 72 63 |h;...tch|.t_intrc|
|000010f0| 20 3d 20 5a 6d 6f 64 65 | 6d 20 3f 20 30 33 3a 30 | = Zmode|m ? 03:0|
|00001100| 33 30 3b 09 2f 2a 20 49 | 6e 74 65 72 72 75 70 74 |30;./* I|nterrupt|
|00001110| 20 63 68 61 72 20 2a 2f | 0a 09 09 74 74 79 2e 73 | char */|...tty.s|
|00001120| 67 5f 66 6c 61 67 73 20 | 7c 3d 20 28 4f 44 44 50 |g_flags ||= (ODDP|
|00001130| 7c 45 56 45 4e 50 7c 43 | 42 52 45 41 4b 29 3b 0a ||EVENP|C|BREAK);.|
|00001140| 09 09 74 74 79 2e 73 67 | 5f 66 6c 61 67 73 20 26 |..tty.sg|_flags &|
|00001150| 3d 20 7e 28 41 4c 4c 44 | 45 4c 41 59 7c 43 52 4d |= ~(ALLD|ELAY|CRM|
|00001160| 4f 44 7c 45 43 48 4f 7c | 4c 43 41 53 45 29 3b 0a |OD|ECHO||LCASE);.|
|00001170| 09 09 69 6f 63 74 6c 28 | 69 6f 66 64 2c 20 54 49 |..ioctl(|iofd, TI|
|00001180| 4f 43 53 45 54 50 2c 20 | 26 74 74 79 29 3b 0a 09 |OCSETP, |&tty);..|
|00001190| 09 69 6f 63 74 6c 28 69 | 6f 66 64 2c 20 54 49 4f |.ioctl(i|ofd, TIO|
|000011a0| 43 53 45 54 43 2c 20 26 | 74 63 68 29 3b 0a 09 09 |CSETC, &|tch);...|
|000011b0| 64 69 64 30 20 3d 20 54 | 52 55 45 3b 0a 09 09 72 |did0 = T|RUE;...r|
|000011c0| 65 74 75 72 6e 20 4f 4b | 3b 0a 09 63 61 73 65 20 |eturn OK|;..case |
|000011d0| 31 3a 0a 09 63 61 73 65 | 20 33 3a 0a 09 09 69 66 |1:..case| 3:...if|
|000011e0| 28 21 64 69 64 30 29 20 | 7b 0a 09 09 09 69 6f 63 |(!did0) |{....ioc|
|000011f0| 74 6c 28 69 6f 66 64 2c | 20 54 49 4f 43 45 58 43 |tl(iofd,| TIOCEXC|
|00001200| 4c 2c 20 30 29 3b 0a 09 | 09 09 69 6f 63 74 6c 28 |L, 0);..|..ioctl(|
|00001210| 69 6f 66 64 2c 20 54 49 | 4f 43 47 45 54 50 2c 20 |iofd, TI|OCGETP, |
|00001220| 26 6f 6c 64 74 74 79 29 | 3b 0a 09 09 09 69 6f 63 |&oldtty)|;....ioc|
|00001230| 74 6c 28 69 6f 66 64 2c | 20 54 49 4f 43 47 45 54 |tl(iofd,| TIOCGET|
|00001240| 43 2c 20 26 6f 6c 64 74 | 63 68 29 3b 0a 09 09 7d |C, &oldt|ch);...}|
|00001250| 0a 09 09 74 74 79 20 3d | 20 6f 6c 64 74 74 79 3b |...tty =| oldtty;|
|00001260| 0a 09 09 74 74 79 2e 73 | 67 5f 66 6c 61 67 73 20 |...tty.s|g_flags |
|00001270| 7c 3d 20 52 41 57 3b 0a | 09 09 74 74 79 2e 73 67 ||= RAW;.|..tty.sg|
|00001280| 5f 66 6c 61 67 73 20 26 | 3d 20 7e 45 43 48 4f 3b |_flags &|= ~ECHO;|
|00001290| 0a 09 09 69 6f 63 74 6c | 28 69 6f 66 64 2c 20 54 |...ioctl|(iofd, T|
|000012a0| 49 4f 43 53 45 54 50 2c | 20 26 74 74 79 29 3b 0a |IOCSETP,| &tty);.|
|000012b0| 09 09 64 69 64 30 20 3d | 20 54 52 55 45 3b 0a 09 |..did0 =| TRUE;..|
|000012c0| 09 42 61 75 64 72 61 74 | 65 20 3d 20 67 65 74 73 |.Baudrat|e = gets|
|000012d0| 70 65 65 64 28 74 74 79 | 2e 73 67 5f 6f 73 70 65 |peed(tty|.sg_ospe|
|000012e0| 65 64 29 3b 0a 09 09 72 | 65 74 75 72 6e 20 4f 4b |ed);...r|eturn OK|
|000012f0| 3b 0a 23 65 6e 64 69 66 | 0a 09 63 61 73 65 20 30 |;.#endif|..case 0|
|00001300| 3a 0a 09 09 69 66 28 21 | 64 69 64 30 29 0a 09 09 |:...if(!|did0)...|
|00001310| 09 72 65 74 75 72 6e 20 | 45 52 52 4f 52 3b 0a 23 |.return |ERROR;.#|
|00001320| 69 66 64 65 66 20 55 53 | 47 0a 09 09 28 76 6f 69 |ifdef US|G...(voi|
|00001330| 64 29 20 69 6f 63 74 6c | 28 69 6f 66 64 2c 20 54 |d) ioctl|(iofd, T|
|00001340| 43 53 42 52 4b 2c 20 31 | 29 3b 09 2f 2a 20 57 61 |CSBRK, 1|);./* Wa|
|00001350| 69 74 20 66 6f 72 20 6f | 75 74 70 75 74 20 74 6f |it for o|utput to|
|00001360| 20 64 72 61 69 6e 20 2a | 2f 0a 09 09 28 76 6f 69 | drain *|/...(voi|
|00001370| 64 29 20 69 6f 63 74 6c | 28 69 6f 66 64 2c 20 54 |d) ioctl|(iofd, T|
|00001380| 43 46 4c 53 48 2c 20 31 | 29 3b 09 2f 2a 20 46 6c |CFLSH, 1|);./* Fl|
|00001390| 75 73 68 20 69 6e 70 75 | 74 20 71 75 65 75 65 20 |ush inpu|t queue |
|000013a0| 2a 2f 0a 09 09 28 76 6f | 69 64 29 20 69 6f 63 74 |*/...(vo|id) ioct|
|000013b0| 6c 28 69 6f 66 64 2c 20 | 54 43 53 45 54 41 57 2c |l(iofd, |TCSETAW,|
|000013c0| 20 26 6f 6c 64 74 74 79 | 29 3b 09 2f 2a 20 52 65 | &oldtty|);./* Re|
|000013d0| 73 74 6f 72 65 20 6f 72 | 69 67 69 6e 61 6c 20 6d |store or|iginal m|
|000013e0| 6f 64 65 73 20 2a 2f 0a | 09 09 28 76 6f 69 64 29 |odes */.|..(void)|
|000013f0| 20 69 6f 63 74 6c 28 69 | 6f 66 64 2c 20 54 43 58 | ioctl(i|ofd, TCX|
|00001400| 4f 4e 43 2c 31 29 3b 09 | 2f 2a 20 52 65 73 74 61 |ONC,1);.|/* Resta|
|00001410| 72 74 20 6f 75 74 70 75 | 74 20 2a 2f 0a 23 65 6e |rt outpu|t */.#en|
|00001420| 64 69 66 0a 23 69 66 64 | 65 66 20 56 37 0a 09 09 |dif.#ifd|ef V7...|
|00001430| 69 6f 63 74 6c 28 69 6f | 66 64 2c 20 54 49 4f 43 |ioctl(io|fd, TIOC|
|00001440| 53 45 54 50 2c 20 26 6f | 6c 64 74 74 79 29 3b 0a |SETP, &o|ldtty);.|
|00001450| 09 09 69 6f 63 74 6c 28 | 69 6f 66 64 2c 20 54 49 |..ioctl(|iofd, TI|
|00001460| 4f 43 53 45 54 43 2c 20 | 26 6f 6c 64 74 63 68 29 |OCSETC, |&oldtch)|
|00001470| 3b 0a 09 09 69 6f 63 74 | 6c 28 69 6f 66 64 2c 20 |;...ioct|l(iofd, |
|00001480| 54 49 4f 43 4e 58 43 4c | 2c 20 30 29 3b 0a 23 65 |TIOCNXCL|, 0);.#e|
|00001490| 6e 64 69 66 0a 09 09 72 | 65 74 75 72 6e 20 4f 4b |ndif...r|eturn OK|
|000014a0| 3b 0a 09 64 65 66 61 75 | 6c 74 3a 0a 09 09 72 65 |;..defau|lt:...re|
|000014b0| 74 75 72 6e 20 45 52 52 | 4f 52 3b 0a 09 7d 0a 7d |turn ERR|OR;..}.}|
|000014c0| 0a 0a 73 65 6e 64 62 72 | 6b 28 29 0a 7b 0a 23 69 |..sendbr|k().{.#i|
|000014d0| 66 64 65 66 20 56 37 0a | 23 69 66 64 65 66 20 54 |fdef V7.|#ifdef T|
|000014e0| 49 4f 43 53 42 52 4b 0a | 23 64 65 66 69 6e 65 20 |IOCSBRK.|#define |
|000014f0| 43 41 4e 42 52 45 41 4b | 0a 09 73 6c 65 65 70 28 |CANBREAK|..sleep(|
|00001500| 31 29 3b 0a 09 69 6f 63 | 74 6c 28 69 6f 66 64 2c |1);..ioc|tl(iofd,|
|00001510| 20 54 49 4f 43 53 42 52 | 4b 2c 20 30 29 3b 0a 09 | TIOCSBR|K, 0);..|
|00001520| 73 6c 65 65 70 28 31 29 | 3b 0a 09 69 6f 63 74 6c |sleep(1)|;..ioctl|
|00001530| 28 69 6f 66 64 2c 20 54 | 49 4f 43 43 42 52 4b 2c |(iofd, T|IOCCBRK,|
|00001540| 20 30 29 3b 0a 23 65 6e | 64 69 66 0a 23 65 6e 64 | 0);.#en|dif.#end|
|00001550| 69 66 0a 23 69 66 64 65 | 66 20 55 53 47 0a 23 64 |if.#ifde|f USG.#d|
|00001560| 65 66 69 6e 65 20 43 41 | 4e 42 52 45 41 4b 0a 09 |efine CA|NBREAK..|
|00001570| 69 6f 63 74 6c 28 69 6f | 66 64 2c 20 54 43 53 42 |ioctl(io|fd, TCSB|
|00001580| 52 4b 2c 20 30 29 3b 0a | 23 65 6e 64 69 66 0a 7d |RK, 0);.|#endif.}|
|00001590| 0a 0a 23 69 66 64 65 66 | 20 46 49 4f 4e 52 45 41 |..#ifdef| FIONREA|
|000015a0| 44 0a 23 64 65 66 69 6e | 65 20 52 45 41 44 43 48 |D.#defin|e READCH|
|000015b0| 45 43 4b 0a 2f 2a 0a 20 | 2a 20 20 52 65 74 75 72 |ECK./*. |* Retur|
|000015c0| 6e 20 6e 6f 6e 20 30 20 | 69 66 66 20 73 6f 6d 65 |n non 0 |iff some|
|000015d0| 74 68 69 6e 67 20 74 6f | 20 72 65 61 64 20 66 72 |thing to| read fr|
|000015e0| 6f 6d 20 69 6f 20 64 65 | 73 63 72 69 70 74 6f 72 |om io de|scriptor|
|000015f0| 20 66 0a 20 2a 2f 0a 72 | 64 63 68 6b 28 66 29 0a | f. */.r|dchk(f).|
|00001600| 7b 0a 09 73 74 61 74 69 | 63 20 6c 6f 6e 67 20 6c |{..stati|c long l|
|00001610| 66 3b 0a 0a 09 69 6f 63 | 74 6c 28 66 2c 20 46 49 |f;...ioc|tl(f, FI|
|00001620| 4f 4e 52 45 41 44 2c 20 | 26 6c 66 29 3b 0a 09 72 |ONREAD, |&lf);..r|
|00001630| 65 74 75 72 6e 20 28 28 | 69 6e 74 29 20 6c 66 29 |eturn ((|int) lf)|
|00001640| 3b 0a 7d 0a 23 65 6e 64 | 69 66 0a 23 69 66 64 65 |;.}.#end|if.#ifde|
|00001650| 66 20 53 56 52 32 0a 23 | 64 65 66 69 6e 65 20 52 |f SVR2.#|define R|
|00001660| 45 41 44 43 48 45 43 4b | 0a 23 69 6e 63 6c 75 64 |EADCHECK|.#includ|
|00001670| 65 20 3c 66 63 6e 74 6c | 2e 68 3e 0a 0a 63 68 61 |e <fcntl|.h>..cha|
|00001680| 72 20 63 68 65 63 6b 65 | 64 20 3d 20 27 5c 30 27 |r checke|d = '\0'|
|00001690| 20 3b 0a 2f 2a 0a 20 2a | 20 4e 6f 6e 62 6c 6f 63 | ;./*. *| Nonbloc|
|000016a0| 6b 69 6e 67 20 49 2f 4f | 20 69 73 20 61 20 62 69 |king I/O| is a bi|
|000016b0| 74 20 64 69 66 66 65 72 | 65 6e 74 20 69 6e 20 53 |t differ|ent in S|
|000016c0| 79 73 74 65 6d 20 56 2c | 20 52 65 6c 65 61 73 65 |ystem V,| Release|
|000016d0| 20 32 0a 20 2a 2f 0a 72 | 64 63 68 6b 28 66 29 0a | 2. */.r|dchk(f).|
|000016e0| 7b 0a 09 69 6e 74 20 6c | 66 2c 20 73 61 76 65 73 |{..int l|f, saves|
|000016f0| 74 61 74 20 3d 20 66 63 | 6e 74 6c 28 66 2c 20 46 |tat = fc|ntl(f, F|
|00001700| 5f 47 45 54 46 4c 29 20 | 3b 0a 0a 09 66 63 6e 74 |_GETFL) |;...fcnt|
|00001710| 6c 28 66 2c 20 46 5f 53 | 45 54 46 4c 2c 20 73 61 |l(f, F_S|ETFL, sa|
|00001720| 76 65 73 74 61 74 20 7c | 20 4f 5f 4e 44 45 4c 41 |vestat || O_NDELA|
|00001730| 59 29 20 3b 0a 09 6c 66 | 20 3d 20 72 65 61 64 28 |Y) ;..lf| = read(|
|00001740| 66 2c 20 26 63 68 65 63 | 6b 65 64 2c 20 31 29 20 |f, &chec|ked, 1) |
|00001750| 3b 0a 09 66 63 6e 74 6c | 28 66 2c 20 46 5f 53 45 |;..fcntl|(f, F_SE|
|00001760| 54 46 4c 2c 20 73 61 76 | 65 73 74 61 74 29 20 3b |TFL, sav|estat) ;|
|00001770| 0a 09 72 65 74 75 72 6e | 28 6c 66 29 20 3b 0a 7d |..return|(lf) ;.}|
|00001780| 0a 23 65 6e 64 69 66 0a | 0a 0a 2f 2a 20 63 72 63 |.#endif.|../* crc|
|00001790| 74 61 62 20 63 61 6c 63 | 75 6c 61 74 65 64 20 62 |tab calc|ulated b|
|000017a0| 79 20 4d 61 72 6b 20 47 | 2e 20 4d 65 6e 64 65 6c |y Mark G|. Mendel|
|000017b0| 2c 20 4e 65 74 77 6f 72 | 6b 20 53 79 73 74 65 6d |, Networ|k System|
|000017c0| 73 20 43 6f 72 70 6f 72 | 61 74 69 6f 6e 20 2a 2f |s Corpor|ation */|
|000017d0| 0a 73 74 61 74 69 63 20 | 75 6e 73 69 67 6e 65 64 |.static |unsigned|
|000017e0| 20 73 68 6f 72 74 20 63 | 72 63 74 61 62 5b 32 35 | short c|rctab[25|
|000017f0| 36 5d 20 3d 20 7b 0a 20 | 20 20 20 30 78 30 30 30 |6] = {. | 0x000|
|00001800| 30 2c 20 20 30 78 31 30 | 32 31 2c 20 20 30 78 32 |0, 0x10|21, 0x2|
|00001810| 30 34 32 2c 20 20 30 78 | 33 30 36 33 2c 20 20 30 |042, 0x|3063, 0|
|00001820| 78 34 30 38 34 2c 20 20 | 30 78 35 30 61 35 2c 20 |x4084, |0x50a5, |
|00001830| 20 30 78 36 30 63 36 2c | 20 20 30 78 37 30 65 37 | 0x60c6,| 0x70e7|
|00001840| 2c 0a 20 20 20 20 30 78 | 38 31 30 38 2c 20 20 30 |,. 0x|8108, 0|
|00001850| 78 39 31 32 39 2c 20 20 | 30 78 61 31 34 61 2c 20 |x9129, |0xa14a, |
|00001860| 20 30 78 62 31 36 62 2c | 20 20 30 78 63 31 38 63 | 0xb16b,| 0xc18c|
|00001870| 2c 20 20 30 78 64 31 61 | 64 2c 20 20 30 78 65 31 |, 0xd1a|d, 0xe1|
|00001880| 63 65 2c 20 20 30 78 66 | 31 65 66 2c 0a 20 20 20 |ce, 0xf|1ef,. |
|00001890| 20 30 78 31 32 33 31 2c | 20 20 30 78 30 32 31 30 | 0x1231,| 0x0210|
|000018a0| 2c 20 20 30 78 33 32 37 | 33 2c 20 20 30 78 32 32 |, 0x327|3, 0x22|
|000018b0| 35 32 2c 20 20 30 78 35 | 32 62 35 2c 20 20 30 78 |52, 0x5|2b5, 0x|
|000018c0| 34 32 39 34 2c 20 20 30 | 78 37 32 66 37 2c 20 20 |4294, 0|x72f7, |
|000018d0| 30 78 36 32 64 36 2c 0a | 20 20 20 20 30 78 39 33 |0x62d6,.| 0x93|
|000018e0| 33 39 2c 20 20 30 78 38 | 33 31 38 2c 20 20 30 78 |39, 0x8|318, 0x|
|000018f0| 62 33 37 62 2c 20 20 30 | 78 61 33 35 61 2c 20 20 |b37b, 0|xa35a, |
|00001900| 30 78 64 33 62 64 2c 20 | 20 30 78 63 33 39 63 2c |0xd3bd, | 0xc39c,|
|00001910| 20 20 30 78 66 33 66 66 | 2c 20 20 30 78 65 33 64 | 0xf3ff|, 0xe3d|
|00001920| 65 2c 0a 20 20 20 20 30 | 78 32 34 36 32 2c 20 20 |e,. 0|x2462, |
|00001930| 30 78 33 34 34 33 2c 20 | 20 30 78 30 34 32 30 2c |0x3443, | 0x0420,|
|00001940| 20 20 30 78 31 34 30 31 | 2c 20 20 30 78 36 34 65 | 0x1401|, 0x64e|
|00001950| 36 2c 20 20 30 78 37 34 | 63 37 2c 20 20 30 78 34 |6, 0x74|c7, 0x4|
|00001960| 34 61 34 2c 20 20 30 78 | 35 34 38 35 2c 0a 20 20 |4a4, 0x|5485,. |
|00001970| 20 20 30 78 61 35 36 61 | 2c 20 20 30 78 62 35 34 | 0xa56a|, 0xb54|
|00001980| 62 2c 20 20 30 78 38 35 | 32 38 2c 20 20 30 78 39 |b, 0x85|28, 0x9|
|00001990| 35 30 39 2c 20 20 30 78 | 65 35 65 65 2c 20 20 30 |509, 0x|e5ee, 0|
|000019a0| 78 66 35 63 66 2c 20 20 | 30 78 63 35 61 63 2c 20 |xf5cf, |0xc5ac, |
|000019b0| 20 30 78 64 35 38 64 2c | 0a 20 20 20 20 30 78 33 | 0xd58d,|. 0x3|
|000019c0| 36 35 33 2c 20 20 30 78 | 32 36 37 32 2c 20 20 30 |653, 0x|2672, 0|
|000019d0| 78 31 36 31 31 2c 20 20 | 30 78 30 36 33 30 2c 20 |x1611, |0x0630, |
|000019e0| 20 30 78 37 36 64 37 2c | 20 20 30 78 36 36 66 36 | 0x76d7,| 0x66f6|
|000019f0| 2c 20 20 30 78 35 36 39 | 35 2c 20 20 30 78 34 36 |, 0x569|5, 0x46|
|00001a00| 62 34 2c 0a 20 20 20 20 | 30 78 62 37 35 62 2c 20 |b4,. |0xb75b, |
|00001a10| 20 30 78 61 37 37 61 2c | 20 20 30 78 39 37 31 39 | 0xa77a,| 0x9719|
|00001a20| 2c 20 20 30 78 38 37 33 | 38 2c 20 20 30 78 66 37 |, 0x873|8, 0xf7|
|00001a30| 64 66 2c 20 20 30 78 65 | 37 66 65 2c 20 20 30 78 |df, 0xe|7fe, 0x|
|00001a40| 64 37 39 64 2c 20 20 30 | 78 63 37 62 63 2c 0a 20 |d79d, 0|xc7bc,. |
|00001a50| 20 20 20 30 78 34 38 63 | 34 2c 20 20 30 78 35 38 | 0x48c|4, 0x58|
|00001a60| 65 35 2c 20 20 30 78 36 | 38 38 36 2c 20 20 30 78 |e5, 0x6|886, 0x|
|00001a70| 37 38 61 37 2c 20 20 30 | 78 30 38 34 30 2c 20 20 |78a7, 0|x0840, |
|00001a80| 30 78 31 38 36 31 2c 20 | 20 30 78 32 38 30 32 2c |0x1861, | 0x2802,|
|00001a90| 20 20 30 78 33 38 32 33 | 2c 0a 20 20 20 20 30 78 | 0x3823|,. 0x|
|00001aa0| 63 39 63 63 2c 20 20 30 | 78 64 39 65 64 2c 20 20 |c9cc, 0|xd9ed, |
|00001ab0| 30 78 65 39 38 65 2c 20 | 20 30 78 66 39 61 66 2c |0xe98e, | 0xf9af,|
|00001ac0| 20 20 30 78 38 39 34 38 | 2c 20 20 30 78 39 39 36 | 0x8948|, 0x996|
|00001ad0| 39 2c 20 20 30 78 61 39 | 30 61 2c 20 20 30 78 62 |9, 0xa9|0a, 0xb|
|00001ae0| 39 32 62 2c 0a 20 20 20 | 20 30 78 35 61 66 35 2c |92b,. | 0x5af5,|
|00001af0| 20 20 30 78 34 61 64 34 | 2c 20 20 30 78 37 61 62 | 0x4ad4|, 0x7ab|
|00001b00| 37 2c 20 20 30 78 36 61 | 39 36 2c 20 20 30 78 31 |7, 0x6a|96, 0x1|
|00001b10| 61 37 31 2c 20 20 30 78 | 30 61 35 30 2c 20 20 30 |a71, 0x|0a50, 0|
|00001b20| 78 33 61 33 33 2c 20 20 | 30 78 32 61 31 32 2c 0a |x3a33, |0x2a12,.|
|00001b30| 20 20 20 20 30 78 64 62 | 66 64 2c 20 20 30 78 63 | 0xdb|fd, 0xc|
|00001b40| 62 64 63 2c 20 20 30 78 | 66 62 62 66 2c 20 20 30 |bdc, 0x|fbbf, 0|
|00001b50| 78 65 62 39 65 2c 20 20 | 30 78 39 62 37 39 2c 20 |xeb9e, |0x9b79, |
|00001b60| 20 30 78 38 62 35 38 2c | 20 20 30 78 62 62 33 62 | 0x8b58,| 0xbb3b|
|00001b70| 2c 20 20 30 78 61 62 31 | 61 2c 0a 20 20 20 20 30 |, 0xab1|a,. 0|
|00001b80| 78 36 63 61 36 2c 20 20 | 30 78 37 63 38 37 2c 20 |x6ca6, |0x7c87, |
|00001b90| 20 30 78 34 63 65 34 2c | 20 20 30 78 35 63 63 35 | 0x4ce4,| 0x5cc5|
|00001ba0| 2c 20 20 30 78 32 63 32 | 32 2c 20 20 30 78 33 63 |, 0x2c2|2, 0x3c|
|00001bb0| 30 33 2c 20 20 30 78 30 | 63 36 30 2c 20 20 30 78 |03, 0x0|c60, 0x|
|00001bc0| 31 63 34 31 2c 0a 20 20 | 20 20 30 78 65 64 61 65 |1c41,. | 0xedae|
|00001bd0| 2c 20 20 30 78 66 64 38 | 66 2c 20 20 30 78 63 64 |, 0xfd8|f, 0xcd|
|00001be0| 65 63 2c 20 20 30 78 64 | 64 63 64 2c 20 20 30 78 |ec, 0xd|dcd, 0x|
|00001bf0| 61 64 32 61 2c 20 20 30 | 78 62 64 30 62 2c 20 20 |ad2a, 0|xbd0b, |
|00001c00| 30 78 38 64 36 38 2c 20 | 20 30 78 39 64 34 39 2c |0x8d68, | 0x9d49,|
|00001c10| 0a 20 20 20 20 30 78 37 | 65 39 37 2c 20 20 30 78 |. 0x7|e97, 0x|
|00001c20| 36 65 62 36 2c 20 20 30 | 78 35 65 64 35 2c 20 20 |6eb6, 0|x5ed5, |
|00001c30| 30 78 34 65 66 34 2c 20 | 20 30 78 33 65 31 33 2c |0x4ef4, | 0x3e13,|
|00001c40| 20 20 30 78 32 65 33 32 | 2c 20 20 30 78 31 65 35 | 0x2e32|, 0x1e5|
|00001c50| 31 2c 20 20 30 78 30 65 | 37 30 2c 0a 20 20 20 20 |1, 0x0e|70,. |
|00001c60| 30 78 66 66 39 66 2c 20 | 20 30 78 65 66 62 65 2c |0xff9f, | 0xefbe,|
|00001c70| 20 20 30 78 64 66 64 64 | 2c 20 20 30 78 63 66 66 | 0xdfdd|, 0xcff|
|00001c80| 63 2c 20 20 30 78 62 66 | 31 62 2c 20 20 30 78 61 |c, 0xbf|1b, 0xa|
|00001c90| 66 33 61 2c 20 20 30 78 | 39 66 35 39 2c 20 20 30 |f3a, 0x|9f59, 0|
|00001ca0| 78 38 66 37 38 2c 0a 20 | 20 20 20 30 78 39 31 38 |x8f78,. | 0x918|
|00001cb0| 38 2c 20 20 30 78 38 31 | 61 39 2c 20 20 30 78 62 |8, 0x81|a9, 0xb|
|00001cc0| 31 63 61 2c 20 20 30 78 | 61 31 65 62 2c 20 20 30 |1ca, 0x|a1eb, 0|
|00001cd0| 78 64 31 30 63 2c 20 20 | 30 78 63 31 32 64 2c 20 |xd10c, |0xc12d, |
|00001ce0| 20 30 78 66 31 34 65 2c | 20 20 30 78 65 31 36 66 | 0xf14e,| 0xe16f|
|00001cf0| 2c 0a 20 20 20 20 30 78 | 31 30 38 30 2c 20 20 30 |,. 0x|1080, 0|
|00001d00| 78 30 30 61 31 2c 20 20 | 30 78 33 30 63 32 2c 20 |x00a1, |0x30c2, |
|00001d10| 20 30 78 32 30 65 33 2c | 20 20 30 78 35 30 30 34 | 0x20e3,| 0x5004|
|00001d20| 2c 20 20 30 78 34 30 32 | 35 2c 20 20 30 78 37 30 |, 0x402|5, 0x70|
|00001d30| 34 36 2c 20 20 30 78 36 | 30 36 37 2c 0a 20 20 20 |46, 0x6|067,. |
|00001d40| 20 30 78 38 33 62 39 2c | 20 20 30 78 39 33 39 38 | 0x83b9,| 0x9398|
|00001d50| 2c 20 20 30 78 61 33 66 | 62 2c 20 20 30 78 62 33 |, 0xa3f|b, 0xb3|
|00001d60| 64 61 2c 20 20 30 78 63 | 33 33 64 2c 20 20 30 78 |da, 0xc|33d, 0x|
|00001d70| 64 33 31 63 2c 20 20 30 | 78 65 33 37 66 2c 20 20 |d31c, 0|xe37f, |
|00001d80| 30 78 66 33 35 65 2c 0a | 20 20 20 20 30 78 30 32 |0xf35e,.| 0x02|
|00001d90| 62 31 2c 20 20 30 78 31 | 32 39 30 2c 20 20 30 78 |b1, 0x1|290, 0x|
|00001da0| 32 32 66 33 2c 20 20 30 | 78 33 32 64 32 2c 20 20 |22f3, 0|x32d2, |
|00001db0| 30 78 34 32 33 35 2c 20 | 20 30 78 35 32 31 34 2c |0x4235, | 0x5214,|
|00001dc0| 20 20 30 78 36 32 37 37 | 2c 20 20 30 78 37 32 35 | 0x6277|, 0x725|
|00001dd0| 36 2c 0a 20 20 20 20 30 | 78 62 35 65 61 2c 20 20 |6,. 0|xb5ea, |
|00001de0| 30 78 61 35 63 62 2c 20 | 20 30 78 39 35 61 38 2c |0xa5cb, | 0x95a8,|
|00001df0| 20 20 30 78 38 35 38 39 | 2c 20 20 30 78 66 35 36 | 0x8589|, 0xf56|
|00001e00| 65 2c 20 20 30 78 65 35 | 34 66 2c 20 20 30 78 64 |e, 0xe5|4f, 0xd|
|00001e10| 35 32 63 2c 20 20 30 78 | 63 35 30 64 2c 0a 20 20 |52c, 0x|c50d,. |
|00001e20| 20 20 30 78 33 34 65 32 | 2c 20 20 30 78 32 34 63 | 0x34e2|, 0x24c|
|00001e30| 33 2c 20 20 30 78 31 34 | 61 30 2c 20 20 30 78 30 |3, 0x14|a0, 0x0|
|00001e40| 34 38 31 2c 20 20 30 78 | 37 34 36 36 2c 20 20 30 |481, 0x|7466, 0|
|00001e50| 78 36 34 34 37 2c 20 20 | 30 78 35 34 32 34 2c 20 |x6447, |0x5424, |
|00001e60| 20 30 78 34 34 30 35 2c | 0a 20 20 20 20 30 78 61 | 0x4405,|. 0xa|
|00001e70| 37 64 62 2c 20 20 30 78 | 62 37 66 61 2c 20 20 30 |7db, 0x|b7fa, 0|
|00001e80| 78 38 37 39 39 2c 20 20 | 30 78 39 37 62 38 2c 20 |x8799, |0x97b8, |
|00001e90| 20 30 78 65 37 35 66 2c | 20 20 30 78 66 37 37 65 | 0xe75f,| 0xf77e|
|00001ea0| 2c 20 20 30 78 63 37 31 | 64 2c 20 20 30 78 64 37 |, 0xc71|d, 0xd7|
|00001eb0| 33 63 2c 0a 20 20 20 20 | 30 78 32 36 64 33 2c 20 |3c,. |0x26d3, |
|00001ec0| 20 30 78 33 36 66 32 2c | 20 20 30 78 30 36 39 31 | 0x36f2,| 0x0691|
|00001ed0| 2c 20 20 30 78 31 36 62 | 30 2c 20 20 30 78 36 36 |, 0x16b|0, 0x66|
|00001ee0| 35 37 2c 20 20 30 78 37 | 36 37 36 2c 20 20 30 78 |57, 0x7|676, 0x|
|00001ef0| 34 36 31 35 2c 20 20 30 | 78 35 36 33 34 2c 0a 20 |4615, 0|x5634,. |
|00001f00| 20 20 20 30 78 64 39 34 | 63 2c 20 20 30 78 63 39 | 0xd94|c, 0xc9|
|00001f10| 36 64 2c 20 20 30 78 66 | 39 30 65 2c 20 20 30 78 |6d, 0xf|90e, 0x|
|00001f20| 65 39 32 66 2c 20 20 30 | 78 39 39 63 38 2c 20 20 |e92f, 0|x99c8, |
|00001f30| 30 78 38 39 65 39 2c 20 | 20 30 78 62 39 38 61 2c |0x89e9, | 0xb98a,|
|00001f40| 20 20 30 78 61 39 61 62 | 2c 0a 20 20 20 20 30 78 | 0xa9ab|,. 0x|
|00001f50| 35 38 34 34 2c 20 20 30 | 78 34 38 36 35 2c 20 20 |5844, 0|x4865, |
|00001f60| 30 78 37 38 30 36 2c 20 | 20 30 78 36 38 32 37 2c |0x7806, | 0x6827,|
|00001f70| 20 20 30 78 31 38 63 30 | 2c 20 20 30 78 30 38 65 | 0x18c0|, 0x08e|
|00001f80| 31 2c 20 20 30 78 33 38 | 38 32 2c 20 20 30 78 32 |1, 0x38|82, 0x2|
|00001f90| 38 61 33 2c 0a 20 20 20 | 20 30 78 63 62 37 64 2c |8a3,. | 0xcb7d,|
|00001fa0| 20 20 30 78 64 62 35 63 | 2c 20 20 30 78 65 62 33 | 0xdb5c|, 0xeb3|
|00001fb0| 66 2c 20 20 30 78 66 62 | 31 65 2c 20 20 30 78 38 |f, 0xfb|1e, 0x8|
|00001fc0| 62 66 39 2c 20 20 30 78 | 39 62 64 38 2c 20 20 30 |bf9, 0x|9bd8, 0|
|00001fd0| 78 61 62 62 62 2c 20 20 | 30 78 62 62 39 61 2c 0a |xabbb, |0xbb9a,.|
|00001fe0| 20 20 20 20 30 78 34 61 | 37 35 2c 20 20 30 78 35 | 0x4a|75, 0x5|
|00001ff0| 61 35 34 2c 20 20 30 78 | 36 61 33 37 2c 20 20 30 |a54, 0x|6a37, 0|
|00002000| 78 37 61 31 36 2c 20 20 | 30 78 30 61 66 31 2c 20 |x7a16, |0x0af1, |
|00002010| 20 30 78 31 61 64 30 2c | 20 20 30 78 32 61 62 33 | 0x1ad0,| 0x2ab3|
|00002020| 2c 20 20 30 78 33 61 39 | 32 2c 0a 20 20 20 20 30 |, 0x3a9|2,. 0|
|00002030| 78 66 64 32 65 2c 20 20 | 30 78 65 64 30 66 2c 20 |xfd2e, |0xed0f, |
|00002040| 20 30 78 64 64 36 63 2c | 20 20 30 78 63 64 34 64 | 0xdd6c,| 0xcd4d|
|00002050| 2c 20 20 30 78 62 64 61 | 61 2c 20 20 30 78 61 64 |, 0xbda|a, 0xad|
|00002060| 38 62 2c 20 20 30 78 39 | 64 65 38 2c 20 20 30 78 |8b, 0x9|de8, 0x|
|00002070| 38 64 63 39 2c 0a 20 20 | 20 20 30 78 37 63 32 36 |8dc9,. | 0x7c26|
|00002080| 2c 20 20 30 78 36 63 30 | 37 2c 20 20 30 78 35 63 |, 0x6c0|7, 0x5c|
|00002090| 36 34 2c 20 20 30 78 34 | 63 34 35 2c 20 20 30 78 |64, 0x4|c45, 0x|
|000020a0| 33 63 61 32 2c 20 20 30 | 78 32 63 38 33 2c 20 20 |3ca2, 0|x2c83, |
|000020b0| 30 78 31 63 65 30 2c 20 | 20 30 78 30 63 63 31 2c |0x1ce0, | 0x0cc1,|
|000020c0| 0a 20 20 20 20 30 78 65 | 66 31 66 2c 20 20 30 78 |. 0xe|f1f, 0x|
|000020d0| 66 66 33 65 2c 20 20 30 | 78 63 66 35 64 2c 20 20 |ff3e, 0|xcf5d, |
|000020e0| 30 78 64 66 37 63 2c 20 | 20 30 78 61 66 39 62 2c |0xdf7c, | 0xaf9b,|
|000020f0| 20 20 30 78 62 66 62 61 | 2c 20 20 30 78 38 66 64 | 0xbfba|, 0x8fd|
|00002100| 39 2c 20 20 30 78 39 66 | 66 38 2c 0a 20 20 20 20 |9, 0x9f|f8,. |
|00002110| 30 78 36 65 31 37 2c 20 | 20 30 78 37 65 33 36 2c |0x6e17, | 0x7e36,|
|00002120| 20 20 30 78 34 65 35 35 | 2c 20 20 30 78 35 65 37 | 0x4e55|, 0x5e7|
|00002130| 34 2c 20 20 30 78 32 65 | 39 33 2c 20 20 30 78 33 |4, 0x2e|93, 0x3|
|00002140| 65 62 32 2c 20 20 30 78 | 30 65 64 31 2c 20 20 30 |eb2, 0x|0ed1, 0|
|00002150| 78 31 65 66 30 0a 7d 3b | 0a 0a 2f 2a 0a 20 2a 20 |x1ef0.};|../*. * |
|00002160| 75 70 64 63 72 63 20 6d | 61 63 72 6f 20 64 65 72 |updcrc m|acro der|
|00002170| 69 76 65 64 20 66 72 6f | 6d 20 61 72 74 69 63 6c |ived fro|m articl|
|00002180| 65 20 43 6f 70 79 72 69 | 67 68 74 20 28 43 29 20 |e Copyri|ght (C) |
|00002190| 31 39 38 36 20 53 74 65 | 70 68 65 6e 20 53 61 74 |1986 Ste|phen Sat|
|000021a0| 63 68 65 6c 6c 2e 20 0a | 20 2a 20 20 4e 4f 54 45 |chell. .| * NOTE|
|000021b0| 3a 20 46 69 72 73 74 20 | 73 72 67 75 6d 65 6e 74 |: First |srgument|
|000021c0| 20 6d 75 73 74 20 62 65 | 20 69 6e 20 72 61 6e 67 | must be| in rang|
|000021d0| 65 20 30 20 74 6f 20 32 | 35 35 2e 0a 20 2a 20 20 |e 0 to 2|55.. * |
|000021e0| 20 20 20 20 20 20 53 65 | 63 6f 6e 64 20 61 72 67 | Se|cond arg|
|000021f0| 75 6d 65 6e 74 20 69 73 | 20 72 65 66 65 72 65 6e |ument is| referen|
|00002200| 63 65 64 20 74 77 69 63 | 65 2e 0a 20 2a 20 0a 20 |ced twic|e.. * . |
|00002210| 2a 20 50 72 6f 67 72 61 | 6d 6d 65 72 73 20 6d 61 |* Progra|mmers ma|
|00002220| 79 20 69 6e 63 6f 72 70 | 6f 72 61 74 65 20 61 6e |y incorp|orate an|
|00002230| 79 20 6f 72 20 61 6c 6c | 20 63 6f 64 65 20 69 6e |y or all| code in|
|00002240| 74 6f 20 74 68 65 69 72 | 20 70 72 6f 67 72 61 6d |to their| program|
|00002250| 73 2c 20 0a 20 2a 20 67 | 69 76 69 6e 67 20 70 72 |s, . * g|iving pr|
|00002260| 6f 70 65 72 20 63 72 65 | 64 69 74 20 77 69 74 68 |oper cre|dit with|
|00002270| 69 6e 20 74 68 65 20 73 | 6f 75 72 63 65 2e 20 50 |in the s|ource. P|
|00002280| 75 62 6c 69 63 61 74 69 | 6f 6e 20 6f 66 20 74 68 |ublicati|on of th|
|00002290| 65 20 0a 20 2a 20 73 6f | 75 72 63 65 20 72 6f 75 |e . * so|urce rou|
|000022a0| 74 69 6e 65 73 20 69 73 | 20 70 65 72 6d 69 74 74 |tines is| permitt|
|000022b0| 65 64 20 73 6f 20 6c 6f | 6e 67 20 61 73 20 70 72 |ed so lo|ng as pr|
|000022c0| 6f 70 65 72 20 63 72 65 | 64 69 74 20 69 73 20 67 |oper cre|dit is g|
|000022d0| 69 76 65 6e 20 0a 20 2a | 20 74 6f 20 53 74 65 70 |iven . *| to Step|
|000022e0| 68 65 6e 20 53 61 74 63 | 68 65 6c 6c 2c 20 53 61 |hen Satc|hell, Sa|
|000022f0| 74 63 68 65 6c 6c 20 45 | 76 61 6c 75 61 74 69 6f |tchell E|valuatio|
|00002300| 6e 73 20 61 6e 64 20 43 | 68 75 63 6b 20 46 6f 72 |ns and C|huck For|
|00002310| 73 62 65 72 67 2c 20 0a | 20 2a 20 4f 6d 65 6e 20 |sberg, .| * Omen |
|00002320| 54 65 63 68 6e 6f 6c 6f | 67 79 2e 0a 20 2a 2f 0a |Technolo|gy.. */.|
|00002330| 0a 23 64 65 66 69 6e 65 | 20 75 70 64 63 72 63 28 |.#define| updcrc(|
|00002340| 63 70 2c 20 63 72 63 29 | 20 28 20 63 72 63 74 61 |cp, crc)| ( crcta|
|00002350| 62 5b 28 28 63 72 63 20 | 3e 3e 20 38 29 20 26 20 |b[((crc |>> 8) & |
|00002360| 32 35 35 29 5d 20 5e 20 | 28 63 72 63 20 3c 3c 20 |255)] ^ |(crc << |
|00002370| 38 29 20 5e 20 63 70 29 | 0a 0a 2f 2a 0a 20 2a 20 |8) ^ cp)|../*. * |
|00002380| 43 6f 70 79 72 69 67 68 | 74 20 28 43 29 20 31 39 |Copyrigh|t (C) 19|
|00002390| 38 36 20 47 61 72 79 20 | 53 2e 20 42 72 6f 77 6e |86 Gary |S. Brown|
|000023a0| 2e 20 20 59 6f 75 20 6d | 61 79 20 75 73 65 20 74 |. You m|ay use t|
|000023b0| 68 69 73 20 70 72 6f 67 | 72 61 6d 2c 20 6f 72 0a |his prog|ram, or.|
|000023c0| 20 2a 20 63 6f 64 65 20 | 6f 72 20 74 61 62 6c 65 | * code |or table|
|000023d0| 73 20 65 78 74 72 61 63 | 74 65 64 20 66 72 6f 6d |s extrac|ted from|
|000023e0| 20 69 74 2c 20 61 73 20 | 64 65 73 69 72 65 64 20 | it, as |desired |
|000023f0| 77 69 74 68 6f 75 74 20 | 72 65 73 74 72 69 63 74 |without |restrict|
|00002400| 69 6f 6e 2e 0a 20 2a 2f | 0a 0a 2f 2a 20 46 69 72 |ion.. */|../* Fir|
|00002410| 73 74 2c 20 74 68 65 20 | 70 6f 6c 79 6e 6f 6d 69 |st, the |polynomi|
|00002420| 61 6c 20 69 74 73 65 6c | 66 20 61 6e 64 20 69 74 |al itsel|f and it|
|00002430| 73 20 74 61 62 6c 65 20 | 6f 66 20 66 65 65 64 62 |s table |of feedb|
|00002440| 61 63 6b 20 74 65 72 6d | 73 2e 20 20 54 68 65 20 |ack term|s. The |
|00002450| 20 2a 2f 0a 2f 2a 20 70 | 6f 6c 79 6e 6f 6d 69 61 | */./* p|olynomia|
|00002460| 6c 20 69 73 20 20 20 20 | 20 20 20 20 20 20 20 20 |l is | |
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002490| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2f 0a 2f 2a | | */./*|
|000024a0| 20 58 5e 33 32 2b 58 5e | 32 36 2b 58 5e 32 33 2b | X^32+X^|26+X^23+|
|000024b0| 58 5e 32 32 2b 58 5e 31 | 36 2b 58 5e 31 32 2b 58 |X^22+X^1|6+X^12+X|
|000024c0| 5e 31 31 2b 58 5e 31 30 | 2b 58 5e 38 2b 58 5e 37 |^11+X^10|+X^8+X^7|
|000024d0| 2b 58 5e 35 2b 58 5e 34 | 2b 58 5e 32 2b 58 5e 31 |+X^5+X^4|+X^2+X^1|
|000024e0| 2b 58 5e 30 20 2a 2f 0a | 2f 2a 20 4e 6f 74 65 20 |+X^0 */.|/* Note |
|000024f0| 74 68 61 74 20 77 65 20 | 74 61 6b 65 20 69 74 20 |that we |take it |
|00002500| 22 62 61 63 6b 77 61 72 | 64 73 22 20 61 6e 64 20 |"backwar|ds" and |
|00002510| 70 75 74 20 74 68 65 20 | 68 69 67 68 65 73 74 2d |put the |highest-|
|00002520| 6f 72 64 65 72 20 74 65 | 72 6d 20 69 6e 20 20 2a |order te|rm in *|
|00002530| 2f 0a 2f 2a 20 74 68 65 | 20 6c 6f 77 65 73 74 2d |/./* the| lowest-|
|00002540| 6f 72 64 65 72 20 62 69 | 74 2e 20 20 54 68 65 20 |order bi|t. The |
|00002550| 58 5e 33 32 20 74 65 72 | 6d 20 69 73 20 22 69 6d |X^32 ter|m is "im|
|00002560| 70 6c 69 65 64 22 3b 20 | 74 68 65 20 4c 53 42 20 |plied"; |the LSB |
|00002570| 69 73 20 74 68 65 20 20 | 20 2a 2f 0a 2f 2a 20 58 |is the | */./* X|
|00002580| 5e 33 31 20 74 65 72 6d | 2c 20 65 74 63 2e 20 20 |^31 term|, etc. |
|00002590| 54 68 65 20 58 5e 30 20 | 74 65 72 6d 20 28 75 73 |The X^0 |term (us|
|000025a0| 75 61 6c 6c 79 20 73 68 | 6f 77 6e 20 61 73 20 22 |ually sh|own as "|
|000025b0| 2b 31 22 29 20 72 65 73 | 75 6c 74 73 20 69 6e 20 |+1") res|ults in |
|000025c0| 20 20 20 2a 2f 0a 2f 2a | 20 74 68 65 20 4d 53 42 | */./*| the MSB|
|000025d0| 20 62 65 69 6e 67 20 31 | 2e 20 20 20 20 20 20 20 | being 1|. |
|000025e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002600| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 2f 0a | | */.|
|00002610| 0a 2f 2a 20 4e 6f 74 65 | 20 74 68 61 74 20 74 68 |./* Note| that th|
|00002620| 65 20 75 73 75 61 6c 20 | 68 61 72 64 77 61 72 65 |e usual |hardware|
|00002630| 20 73 68 69 66 74 20 72 | 65 67 69 73 74 65 72 20 | shift r|egister |
|00002640| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2c 20 |implemen|tation, |
|00002650| 77 68 69 63 68 20 20 20 | 2a 2f 0a 2f 2a 20 69 73 |which |*/./* is|
|00002660| 20 77 68 61 74 20 77 65 | 27 72 65 20 75 73 69 6e | what we|'re usin|
|00002670| 67 20 28 77 65 27 72 65 | 20 6d 65 72 65 6c 79 20 |g (we're| merely |
|00002680| 6f 70 74 69 6d 69 7a 69 | 6e 67 20 69 74 20 62 79 |optimizi|ng it by|
|00002690| 20 64 6f 69 6e 67 20 65 | 69 67 68 74 2d 62 69 74 | doing e|ight-bit|
|000026a0| 20 20 2a 2f 0a 2f 2a 20 | 63 68 75 6e 6b 73 20 61 | */./* |chunks a|
|000026b0| 74 20 61 20 74 69 6d 65 | 29 20 73 68 69 66 74 73 |t a time|) shifts|
|000026c0| 20 62 69 74 73 20 69 6e | 74 6f 20 74 68 65 20 6c | bits in|to the l|
|000026d0| 6f 77 65 73 74 2d 6f 72 | 64 65 72 20 74 65 72 6d |owest-or|der term|
|000026e0| 2e 20 20 49 6e 20 6f 75 | 72 20 20 20 2a 2f 0a 2f |. In ou|r */./|
|000026f0| 2a 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |* implem|entation|
|00002700| 2c 20 74 68 61 74 20 6d | 65 61 6e 73 20 73 68 69 |, that m|eans shi|
|00002710| 66 74 69 6e 67 20 74 6f | 77 61 72 64 73 20 74 68 |fting to|wards th|
|00002720| 65 20 72 69 67 68 74 2e | 20 20 57 68 79 20 64 6f |e right.| Why do|
|00002730| 20 77 65 20 20 20 2a 2f | 0a 2f 2a 20 64 6f 20 69 | we */|./* do i|
|00002740| 74 20 74 68 69 73 20 77 | 61 79 3f 20 20 42 65 63 |t this w|ay? Bec|
|00002750| 61 75 73 65 20 74 68 65 | 20 63 61 6c 63 75 6c 61 |ause the| calcula|
|00002760| 74 65 64 20 43 52 43 20 | 6d 75 73 74 20 62 65 20 |ted CRC |must be |
|00002770| 74 72 61 6e 73 6d 69 74 | 74 65 64 20 69 6e 20 20 |transmit|ted in |
|00002780| 2a 2f 0a 2f 2a 20 6f 72 | 64 65 72 20 66 72 6f 6d |*/./* or|der from|
|00002790| 20 68 69 67 68 65 73 74 | 2d 6f 72 64 65 72 20 74 | highest|-order t|
|000027a0| 65 72 6d 20 74 6f 20 6c | 6f 77 65 73 74 2d 6f 72 |erm to l|owest-or|
|000027b0| 64 65 72 20 74 65 72 6d | 2e 20 20 55 41 52 54 73 |der term|. UARTs|
|000027c0| 20 74 72 61 6e 73 6d 69 | 74 20 2a 2f 0a 2f 2a 20 | transmi|t */./* |
|000027d0| 63 68 61 72 61 63 74 65 | 72 73 20 69 6e 20 6f 72 |characte|rs in or|
|000027e0| 64 65 72 20 66 72 6f 6d | 20 4c 53 42 20 74 6f 20 |der from| LSB to |
|000027f0| 4d 53 42 2e 20 20 42 79 | 20 73 74 6f 72 69 6e 67 |MSB. By| storing|
|00002800| 20 74 68 65 20 43 52 43 | 20 74 68 69 73 20 77 61 | the CRC| this wa|
|00002810| 79 2c 20 20 2a 2f 0a 2f | 2a 20 77 65 20 68 61 6e |y, */./|* we han|
|00002820| 64 20 69 74 20 74 6f 20 | 74 68 65 20 55 41 52 54 |d it to |the UART|
|00002830| 20 69 6e 20 74 68 65 20 | 6f 72 64 65 72 20 6c 6f | in the |order lo|
|00002840| 77 2d 62 79 74 65 20 74 | 6f 20 68 69 67 68 2d 62 |w-byte t|o high-b|
|00002850| 79 74 65 3b 20 74 68 65 | 20 55 41 52 54 20 2a 2f |yte; the| UART */|
|00002860| 0a 2f 2a 20 73 65 6e 64 | 73 20 65 61 63 68 20 6c |./* send|s each l|
|00002870| 6f 77 2d 62 69 74 20 74 | 6f 20 68 69 67 68 74 2d |ow-bit t|o hight-|
|00002880| 62 69 74 3b 20 61 6e 64 | 20 74 68 65 20 72 65 73 |bit; and| the res|
|00002890| 75 6c 74 20 69 73 20 74 | 72 61 6e 73 6d 69 73 73 |ult is t|ransmiss|
|000028a0| 69 6f 6e 20 62 69 74 20 | 2a 2f 0a 2f 2a 20 62 79 |ion bit |*/./* by|
|000028b0| 20 62 69 74 20 66 72 6f | 6d 20 68 69 67 68 65 73 | bit fro|m highes|
|000028c0| 74 2d 20 74 6f 20 6c 6f | 77 65 73 74 2d 6f 72 64 |t- to lo|west-ord|
|000028d0| 65 72 20 74 65 72 6d 20 | 77 69 74 68 6f 75 74 20 |er term |without |
|000028e0| 72 65 71 75 69 72 69 6e | 67 20 61 6e 79 20 62 69 |requirin|g any bi|
|000028f0| 74 20 2a 2f 0a 2f 2a 20 | 73 68 75 66 66 6c 69 6e |t */./* |shufflin|
|00002900| 67 20 6f 6e 20 6f 75 72 | 20 70 61 72 74 2e 20 20 |g on our| part. |
|00002910| 52 65 63 65 70 74 69 6f | 6e 20 77 6f 72 6b 73 20 |Receptio|n works |
|00002920| 73 69 6d 69 6c 61 72 6c | 79 2e 20 20 20 20 20 20 |similarl|y. |
|00002930| 20 20 20 20 20 20 20 20 | 20 20 20 20 2a 2f 0a 0a | | */..|
|00002940| 2f 2a 20 54 68 65 20 66 | 65 65 64 62 61 63 6b 20 |/* The f|eedback |
|00002950| 74 65 72 6d 73 20 74 61 | 62 6c 65 20 63 6f 6e 73 |terms ta|ble cons|
|00002960| 69 73 74 73 20 6f 66 20 | 32 35 36 2c 20 33 32 2d |ists of |256, 32-|
|00002970| 62 69 74 20 65 6e 74 72 | 69 65 73 2e 20 20 4e 6f |bit entr|ies. No|
|00002980| 74 65 73 3a 20 20 20 2a | 2f 0a 2f 2a 20 20 20 20 |tes: *|/./* |
|00002990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000029a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000029b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000029c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000029d0| 20 2a 2f 0a 2f 2a 20 20 | 20 20 20 54 68 65 20 74 | */./* | The t|
|000029e0| 61 62 6c 65 20 63 61 6e | 20 62 65 20 67 65 6e 65 |able can| be gene|
|000029f0| 72 61 74 65 64 20 61 74 | 20 72 75 6e 74 69 6d 65 |rated at| runtime|
|00002a00| 20 69 66 20 64 65 73 69 | 72 65 64 3b 20 63 6f 64 | if desi|red; cod|
|00002a10| 65 20 74 6f 20 64 6f 20 | 73 6f 20 2a 2f 0a 2f 2a |e to do |so */./*|
|00002a20| 20 20 20 20 20 69 73 20 | 73 68 6f 77 6e 20 6c 61 | is |shown la|
|00002a30| 74 65 72 2e 20 20 49 74 | 20 6d 69 67 68 74 20 6e |ter. It| might n|
|00002a40| 6f 74 20 62 65 20 6f 62 | 76 69 6f 75 73 2c 20 62 |ot be ob|vious, b|
|00002a50| 75 74 20 74 68 65 20 66 | 65 65 64 62 61 63 6b 20 |ut the f|eedback |
|00002a60| 20 20 20 20 20 2a 2f 0a | 2f 2a 20 20 20 20 20 74 | */.|/* t|
|00002a70| 65 72 6d 73 20 73 69 6d | 70 6c 79 20 72 65 70 72 |erms sim|ply repr|
|00002a80| 65 73 65 6e 74 20 74 68 | 65 20 72 65 73 75 6c 74 |esent th|e result|
|00002a90| 73 20 6f 66 20 65 69 67 | 68 74 20 73 68 69 66 74 |s of eig|ht shift|
|00002aa0| 2f 78 6f 72 20 6f 70 65 | 72 61 2d 20 20 20 20 2a |/xor ope|ra- *|
|00002ab0| 2f 0a 2f 2a 20 20 20 20 | 20 74 69 6f 6e 73 20 66 |/./* | tions f|
|00002ac0| 6f 72 20 61 6c 6c 20 63 | 6f 6d 62 69 6e 61 74 69 |or all c|ombinati|
|00002ad0| 6f 6e 73 20 6f 66 20 64 | 61 74 61 20 61 6e 64 20 |ons of d|ata and |
|00002ae0| 43 52 43 20 72 65 67 69 | 73 74 65 72 20 76 61 6c |CRC regi|ster val|
|00002af0| 75 65 73 2e 20 20 20 20 | 20 2a 2f 0a 2f 2a 20 20 |ues. | */./* |
|00002b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b40| 20 20 20 2a 2f 0a 2f 2a | 20 20 20 20 20 54 68 65 | */./*| The|
|00002b50| 20 76 61 6c 75 65 73 20 | 6d 75 73 74 20 62 65 20 | values |must be |
|00002b60| 72 69 67 68 74 2d 73 68 | 69 66 74 65 64 20 62 79 |right-sh|ifted by|
|00002b70| 20 65 69 67 68 74 20 62 | 69 74 73 20 62 79 20 74 | eight b|its by t|
|00002b80| 68 65 20 22 75 70 64 63 | 72 63 22 20 20 2a 2f 0a |he "updc|rc" */.|
|00002b90| 2f 2a 20 20 20 20 20 6c | 6f 67 69 63 3b 20 74 68 |/* l|ogic; th|
|00002ba0| 65 20 73 68 69 66 74 20 | 6d 75 73 74 20 62 65 20 |e shift |must be |
|00002bb0| 75 6e 73 69 67 6e 65 64 | 20 28 62 72 69 6e 67 20 |unsigned| (bring |
|00002bc0| 69 6e 20 7a 65 72 6f 65 | 73 29 2e 20 20 4f 6e 20 |in zeroe|s). On |
|00002bd0| 73 6f 6d 65 20 20 20 2a | 2f 0a 2f 2a 20 20 20 20 |some *|/./* |
|00002be0| 20 68 61 72 64 77 61 72 | 65 20 79 6f 75 20 63 6f | hardwar|e you co|
|00002bf0| 75 6c 64 20 70 72 6f 62 | 61 62 6c 79 20 6f 70 74 |uld prob|ably opt|
|00002c00| 69 6d 69 7a 65 20 74 68 | 65 20 73 68 69 66 74 20 |imize th|e shift |
|00002c10| 69 6e 20 61 73 73 65 6d | 62 6c 65 72 20 62 79 20 |in assem|bler by |
|00002c20| 20 2a 2f 0a 2f 2a 20 20 | 20 20 20 75 73 69 6e 67 | */./* | using|
|00002c30| 20 62 79 74 65 2d 73 77 | 61 70 20 69 6e 73 74 72 | byte-sw|ap instr|
|00002c40| 75 63 74 69 6f 6e 73 2e | 20 20 20 20 20 20 20 20 |uctions.| |
|00002c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c60| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2f 0a 0a 73 | | */..s|
|00002c70| 74 61 74 69 63 20 6c 6f | 6e 67 20 63 72 33 74 61 |tatic lo|ng cr3ta|
|00002c80| 62 5b 5d 20 3d 20 7b 20 | 2f 2a 20 43 52 43 20 70 |b[] = { |/* CRC p|
|00002c90| 6f 6c 79 6e 6f 6d 69 61 | 6c 20 30 78 65 64 62 38 |olynomia|l 0xedb8|
|00002ca0| 38 33 32 30 20 2a 2f 0a | 30 78 30 30 30 30 30 30 |8320 */.|0x000000|
|00002cb0| 30 30 2c 20 30 78 37 37 | 30 37 33 30 39 36 2c 20 |00, 0x77|073096, |
|00002cc0| 30 78 65 65 30 65 36 31 | 32 63 2c 20 30 78 39 39 |0xee0e61|2c, 0x99|
|00002cd0| 30 39 35 31 62 61 2c 20 | 30 78 30 37 36 64 63 34 |0951ba, |0x076dc4|
|00002ce0| 31 39 2c 20 30 78 37 30 | 36 61 66 34 38 66 2c 20 |19, 0x70|6af48f, |
|00002cf0| 30 78 65 39 36 33 61 35 | 33 35 2c 20 30 78 39 65 |0xe963a5|35, 0x9e|
|00002d00| 36 34 39 35 61 33 2c 0a | 30 78 30 65 64 62 38 38 |6495a3,.|0x0edb88|
|00002d10| 33 32 2c 20 30 78 37 39 | 64 63 62 38 61 34 2c 20 |32, 0x79|dcb8a4, |
|00002d20| 30 78 65 30 64 35 65 39 | 31 65 2c 20 30 78 39 37 |0xe0d5e9|1e, 0x97|
|00002d30| 64 32 64 39 38 38 2c 20 | 30 78 30 39 62 36 34 63 |d2d988, |0x09b64c|
|00002d40| 32 62 2c 20 30 78 37 65 | 62 31 37 63 62 64 2c 20 |2b, 0x7e|b17cbd, |
|00002d50| 30 78 65 37 62 38 32 64 | 30 37 2c 20 30 78 39 30 |0xe7b82d|07, 0x90|
|00002d60| 62 66 31 64 39 31 2c 0a | 30 78 31 64 62 37 31 30 |bf1d91,.|0x1db710|
|00002d70| 36 34 2c 20 30 78 36 61 | 62 30 32 30 66 32 2c 20 |64, 0x6a|b020f2, |
|00002d80| 30 78 66 33 62 39 37 31 | 34 38 2c 20 30 78 38 34 |0xf3b971|48, 0x84|
|00002d90| 62 65 34 31 64 65 2c 20 | 30 78 31 61 64 61 64 34 |be41de, |0x1adad4|
|00002da0| 37 64 2c 20 30 78 36 64 | 64 64 65 34 65 62 2c 20 |7d, 0x6d|dde4eb, |
|00002db0| 30 78 66 34 64 34 62 35 | 35 31 2c 20 30 78 38 33 |0xf4d4b5|51, 0x83|
|00002dc0| 64 33 38 35 63 37 2c 0a | 30 78 31 33 36 63 39 38 |d385c7,.|0x136c98|
|00002dd0| 35 36 2c 20 30 78 36 34 | 36 62 61 38 63 30 2c 20 |56, 0x64|6ba8c0, |
|00002de0| 30 78 66 64 36 32 66 39 | 37 61 2c 20 30 78 38 61 |0xfd62f9|7a, 0x8a|
|00002df0| 36 35 63 39 65 63 2c 20 | 30 78 31 34 30 31 35 63 |65c9ec, |0x14015c|
|00002e00| 34 66 2c 20 30 78 36 33 | 30 36 36 63 64 39 2c 20 |4f, 0x63|066cd9, |
|00002e10| 30 78 66 61 30 66 33 64 | 36 33 2c 20 30 78 38 64 |0xfa0f3d|63, 0x8d|
|00002e20| 30 38 30 64 66 35 2c 0a | 30 78 33 62 36 65 32 30 |080df5,.|0x3b6e20|
|00002e30| 63 38 2c 20 30 78 34 63 | 36 39 31 30 35 65 2c 20 |c8, 0x4c|69105e, |
|00002e40| 30 78 64 35 36 30 34 31 | 65 34 2c 20 30 78 61 32 |0xd56041|e4, 0xa2|
|00002e50| 36 37 37 31 37 32 2c 20 | 30 78 33 63 30 33 65 34 |677172, |0x3c03e4|
|00002e60| 64 31 2c 20 30 78 34 62 | 30 34 64 34 34 37 2c 20 |d1, 0x4b|04d447, |
|00002e70| 30 78 64 32 30 64 38 35 | 66 64 2c 20 30 78 61 35 |0xd20d85|fd, 0xa5|
|00002e80| 30 61 62 35 36 62 2c 0a | 30 78 33 35 62 35 61 38 |0ab56b,.|0x35b5a8|
|00002e90| 66 61 2c 20 30 78 34 32 | 62 32 39 38 36 63 2c 20 |fa, 0x42|b2986c, |
|00002ea0| 30 78 64 62 62 62 63 39 | 64 36 2c 20 30 78 61 63 |0xdbbbc9|d6, 0xac|
|00002eb0| 62 63 66 39 34 30 2c 20 | 30 78 33 32 64 38 36 63 |bcf940, |0x32d86c|
|00002ec0| 65 33 2c 20 30 78 34 35 | 64 66 35 63 37 35 2c 20 |e3, 0x45|df5c75, |
|00002ed0| 30 78 64 63 64 36 30 64 | 63 66 2c 20 30 78 61 62 |0xdcd60d|cf, 0xab|
|00002ee0| 64 31 33 64 35 39 2c 0a | 30 78 32 36 64 39 33 30 |d13d59,.|0x26d930|
|00002ef0| 61 63 2c 20 30 78 35 31 | 64 65 30 30 33 61 2c 20 |ac, 0x51|de003a, |
|00002f00| 30 78 63 38 64 37 35 31 | 38 30 2c 20 30 78 62 66 |0xc8d751|80, 0xbf|
|00002f10| 64 30 36 31 31 36 2c 20 | 30 78 32 31 62 34 66 34 |d06116, |0x21b4f4|
|00002f20| 62 35 2c 20 30 78 35 36 | 62 33 63 34 32 33 2c 20 |b5, 0x56|b3c423, |
|00002f30| 30 78 63 66 62 61 39 35 | 39 39 2c 20 30 78 62 38 |0xcfba95|99, 0xb8|
|00002f40| 62 64 61 35 30 66 2c 0a | 30 78 32 38 30 32 62 38 |bda50f,.|0x2802b8|
|00002f50| 39 65 2c 20 30 78 35 66 | 30 35 38 38 30 38 2c 20 |9e, 0x5f|058808, |
|00002f60| 30 78 63 36 30 63 64 39 | 62 32 2c 20 30 78 62 31 |0xc60cd9|b2, 0xb1|
|00002f70| 30 62 65 39 32 34 2c 20 | 30 78 32 66 36 66 37 63 |0be924, |0x2f6f7c|
|00002f80| 38 37 2c 20 30 78 35 38 | 36 38 34 63 31 31 2c 20 |87, 0x58|684c11, |
|00002f90| 30 78 63 31 36 31 31 64 | 61 62 2c 20 30 78 62 36 |0xc1611d|ab, 0xb6|
|00002fa0| 36 36 32 64 33 64 2c 0a | 30 78 37 36 64 63 34 31 |662d3d,.|0x76dc41|
|00002fb0| 39 30 2c 20 30 78 30 31 | 64 62 37 31 30 36 2c 20 |90, 0x01|db7106, |
|00002fc0| 30 78 39 38 64 32 32 30 | 62 63 2c 20 30 78 65 66 |0x98d220|bc, 0xef|
|00002fd0| 64 35 31 30 32 61 2c 20 | 30 78 37 31 62 31 38 35 |d5102a, |0x71b185|
|00002fe0| 38 39 2c 20 30 78 30 36 | 62 36 62 35 31 66 2c 20 |89, 0x06|b6b51f, |
|00002ff0| 30 78 39 66 62 66 65 34 | 61 35 2c 20 30 78 65 38 |0x9fbfe4|a5, 0xe8|
|00003000| 62 38 64 34 33 33 2c 0a | 30 78 37 38 30 37 63 39 |b8d433,.|0x7807c9|
|00003010| 61 32 2c 20 30 78 30 66 | 30 30 66 39 33 34 2c 20 |a2, 0x0f|00f934, |
|00003020| 30 78 39 36 30 39 61 38 | 38 65 2c 20 30 78 65 31 |0x9609a8|8e, 0xe1|
|00003030| 30 65 39 38 31 38 2c 20 | 30 78 37 66 36 61 30 64 |0e9818, |0x7f6a0d|
|00003040| 62 62 2c 20 30 78 30 38 | 36 64 33 64 32 64 2c 20 |bb, 0x08|6d3d2d, |
|00003050| 30 78 39 31 36 34 36 63 | 39 37 2c 20 30 78 65 36 |0x91646c|97, 0xe6|
|00003060| 36 33 35 63 30 31 2c 0a | 30 78 36 62 36 62 35 31 |635c01,.|0x6b6b51|
|00003070| 66 34 2c 20 30 78 31 63 | 36 63 36 31 36 32 2c 20 |f4, 0x1c|6c6162, |
|00003080| 30 78 38 35 36 35 33 30 | 64 38 2c 20 30 78 66 32 |0x856530|d8, 0xf2|
|00003090| 36 32 30 30 34 65 2c 20 | 30 78 36 63 30 36 39 35 |62004e, |0x6c0695|
|000030a0| 65 64 2c 20 30 78 31 62 | 30 31 61 35 37 62 2c 20 |ed, 0x1b|01a57b, |
|000030b0| 30 78 38 32 30 38 66 34 | 63 31 2c 20 30 78 66 35 |0x8208f4|c1, 0xf5|
|000030c0| 30 66 63 34 35 37 2c 0a | 30 78 36 35 62 30 64 39 |0fc457,.|0x65b0d9|
|000030d0| 63 36 2c 20 30 78 31 32 | 62 37 65 39 35 30 2c 20 |c6, 0x12|b7e950, |
|000030e0| 30 78 38 62 62 65 62 38 | 65 61 2c 20 30 78 66 63 |0x8bbeb8|ea, 0xfc|
|000030f0| 62 39 38 38 37 63 2c 20 | 30 78 36 32 64 64 31 64 |b9887c, |0x62dd1d|
|00003100| 64 66 2c 20 30 78 31 35 | 64 61 32 64 34 39 2c 20 |df, 0x15|da2d49, |
|00003110| 30 78 38 63 64 33 37 63 | 66 33 2c 20 30 78 66 62 |0x8cd37c|f3, 0xfb|
|00003120| 64 34 34 63 36 35 2c 0a | 30 78 34 64 62 32 36 31 |d44c65,.|0x4db261|
|00003130| 35 38 2c 20 30 78 33 61 | 62 35 35 31 63 65 2c 20 |58, 0x3a|b551ce, |
|00003140| 30 78 61 33 62 63 30 30 | 37 34 2c 20 30 78 64 34 |0xa3bc00|74, 0xd4|
|00003150| 62 62 33 30 65 32 2c 20 | 30 78 34 61 64 66 61 35 |bb30e2, |0x4adfa5|
|00003160| 34 31 2c 20 30 78 33 64 | 64 38 39 35 64 37 2c 20 |41, 0x3d|d895d7, |
|00003170| 30 78 61 34 64 31 63 34 | 36 64 2c 20 30 78 64 33 |0xa4d1c4|6d, 0xd3|
|00003180| 64 36 66 34 66 62 2c 0a | 30 78 34 33 36 39 65 39 |d6f4fb,.|0x4369e9|
|00003190| 36 61 2c 20 30 78 33 34 | 36 65 64 39 66 63 2c 20 |6a, 0x34|6ed9fc, |
|000031a0| 30 78 61 64 36 37 38 38 | 34 36 2c 20 30 78 64 61 |0xad6788|46, 0xda|
|000031b0| 36 30 62 38 64 30 2c 20 | 30 78 34 34 30 34 32 64 |60b8d0, |0x44042d|
|000031c0| 37 33 2c 20 30 78 33 33 | 30 33 31 64 65 35 2c 20 |73, 0x33|031de5, |
|000031d0| 30 78 61 61 30 61 34 63 | 35 66 2c 20 30 78 64 64 |0xaa0a4c|5f, 0xdd|
|000031e0| 30 64 37 63 63 39 2c 0a | 30 78 35 30 30 35 37 31 |0d7cc9,.|0x500571|
|000031f0| 33 63 2c 20 30 78 32 37 | 30 32 34 31 61 61 2c 20 |3c, 0x27|0241aa, |
|00003200| 30 78 62 65 30 62 31 30 | 31 30 2c 20 30 78 63 39 |0xbe0b10|10, 0xc9|
|00003210| 30 63 32 30 38 36 2c 20 | 30 78 35 37 36 38 62 35 |0c2086, |0x5768b5|
|00003220| 32 35 2c 20 30 78 32 30 | 36 66 38 35 62 33 2c 20 |25, 0x20|6f85b3, |
|00003230| 30 78 62 39 36 36 64 34 | 30 39 2c 20 30 78 63 65 |0xb966d4|09, 0xce|
|00003240| 36 31 65 34 39 66 2c 0a | 30 78 35 65 64 65 66 39 |61e49f,.|0x5edef9|
|00003250| 30 65 2c 20 30 78 32 39 | 64 39 63 39 39 38 2c 20 |0e, 0x29|d9c998, |
|00003260| 30 78 62 30 64 30 39 38 | 32 32 2c 20 30 78 63 37 |0xb0d098|22, 0xc7|
|00003270| 64 37 61 38 62 34 2c 20 | 30 78 35 39 62 33 33 64 |d7a8b4, |0x59b33d|
|00003280| 31 37 2c 20 30 78 32 65 | 62 34 30 64 38 31 2c 20 |17, 0x2e|b40d81, |
|00003290| 30 78 62 37 62 64 35 63 | 33 62 2c 20 30 78 63 30 |0xb7bd5c|3b, 0xc0|
|000032a0| 62 61 36 63 61 64 2c 0a | 30 78 65 64 62 38 38 33 |ba6cad,.|0xedb883|
|000032b0| 32 30 2c 20 30 78 39 61 | 62 66 62 33 62 36 2c 20 |20, 0x9a|bfb3b6, |
|000032c0| 30 78 30 33 62 36 65 32 | 30 63 2c 20 30 78 37 34 |0x03b6e2|0c, 0x74|
|000032d0| 62 31 64 32 39 61 2c 20 | 30 78 65 61 64 35 34 37 |b1d29a, |0xead547|
|000032e0| 33 39 2c 20 30 78 39 64 | 64 32 37 37 61 66 2c 20 |39, 0x9d|d277af, |
|000032f0| 30 78 30 34 64 62 32 36 | 31 35 2c 20 30 78 37 33 |0x04db26|15, 0x73|
|00003300| 64 63 31 36 38 33 2c 0a | 30 78 65 33 36 33 30 62 |dc1683,.|0xe3630b|
|00003310| 31 32 2c 20 30 78 39 34 | 36 34 33 62 38 34 2c 20 |12, 0x94|643b84, |
|00003320| 30 78 30 64 36 64 36 61 | 33 65 2c 20 30 78 37 61 |0x0d6d6a|3e, 0x7a|
|00003330| 36 61 35 61 61 38 2c 20 | 30 78 65 34 30 65 63 66 |6a5aa8, |0xe40ecf|
|00003340| 30 62 2c 20 30 78 39 33 | 30 39 66 66 39 64 2c 20 |0b, 0x93|09ff9d, |
|00003350| 30 78 30 61 30 30 61 65 | 32 37 2c 20 30 78 37 64 |0x0a00ae|27, 0x7d|
|00003360| 30 37 39 65 62 31 2c 0a | 30 78 66 30 30 66 39 33 |079eb1,.|0xf00f93|
|00003370| 34 34 2c 20 30 78 38 37 | 30 38 61 33 64 32 2c 20 |44, 0x87|08a3d2, |
|00003380| 30 78 31 65 30 31 66 32 | 36 38 2c 20 30 78 36 39 |0x1e01f2|68, 0x69|
|00003390| 30 36 63 32 66 65 2c 20 | 30 78 66 37 36 32 35 37 |06c2fe, |0xf76257|
|000033a0| 35 64 2c 20 30 78 38 30 | 36 35 36 37 63 62 2c 20 |5d, 0x80|6567cb, |
|000033b0| 30 78 31 39 36 63 33 36 | 37 31 2c 20 30 78 36 65 |0x196c36|71, 0x6e|
|000033c0| 36 62 30 36 65 37 2c 0a | 30 78 66 65 64 34 31 62 |6b06e7,.|0xfed41b|
|000033d0| 37 36 2c 20 30 78 38 39 | 64 33 32 62 65 30 2c 20 |76, 0x89|d32be0, |
|000033e0| 30 78 31 30 64 61 37 61 | 35 61 2c 20 30 78 36 37 |0x10da7a|5a, 0x67|
|000033f0| 64 64 34 61 63 63 2c 20 | 30 78 66 39 62 39 64 66 |dd4acc, |0xf9b9df|
|00003400| 36 66 2c 20 30 78 38 65 | 62 65 65 66 66 39 2c 20 |6f, 0x8e|beeff9, |
|00003410| 30 78 31 37 62 37 62 65 | 34 33 2c 20 30 78 36 30 |0x17b7be|43, 0x60|
|00003420| 62 30 38 65 64 35 2c 0a | 30 78 64 36 64 36 61 33 |b08ed5,.|0xd6d6a3|
|00003430| 65 38 2c 20 30 78 61 31 | 64 31 39 33 37 65 2c 20 |e8, 0xa1|d1937e, |
|00003440| 30 78 33 38 64 38 63 32 | 63 34 2c 20 30 78 34 66 |0x38d8c2|c4, 0x4f|
|00003450| 64 66 66 32 35 32 2c 20 | 30 78 64 31 62 62 36 37 |dff252, |0xd1bb67|
|00003460| 66 31 2c 20 30 78 61 36 | 62 63 35 37 36 37 2c 20 |f1, 0xa6|bc5767, |
|00003470| 30 78 33 66 62 35 30 36 | 64 64 2c 20 30 78 34 38 |0x3fb506|dd, 0x48|
|00003480| 62 32 33 36 34 62 2c 0a | 30 78 64 38 30 64 32 62 |b2364b,.|0xd80d2b|
|00003490| 64 61 2c 20 30 78 61 66 | 30 61 31 62 34 63 2c 20 |da, 0xaf|0a1b4c, |
|000034a0| 30 78 33 36 30 33 34 61 | 66 36 2c 20 30 78 34 31 |0x36034a|f6, 0x41|
|000034b0| 30 34 37 61 36 30 2c 20 | 30 78 64 66 36 30 65 66 |047a60, |0xdf60ef|
|000034c0| 63 33 2c 20 30 78 61 38 | 36 37 64 66 35 35 2c 20 |c3, 0xa8|67df55, |
|000034d0| 30 78 33 31 36 65 38 65 | 65 66 2c 20 30 78 34 36 |0x316e8e|ef, 0x46|
|000034e0| 36 39 62 65 37 39 2c 0a | 30 78 63 62 36 31 62 33 |69be79,.|0xcb61b3|
|000034f0| 38 63 2c 20 30 78 62 63 | 36 36 38 33 31 61 2c 20 |8c, 0xbc|66831a, |
|00003500| 30 78 32 35 36 66 64 32 | 61 30 2c 20 30 78 35 32 |0x256fd2|a0, 0x52|
|00003510| 36 38 65 32 33 36 2c 20 | 30 78 63 63 30 63 37 37 |68e236, |0xcc0c77|
|00003520| 39 35 2c 20 30 78 62 62 | 30 62 34 37 30 33 2c 20 |95, 0xbb|0b4703, |
|00003530| 30 78 32 32 30 32 31 36 | 62 39 2c 20 30 78 35 35 |0x220216|b9, 0x55|
|00003540| 30 35 32 36 32 66 2c 0a | 30 78 63 35 62 61 33 62 |05262f,.|0xc5ba3b|
|00003550| 62 65 2c 20 30 78 62 32 | 62 64 30 62 32 38 2c 20 |be, 0xb2|bd0b28, |
|00003560| 30 78 32 62 62 34 35 61 | 39 32 2c 20 30 78 35 63 |0x2bb45a|92, 0x5c|
|00003570| 62 33 36 61 30 34 2c 20 | 30 78 63 32 64 37 66 66 |b36a04, |0xc2d7ff|
|00003580| 61 37 2c 20 30 78 62 35 | 64 30 63 66 33 31 2c 20 |a7, 0xb5|d0cf31, |
|00003590| 30 78 32 63 64 39 39 65 | 38 62 2c 20 30 78 35 62 |0x2cd99e|8b, 0x5b|
|000035a0| 64 65 61 65 31 64 2c 0a | 30 78 39 62 36 34 63 32 |deae1d,.|0x9b64c2|
|000035b0| 62 30 2c 20 30 78 65 63 | 36 33 66 32 32 36 2c 20 |b0, 0xec|63f226, |
|000035c0| 30 78 37 35 36 61 61 33 | 39 63 2c 20 30 78 30 32 |0x756aa3|9c, 0x02|
|000035d0| 36 64 39 33 30 61 2c 20 | 30 78 39 63 30 39 30 36 |6d930a, |0x9c0906|
|000035e0| 61 39 2c 20 30 78 65 62 | 30 65 33 36 33 66 2c 20 |a9, 0xeb|0e363f, |
|000035f0| 30 78 37 32 30 37 36 37 | 38 35 2c 20 30 78 30 35 |0x720767|85, 0x05|
|00003600| 30 30 35 37 31 33 2c 0a | 30 78 39 35 62 66 34 61 |005713,.|0x95bf4a|
|00003610| 38 32 2c 20 30 78 65 32 | 62 38 37 61 31 34 2c 20 |82, 0xe2|b87a14, |
|00003620| 30 78 37 62 62 31 32 62 | 61 65 2c 20 30 78 30 63 |0x7bb12b|ae, 0x0c|
|00003630| 62 36 31 62 33 38 2c 20 | 30 78 39 32 64 32 38 65 |b61b38, |0x92d28e|
|00003640| 39 62 2c 20 30 78 65 35 | 64 35 62 65 30 64 2c 20 |9b, 0xe5|d5be0d, |
|00003650| 30 78 37 63 64 63 65 66 | 62 37 2c 20 30 78 30 62 |0x7cdcef|b7, 0x0b|
|00003660| 64 62 64 66 32 31 2c 0a | 30 78 38 36 64 33 64 32 |dbdf21,.|0x86d3d2|
|00003670| 64 34 2c 20 30 78 66 31 | 64 34 65 32 34 32 2c 20 |d4, 0xf1|d4e242, |
|00003680| 30 78 36 38 64 64 62 33 | 66 38 2c 20 30 78 31 66 |0x68ddb3|f8, 0x1f|
|00003690| 64 61 38 33 36 65 2c 20 | 30 78 38 31 62 65 31 36 |da836e, |0x81be16|
|000036a0| 63 64 2c 20 30 78 66 36 | 62 39 32 36 35 62 2c 20 |cd, 0xf6|b9265b, |
|000036b0| 30 78 36 66 62 30 37 37 | 65 31 2c 20 30 78 31 38 |0x6fb077|e1, 0x18|
|000036c0| 62 37 34 37 37 37 2c 0a | 30 78 38 38 30 38 35 61 |b74777,.|0x88085a|
|000036d0| 65 36 2c 20 30 78 66 66 | 30 66 36 61 37 30 2c 20 |e6, 0xff|0f6a70, |
|000036e0| 30 78 36 36 30 36 33 62 | 63 61 2c 20 30 78 31 31 |0x66063b|ca, 0x11|
|000036f0| 30 31 30 62 35 63 2c 20 | 30 78 38 66 36 35 39 65 |010b5c, |0x8f659e|
|00003700| 66 66 2c 20 30 78 66 38 | 36 32 61 65 36 39 2c 20 |ff, 0xf8|62ae69, |
|00003710| 30 78 36 31 36 62 66 66 | 64 33 2c 20 30 78 31 36 |0x616bff|d3, 0x16|
|00003720| 36 63 63 66 34 35 2c 0a | 30 78 61 30 30 61 65 32 |6ccf45,.|0xa00ae2|
|00003730| 37 38 2c 20 30 78 64 37 | 30 64 64 32 65 65 2c 20 |78, 0xd7|0dd2ee, |
|00003740| 30 78 34 65 30 34 38 33 | 35 34 2c 20 30 78 33 39 |0x4e0483|54, 0x39|
|00003750| 30 33 62 33 63 32 2c 20 | 30 78 61 37 36 37 32 36 |03b3c2, |0xa76726|
|00003760| 36 31 2c 20 30 78 64 30 | 36 30 31 36 66 37 2c 20 |61, 0xd0|6016f7, |
|00003770| 30 78 34 39 36 39 34 37 | 34 64 2c 20 30 78 33 65 |0x496947|4d, 0x3e|
|00003780| 36 65 37 37 64 62 2c 0a | 30 78 61 65 64 31 36 61 |6e77db,.|0xaed16a|
|00003790| 34 61 2c 20 30 78 64 39 | 64 36 35 61 64 63 2c 20 |4a, 0xd9|d65adc, |
|000037a0| 30 78 34 30 64 66 30 62 | 36 36 2c 20 30 78 33 37 |0x40df0b|66, 0x37|
|000037b0| 64 38 33 62 66 30 2c 20 | 30 78 61 39 62 63 61 65 |d83bf0, |0xa9bcae|
|000037c0| 35 33 2c 20 30 78 64 65 | 62 62 39 65 63 35 2c 20 |53, 0xde|bb9ec5, |
|000037d0| 30 78 34 37 62 32 63 66 | 37 66 2c 20 30 78 33 30 |0x47b2cf|7f, 0x30|
|000037e0| 62 35 66 66 65 39 2c 0a | 30 78 62 64 62 64 66 32 |b5ffe9,.|0xbdbdf2|
|000037f0| 31 63 2c 20 30 78 63 61 | 62 61 63 32 38 61 2c 20 |1c, 0xca|bac28a, |
|00003800| 30 78 35 33 62 33 39 33 | 33 30 2c 20 30 78 32 34 |0x53b393|30, 0x24|
|00003810| 62 34 61 33 61 36 2c 20 | 30 78 62 61 64 30 33 36 |b4a3a6, |0xbad036|
|00003820| 30 35 2c 20 30 78 63 64 | 64 37 30 36 39 33 2c 20 |05, 0xcd|d70693, |
|00003830| 30 78 35 34 64 65 35 37 | 32 39 2c 20 30 78 32 33 |0x54de57|29, 0x23|
|00003840| 64 39 36 37 62 66 2c 0a | 30 78 62 33 36 36 37 61 |d967bf,.|0xb3667a|
|00003850| 32 65 2c 20 30 78 63 34 | 36 31 34 61 62 38 2c 20 |2e, 0xc4|614ab8, |
|00003860| 30 78 35 64 36 38 31 62 | 30 32 2c 20 30 78 32 61 |0x5d681b|02, 0x2a|
|00003870| 36 66 32 62 39 34 2c 20 | 30 78 62 34 30 62 62 65 |6f2b94, |0xb40bbe|
|00003880| 33 37 2c 20 30 78 63 33 | 30 63 38 65 61 31 2c 20 |37, 0xc3|0c8ea1, |
|00003890| 30 78 35 61 30 35 64 66 | 31 62 2c 20 30 78 32 64 |0x5a05df|1b, 0x2d|
|000038a0| 30 32 65 66 38 64 0a 7d | 3b 0a 0a 23 69 66 64 65 |02ef8d.}|;..#ifde|
|000038b0| 66 20 4e 46 47 4d 0a 6c | 6f 6e 67 0a 55 50 44 43 |f NFGM.l|ong.UPDC|
|000038c0| 33 32 28 62 2c 20 63 29 | 0a 6c 6f 6e 67 20 63 3b |32(b, c)|.long c;|
|000038d0| 0a 7b 0a 09 72 65 74 75 | 72 6e 20 28 63 72 33 74 |.{..retu|rn (cr3t|
|000038e0| 61 62 5b 28 28 69 6e 74 | 29 63 20 5e 20 62 29 20 |ab[((int|)c ^ b) |
|000038f0| 26 20 30 78 66 66 5d 20 | 5e 20 28 28 63 20 3e 3e |& 0xff] |^ ((c >>|
|00003900| 20 38 29 20 26 20 30 78 | 30 30 46 46 46 46 46 46 | 8) & 0x|00FFFFFF|
|00003910| 29 29 3b 0a 7d 0a 0a 23 | 65 6c 73 65 0a 0a 23 64 |));.}..#|else..#d|
|00003920| 65 66 69 6e 65 20 55 50 | 44 43 33 32 28 62 2c 20 |efine UP|DC32(b, |
|00003930| 63 29 20 28 63 72 33 74 | 61 62 5b 28 28 69 6e 74 |c) (cr3t|ab[((int|
|00003940| 29 63 20 5e 20 62 29 20 | 26 20 30 78 66 66 5d 20 |)c ^ b) |& 0xff] |
|00003950| 5e 20 28 28 63 20 3e 3e | 20 38 29 20 26 20 30 78 |^ ((c >>| 8) & 0x|
|00003960| 30 30 46 46 46 46 46 46 | 29 29 0a 23 65 6e 64 69 |00FFFFFF|)).#endi|
|00003970| 66 0a 0a 2f 2a 20 45 6e | 64 20 6f 66 20 72 62 73 |f../* En|d of rbs|
|00003980| 62 2e 63 20 2a 2f 0a 0a | 23 65 6e 64 69 66 0a 7d |b.c */..|#endif.}|
|00003990| 0a 0a 23 69 66 64 65 66 | 20 46 49 4f 4e 52 45 41 |..#ifdef| FIONREA|
|000039a0| 44 0a 23 64 65 66 69 6e | 65 20 52 45 41 44 43 48 |D.#defin|e READCH|
|000039b0| 45 43 4b 0a 2f 2a 0a 20 | 2a 20 20 52 65 74 75 72 |ECK./*. |* Retur|
|000039c0| 6e 20 6e 6f 6e 20 30 20 | 69 66 66 20 73 6f 6d 65 |n non 0 |iff some|
|000039d0| 74 68 69 6e 67 20 74 6f | 20 72 65 61 64 20 66 72 |thing to| read fr|
|000039e0| 6f 6d 20 69 6f 20 64 65 | 73 63 72 69 70 74 6f 72 |om io de|scriptor|
|000039f0| 20 66 0a 20 2a 2f 0a 72 | 64 63 68 6b 28 66 29 0a | f. */.r|dchk(f).|
|00003a00| 7a 6d 6f 64 65 6d 2f 67 | 7a 00 00 00 00 00 00 00 |zmodem/g|z.......|
|00003a10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003a60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00003a70| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00003a80| 20 20 20 20 20 31 36 20 | 20 35 32 32 34 37 34 33 | 16 | 5224743|
|00003a90| 34 33 32 20 20 20 35 36 | 36 34 00 20 00 00 00 00 |432 56|64. ....|
|00003aa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ab0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003af0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003c00| 73 7a 20 2d 63 20 22 73 | 7a 20 24 2a 22 0a 0a 00 |sz -c "s|z $*"...|
|00003c10| 2c 00 02 00 2e 2e 00 00 | 81 04 03 00 10 00 06 00 |,.......|........|
|00003c20| 70 61 72 74 30 32 00 5a | 82 04 03 00 10 00 06 00 |part02.Z|........|
|00003c30| 70 61 72 74 30 33 00 74 | 85 04 03 00 10 00 06 00 |part03.t|........|
|00003c40| 72 62 73 62 2e 63 00 00 | 95 04 03 00 1c 00 02 00 |rbsb.c..|........|
|00003c50| 67 7a 00 00 87 04 03 00 | 10 00 06 00 70 61 72 74 |gz......|....part|
|00003c60| 30 31 00 00 8c 04 03 00 | 14 00 08 00 6d 69 6e 69 |01......|....mini|
|00003c70| 72 62 2e 63 00 00 00 00 | 8d 04 03 00 14 00 08 00 |rb.c....|........|
|00003c80| 6d 69 6e 69 72 62 2e 31 | 00 00 00 00 8e 04 03 00 |minirb.1|........|
|00003c90| 10 00 04 00 72 7a 2e 31 | 00 00 00 00 8f 04 03 00 |....rz.1|........|
|00003ca0| 10 00 04 00 73 7a 2e 31 | 00 00 00 00 a1 04 03 00 |....sz.1|........|
|00003cb0| 14 00 08 00 70 74 65 73 | 74 2e 73 68 00 00 00 00 |....ptes|t.sh....|
|00003cc0| a2 04 03 00 10 00 06 00 | 7a 75 70 6c 2e 74 00 00 |........|zupl.t..|
|00003cd0| ad 04 03 00 10 00 06 00 | 52 45 41 44 4d 45 00 00 |........|README..|
|00003ce0| ae 04 03 00 14 00 08 00 | 4d 61 6b 65 66 69 6c 65 |........|Makefile|
|00003cf0| 00 00 00 00 af 04 03 00 | 14 00 08 00 7a 6d 6f 64 |........|....zmod|
|00003d00| 65 6d 2e 68 00 00 00 00 | b0 04 03 00 10 00 04 00 |em.h....|........|
|00003d10| 7a 6d 2e 63 00 00 00 00 | b1 04 03 00 10 00 04 00 |zm.c....|........|
|00003d20| 73 7a 2e 63 00 00 00 00 | b2 04 03 00 d8 00 04 00 |sz.c....|........|
|00003d30| 72 7a 2e 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |rz.c....|........|
|00003d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003d90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003da0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003db0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003dc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003dd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003df0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e00| 7a 6d 6f 64 65 6d 2f 6d | 69 6e 69 72 62 2e 63 00 |zmodem/m|inirb.c.|
|00003e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003e60| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00003e70| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00003e80| 20 20 20 37 37 33 31 20 | 20 35 32 32 34 37 34 33 | 7731 | 5224743|
|00003e90| 33 37 37 20 20 20 37 30 | 33 30 00 20 00 00 00 00 |377 70|30. ....|
|00003ea0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ee0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ef0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fa0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003fe0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003ff0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004000| 2f 2a 0a 20 2a 20 6d 69 | 6e 69 72 62 2e 63 20 42 |/*. * mi|nirb.c B|
|00004010| 79 20 43 68 75 63 6b 20 | 46 6f 72 73 62 65 72 67 |y Chuck |Forsberg|
|00004020| 20 4f 6d 65 6e 20 54 65 | 63 68 6e 6f 6c 6f 67 79 | Omen Te|chnology|
|00004030| 20 49 4e 43 0a 20 2a 20 | 20 20 20 20 20 20 20 22 | INC. * | "|
|00004040| 54 68 65 20 48 69 67 68 | 20 52 65 6c 69 61 62 69 |The High| Reliabi|
|00004050| 6c 69 74 79 20 43 6f 6d | 6d 75 6e 69 63 61 74 69 |lity Com|municati|
|00004060| 6f 6e 73 20 53 6f 66 74 | 77 61 72 65 22 0a 20 2a |ons Soft|ware". *|
|00004070| 0a 20 2a 20 41 20 62 6f | 6f 74 73 74 72 61 70 20 |. * A bo|otstrap |
|00004080| 70 72 6f 67 72 61 6d 20 | 66 6f 72 20 55 6e 69 78 |program |for Unix|
|00004090| 20 74 6f 20 72 65 63 65 | 69 76 65 20 66 69 6c 65 | to rece|ive file|
|000040a0| 73 20 66 72 6f 6d 20 63 | 6f 6d 70 75 74 65 72 73 |s from c|omputers|
|000040b0| 20 72 75 6e 6e 69 6e 67 | 0a 20 2a 20 20 59 4d 4f | running|. * YMO|
|000040c0| 44 45 4d 20 42 61 74 63 | 68 20 28 50 72 6f 66 65 |DEM Batc|h (Profe|
|000040d0| 73 73 69 6f 6e 61 6c 2d | 59 41 4d 2c 20 50 6f 77 |ssional-|YAM, Pow|
|000040e0| 65 72 43 6f 6d 2c 20 5a | 43 4f 4d 4d 2c 20 65 74 |erCom, Z|COMM, et|
|000040f0| 63 2e 29 2e 0a 20 2a 0a | 20 2a 20 20 4d 69 6e 69 |c.).. *.| * Mini|
|00004100| 72 62 20 75 73 65 73 20 | 73 79 73 74 65 6d 28 33 |rb uses |system(3|
|00004110| 29 20 74 6f 20 63 61 6c | 6c 20 73 74 74 79 2c 20 |) to cal|l stty, |
|00004120| 61 76 6f 69 64 69 6e 67 | 20 73 79 73 74 65 6d 20 |avoiding| system |
|00004130| 64 65 70 65 6e 64 65 6e | 74 20 63 6f 64 65 2e 0a |dependen|t code..|
|00004140| 20 2a 20 20 20 70 72 6f | 67 72 61 6d 20 73 74 72 | * pro|gram str|
|00004150| 69 70 73 20 43 52 20 61 | 6e 64 20 43 50 4d 45 4f |ips CR a|nd CPMEO|
|00004160| 46 20 28 5e 5a 29 20 63 | 68 61 72 61 63 74 65 72 |F (^Z) c|haracter|
|00004170| 73 20 28 73 65 65 20 70 | 75 74 73 65 63 28 29 29 |s (see p|utsec())|
|00004180| 2e 0a 20 2a 20 20 50 6c | 65 61 73 65 20 72 65 66 |.. * Pl|ease ref|
|00004190| 65 72 20 74 6f 20 72 7a | 2e 63 20 66 6f 72 20 63 |er to rz|.c for c|
|000041a0| 6f 6d 6d 65 6e 74 73 2c | 20 65 74 63 2e 0a 20 2a |omments,| etc.. *|
|000041b0| 2f 0a 63 68 61 72 20 2a | 20 56 65 72 73 69 6f 6e |/.char *| Version|
|000041c0| 20 3d 20 22 6d 69 6e 69 | 72 62 20 32 2e 30 30 20 | = "mini|rb 2.00 |
|000041d0| 30 35 2d 32 35 2d 38 37 | 22 3b 0a 0a 23 69 6e 63 |05-25-87|";..#inc|
|000041e0| 6c 75 64 65 20 3c 73 74 | 64 69 6f 2e 68 3e 0a 23 |lude <st|dio.h>.#|
|000041f0| 69 6e 63 6c 75 64 65 20 | 3c 73 69 67 6e 61 6c 2e |include |<signal.|
|00004200| 68 3e 0a 23 69 6e 63 6c | 75 64 65 20 3c 73 65 74 |h>.#incl|ude <set|
|00004210| 6a 6d 70 2e 68 3e 0a 0a | 23 64 65 66 69 6e 65 20 |jmp.h>..|#define |
|00004220| 4f 4b 20 30 0a 23 64 65 | 66 69 6e 65 20 46 41 4c |OK 0.#de|fine FAL|
|00004230| 53 45 20 30 0a 23 64 65 | 66 69 6e 65 20 54 52 55 |SE 0.#de|fine TRU|
|00004240| 45 20 31 0a 23 64 65 66 | 69 6e 65 20 45 52 52 4f |E 1.#def|ine ERRO|
|00004250| 52 20 28 2d 31 29 0a 23 | 64 65 66 69 6e 65 20 43 |R (-1).#|define C|
|00004260| 41 4e 20 28 27 58 27 26 | 30 33 37 29 0a 23 64 65 |AN ('X'&|037).#de|
|00004270| 66 69 6e 65 20 53 4f 48 | 20 31 0a 23 64 65 66 69 |fine SOH| 1.#defi|
|00004280| 6e 65 20 53 54 58 20 32 | 0a 23 64 65 66 69 6e 65 |ne STX 2|.#define|
|00004290| 20 45 4f 54 20 34 0a 23 | 64 65 66 69 6e 65 20 41 | EOT 4.#|define A|
|000042a0| 43 4b 20 36 0a 23 64 65 | 66 69 6e 65 20 4e 41 4b |CK 6.#de|fine NAK|
|000042b0| 20 30 32 35 0a 23 64 65 | 66 69 6e 65 20 54 49 4d | 025.#de|fine TIM|
|000042c0| 45 4f 55 54 20 28 2d 32 | 29 0a 23 64 65 66 69 6e |EOUT (-2|).#defin|
|000042d0| 65 20 52 45 54 52 59 4d | 41 58 20 39 0a 23 64 65 |e RETRYM|AX 9.#de|
|000042e0| 66 69 6e 65 20 57 43 45 | 4f 54 20 28 2d 31 30 29 |fine WCE|OT (-10)|
|000042f0| 0a 0a 46 49 4c 45 20 2a | 66 6f 75 74 3b 0a 6c 6f |..FILE *|fout;.lo|
|00004300| 6e 67 20 42 79 74 65 73 | 6c 65 66 74 3b 0a 69 6e |ng Bytes|left;.in|
|00004310| 74 20 42 6c 6b 6c 65 6e | 3b 0a 63 68 61 72 20 73 |t Blklen|;.char s|
|00004320| 65 63 62 75 66 5b 31 30 | 32 34 5d 3b 0a 63 68 61 |ecbuf[10|24];.cha|
|00004330| 72 20 6c 69 6e 62 75 66 | 5b 31 30 32 34 5d 3b 0a |r linbuf|[1024];.|
|00004340| 69 6e 74 20 4c 6c 65 66 | 74 3d 30 3b 0a 6a 6d 70 |int Llef|t=0;.jmp|
|00004350| 5f 62 75 66 20 74 6f 68 | 65 72 65 3b 0a 0a 61 6c |_buf toh|ere;..al|
|00004360| 72 6d 28 29 20 7b 20 6c | 6f 6e 67 6a 6d 70 28 74 |rm() { l|ongjmp(t|
|00004370| 6f 68 65 72 65 2c 20 2d | 31 29 3b 20 7d 0a 0a 62 |ohere, -|1); }..b|
|00004380| 69 62 69 28 6e 29 20 7b | 0a 20 63 61 6e 69 74 28 |ibi(n) {|. canit(|
|00004390| 29 3b 20 6d 6f 64 65 28 | 30 29 3b 0a 20 66 70 72 |); mode(|0);. fpr|
|000043a0| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 6d 69 |intf(std|err, "mi|
|000043b0| 6e 69 72 62 3a 20 63 61 | 75 67 68 74 20 73 69 67 |nirb: ca|ught sig|
|000043c0| 6e 61 6c 20 25 64 3b 20 | 65 78 69 74 69 6e 67 22 |nal %d; |exiting"|
|000043d0| 2c 20 6e 29 3b 0a 20 65 | 78 69 74 28 31 32 38 2b |, n);. e|xit(128+|
|000043e0| 6e 29 3b 0a 7d 0a 0a 6d | 6f 64 65 28 6e 29 20 7b |n);.}..m|ode(n) {|
|000043f0| 0a 20 69 66 20 28 6e 29 | 20 73 79 73 74 65 6d 28 |. if (n)| system(|
|00004400| 22 73 74 74 79 20 72 61 | 77 20 2d 65 63 68 6f 22 |"stty ra|w -echo"|
|00004410| 29 3b 0a 20 65 6c 73 65 | 20 73 79 73 74 65 6d 28 |);. else| system(|
|00004420| 22 73 74 74 79 20 65 63 | 68 6f 20 2d 72 61 77 22 |"stty ec|ho -raw"|
|00004430| 29 3b 0a 7d 0a 0a 6d 61 | 69 6e 28 29 20 7b 0a 20 |);.}..ma|in() {. |
|00004440| 6d 6f 64 65 28 31 29 3b | 0a 20 69 66 20 28 73 69 |mode(1);|. if (si|
|00004450| 67 6e 61 6c 28 53 49 47 | 49 4e 54 2c 20 62 69 62 |gnal(SIG|INT, bib|
|00004460| 69 29 20 3d 3d 20 53 49 | 47 5f 49 47 4e 29 20 7b |i) == SI|G_IGN) {|
|00004470| 0a 20 20 73 69 67 6e 61 | 6c 28 53 49 47 49 4e 54 |. signa|l(SIGINT|
|00004480| 2c 20 53 49 47 5f 49 47 | 4e 29 3b 20 73 69 67 6e |, SIG_IG|N); sign|
|00004490| 61 6c 28 53 49 47 4b 49 | 4c 4c 2c 20 53 49 47 5f |al(SIGKI|LL, SIG_|
|000044a0| 49 47 4e 29 3b 0a 20 7d | 20 65 6c 73 65 20 7b 0a |IGN);. }| else {.|
|000044b0| 20 20 73 69 67 6e 61 6c | 28 53 49 47 49 4e 54 2c | signal|(SIGINT,|
|000044c0| 20 62 69 62 69 29 3b 20 | 73 69 67 6e 61 6c 28 53 | bibi); |signal(S|
|000044d0| 49 47 4b 49 4c 4c 2c 20 | 62 69 62 69 29 3b 0a 20 |IGKILL, |bibi);. |
|000044e0| 7d 0a 20 70 72 69 6e 74 | 66 28 22 6d 69 6e 69 72 |}. print|f("minir|
|000044f0| 62 3a 20 4e 6f 77 20 73 | 65 6e 64 20 66 69 6c 65 |b: Now s|end file|
|00004500| 28 73 29 20 77 69 74 68 | 20 5c 30 34 32 73 62 20 |(s) with| \042sb |
|00004510| 66 69 6c 65 20 2e 2e 2e | 5c 30 34 32 20 63 6f 6d |file ...|\042 com|
|00004520| 6d 61 6e 64 5c 72 5c 6e | 22 29 3b 0a 0a 20 69 66 |mand\r\n|");.. if|
|00004530| 20 28 77 63 72 65 63 65 | 69 76 65 28 29 3d 3d 45 | (wcrece|ive()==E|
|00004540| 52 52 4f 52 29 0a 20 20 | 63 61 6e 69 74 28 29 3b |RROR). |canit();|
|00004550| 0a 20 6d 6f 64 65 28 30 | 29 3b 20 65 78 69 74 28 |. mode(0|); exit(|
|00004560| 30 29 3b 0a 7d 0a 0a 77 | 63 72 65 63 65 69 76 65 |0);.}..w|creceive|
|00004570| 28 29 20 7b 0a 20 66 6f | 72 20 28 3b 3b 29 20 7b |() {. fo|r (;;) {|
|00004580| 0a 20 20 69 66 20 28 77 | 63 72 78 70 6e 28 73 65 |. if (w|crxpn(se|
|00004590| 63 62 75 66 29 20 3d 3d | 20 45 52 52 4f 52 29 20 |cbuf) ==| ERROR) |
|000045a0| 62 72 65 61 6b 3b 0a 20 | 20 69 66 20 28 73 65 63 |break;. | if (sec|
|000045b0| 62 75 66 5b 30 5d 3d 3d | 30 29 20 72 65 74 75 72 |buf[0]==|0) retur|
|000045c0| 6e 20 4f 4b 3b 0a 20 20 | 69 66 20 28 70 72 6f 63 |n OK;. |if (proc|
|000045d0| 68 65 61 64 65 72 28 73 | 65 63 62 75 66 29 3d 3d |header(s|ecbuf)==|
|000045e0| 45 52 52 4f 52 20 7c 7c | 20 77 63 72 78 28 29 3d |ERROR ||| wcrx()=|
|000045f0| 3d 45 52 52 4f 52 29 20 | 62 72 65 61 6b 3b 0a 20 |=ERROR) |break;. |
|00004600| 7d 0a 20 63 61 6e 69 74 | 28 29 3b 20 72 65 74 75 |}. canit|(); retu|
|00004610| 72 6e 20 45 52 52 4f 52 | 3b 0a 7d 0a 0a 0a 77 63 |rn ERROR|;.}...wc|
|00004620| 72 78 70 6e 28 72 70 6e | 29 20 63 68 61 72 20 2a |rxpn(rpn|) char *|
|00004630| 72 70 6e 3b 20 7b 0a 20 | 72 65 67 69 73 74 65 72 |rpn; {. |register|
|00004640| 20 63 3b 0a 0a 20 70 75 | 72 67 65 6c 69 6e 65 28 | c;.. pu|rgeline(|
|00004650| 29 3b 0a 65 74 5f 74 75 | 3a 0a 20 73 65 6e 64 6c |);.et_tu|:. sendl|
|00004660| 69 6e 65 28 4e 41 4b 29 | 3b 20 4c 6c 65 66 74 3d |ine(NAK)|; Lleft=|
|00004670| 30 3b 0a 20 77 68 69 6c | 65 20 28 28 63 20 3d 20 |0;. whil|e ((c = |
|00004680| 77 63 67 65 74 73 65 63 | 28 72 70 6e 2c 20 31 30 |wcgetsec|(rpn, 10|
|00004690| 30 29 29 20 21 3d 20 30 | 29 20 7b 0a 20 20 69 66 |0)) != 0|) {. if|
|000046a0| 20 28 63 20 3d 3d 20 57 | 43 45 4f 54 29 20 7b 20 | (c == W|CEOT) { |
|000046b0| 73 65 6e 64 6c 69 6e 65 | 28 41 43 4b 29 3b 20 4c |sendline|(ACK); L|
|000046c0| 6c 65 66 74 3d 30 3b 20 | 72 65 61 64 6c 69 6e 65 |left=0; |readline|
|000046d0| 28 31 29 3b 20 67 6f 74 | 6f 20 65 74 5f 74 75 3b |(1); got|o et_tu;|
|000046e0| 20 7d 0a 20 20 72 65 74 | 75 72 6e 20 45 52 52 4f | }. ret|urn ERRO|
|000046f0| 52 3b 0a 20 7d 0a 20 73 | 65 6e 64 6c 69 6e 65 28 |R;. }. s|endline(|
|00004700| 41 43 4b 29 3b 20 72 65 | 74 75 72 6e 20 4f 4b 3b |ACK); re|turn OK;|
|00004710| 0a 7d 0a 0a 77 63 72 78 | 28 29 20 7b 0a 20 72 65 |.}..wcrx|() {. re|
|00004720| 67 69 73 74 65 72 20 69 | 6e 74 20 73 65 63 74 6e |gister i|nt sectn|
|00004730| 75 6d 2c 20 73 65 63 74 | 63 75 72 72 2c 20 73 65 |um, sect|curr, se|
|00004740| 6e 64 63 68 61 72 2c 20 | 63 62 6c 6b 6c 65 6e 3b |ndchar, |cblklen;|
|00004750| 0a 0a 20 73 65 63 74 6e | 75 6d 3d 30 3b 20 73 65 |.. sectn|um=0; se|
|00004760| 6e 64 63 68 61 72 3d 4e | 41 4b 3b 0a 20 66 6f 72 |ndchar=N|AK;. for|
|00004770| 20 28 3b 3b 29 20 7b 0a | 20 20 73 65 6e 64 6c 69 | (;;) {.| sendli|
|00004780| 6e 65 28 73 65 6e 64 63 | 68 61 72 29 3b 20 4c 6c |ne(sendc|har); Ll|
|00004790| 65 66 74 3d 30 3b 0a 20 | 20 73 65 63 74 63 75 72 |eft=0;. | sectcur|
|000047a0| 72 3d 77 63 67 65 74 73 | 65 63 28 73 65 63 62 75 |r=wcgets|ec(secbu|
|000047b0| 66 2c 20 35 30 29 3b 0a | 20 20 69 66 20 28 73 65 |f, 50);.| if (se|
|000047c0| 63 74 63 75 72 72 3d 3d | 28 73 65 63 74 6e 75 6d |ctcurr==|(sectnum|
|000047d0| 2b 31 20 26 20 30 33 37 | 37 29 29 20 7b 0a 20 20 |+1 & 037|7)) {. |
|000047e0| 20 73 65 63 74 6e 75 6d | 2b 2b 3b 20 63 62 6c 6b | sectnum|++; cblk|
|000047f0| 6c 65 6e 20 3d 20 42 79 | 74 65 73 6c 65 66 74 3e |len = By|tesleft>|
|00004800| 42 6c 6b 6c 65 6e 20 3f | 20 42 6c 6b 6c 65 6e 3a |Blklen ?| Blklen:|
|00004810| 42 79 74 65 73 6c 65 66 | 74 3b 0a 20 20 20 70 75 |Byteslef|t;. pu|
|00004820| 74 73 65 63 28 73 65 63 | 62 75 66 2c 20 63 62 6c |tsec(sec|buf, cbl|
|00004830| 6b 6c 65 6e 29 3b 0a 20 | 20 20 69 66 20 28 28 42 |klen);. | if ((B|
|00004840| 79 74 65 73 6c 65 66 74 | 2d 3d 63 62 6c 6b 6c 65 |ytesleft|-=cblkle|
|00004850| 6e 29 20 3c 20 30 29 20 | 42 79 74 65 73 6c 65 66 |n) < 0) |Byteslef|
|00004860| 74 20 3d 20 30 3b 0a 20 | 20 20 73 65 6e 64 63 68 |t = 0;. | sendch|
|00004870| 61 72 3d 41 43 4b 3b 0a | 20 20 7d 0a 20 20 65 6c |ar=ACK;.| }. el|
|00004880| 73 65 20 69 66 20 28 73 | 65 63 74 63 75 72 72 3d |se if (s|ectcurr=|
|00004890| 3d 28 73 65 63 74 6e 75 | 6d 26 30 33 37 37 29 29 |=(sectnu|m&0377))|
|000048a0| 20 73 65 6e 64 63 68 61 | 72 3d 41 43 4b 3b 0a 20 | sendcha|r=ACK;. |
|000048b0| 20 65 6c 73 65 20 69 66 | 20 28 73 65 63 74 63 75 | else if| (sectcu|
|000048c0| 72 72 3d 3d 57 43 45 4f | 54 29 20 7b 0a 20 20 20 |rr==WCEO|T) {. |
|000048d0| 69 66 20 28 66 63 6c 6f | 73 65 28 66 6f 75 74 29 |if (fclo|se(fout)|
|000048e0| 3d 3d 45 52 52 4f 52 29 | 20 72 65 74 75 72 6e 20 |==ERROR)| return |
|000048f0| 45 52 52 4f 52 3b 0a 20 | 20 20 73 65 6e 64 6c 69 |ERROR;. | sendli|
|00004900| 6e 65 28 41 43 4b 29 3b | 20 4c 6c 65 66 74 3d 30 |ne(ACK);| Lleft=0|
|00004910| 3b 20 72 65 74 75 72 6e | 20 4f 4b 3b 0a 20 20 7d |; return| OK;. }|
|00004920| 0a 20 20 65 6c 73 65 20 | 69 66 20 28 73 65 63 74 |. else |if (sect|
|00004930| 63 75 72 72 3d 3d 45 52 | 52 4f 52 29 20 72 65 74 |curr==ER|ROR) ret|
|00004940| 75 72 6e 20 45 52 52 4f | 52 3b 0a 20 20 65 6c 73 |urn ERRO|R;. els|
|00004950| 65 20 72 65 74 75 72 6e | 20 45 52 52 4f 52 3b 0a |e return| ERROR;.|
|00004960| 20 7d 0a 7d 0a 0a 77 63 | 67 65 74 73 65 63 28 72 | }.}..wc|getsec(r|
|00004970| 78 62 75 66 2c 20 6d 61 | 78 74 69 6d 65 29 20 63 |xbuf, ma|xtime) c|
|00004980| 68 61 72 20 2a 72 78 62 | 75 66 3b 20 69 6e 74 20 |har *rxb|uf; int |
|00004990| 6d 61 78 74 69 6d 65 3b | 20 7b 0a 20 72 65 67 69 |maxtime;| {. regi|
|000049a0| 73 74 65 72 20 63 68 65 | 63 6b 73 75 6d 2c 20 77 |ster che|cksum, w|
|000049b0| 63 6a 2c 20 66 69 72 73 | 74 63 68 3b 20 72 65 67 |cj, firs|tch; reg|
|000049c0| 69 73 74 65 72 20 63 68 | 61 72 20 2a 70 3b 20 69 |ister ch|ar *p; i|
|000049d0| 6e 74 20 73 65 63 74 63 | 75 72 72 2c 20 65 72 72 |nt sectc|urr, err|
|000049e0| 6f 72 73 3b 0a 20 66 6f | 72 20 28 65 72 72 6f 72 |ors;. fo|r (error|
|000049f0| 73 3d 30 3b 20 65 72 72 | 6f 72 73 3c 52 45 54 52 |s=0; err|ors<RETR|
|00004a00| 59 4d 41 58 3b 20 65 72 | 72 6f 72 73 2b 2b 29 20 |YMAX; er|rors++) |
|00004a10| 7b 0a 20 20 69 66 20 28 | 28 66 69 72 73 74 63 68 |{. if (|(firstch|
|00004a20| 3d 72 65 61 64 6c 69 6e | 65 28 6d 61 78 74 69 6d |=readlin|e(maxtim|
|00004a30| 65 29 29 3d 3d 53 54 58 | 29 20 7b 20 42 6c 6b 6c |e))==STX|) { Blkl|
|00004a40| 65 6e 3d 31 30 32 34 3b | 20 67 6f 74 6f 20 67 65 |en=1024;| goto ge|
|00004a50| 74 32 3b 20 7d 0a 20 20 | 69 66 20 28 66 69 72 73 |t2; }. |if (firs|
|00004a60| 74 63 68 3d 3d 53 4f 48 | 29 20 7b 0a 20 20 20 42 |tch==SOH|) {. B|
|00004a70| 6c 6b 6c 65 6e 3d 31 32 | 38 3b 0a 67 65 74 32 3a |lklen=12|8;.get2:|
|00004a80| 0a 20 20 20 73 65 63 74 | 63 75 72 72 3d 72 65 61 |. sect|curr=rea|
|00004a90| 64 6c 69 6e 65 28 31 29 | 3b 20 63 68 65 63 6b 73 |dline(1)|; checks|
|00004aa0| 75 6d 3d 30 3b 0a 20 20 | 20 69 66 20 28 28 73 65 |um=0;. | if ((se|
|00004ab0| 63 74 63 75 72 72 2b 28 | 72 65 61 64 6c 69 6e 65 |ctcurr+(|readline|
|00004ac0| 28 31 29 29 29 3d 3d 30 | 33 37 37 29 20 7b 0a 20 |(1)))==0|377) {. |
|00004ad0| 20 20 20 66 6f 72 20 28 | 70 3d 72 78 62 75 66 2c | for (|p=rxbuf,|
|00004ae0| 77 63 6a 3d 42 6c 6b 6c | 65 6e 3b 20 2d 2d 77 63 |wcj=Blkl|en; --wc|
|00004af0| 6a 3e 3d 30 3b 20 29 20 | 7b 0a 20 20 20 20 20 69 |j>=0; ) |{. i|
|00004b00| 66 20 28 28 66 69 72 73 | 74 63 68 3d 72 65 61 64 |f ((firs|tch=read|
|00004b10| 6c 69 6e 65 28 31 29 29 | 20 3c 20 30 29 20 67 6f |line(1))| < 0) go|
|00004b20| 74 6f 20 62 69 6c 67 65 | 3b 0a 20 20 20 20 20 63 |to bilge|;. c|
|00004b30| 68 65 63 6b 73 75 6d 20 | 2b 3d 20 28 2a 70 2b 2b |hecksum |+= (*p++|
|00004b40| 20 3d 20 66 69 72 73 74 | 63 68 29 3b 0a 20 20 20 | = first|ch);. |
|00004b50| 20 7d 0a 20 20 20 20 69 | 66 20 28 28 66 69 72 73 | }. i|f ((firs|
|00004b60| 74 63 68 3d 72 65 61 64 | 6c 69 6e 65 28 31 29 29 |tch=read|line(1))|
|00004b70| 20 3c 20 30 29 20 67 6f | 74 6f 20 62 69 6c 67 65 | < 0) go|to bilge|
|00004b80| 3b 0a 20 20 20 20 69 66 | 20 28 28 28 63 68 65 63 |;. if| (((chec|
|00004b90| 6b 73 75 6d 2d 66 69 72 | 73 74 63 68 29 26 30 33 |ksum-fir|stch)&03|
|00004ba0| 37 37 29 3d 3d 30 29 20 | 72 65 74 75 72 6e 20 73 |77)==0) |return s|
|00004bb0| 65 63 74 63 75 72 72 3b | 0a 20 20 20 7d 0a 20 20 |ectcurr;|. }. |
|00004bc0| 7d 0a 20 20 65 6c 73 65 | 20 69 66 20 28 66 69 72 |}. else| if (fir|
|00004bd0| 73 74 63 68 3d 3d 45 4f | 54 29 20 72 65 74 75 72 |stch==EO|T) retur|
|00004be0| 6e 20 57 43 45 4f 54 3b | 0a 20 20 65 6c 73 65 20 |n WCEOT;|. else |
|00004bf0| 69 66 20 28 66 69 72 73 | 74 63 68 3d 3d 43 41 4e |if (firs|tch==CAN|
|00004c00| 29 20 72 65 74 75 72 6e | 20 45 52 52 4f 52 3b 0a |) return| ERROR;.|
|00004c10| 62 69 6c 67 65 3a 0a 20 | 20 77 68 69 6c 65 28 72 |bilge:. | while(r|
|00004c20| 65 61 64 6c 69 6e 65 28 | 31 29 21 3d 54 49 4d 45 |eadline(|1)!=TIME|
|00004c30| 4f 55 54 29 0a 20 20 20 | 3b 0a 20 20 6d 61 78 74 |OUT). |;. maxt|
|00004c40| 69 6d 65 3d 34 30 3b 20 | 73 65 6e 64 6c 69 6e 65 |ime=40; |sendline|
|00004c50| 28 4e 41 4b 29 3b 20 4c | 6c 65 66 74 3d 30 3b 0a |(NAK); L|left=0;.|
|00004c60| 20 7d 0a 20 63 61 6e 69 | 74 28 29 3b 20 72 65 74 | }. cani|t(); ret|
|00004c70| 75 72 6e 20 45 52 52 4f | 52 3b 0a 7d 0a 0a 72 65 |urn ERRO|R;.}..re|
|00004c80| 61 64 6c 69 6e 65 28 74 | 69 6d 65 6f 75 74 29 20 |adline(t|imeout) |
|00004c90| 69 6e 74 20 74 69 6d 65 | 6f 75 74 3b 20 7b 0a 20 |int time|out; {. |
|00004ca0| 72 65 67 69 73 74 65 72 | 20 6e 3b 20 73 74 61 74 |register| n; stat|
|00004cb0| 69 63 20 63 68 61 72 20 | 2a 63 64 71 3b 0a 0a 20 |ic char |*cdq;.. |
|00004cc0| 69 66 20 28 2d 2d 4c 6c | 65 66 74 20 3e 3d 20 30 |if (--Ll|eft >= 0|
|00004cd0| 29 20 72 65 74 75 72 6e | 20 28 2a 63 64 71 2b 2b |) return| (*cdq++|
|00004ce0| 20 26 20 30 33 37 37 29 | 3b 0a 20 6e 20 3d 20 74 | & 0377)|;. n = t|
|00004cf0| 69 6d 65 6f 75 74 2f 31 | 30 3b 0a 20 69 66 20 28 |imeout/1|0;. if (|
|00004d00| 6e 20 3c 20 32 29 20 6e | 20 3d 20 33 3b 0a 20 69 |n < 2) n| = 3;. i|
|00004d10| 66 20 28 73 65 74 6a 6d | 70 28 74 6f 68 65 72 65 |f (setjm|p(tohere|
|00004d20| 29 29 20 7b 20 4c 6c 65 | 66 74 20 3d 20 30 3b 20 |)) { Lle|ft = 0; |
|00004d30| 72 65 74 75 72 6e 20 54 | 49 4d 45 4f 55 54 3b 20 |return T|IMEOUT; |
|00004d40| 7d 0a 20 73 69 67 6e 61 | 6c 28 53 49 47 41 4c 52 |}. signa|l(SIGALR|
|00004d50| 4d 2c 20 61 6c 72 6d 29 | 3b 20 61 6c 61 72 6d 28 |M, alrm)|; alarm(|
|00004d60| 6e 29 3b 0a 20 4c 6c 65 | 66 74 3d 72 65 61 64 28 |n);. Lle|ft=read(|
|00004d70| 30 2c 20 63 64 71 3d 6c | 69 6e 62 75 66 2c 20 31 |0, cdq=l|inbuf, 1|
|00004d80| 30 32 34 29 3b 20 61 6c | 61 72 6d 28 30 29 3b 0a |024); al|arm(0);.|
|00004d90| 20 69 66 20 28 4c 6c 65 | 66 74 20 3c 20 31 29 20 | if (Lle|ft < 1) |
|00004da0| 72 65 74 75 72 6e 20 54 | 49 4d 45 4f 55 54 3b 0a |return T|IMEOUT;.|
|00004db0| 20 2d 2d 4c 6c 65 66 74 | 3b 20 72 65 74 75 72 6e | --Lleft|; return|
|00004dc0| 20 28 2a 63 64 71 2b 2b | 20 26 20 30 33 37 37 29 | (*cdq++| & 0377)|
|00004dd0| 3b 0a 7d 0a 0a 70 75 72 | 67 65 6c 69 6e 65 28 29 |;.}..pur|geline()|
|00004de0| 20 7b 20 4c 6c 65 66 74 | 20 3d 20 30 3b 20 6c 73 | { Lleft| = 0; ls|
|00004df0| 65 65 6b 28 30 2c 20 30 | 4c 2c 20 32 29 3b 20 7d |eek(0, 0|L, 2); }|
|00004e00| 0a 0a 0a 70 72 6f 63 68 | 65 61 64 65 72 28 6e 61 |...proch|eader(na|
|00004e10| 6d 65 29 20 63 68 61 72 | 20 2a 6e 61 6d 65 3b 20 |me) char| *name; |
|00004e20| 7b 0a 20 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |{. regis|ter char|
|00004e30| 20 2a 70 3b 0a 0a 20 42 | 79 74 65 73 6c 65 66 74 | *p;.. B|ytesleft|
|00004e40| 20 3d 20 32 30 30 30 30 | 30 30 30 30 30 4c 3b 20 | = 20000|00000L; |
|00004e50| 70 20 3d 20 6e 61 6d 65 | 20 2b 20 31 20 2b 20 73 |p = name| + 1 + s|
|00004e60| 74 72 6c 65 6e 28 6e 61 | 6d 65 29 3b 0a 20 69 66 |trlen(na|me);. if|
|00004e70| 20 28 2a 70 29 20 73 73 | 63 61 6e 66 28 70 2c 20 | (*p) ss|canf(p, |
|00004e80| 22 25 6c 64 22 2c 20 26 | 42 79 74 65 73 6c 65 66 |"%ld", &|Byteslef|
|00004e90| 74 29 3b 0a 20 69 66 20 | 28 28 66 6f 75 74 3d 66 |t);. if |((fout=f|
|00004ea0| 6f 70 65 6e 28 6e 61 6d | 65 2c 20 22 77 22 29 29 |open(nam|e, "w"))|
|00004eb0| 20 3d 3d 20 4e 55 4c 4c | 29 20 72 65 74 75 72 6e | == NULL|) return|
|00004ec0| 20 45 52 52 4f 52 3b 0a | 20 72 65 74 75 72 6e 20 | ERROR;.| return |
|00004ed0| 4f 4b 3b 0a 7d 0a 0a 70 | 75 74 73 65 63 28 70 2c |OK;.}..p|utsec(p,|
|00004ee0| 20 6e 29 20 63 68 61 72 | 20 2a 70 3b 20 69 6e 74 | n) char| *p; int|
|00004ef0| 20 6e 3b 0a 7b 20 66 6f | 72 20 28 3b 20 2d 2d 6e | n;.{ fo|r (; --n|
|00004f00| 3e 3d 30 3b 20 2b 2b 70 | 29 20 69 66 20 28 2a 70 |>=0; ++p|) if (*p|
|00004f10| 20 21 3d 20 30 31 35 20 | 26 26 20 2a 70 20 21 3d | != 015 |&& *p !=|
|00004f20| 20 30 33 32 29 20 70 75 | 74 63 28 2a 70 2c 20 66 | 032) pu|tc(*p, f|
|00004f30| 6f 75 74 29 3b 20 7d 0a | 0a 73 65 6e 64 6c 69 6e |out); }.|.sendlin|
|00004f40| 65 28 63 29 20 7b 20 63 | 68 61 72 20 64 3b 20 64 |e(c) { c|har d; d|
|00004f50| 20 3d 20 63 3b 20 77 72 | 69 74 65 28 31 2c 20 26 | = c; wr|ite(1, &|
|00004f60| 64 2c 20 31 29 3b 20 7d | 0a 0a 63 68 61 72 20 63 |d, 1); }|..char c|
|00004f70| 61 6e 69 73 74 72 5b 5d | 20 3d 20 7b 20 32 34 2c |anistr[]| = { 24,|
|00004f80| 32 34 2c 32 34 2c 32 34 | 2c 32 34 2c 32 34 2c 32 |24,24,24|,24,24,2|
|00004f90| 34 2c 32 34 2c 30 20 7d | 3b 0a 0a 63 61 6e 69 74 |4,24,0 }|;..canit|
|00004fa0| 28 29 20 7b 20 70 72 69 | 6e 74 66 28 63 61 6e 69 |() { pri|ntf(cani|
|00004fb0| 73 74 72 29 3b 20 4c 6c | 65 66 74 3d 30 3b 20 7d |str); Ll|eft=0; }|
|00004fc0| 0a 0a 2f 2a 20 45 4e 44 | 20 6f 66 20 6d 69 6e 69 |../* END| of mini|
|00004fd0| 72 62 2e 63 20 2a 2f 0a | 0a 66 2c 20 30 78 33 30 |rb.c */.|.f, 0x30|
|00004fe0| 62 35 66 66 65 39 2c 0a | 30 78 62 64 62 64 66 32 |b5ffe9,.|0xbdbdf2|
|00004ff0| 31 63 2c 20 30 78 63 61 | 62 61 63 32 38 61 2c 20 |1c, 0xca|bac28a, |
|00005000| 7a 6d 6f 64 65 6d 2f 6d | 69 6e 69 72 62 2e 31 00 |zmodem/m|inirb.1.|
|00005010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005040| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005050| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005060| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00005070| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00005080| 20 20 20 32 32 37 35 20 | 20 35 32 32 34 37 34 33 | 2275 | 5224743|
|00005090| 34 30 32 20 20 20 36 37 | 33 31 00 20 00 00 00 00 |402 67|31. ....|
|000050a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000050f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005100| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005110| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005120| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005130| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005140| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005150| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005170| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005180| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005190| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000051f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005200| 27 5c 22 20 52 65 76 69 | 73 69 6f 6e 20 4c 65 76 |'\" Revi|sion Lev|
|00005210| 65 6c 20 0a 27 5c 22 20 | 4c 61 73 74 20 44 65 6c |el .'\" |Last Del|
|00005220| 74 61 20 20 20 20 20 30 | 39 2d 30 38 2d 38 37 0a |ta 0|9-08-87.|
|00005230| 2e 54 48 20 4d 49 4e 49 | 52 42 20 31 20 4f 4d 45 |.TH MINI|RB 1 OME|
|00005240| 4e 0a 2e 53 48 20 4e 41 | 4d 45 0a 6d 69 6e 69 72 |N..SH NA|ME.minir|
|00005250| 62 20 5c 2d 20 42 6f 6f | 74 73 74 72 61 70 20 59 |b \- Boo|tstrap Y|
|00005260| 4d 4f 44 45 4d 20 42 61 | 74 63 68 20 66 69 6c 65 |MODEM Ba|tch file|
|00005270| 20 72 65 63 65 69 76 65 | 0a 2e 53 48 20 53 59 4e | receive|..SH SYN|
|00005280| 4f 50 53 49 53 0a 2e 42 | 20 6d 69 6e 69 72 62 0a |OPSIS..B| minirb.|
|00005290| 2e 53 48 20 44 45 53 43 | 52 49 50 54 49 4f 4e 0a |.SH DESC|RIPTION.|
|000052a0| 2e 49 20 4d 69 6e 69 72 | 62 0a 72 65 63 65 69 76 |.I Minir|b.receiv|
|000052b0| 65 73 20 6f 6e 65 20 6f | 72 20 6d 6f 72 65 20 66 |es one o|r more f|
|000052c0| 69 6c 65 73 20 77 69 74 | 68 20 59 4d 4f 44 45 4d |iles wit|h YMODEM|
|000052d0| 20 62 61 74 63 68 20 66 | 69 6c 65 20 74 72 61 6e | batch f|ile tran|
|000052e0| 73 66 65 72 20 70 72 6f | 74 6f 63 6f 6c 2e 0a 2e |sfer pro|tocol...|
|000052f0| 49 20 4d 69 6e 69 72 62 | 0a 77 61 73 20 64 65 76 |I Minirb|.was dev|
|00005300| 65 6c 6f 70 65 64 20 66 | 6f 72 20 75 73 65 20 61 |eloped f|or use a|
|00005310| 73 20 61 20 62 6f 6f 74 | 73 74 72 61 70 20 74 6f |s a boot|strap to|
|00005320| 20 73 69 6d 70 6c 69 66 | 79 20 75 70 6c 6f 61 64 | simplif|y upload|
|00005330| 69 6e 67 20 6f 66 20 74 | 68 65 20 6c 6f 6e 67 65 |ing of t|he longe|
|00005340| 72 0a 2e 49 20 72 7a 0a | 61 6e 64 0a 2e 49 20 73 |r..I rz.|and..I s|
|00005350| 7a 0a 70 72 6f 67 72 61 | 6d 73 2c 20 73 75 63 68 |z.progra|ms, such|
|00005360| 20 61 73 20 61 72 65 20 | 63 6f 6e 74 61 69 6e 65 | as are |containe|
|00005370| 64 20 69 6e 20 74 68 65 | 0a 2e 49 20 72 7a 73 7a |d in the|..I rzsz|
|00005380| 2e 7a 6f 6f 0a 22 7a 6f | 6f 22 20 61 72 63 68 69 |.zoo."zo|o" archi|
|00005390| 76 65 20 6f 72 20 74 68 | 65 0a 2e 49 20 72 7a 73 |ve or th|e..I rzs|
|000053a0| 7a 31 65 74 32 2e 73 68 | 0a 73 68 65 6c 6c 20 61 |z1et2.sh|.shell a|
|000053b0| 72 63 68 69 76 65 2e 0a | 2e 53 48 20 53 45 45 20 |rchive..|.SH SEE |
|000053c0| 41 4c 53 4f 0a 59 4d 4f | 44 45 4d 2e 44 4f 43 2c |ALSO.YMO|DEM.DOC,|
|000053d0| 0a 50 72 6f 66 65 73 73 | 69 6f 6e 61 6c 2d 59 41 |.Profess|ional-YA|
|000053e0| 4d 20 6d 61 6e 75 61 6c | 2c 0a 73 7a 28 6f 6d 65 |M manual|,.sz(ome|
|000053f0| 6e 29 0a 2e 53 48 20 4e | 4f 54 45 53 0a 54 68 65 |n)..SH N|OTES.The|
|00005400| 20 73 6f 75 72 63 65 20 | 66 69 6c 65 0a 2e 49 20 | source |file..I |
|00005410| 6d 69 6e 69 72 62 2e 63 | 0a 68 61 73 20 62 65 65 |minirb.c|.has bee|
|00005420| 6e 20 72 75 74 68 6c 65 | 73 73 6c 79 20 70 72 75 |n ruthle|ssly pru|
|00005430| 6e 65 64 20 74 6f 20 73 | 69 6d 70 6c 69 66 79 20 |ned to s|implify |
|00005440| 75 70 6c 6f 61 64 69 6e | 67 20 77 69 74 68 6f 75 |uploadin|g withou|
|00005450| 74 20 62 65 6e 65 66 69 | 74 20 6f 66 0a 61 6e 79 |t benefi|t of.any|
|00005460| 20 66 69 6c 65 20 74 72 | 61 6e 73 66 65 72 20 70 | file tr|ansfer p|
|00005470| 72 6f 74 6f 63 6f 6c 2e | 0a 44 6f 20 6e 6f 74 20 |rotocol.|.Do not |
|00005480| 72 65 66 6f 72 6d 61 74 | 20 6f 72 20 61 64 64 20 |reformat| or add |
|00005490| 74 61 62 73 20 74 6f 20 | 74 68 65 20 73 6f 75 72 |tabs to |the sour|
|000054a0| 63 65 20 66 69 6c 65 0a | 61 73 20 74 68 69 73 20 |ce file.|as this |
|000054b0| 77 6f 75 6c 64 20 63 6f | 6d 70 6c 69 63 61 74 65 |would co|mplicate|
|000054c0| 20 75 70 6c 6f 61 64 69 | 6e 67 2e 0a 0a 50 6c 65 | uploadi|ng...Ple|
|000054d0| 61 73 65 20 72 65 61 64 | 20 74 68 65 20 75 70 6c |ase read| the upl|
|000054e0| 6f 61 64 69 6e 67 20 73 | 75 67 67 65 73 74 69 6f |oading s|uggestio|
|000054f0| 6e 73 20 69 6e 20 74 68 | 65 20 63 68 61 70 74 65 |ns in th|e chapte|
|00005500| 72 0a 2e 49 20 22 46 69 | 6c 65 20 54 72 61 6e 73 |r..I "Fi|le Trans|
|00005510| 66 65 72 20 42 61 73 69 | 63 73 22 0a 69 6e 20 74 |fer Basi|cs".in t|
|00005520| 68 65 20 50 72 6f 66 65 | 73 73 69 6f 6e 61 6c 2d |he Profe|ssional-|
|00005530| 59 41 4d 20 6f 72 20 5a | 43 4f 4d 4d 20 75 73 65 |YAM or Z|COMM use|
|00005540| 72 27 73 20 6d 61 6e 75 | 61 6c 2e 0a 0a 2e 49 20 |r's manu|al....I |
|00005550| 4d 69 6e 69 72 62 0a 75 | 73 65 73 20 38 20 62 69 |Minirb.u|ses 8 bi|
|00005560| 74 20 63 68 65 63 6b 73 | 75 6d 20 77 68 69 63 68 |t checks|um which|
|00005570| 20 6d 61 79 20 6e 6f 74 | 20 62 65 20 63 6f 6d 70 | may not| be comp|
|00005580| 61 74 69 62 6c 65 20 77 | 69 74 68 20 73 6f 6d 65 |atible w|ith some|
|00005590| 20 70 72 6f 67 72 61 6d | 73 0a 63 6c 61 69 6d 69 | program|s.claimi|
|000055a0| 6e 67 20 74 6f 20 73 75 | 70 70 6f 72 74 20 59 4d |ng to su|pport YM|
|000055b0| 4f 44 45 4d 20 62 61 74 | 63 68 20 74 72 61 6e 73 |ODEM bat|ch trans|
|000055c0| 66 65 72 73 2e 0a 0a 2e | 49 20 4d 69 6e 69 72 62 |fers....|I Minirb|
|000055d0| 0a 75 73 65 73 20 74 68 | 65 0a 59 4d 4f 44 45 4d |.uses th|e.YMODEM|
|000055e0| 20 68 65 61 64 65 72 0a | 66 69 6c 65 20 6c 65 6e | header.|file len|
|000055f0| 67 74 68 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 0a |gth info|rmation.|
|00005600| 74 6f 20 61 76 6f 69 64 | 20 73 74 6f 72 69 6e 67 |to avoid| storing|
|00005610| 20 65 78 74 72 61 6e 65 | 6f 75 73 20 63 68 61 72 | extrane|ous char|
|00005620| 61 63 74 65 72 73 2e 0a | 2e 49 20 4d 69 6e 69 72 |acters..|.I Minir|
|00005630| 62 0a 64 65 6c 65 74 65 | 73 20 63 61 72 72 69 61 |b.delete|s carria|
|00005640| 67 65 20 72 65 74 75 72 | 6e 73 20 61 6e 64 20 43 |ge retur|ns and C|
|00005650| 50 4d 45 4f 46 20 28 5e | 5a 29 20 63 68 61 72 61 |PMEOF (^|Z) chara|
|00005660| 63 74 65 72 73 0a 65 6e | 63 6f 75 6e 74 65 72 65 |cters.en|countere|
|00005670| 64 20 69 6e 20 75 70 6c | 6f 61 64 65 64 20 66 69 |d in upl|oaded fi|
|00005680| 6c 65 73 2e 0a 0a 2e 49 | 20 4d 69 6e 69 72 62 0a |les....I| Minirb.|
|00005690| 63 61 6c 6c 73 20 73 74 | 74 79 28 31 29 20 74 6f |calls st|ty(1) to|
|000056a0| 20 73 65 74 20 61 6e 64 | 20 72 65 73 65 74 20 72 | set and| reset r|
|000056b0| 61 77 20 74 74 79 20 6d | 6f 64 65 2e 0a 4e 54 2c |aw tty m|ode..NT,|
|000056c0| 20 62 69 62 69 29 3b 20 | 73 69 67 6e 61 6c 28 53 | bibi); |signal(S|
|000056d0| 49 47 4b 49 4c 4c 2c 20 | 62 69 62 69 29 3b 0a 20 |IGKILL, |bibi);. |
|000056e0| 7d 0a 20 70 72 69 6e 74 | 66 28 22 6d 69 6e 69 72 |}. print|f("minir|
|000056f0| 62 3a 20 4e 6f 77 20 73 | 65 6e 64 20 66 69 6c 65 |b: Now s|end file|
|00005700| 28 73 29 20 77 69 74 68 | 20 5c 30 34 32 73 62 20 |(s) with| \042sb |
|00005710| 66 69 6c 65 20 2e 2e 2e | 5c 30 34 32 20 63 6f 6d |file ...|\042 com|
|00005720| 6d 61 6e 64 5c 72 5c 6e | 22 29 3b 0a 0a 20 69 66 |mand\r\n|");.. if|
|00005730| 20 28 77 63 72 65 63 65 | 69 76 65 28 29 3d 3d 45 | (wcrece|ive()==E|
|00005740| 52 52 4f 52 29 0a 20 20 | 63 61 6e 69 74 28 29 3b |RROR). |canit();|
|00005750| 0a 20 6d 6f 64 65 28 30 | 29 3b 20 65 78 69 74 28 |. mode(0|); exit(|
|00005760| 30 29 3b 0a 7d 0a 0a 77 | 63 72 65 63 65 69 76 65 |0);.}..w|creceive|
|00005770| 28 29 20 7b 0a 20 66 6f | 72 20 28 3b 3b 29 20 7b |() {. fo|r (;;) {|
|00005780| 0a 20 20 69 66 20 28 77 | 63 72 78 70 6e 28 73 65 |. if (w|crxpn(se|
|00005790| 63 62 75 66 29 20 3d 3d | 20 45 52 52 4f 52 29 20 |cbuf) ==| ERROR) |
|000057a0| 62 72 65 61 6b 3b 0a 20 | 20 69 66 20 28 73 65 63 |break;. | if (sec|
|000057b0| 62 75 66 5b 30 5d 3d 3d | 30 29 20 72 65 74 75 72 |buf[0]==|0) retur|
|000057c0| 6e 20 4f 4b 3b 0a 20 20 | 69 66 20 28 70 72 6f 63 |n OK;. |if (proc|
|000057d0| 68 65 61 64 65 72 28 73 | 65 63 62 75 66 29 3d 3d |header(s|ecbuf)==|
|000057e0| 45 52 52 4f 52 20 7c 7c | 20 77 63 72 78 28 29 3d |ERROR ||| wcrx()=|
|000057f0| 3d 45 52 52 4f 52 29 20 | 62 72 65 61 6b 3b 0a 20 |=ERROR) |break;. |
|00005800| 7a 6d 6f 64 65 6d 2f 72 | 7a 2e 31 00 00 00 00 00 |zmodem/r|z.1.....|
|00005810| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005820| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005860| 00 00 00 00 20 20 20 36 | 34 34 20 00 20 20 20 20 |.... 6|44 . |
|00005870| 36 32 20 00 20 20 20 20 | 32 35 20 00 20 20 20 20 |62 . |25 . |
|00005880| 20 20 31 35 32 30 34 20 | 20 35 32 32 34 37 34 33 | 15204 | 5224743|
|00005890| 34 31 33 20 20 20 36 31 | 32 32 00 20 00 00 00 00 |413 61|22. ....|
|000058a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000058f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005980| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005990| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000059f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a00| 27 5c 22 20 52 65 76 69 | 73 69 6f 6e 20 4c 65 76 |'\" Revi|sion Lev|
|00005a10| 65 6c 20 0a 27 5c 22 20 | 4c 61 73 74 20 44 65 6c |el .'\" |Last Del|
|00005a20| 74 61 20 20 20 20 20 30 | 35 2d 32 38 2d 38 37 0a |ta 0|5-28-87.|
|00005a30| 2e 54 48 20 52 5a 20 31 | 20 4f 4d 45 4e 0a 2e 53 |.TH RZ 1| OMEN..S|
|00005a40| 48 20 4e 41 4d 45 0a 72 | 78 2c 20 72 62 2c 20 72 |H NAME.r|x, rb, r|
|00005a50| 7a 20 5c 2d 20 58 4d 4f | 44 45 4d 2c 20 59 4d 4f |z \- XMO|DEM, YMO|
|00005a60| 44 45 4d 2c 20 5a 4d 4f | 44 45 4d 20 28 42 61 74 |DEM, ZMO|DEM (Bat|
|00005a70| 63 68 29 20 66 69 6c 65 | 20 72 65 63 65 69 76 65 |ch) file| receive|
|00005a80| 0a 2e 53 48 20 53 59 4e | 4f 50 53 49 53 0a 2e 42 |..SH SYN|OPSIS..B|
|00005a90| 20 72 7a 0a 2e 52 42 20 | 5b 5c 2d 20 22 5c 20 2b | rz..RB |[\- "\ +|
|00005aa0| 31 61 62 65 70 71 74 75 | 76 22 20 5d 0a 2e 62 72 |1abepqtu|v" ]..br|
|00005ab0| 0a 2e 42 20 72 62 0a 2e | 52 42 20 5b 5c 2d 20 22 |..B rb..|RB [\- "|
|00005ac0| 5c 20 2b 31 61 62 71 74 | 75 76 22 20 5d 0a 2e 62 |\ +1abqt|uv" ]..b|
|00005ad0| 72 0a 2e 42 20 72 7a 0a | 2e 52 42 20 5b 5c 2d 20 |r..B rz.|.RB [\- |
|00005ae0| 22 5c 20 31 61 62 63 65 | 71 74 75 76 22 20 5d 0a |"\ 1abce|qtuv" ].|
|00005af0| 2e 49 20 66 69 6c 65 0a | 2e 62 72 0a 2e 42 20 67 |.I file.|.br..B g|
|00005b00| 7a 0a 2e 49 20 22 66 69 | 6c 65 20 2e 2e 2e 22 0a |z..I "fi|le ...".|
|00005b10| 2e 62 72 0a 2e 52 42 20 | 5b 20 5c 2d 20 5d 5b 20 |.br..RB |[ \- ][ |
|00005b20| 76 20 5d 20 72 7a 43 4f | 4d 4d 41 4e 44 0a 2e 53 |v ] rzCO|MMAND..S|
|00005b30| 48 20 44 45 53 43 52 49 | 50 54 49 4f 4e 0a 54 68 |H DESCRI|PTION.Th|
|00005b40| 69 73 20 70 72 6f 67 72 | 61 6d 20 75 73 65 73 20 |is progr|am uses |
|00005b50| 65 72 72 6f 72 20 63 6f | 72 72 65 63 74 69 6e 67 |error co|rrecting|
|00005b60| 20 70 72 6f 74 6f 63 6f | 6c 20 74 6f 20 72 65 63 | protoco|l to rec|
|00005b70| 65 69 76 65 0a 66 69 6c | 65 73 20 6f 76 65 72 20 |eive.fil|es over |
|00005b80| 61 20 73 65 72 69 61 6c | 20 70 6f 72 74 20 66 72 |a serial| port fr|
|00005b90| 6f 6d 20 61 20 76 61 72 | 69 65 74 79 20 6f 66 20 |om a var|iety of |
|00005ba0| 70 72 6f 67 72 61 6d 73 | 20 72 75 6e 6e 69 6e 67 |programs| running|
|00005bb0| 20 75 6e 64 65 72 0a 50 | 43 2d 44 4f 53 2c 20 43 | under.P|C-DOS, C|
|00005bc0| 50 2f 4d 2c 0a 2e 53 4d | 20 55 6e 69 78 2c 0a 61 |P/M,..SM| Unix,.a|
|00005bd0| 6e 64 20 6f 74 68 65 72 | 20 6f 70 65 72 61 74 69 |nd other| operati|
|00005be0| 6e 67 20 73 79 73 74 65 | 6d 73 2e 0a 0a 54 68 65 |ng syste|ms...The|
|00005bf0| 20 66 69 72 73 74 20 66 | 6f 72 6d 20 6f 66 0a 2e | first f|orm of..|
|00005c00| 49 20 72 7a 0a 28 52 65 | 63 65 69 76 65 20 5a 4d |I rz.(Re|ceive ZM|
|00005c10| 4f 44 45 4d 29 0a 72 65 | 63 65 69 76 65 73 20 66 |ODEM).re|ceives f|
|00005c20| 69 6c 65 73 20 77 69 74 | 68 20 74 68 65 20 5a 4d |iles wit|h the ZM|
|00005c30| 4f 44 45 4d 20 62 61 74 | 63 68 20 70 72 6f 74 6f |ODEM bat|ch proto|
|00005c40| 63 6f 6c 2e 0a 49 66 20 | 74 68 65 20 73 65 6e 64 |col..If |the send|
|00005c50| 69 6e 67 20 70 72 6f 67 | 72 61 6d 20 64 6f 65 73 |ing prog|ram does|
|00005c60| 20 6e 6f 74 20 73 75 70 | 70 6f 72 74 20 5a 4d 4f | not sup|port ZMO|
|00005c70| 44 45 4d 2c 0a 2e 49 20 | 72 7a 0a 73 74 65 70 73 |DEM,..I |rz.steps|
|00005c80| 20 64 6f 77 6e 20 74 6f | 20 59 4d 4f 44 45 4d 20 | down to| YMODEM |
|00005c90| 70 72 6f 74 6f 63 6f 6c | 0a 61 66 74 65 72 20 35 |protocol|.after 5|
|00005ca0| 30 20 73 65 63 6f 6e 64 | 73 2e 0a 54 68 69 73 20 |0 second|s..This |
|00005cb0| 64 65 6c 61 79 20 63 61 | 6e 20 62 65 20 65 6c 69 |delay ca|n be eli|
|00005cc0| 6d 69 6e 61 74 65 64 20 | 62 79 20 69 6e 76 6f 6b |minated |by invok|
|00005cd0| 69 6e 67 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ing the |program |
|00005ce0| 61 73 0a 2e 49 20 72 62 | 20 2e 0a 0a 57 68 65 6e |as..I rb| ...When|
|00005cf0| 20 72 65 63 65 69 76 69 | 6e 67 20 77 69 74 68 20 | receivi|ng with |
|00005d00| 58 4d 4f 44 45 4d 20 6f | 72 20 59 4d 4f 44 45 4d |XMODEM o|r YMODEM|
|00005d10| 2c 0a 2e 49 20 52 7a 0a | 61 63 63 65 70 74 73 20 |,..I Rz.|accepts |
|00005d20| 65 69 74 68 65 72 20 73 | 74 61 6e 64 61 72 64 20 |either s|tandard |
|00005d30| 31 32 38 20 62 79 74 65 | 20 73 65 63 74 6f 72 73 |128 byte| sectors|
|00005d40| 20 6f 72 0a 31 30 32 34 | 20 62 79 74 65 20 73 65 | or.1024| byte se|
|00005d50| 63 74 6f 72 73 0a 28 59 | 41 4d 0a 2e 42 20 2d 6b |ctors.(Y|AM..B -k|
|00005d60| 0a 6f 70 74 69 6f 6e 29 | 2e 0a 54 68 65 20 75 73 |.option)|..The us|
|00005d70| 65 72 20 73 68 6f 75 6c | 64 20 64 65 74 65 72 6d |er shoul|d determ|
|00005d80| 69 6e 65 20 77 68 65 6e | 0a 74 68 65 20 6c 6f 6e |ine when|.the lon|
|00005d90| 67 65 72 20 62 6c 6f 63 | 6b 20 6c 65 6e 67 74 68 |ger bloc|k length|
|00005da0| 0a 61 63 74 75 61 6c 6c | 79 20 69 6d 70 72 6f 76 |.actuall|y improv|
|00005db0| 65 73 20 74 68 72 6f 75 | 67 68 70 75 74 20 77 69 |es throu|ghput wi|
|00005dc0| 74 68 6f 75 74 20 63 61 | 75 73 69 6e 67 20 70 72 |thout ca|using pr|
|00005dd0| 6f 62 6c 65 6d 73 2e 0a | 0a 49 66 20 65 78 74 65 |oblems..|.If exte|
|00005de0| 6e 64 65 64 20 66 69 6c | 65 20 69 6e 66 6f 72 6d |nded fil|e inform|
|00005df0| 61 74 69 6f 6e 20 28 66 | 69 6c 65 20 6c 65 6e 67 |ation (f|ile leng|
|00005e00| 74 68 2c 20 65 74 63 2e | 29 0a 69 73 20 72 65 63 |th, etc.|).is rec|
|00005e10| 65 69 76 65 64 2c 0a 74 | 68 65 20 66 69 6c 65 20 |eived,.t|he file |
|00005e20| 6c 65 6e 67 74 68 20 63 | 6f 6e 74 72 6f 6c 73 20 |length c|ontrols |
|00005e30| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 62 79 |the numb|er of by|
|00005e40| 74 65 73 20 77 72 69 74 | 74 65 6e 20 74 6f 0a 74 |tes writ|ten to.t|
|00005e50| 68 65 20 6f 75 74 70 75 | 74 20 64 61 74 61 73 65 |he outpu|t datase|
|00005e60| 74 20 28 59 4d 4f 44 45 | 4d 20 6f 6e 6c 79 29 2c |t (YMODE|M only),|
|00005e70| 0a 61 6e 64 20 74 68 65 | 20 6d 6f 64 69 66 79 20 |.and the| modify |
|00005e80| 74 69 6d 65 20 61 6e 64 | 20 66 69 6c 65 20 6d 6f |time and| file mo|
|00005e90| 64 65 0a 28 69 66 66 20 | 6e 6f 6e 20 7a 65 72 6f |de.(iff |non zero|
|00005ea0| 29 0a 61 72 65 20 73 65 | 74 20 61 63 63 6f 72 64 |).are se|t accord|
|00005eb0| 69 6e 67 6c 79 2e 0a 0a | 49 66 20 6e 6f 20 65 78 |ingly...|If no ex|
|00005ec0| 74 65 6e 64 65 64 20 66 | 69 6c 65 20 69 6e 66 6f |tended f|ile info|
|00005ed0| 72 6d 61 74 69 6f 6e 20 | 69 73 20 72 65 63 65 69 |rmation |is recei|
|00005ee0| 76 65 64 2c 0a 73 6c 61 | 73 68 65 73 20 69 6e 20 |ved,.sla|shes in |
|00005ef0| 74 68 65 20 70 61 74 68 | 6e 61 6d 65 20 61 72 65 |the path|name are|
|00005f00| 20 63 68 61 6e 67 65 64 | 20 74 6f 20 75 6e 64 65 | changed| to unde|
|00005f10| 72 73 63 6f 72 65 2c 0a | 61 6e 64 20 61 6e 79 20 |rscore,.|and any |
|00005f20| 74 72 61 69 6c 69 6e 67 | 20 70 65 72 69 6f 64 20 |trailing| period |
|00005f30| 69 6e 20 74 68 65 20 70 | 61 74 68 6e 61 6d 65 20 |in the p|athname |
|00005f40| 69 73 20 65 6c 69 6d 69 | 6e 61 74 65 64 2e 0a 54 |is elimi|nated..T|
|00005f50| 68 69 73 20 63 6f 6e 76 | 65 72 73 69 6f 6e 20 69 |his conv|ersion i|
|00005f60| 73 20 75 73 65 66 75 6c | 20 66 6f 72 20 66 69 6c |s useful| for fil|
|00005f70| 65 73 20 72 65 63 65 69 | 76 65 64 20 66 72 6f 6d |es recei|ved from|
|00005f80| 20 43 50 2f 4d 20 73 79 | 73 74 65 6d 73 2e 0a 57 | CP/M sy|stems..W|
|00005f90| 69 74 68 20 59 4d 4f 44 | 45 4d 2c 20 65 61 63 68 |ith YMOD|EM, each|
|00005fa0| 20 66 69 6c 65 20 6e 61 | 6d 65 20 69 73 20 63 6f | file na|me is co|
|00005fb0| 6e 76 65 72 74 65 64 20 | 74 6f 20 6c 6f 77 65 72 |nverted |to lower|
|00005fc0| 20 63 61 73 65 0a 75 6e | 6c 65 73 73 20 69 74 20 | case.un|less it |
|00005fd0| 63 6f 6e 74 61 69 6e 73 | 20 6f 6e 65 20 6f 72 20 |contains| one or |
|00005fe0| 6d 6f 72 65 20 6c 6f 77 | 65 72 20 63 61 73 65 20 |more low|er case |
|00005ff0| 6c 65 74 74 65 72 73 2e | 0a 0a 0a 54 68 65 20 73 |letters.|...The s|
|00006000| 65 63 6f 6e 64 20 66 6f | 72 6d 20 6f 66 0a 2e 49 |econd fo|rm of..I|
|00006010| 20 72 7a 0a 72 65 63 65 | 69 76 65 73 20 61 20 73 | rz.rece|ives a s|
|00006020| 69 6e 67 6c 65 0a 2e 49 | 20 66 69 6c 65 0a 77 69 |ingle..I| file.wi|
|00006030| 74 68 20 58 4d 4f 44 45 | 4d 20 70 72 6f 74 6f 63 |th XMODE|M protoc|
|00006040| 6f 6c 2e 0a 54 68 65 20 | 75 73 65 72 20 6d 75 73 |ol..The |user mus|
|00006050| 74 20 73 75 70 70 6c 79 | 20 74 68 65 20 66 69 6c |t supply| the fil|
|00006060| 65 20 6e 61 6d 65 20 74 | 6f 20 62 6f 74 68 20 73 |e name t|o both s|
|00006070| 65 6e 64 69 6e 67 20 61 | 6e 64 20 72 65 63 65 69 |ending a|nd recei|
|00006080| 76 69 6e 67 20 70 72 6f | 67 72 61 6d 73 2e 0a 0a |ving pro|grams...|
|00006090| 2e 49 20 47 7a 0a 69 73 | 20 61 20 73 68 65 6c 6c |.I Gz.is| a shell|
|000060a0| 20 73 63 72 69 70 74 20 | 77 68 69 63 68 20 63 61 | script |which ca|
|000060b0| 6c 6c 73 0a 2e 49 20 73 | 7a 0a 74 6f 20 63 6f 6d |lls..I s|z.to com|
|000060c0| 6d 61 6e 64 20 50 72 6f | 2d 59 41 4d 20 6f 72 20 |mand Pro|-YAM or |
|000060d0| 5a 43 4f 4d 4d 20 74 6f | 20 74 72 61 6e 73 6d 69 |ZCOMM to| transmi|
|000060e0| 74 20 74 68 65 20 73 70 | 65 63 69 66 69 65 64 20 |t the sp|ecified |
|000060f0| 66 69 6c 65 73 2e 0a 50 | 61 74 68 6e 61 6d 65 73 |files..P|athnames|
|00006100| 20 75 73 65 64 20 77 69 | 74 68 0a 2e 49 20 67 7a | used wi|th..I gz|
|00006110| 0a 6d 75 73 74 20 62 65 | 20 65 73 63 61 70 65 64 |.must be| escaped|
|00006120| 20 69 66 20 74 68 65 79 | 20 68 61 76 65 20 73 70 | if they| have sp|
|00006130| 65 63 69 61 6c 20 73 69 | 67 6e 69 66 69 63 61 6e |ecial si|gnifican|
|00006140| 63 65 20 74 6f 20 74 68 | 65 20 55 6e 69 78 20 73 |ce to th|e Unix s|
|00006150| 68 65 6c 6c 2e 0a 2e 62 | 72 0a 45 58 41 4d 50 4c |hell...b|r.EXAMPL|
|00006160| 45 3a 0a 67 7a 20 22 2d | 61 20 43 3a 2a 2e 63 20 |E:.gz "-|a C:*.c |
|00006170| 44 3a 2a 2e 68 22 0a 0a | 0a 54 68 65 20 74 68 69 |D:*.h"..|.The thi|
|00006180| 72 64 20 66 6f 72 6d 20 | 6f 66 0a 2e 49 20 72 7a |rd form |of..I rz|
|00006190| 0a 69 73 20 69 6e 76 6f | 6b 65 64 20 61 73 0a 2e |.is invo|ked as..|
|000061a0| 42 20 72 7a 43 4f 4d 4d | 41 4e 44 0a 28 77 69 74 |B rzCOMM|AND.(wit|
|000061b0| 68 20 61 6e 20 6f 70 74 | 69 6f 6e 61 6c 20 6c 65 |h an opt|ional le|
|000061c0| 61 64 69 6e 67 20 5c 2d | 20 61 73 20 67 65 6e 65 |ading \-| as gene|
|000061d0| 72 61 74 65 64 20 62 79 | 20 6c 6f 67 69 6e 28 31 |rated by| login(1|
|000061e0| 29 29 2e 0a 46 6f 72 20 | 65 61 63 68 20 72 65 63 |))..For |each rec|
|000061f0| 65 69 76 65 64 20 66 69 | 6c 65 2c 0a 72 7a 20 77 |eived fi|le,.rz w|
|00006200| 69 6c 6c 20 70 69 70 65 | 20 74 68 65 20 66 69 6c |ill pipe| the fil|
|00006210| 65 20 74 6f 20 60 60 43 | 4f 4d 4d 41 4e 44 20 66 |e to ``C|OMMAND f|
|00006220| 69 6c 65 6e 61 6d 65 27 | 27 0a 77 68 65 72 65 20 |ilename'|'.where |
|00006230| 66 69 6c 65 6e 61 6d 65 | 20 69 73 20 74 68 65 20 |filename| is the |
|00006240| 6e 61 6d 65 20 6f 66 20 | 74 68 65 20 74 72 61 6e |name of |the tran|
|00006250| 73 6d 69 74 74 65 64 20 | 66 69 6c 65 0a 77 69 74 |smitted |file.wit|
|00006260| 68 20 74 68 65 20 66 69 | 6c 65 20 63 6f 6e 74 65 |h the fi|le conte|
|00006270| 6e 74 73 20 61 73 20 73 | 74 61 6e 64 61 72 64 20 |nts as s|tandard |
|00006280| 69 6e 70 75 74 2e 0a 0a | 45 61 63 68 20 66 69 6c |input...|Each fil|
|00006290| 65 20 74 72 61 6e 73 66 | 65 72 20 69 73 20 61 63 |e transf|er is ac|
|000062a0| 6b 6e 6f 77 6c 65 64 67 | 65 64 20 77 68 65 6e 20 |knowledg|ed when |
|000062b0| 43 4f 4d 4d 41 4e 44 20 | 65 78 69 74 73 20 77 69 |COMMAND |exits wi|
|000062c0| 74 68 20 30 20 73 74 61 | 74 75 73 2e 0a 41 20 6e |th 0 sta|tus..A n|
|000062d0| 6f 6e 20 7a 65 72 6f 20 | 65 78 69 74 20 73 74 61 |on zero |exit sta|
|000062e0| 74 75 73 20 74 65 72 6d | 69 6e 61 74 65 73 20 74 |tus term|inates t|
|000062f0| 72 61 6e 73 66 65 72 73 | 2e 0a 0a 41 20 74 79 70 |ransfers|...A typ|
|00006300| 69 63 61 6c 20 75 73 65 | 20 66 6f 72 20 74 68 69 |ical use| for thi|
|00006310| 73 20 66 6f 72 6d 20 69 | 73 0a 2e 49 20 72 7a 72 |s form i|s..I rzr|
|00006320| 6d 61 69 6c 0a 77 68 69 | 63 68 20 63 61 6c 6c 73 |mail.whi|ch calls|
|00006330| 20 72 6d 61 69 6c 28 31 | 29 0a 74 6f 20 70 6f 73 | rmail(1|).to pos|
|00006340| 74 20 6d 61 69 6c 20 74 | 6f 20 74 68 65 20 75 73 |t mail t|o the us|
|00006350| 65 72 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |er speci|fied by |
|00006360| 74 68 65 20 74 72 61 6e | 73 6d 69 74 74 65 64 20 |the tran|smitted |
|00006370| 66 69 6c 65 20 6e 61 6d | 65 2e 0a 46 6f 72 20 65 |file nam|e..For e|
|00006380| 78 61 6d 70 6c 65 2c 20 | 73 65 6e 64 69 6e 67 20 |xample, |sending |
|00006390| 74 68 65 20 66 69 6c 65 | 20 22 63 61 66 22 20 66 |the file| "caf" f|
|000063a0| 72 6f 6d 20 61 20 50 43 | 2d 44 4f 53 20 73 79 73 |rom a PC|-DOS sys|
|000063b0| 74 65 6d 20 74 6f 0a 2e | 49 20 72 7a 72 6d 61 69 |tem to..|I rzrmai|
|000063c0| 6c 0a 6f 6e 20 61 0a 2e | 53 4d 20 55 6e 69 78 0a |l.on a..|SM Unix.|
|000063d0| 73 79 73 74 65 6d 0a 77 | 6f 75 6c 64 20 72 65 73 |system.w|ould res|
|000063e0| 75 6c 74 20 69 6e 20 74 | 68 65 20 63 6f 6e 74 65 |ult in t|he conte|
|000063f0| 6e 74 73 20 6f 66 20 74 | 68 65 20 44 4f 53 20 66 |nts of t|he DOS f|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.