home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume28 / m0 / part01 next >
SHell self-extracting ARchive  |  1994-06-06  |  58.0 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: SHell self-extracting ARchive (archive/shar).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert SHell self-extracting ARchive (archive/shar) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file ASCII text default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/329 Shell Archive Format default
100% detectItEasy Format: plain text[LF] default (weak)



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 4e 65 77 73 67 72 6f 75 | 70 73 3a 20 63 6f 6d 70 |Newsgrou|ps: comp|
|00000010| 2e 73 6f 75 72 63 65 73 | 2e 75 6e 69 78 0a 46 72 |.sources|.unix.Fr|
|00000020| 6f 6d 3a 20 74 73 63 68 | 75 64 69 6e 40 63 75 69 |om: tsch|udin@cui|
|00000030| 2e 75 6e 69 67 65 2e 63 | 68 20 28 43 68 72 69 73 |.unige.c|h (Chris|
|00000040| 74 69 61 6e 20 54 73 63 | 68 75 64 69 6e 29 0a 53 |tian Tsc|hudin).S|
|00000050| 75 62 6a 65 63 74 3a 20 | 76 32 38 69 30 35 31 3a |ubject: |v28i051:|
|00000060| 20 6d 30 20 2d 20 61 20 | 6d 65 73 73 65 6e 67 65 | m0 - a |messenge|
|00000070| 72 20 65 78 65 63 75 74 | 69 6f 6e 20 65 6e 76 69 |r execut|ion envi|
|00000080| 72 6f 6e 6d 65 6e 74 2c | 20 50 61 72 74 30 31 2f |ronment,| Part01/|
|00000090| 31 32 0a 4d 65 73 73 61 | 67 65 2d 69 64 3a 20 3c |12.Messa|ge-id: <|
|000000a0| 31 2e 37 37 30 39 31 37 | 34 37 38 2e 31 39 32 37 |1.770917|478.1927|
|000000b0| 37 40 67 77 2e 68 6f 6d | 65 2e 76 69 78 2e 63 6f |7@gw.hom|e.vix.co|
|000000c0| 6d 3e 0a 53 65 6e 64 65 | 72 3a 20 75 6e 69 78 2d |m>.Sende|r: unix-|
|000000d0| 73 6f 75 72 63 65 73 2d | 6d 6f 64 65 72 61 74 6f |sources-|moderato|
|000000e0| 72 40 67 77 2e 68 6f 6d | 65 2e 76 69 78 2e 63 6f |r@gw.hom|e.vix.co|
|000000f0| 6d 0a 41 70 70 72 6f 76 | 65 64 3a 20 76 69 78 69 |m.Approv|ed: vixi|
|00000100| 65 40 67 77 2e 68 6f 6d | 65 2e 76 69 78 2e 63 6f |e@gw.hom|e.vix.co|
|00000110| 6d 0a 0a 53 75 62 6d 69 | 74 74 65 64 2d 42 79 3a |m..Submi|tted-By:|
|00000120| 20 74 73 63 68 75 64 69 | 6e 40 63 75 69 2e 75 6e | tschudi|n@cui.un|
|00000130| 69 67 65 2e 63 68 20 28 | 43 68 72 69 73 74 69 61 |ige.ch (|Christia|
|00000140| 6e 20 54 73 63 68 75 64 | 69 6e 29 0a 50 6f 73 74 |n Tschud|in).Post|
|00000150| 69 6e 67 2d 4e 75 6d 62 | 65 72 3a 20 56 6f 6c 75 |ing-Numb|er: Volu|
|00000160| 6d 65 20 32 38 2c 20 49 | 73 73 75 65 20 35 31 0a |me 28, I|ssue 51.|
|00000170| 41 72 63 68 69 76 65 2d | 4e 61 6d 65 3a 20 6d 30 |Archive-|Name: m0|
|00000180| 2f 70 61 72 74 30 31 0a | 0a 09 4d 30 20 28 4d 2d |/part01.|..M0 (M-|
|00000190| 5a 65 72 6f 29 20 69 73 | 20 61 20 6e 65 77 20 68 |Zero) is| a new h|
|000001a0| 69 67 68 2d 6c 65 76 65 | 6c 20 70 72 6f 67 72 61 |igh-leve|l progra|
|000001b0| 6d 6d 69 6e 67 20 6c 61 | 6e 67 75 61 67 65 20 61 |mming la|nguage a|
|000001c0| 6e 64 0a 09 65 78 65 63 | 75 74 69 6f 6e 20 65 6e |nd..exec|ution en|
|000001d0| 76 69 72 6f 6e 6d 65 6e | 74 20 73 69 6d 69 6c 61 |vironmen|t simila|
|000001e0| 72 20 74 6f 20 50 6f 73 | 74 53 63 72 69 70 74 20 |r to Pos|tScript |
|000001f0| 74 68 61 74 20 69 73 20 | 64 65 73 69 67 6e 65 64 |that is |designed|
|00000200| 0a 09 66 6f 72 20 74 68 | 65 20 6d 65 73 73 65 6e |..for th|e messen|
|00000210| 67 65 72 2d 62 61 73 65 | 64 20 70 72 6f 76 69 73 |ger-base|d provis|
|00000220| 69 6f 6e 20 6f 66 20 63 | 6f 6d 70 75 74 65 72 20 |ion of c|omputer |
|00000230| 63 6f 6d 6d 75 6e 69 63 | 61 74 69 6f 6e 0a 09 73 |communic|ation..s|
|00000240| 65 72 76 69 63 65 73 2e | 20 28 4d 65 73 73 65 6e |ervices.| (Messen|
|00000250| 67 65 72 73 20 61 72 65 | 20 70 72 6f 74 6f 63 6f |gers are| protoco|
|00000260| 6c 2d 75 6e 73 70 65 63 | 69 66 69 63 20 69 6e 73 |l-unspec|ific ins|
|00000270| 74 72 75 63 74 69 6f 6e | 0a 09 73 65 71 75 65 6e |truction|..sequen|
|00000280| 63 65 73 20 74 68 61 74 | 20 60 72 65 70 6c 61 63 |ces that| `replac|
|00000290| 65 27 20 74 68 65 20 70 | 72 6f 74 6f 63 6f 6c 2d |e' the p|rotocol-|
|000002a0| 73 70 65 63 69 66 69 63 | 20 6d 65 73 73 61 67 65 |specific| message|
|000002b0| 73 20 6f 6e 0a 09 77 68 | 69 63 68 20 6f 72 64 69 |s on..wh|ich ordi|
|000002c0| 6e 61 72 79 20 63 6f 6d | 70 75 74 65 72 20 63 6f |nary com|puter co|
|000002d0| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 20 70 72 6f 74 |mmunicat|ion prot|
|000002e0| 6f 63 6f 6c 73 20 61 72 | 65 20 62 61 73 65 64 29 |ocols ar|e based)|
|000002f0| 2e 0a 0a 09 49 6e 20 61 | 20 66 69 72 73 74 20 70 |....In a| first p|
|00000300| 6c 61 63 65 20 74 68 69 | 73 20 65 78 70 65 72 69 |lace thi|s experi|
|00000310| 6d 65 6e 74 61 6c 20 70 | 61 63 6b 61 67 65 20 63 |mental p|ackage c|
|00000320| 6f 6e 74 61 69 6e 73 20 | 61 20 63 6f 6d 70 6c 65 |ontains |a comple|
|00000330| 74 65 0a 09 4d 30 20 69 | 6e 74 65 72 70 72 65 74 |te..M0 i|nterpret|
|00000340| 65 72 2e 20 54 68 65 72 | 65 20 69 73 20 61 6c 73 |er. Ther|e is als|
|00000350| 6f 20 61 20 33 30 2d 70 | 61 67 65 20 72 65 70 6f |o a 30-p|age repo|
|00000360| 72 74 20 6f 6e 20 4d 30 | 20 28 73 65 65 20 74 68 |rt on M0| (see th|
|00000370| 65 0a 09 66 69 6c 65 20 | 4d 30 2e 70 73 29 20 74 |e..file |M0.ps) t|
|00000380| 68 61 74 20 70 72 6f 76 | 69 64 65 73 20 61 20 62 |hat prov|ides a b|
|00000390| 72 69 65 66 20 69 6e 74 | 72 6f 64 75 63 74 69 6f |rief int|roductio|
|000003a0| 6e 20 74 6f 20 74 68 65 | 20 63 6f 6e 63 65 70 74 |n to the| concept|
|000003b0| 0a 09 6f 66 20 6d 65 73 | 73 65 6e 67 65 72 2d 62 |..of mes|senger-b|
|000003c0| 61 73 65 64 20 63 6f 6d | 70 75 74 65 72 20 63 6f |ased com|puter co|
|000003d0| 6d 6d 75 6e 69 63 61 74 | 69 6f 6e 73 20 61 6e 64 |mmunicat|ions and|
|000003e0| 20 77 68 69 63 68 20 63 | 6f 6e 74 61 69 6e 73 0a | which c|ontains.|
|000003f0| 09 74 68 65 20 6d 61 6e | 75 61 6c 20 6f 66 20 74 |.the man|ual of t|
|00000400| 68 65 20 4d 30 20 6c 61 | 6e 67 75 61 67 65 20 61 |he M0 la|nguage a|
|00000410| 6e 64 20 66 6f 72 6d 61 | 74 20 64 65 66 69 6e 69 |nd forma|t defini|
|00000420| 74 69 6f 6e 2e 20 53 6f | 6d 65 0a 09 73 6d 61 6c |tion. So|me..smal|
|00000430| 6c 20 65 78 61 6d 70 6c | 65 73 20 6f 66 20 4d 30 |l exampl|es of M0|
|00000440| 20 6d 65 73 73 65 6e 67 | 65 72 73 20 61 72 65 20 | messeng|ers are |
|00000450| 61 6c 73 6f 20 69 6e 63 | 6c 75 64 65 64 20 61 6e |also inc|luded an|
|00000460| 64 20 64 69 73 63 75 73 | 73 65 64 2e 0a 0a 09 4b |d discus|sed....K|
|00000470| 65 79 77 6f 72 64 73 3a | 20 4d 30 20 70 72 6f 67 |eywords:| M0 prog|
|00000480| 72 61 6d 6d 69 6e 67 20 | 6c 61 6e 67 75 61 67 65 |ramming |language|
|00000490| 2c 20 63 6f 6d 70 75 74 | 65 72 20 63 6f 6d 6d 75 |, comput|er commu|
|000004a0| 6e 69 63 61 74 69 6f 6e | 73 2c 0a 09 63 6f 6d 6d |nication|s,..comm|
|000004b0| 75 6e 69 63 61 74 69 6f | 6e 20 62 79 20 6d 65 73 |unicatio|n by mes|
|000004c0| 73 65 6e 67 65 72 73 2c | 20 70 72 6f 74 6f 63 6f |sengers,| protoco|
|000004d0| 6c 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |l implem|entation|
|000004e0| 2c 20 70 72 6f 74 6f 63 | 6f 6c 0a 09 69 6e 74 65 |, protoc|ol..inte|
|000004f0| 72 70 72 65 74 61 74 69 | 6f 6e 2e 0a 0a 23 21 20 |rpretati|on...#! |
|00000500| 2f 62 69 6e 2f 73 68 0a | 23 20 54 68 69 73 20 69 |/bin/sh.|# This i|
|00000510| 73 20 61 20 73 68 65 6c | 6c 20 61 72 63 68 69 76 |s a shel|l archiv|
|00000520| 65 2e 20 20 52 65 6d 6f | 76 65 20 61 6e 79 74 68 |e. Remo|ve anyth|
|00000530| 69 6e 67 20 62 65 66 6f | 72 65 20 74 68 69 73 20 |ing befo|re this |
|00000540| 6c 69 6e 65 2c 20 74 68 | 65 6e 20 75 6e 70 61 63 |line, th|en unpac|
|00000550| 6b 0a 23 20 69 74 20 62 | 79 20 73 61 76 69 6e 67 |k.# it b|y saving|
|00000560| 20 69 74 20 69 6e 74 6f | 20 61 20 66 69 6c 65 20 | it into| a file |
|00000570| 61 6e 64 20 74 79 70 69 | 6e 67 20 22 73 68 20 66 |and typi|ng "sh f|
|00000580| 69 6c 65 22 2e 20 20 54 | 6f 20 6f 76 65 72 77 72 |ile". T|o overwr|
|00000590| 69 74 65 20 65 78 69 73 | 74 69 6e 67 0a 23 20 66 |ite exis|ting.# f|
|000005a0| 69 6c 65 73 2c 20 74 79 | 70 65 20 22 73 68 20 66 |iles, ty|pe "sh f|
|000005b0| 69 6c 65 20 2d 63 22 2e | 20 20 59 6f 75 20 63 61 |ile -c".| You ca|
|000005c0| 6e 20 61 6c 73 6f 20 66 | 65 65 64 20 74 68 69 73 |n also f|eed this|
|000005d0| 20 61 73 20 73 74 61 6e | 64 61 72 64 20 69 6e 70 | as stan|dard inp|
|000005e0| 75 74 20 76 69 61 0a 23 | 20 75 6e 73 68 61 72 2c |ut via.#| unshar,|
|000005f0| 20 6f 72 20 62 79 20 74 | 79 70 69 6e 67 20 22 73 | or by t|yping "s|
|00000600| 68 20 3c 66 69 6c 65 22 | 2c 20 65 2e 67 2e 2e 20 |h <file"|, e.g.. |
|00000610| 20 49 66 20 74 68 69 73 | 20 61 72 63 68 69 76 65 | If this| archive|
|00000620| 20 69 73 20 63 6f 6d 70 | 6c 65 74 65 2c 20 79 6f | is comp|lete, yo|
|00000630| 75 0a 23 20 77 69 6c 6c | 20 73 65 65 20 74 68 65 |u.# will| see the|
|00000640| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 6d 65 73 73 61 | followi|ng messa|
|00000650| 67 65 20 61 74 20 74 68 | 65 20 65 6e 64 3a 0a 23 |ge at th|e end:.#|
|00000660| 09 09 22 45 6e 64 20 6f | 66 20 61 72 63 68 69 76 |.."End o|f archiv|
|00000670| 65 20 31 20 28 6f 66 20 | 31 32 29 2e 22 0a 23 20 |e 1 (of |12).".# |
|00000680| 43 6f 6e 74 65 6e 74 73 | 3a 20 20 4d 61 6b 65 66 |Contents|: Makef|
|00000690| 69 6c 65 20 52 45 41 44 | 4d 45 20 54 4f 44 4f 2e |ile READ|ME TODO.|
|000006a0| 64 6f 63 20 63 5f 63 6f | 6e 2e 63 20 63 5f 66 69 |doc c_co|n.c c_fi|
|000006b0| 6c 65 2e 63 20 63 5f 70 | 72 6f 74 6f 2e 68 0a 23 |le.c c_p|roto.h.#|
|000006c0| 20 20 20 63 68 6b 73 75 | 6d 2e 68 20 63 6f 70 79 | chksu|m.h copy|
|000006d0| 72 67 68 74 2e 68 20 65 | 72 72 6f 72 2e 68 20 66 |rght.h e|rror.h f|
|000006e0| 72 61 67 5f 30 2e 6d 30 | 20 66 72 61 67 6d 65 6e |rag_0.m0| fragmen|
|000006f0| 74 2e 6d 30 20 68 64 72 | 2e 68 20 6c 5f 63 6f 6d |t.m0 hdr|.h l_com|
|00000700| 70 61 74 2e 63 0a 23 20 | 20 20 6c 5f 73 74 72 62 |pat.c.# | l_strb|
|00000710| 75 66 2e 63 20 6c 5f 74 | 69 6d 65 2e 63 20 6d 30 |uf.c l_t|ime.c m0|
|00000720| 73 74 72 69 70 2e 31 20 | 6d 61 6b 65 66 69 6c 65 |strip.1 |makefile|
|00000730| 2e 64 6f 73 20 6d 61 6b | 65 66 69 6c 65 2e 6f 73 |.dos mak|efile.os|
|00000740| 66 0a 23 20 20 20 6d 61 | 6b 65 66 69 6c 65 2e 73 |f.# ma|kefile.s|
|00000750| 6f 34 20 6d 61 6b 65 66 | 69 6c 65 2e 73 6f 35 20 |o4 makef|ile.so5 |
|00000760| 6d 61 6b 65 66 69 6c 65 | 2e 75 6c 74 20 6d 61 6b |makefile|.ult mak|
|00000770| 65 66 69 6c 65 2e 75 6e | 78 20 6e 65 69 67 68 5f |efile.un|x neigh_|
|00000780| 65 78 2e 6d 30 0a 23 20 | 20 20 6e 65 69 67 68 62 |ex.m0.# | neighb|
|00000790| 6f 72 2e 6d 30 20 6f 5f | 61 72 72 61 79 2e 63 20 |or.m0 o_|array.c |
|000007a0| 6f 5f 61 74 74 72 2e 63 | 20 6f 5f 73 74 72 69 6e |o_attr.c| o_strin|
|000007b0| 67 2e 63 20 70 72 6f 63 | 2e 68 20 73 74 61 72 74 |g.c proc|.h start|
|000007c0| 75 70 2e 6d 30 0a 23 20 | 20 20 73 74 72 62 75 66 |up.m0.# | strbuf|
|000007d0| 2e 68 0a 23 20 57 72 61 | 70 70 65 64 20 62 79 20 |.h.# Wra|pped by |
|000007e0| 74 73 63 68 75 64 69 6e | 40 63 75 69 73 75 6e 66 |tschudin|@cuisunf|
|000007f0| 20 6f 6e 20 4d 6f 6e 20 | 4a 75 6e 20 20 36 20 31 | on Mon |Jun 6 1|
|00000800| 33 3a 32 36 3a 30 30 20 | 31 39 39 34 0a 50 41 54 |3:26:00 |1994.PAT|
|00000810| 48 3d 2f 62 69 6e 3a 2f | 75 73 72 2f 62 69 6e 3a |H=/bin:/|usr/bin:|
|00000820| 2f 75 73 72 2f 75 63 62 | 20 3b 20 65 78 70 6f 72 |/usr/ucb| ; expor|
|00000830| 74 20 50 41 54 48 0a 69 | 66 20 74 65 73 74 20 2d |t PATH.i|f test -|
|00000840| 66 20 27 4d 61 6b 65 66 | 69 6c 65 27 20 2d 61 20 |f 'Makef|ile' -a |
|00000850| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|00000860| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|00000870| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|00000880| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|00000890| 6c 65 20 5c 22 27 4d 61 | 6b 65 66 69 6c 65 27 5c |le \"'Ma|kefile'\|
|000008a0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|000008b0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|000008c0| 4d 61 6b 65 66 69 6c 65 | 27 5c 22 20 5c 28 37 38 |Makefile|'\" \(78|
|000008d0| 33 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |3 charac|ters\).s|
|000008e0| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 4d 61 |ed "s/^X|//" >'Ma|
|000008f0| 6b 65 66 69 6c 65 27 20 | 3c 3c 27 45 4e 44 5f 4f |kefile' |<<'END_O|
|00000900| 46 5f 46 49 4c 45 27 0a | 58 23 20 4d 61 6b 65 66 |F_FILE'.|X# Makef|
|00000910| 69 6c 65 20 66 6f 72 20 | 4d 30 0a 58 23 20 63 68 |ile for |M0.X# ch|
|00000920| 72 69 73 74 69 61 6e 20 | 74 73 63 68 75 64 69 6e |ristian |tschudin|
|00000930| 2c 20 6d 61 79 20 31 39 | 39 34 0a 58 0a 58 23 20 |, may 19|94.X.X# |
|00000940| 70 6f 73 73 69 62 6c 65 | 20 76 61 6c 75 65 73 20 |possible| values |
|00000950| 66 6f 72 20 22 4f 53 22 | 3a 0a 58 23 09 73 6f 34 |for "OS"|:.X#.so4|
|00000960| 09 09 66 6f 72 20 53 75 | 6e 4f 53 20 34 2e 31 2e |..for Su|nOS 4.1.|
|00000970| 33 0a 58 23 09 73 6f 35 | 09 09 66 6f 72 20 53 75 |3.X#.so5|..for Su|
|00000980| 6e 4f 53 20 35 2e 31 20 | 28 61 6b 61 20 53 6f 6c |nOS 5.1 |(aka Sol|
|00000990| 61 72 69 73 20 32 2e 31 | 29 0a 58 23 09 75 6c 74 |aris 2.1|).X#.ult|
|000009a0| 09 09 66 6f 72 20 44 45 | 43 20 55 6c 74 72 69 78 |..for DE|C Ultrix|
|000009b0| 20 76 34 2e 33 0a 58 23 | 09 6f 73 66 09 09 66 6f | v4.3.X#|.osf..fo|
|000009c0| 72 20 44 45 43 20 4f 53 | 46 2f 31 20 76 31 2e 33 |r DEC OS|F/1 v1.3|
|000009d0| 0a 58 23 09 64 6f 73 09 | 09 66 6f 72 20 4d 53 2f |.X#.dos.|.for MS/|
|000009e0| 44 4f 53 20 3e 35 2e 78 | 0a 58 23 0a 58 4f 53 3d |DOS >5.x|.X#.XOS=|
|000009f0| 73 6f 34 0a 58 0a 58 0a | 58 23 20 64 65 66 61 75 |so4.X.X.|X# defau|
|00000a00| 6c 74 20 70 61 74 68 73 | 20 77 68 65 72 65 20 62 |lt paths| where b|
|00000a10| 69 6e 61 72 69 65 73 2c | 20 4d 30 20 66 69 6c 65 |inaries,| M0 file|
|00000a20| 73 20 61 6e 64 20 6d 61 | 6e 20 70 61 67 65 73 0a |s and ma|n pages.|
|00000a30| 58 23 20 73 68 6f 75 6c | 64 20 62 65 20 69 6e 73 |X# shoul|d be ins|
|00000a40| 74 61 6c 6c 65 64 20 61 | 6e 64 2f 6f 72 20 63 61 |talled a|nd/or ca|
|00000a50| 6e 20 62 65 20 66 6f 75 | 6e 64 3a 0a 58 0a 58 23 |n be fou|nd:.X.X#|
|00000a60| 20 62 65 20 65 78 70 6c | 69 63 69 74 20 66 6f 72 | be expl|icit for|
|00000a70| 20 4d 53 2f 44 4f 53 3a | 0a 58 23 43 57 44 3d 5c | MS/DOS:|.X#CWD=\|
|00000a80| 5c 5c 5c 63 66 74 5c 5c | 5c 5c 6d 73 67 72 5c 5c |\\\cft\\|\\msgr\\|
|00000a90| 5c 5c 73 72 63 0a 58 23 | 20 73 6f 34 0a 58 43 57 |\\src.X#| so4.XCW|
|00000aa0| 44 3d 24 28 50 57 44 29 | 0a 58 23 20 73 6f 35 20 |D=$(PWD)|.X# so5 |
|00000ab0| 61 6e 64 20 6f 73 66 3a | 0a 58 23 43 57 44 3d 2f |and osf:|.X#CWD=/|
|00000ac0| 75 73 65 72 2f 75 32 2f | 74 73 63 68 75 64 69 6e |user/u2/|tschudin|
|00000ad0| 2f 6d 73 67 72 2f 73 72 | 63 0a 58 23 20 75 6c 74 |/msgr/sr|c.X# ult|
|00000ae0| 3a 0a 58 23 43 57 44 3d | 2f 67 75 72 75 2f 74 73 |:.X#CWD=|/guru/ts|
|00000af0| 63 68 75 64 69 6e 2f 6d | 30 0a 58 0a 58 4d 30 44 |chudin/m|0.X.XM0D|
|00000b00| 45 46 42 49 4e 50 41 54 | 48 3d 24 28 43 57 44 29 |EFBINPAT|H=$(CWD)|
|00000b10| 0a 58 4d 30 44 45 46 4c | 49 42 50 41 54 48 3d 24 |.XM0DEFL|IBPATH=$|
|00000b20| 28 43 57 44 29 0a 58 4d | 30 44 45 46 4d 41 4e 50 |(CWD).XM|0DEFMANP|
|00000b30| 41 54 48 3d 24 28 43 57 | 44 29 0a 58 0a 58 0a 58 |ATH=$(CW|D).X.X.X|
|00000b40| 23 20 61 64 64 20 2d 44 | 44 45 42 55 47 20 66 6f |# add -D|DEBUG fo|
|00000b50| 72 20 65 6e 61 62 6c 69 | 6e 67 20 74 72 61 63 69 |r enabli|ng traci|
|00000b60| 6e 67 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 0a 58 |ng infor|mation.X|
|00000b70| 43 4f 50 54 3d 20 2d 44 | 44 45 42 55 47 0a 58 0a |COPT= -D|DEBUG.X.|
|00000b80| 58 23 20 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |X# -----|--------|
|00000b90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000ba0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000bb0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000bc0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 0a 58 23 20 |--------|----.X# |
|00000bd0| 68 65 72 65 20 77 65 20 | 67 6f 20 2e 2e 2e 0a 58 |here we |go ....X|
|00000be0| 0a 58 69 6e 63 6c 75 64 | 65 20 6d 61 6b 65 66 69 |.Xinclud|e makefi|
|00000bf0| 6c 65 2e 24 28 4f 53 29 | 0a 58 0a 58 61 6c 6c 3a |le.$(OS)|.X.Xall:|
|00000c00| 20 65 78 65 66 69 6c 65 | 73 0a 58 0a 58 69 6e 63 | exefile|s.X.Xinc|
|00000c10| 6c 75 64 65 20 6d 61 6b | 65 66 69 6c 65 2e 61 6c |lude mak|efile.al|
|00000c20| 6c 0a 58 0a 58 65 78 65 | 66 69 6c 65 73 3a 20 24 |l.X.Xexe|files: $|
|00000c30| 28 45 58 45 46 49 4c 45 | 53 29 0a 58 0a 58 23 20 |(EXEFILE|S).X.X# |
|00000c40| 65 6f 66 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |eof.END_|OF_FILE.|
|00000c50| 69 66 20 74 65 73 74 20 | 37 38 33 20 2d 6e 65 20 |if test |783 -ne |
|00000c60| 60 77 63 20 2d 63 20 3c | 27 4d 61 6b 65 66 69 6c |`wc -c <|'Makefil|
|00000c70| 65 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |e'`; the|n. ec|
|00000c80| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 4d 61 6b 65 |ho shar:| \"'Make|
|00000c90| 66 69 6c 65 27 5c 22 20 | 75 6e 70 61 63 6b 65 64 |file'\" |unpacked|
|00000ca0| 20 77 69 74 68 20 77 72 | 6f 6e 67 20 73 69 7a 65 | with wr|ong size|
|00000cb0| 21 0a 66 69 0a 23 20 65 | 6e 64 20 6f 66 20 27 4d |!.fi.# e|nd of 'M|
|00000cc0| 61 6b 65 66 69 6c 65 27 | 0a 66 69 0a 69 66 20 74 |akefile'|.fi.if t|
|00000cd0| 65 73 74 20 2d 66 20 27 | 52 45 41 44 4d 45 27 20 |est -f '|README' |
|00000ce0| 2d 61 20 22 24 7b 31 7d | 22 20 21 3d 20 22 2d 63 |-a "${1}|" != "-c|
|00000cf0| 22 20 3b 20 74 68 65 6e | 20 0a 20 20 65 63 68 6f |" ; then| . echo|
|00000d00| 20 73 68 61 72 3a 20 57 | 69 6c 6c 20 6e 6f 74 20 | shar: W|ill not |
|00000d10| 63 6c 6f 62 62 65 72 20 | 65 78 69 73 74 69 6e 67 |clobber |existing|
|00000d20| 20 66 69 6c 65 20 5c 22 | 27 52 45 41 44 4d 45 27 | file \"|'README'|
|00000d30| 5c 22 0a 65 6c 73 65 0a | 65 63 68 6f 20 73 68 61 |\".else.|echo sha|
|00000d40| 72 3a 20 45 78 74 72 61 | 63 74 69 6e 67 20 5c 22 |r: Extra|cting \"|
|00000d50| 27 52 45 41 44 4d 45 27 | 5c 22 20 5c 28 34 30 37 |'README'|\" \(407|
|00000d60| 33 20 63 68 61 72 61 63 | 74 65 72 73 5c 29 0a 73 |3 charac|ters\).s|
|00000d70| 65 64 20 22 73 2f 5e 58 | 2f 2f 22 20 3e 27 52 45 |ed "s/^X|//" >'RE|
|00000d80| 41 44 4d 45 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |ADME' <<|'END_OF_|
|00000d90| 46 49 4c 45 27 0a 58 23 | 20 52 45 41 44 4d 45 20 |FILE'.X#| README |
|00000da0| 66 6f 72 20 4d 30 20 76 | 65 72 73 69 6f 6e 20 30 |for M0 v|ersion 0|
|00000db0| 2e 31 31 2c 20 6d 61 79 | 20 31 39 39 34 0a 58 0a |.11, may| 1994.X.|
|00000dc0| 58 0a 58 09 09 20 20 57 | 65 6c 63 6f 6d 65 20 74 |X.X.. W|elcome t|
|00000dd0| 6f 20 74 68 65 20 77 6f | 72 6c 64 20 6f 66 20 6d |o the wo|rld of m|
|00000de0| 65 73 73 65 6e 67 65 72 | 73 20 61 6e 64 20 74 6f |essenger|s and to|
|00000df0| 0a 58 09 09 4d 30 20 2d | 20 74 68 65 20 66 69 72 |.X..M0 -| the fir|
|00000e00| 73 74 20 6d 65 73 73 65 | 6e 67 65 72 20 65 78 65 |st messe|nger exe|
|00000e10| 63 75 74 69 6f 6e 20 65 | 6e 76 69 72 6f 6e 6d 65 |cution e|nvironme|
|00000e20| 6e 74 21 0a 58 0a 58 0a | 58 53 65 65 20 74 68 65 |nt!.X.X.|XSee the|
|00000e30| 20 66 69 6c 65 20 60 46 | 49 4c 45 53 2e 64 6f 63 | file `F|ILES.doc|
|00000e40| 27 20 66 6f 72 20 61 6e | 20 6f 76 65 72 76 69 65 |' for an| overvie|
|00000e50| 77 20 6f 66 20 74 68 65 | 20 66 69 6c 65 73 20 69 |w of the| files i|
|00000e60| 6e 20 74 68 69 73 20 64 | 69 72 65 63 74 6f 72 79 |n this d|irectory|
|00000e70| 2e 0a 58 0a 58 53 65 65 | 20 74 68 65 20 66 69 6c |..X.XSee| the fil|
|00000e80| 65 20 60 4c 49 43 45 4e | 53 45 27 20 66 6f 72 20 |e `LICEN|SE' for |
|00000e90| 74 68 65 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 |the GNU |General |
|00000ea0| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 0a 58 |Public L|icense.X|
|00000eb0| 0a 58 0a 58 09 09 09 09 | 57 68 61 74 20 69 73 20 |.X.X....|What is |
|00000ec0| 4d 30 3f 0a 58 0a 58 09 | 4d 30 20 28 4d 2d 5a 65 |M0?.X.X.|M0 (M-Ze|
|00000ed0| 72 6f 29 20 69 73 20 61 | 20 6e 65 77 20 68 69 67 |ro) is a| new hig|
|00000ee0| 68 2d 6c 65 76 65 6c 20 | 70 72 6f 67 72 61 6d 6d |h-level |programm|
|00000ef0| 69 6e 67 20 6c 61 6e 67 | 75 61 67 65 20 61 6e 64 |ing lang|uage and|
|00000f00| 0a 58 09 65 78 65 63 75 | 74 69 6f 6e 20 65 6e 76 |.X.execu|tion env|
|00000f10| 69 72 6f 6e 6d 65 6e 74 | 20 73 69 6d 69 6c 61 72 |ironment| similar|
|00000f20| 20 74 6f 20 50 6f 73 74 | 53 63 72 69 70 74 20 74 | to Post|Script t|
|00000f30| 68 61 74 20 69 73 20 64 | 65 73 69 67 6e 65 64 0a |hat is d|esigned.|
|00000f40| 58 09 66 6f 72 20 74 68 | 65 20 6d 65 73 73 65 6e |X.for th|e messen|
|00000f50| 67 65 72 2d 62 61 73 65 | 64 20 70 72 6f 76 69 73 |ger-base|d provis|
|00000f60| 69 6f 6e 20 6f 66 20 63 | 6f 6d 70 75 74 65 72 20 |ion of c|omputer |
|00000f70| 63 6f 6d 6d 75 6e 69 63 | 61 74 69 6f 6e 0a 58 09 |communic|ation.X.|
|00000f80| 73 65 72 76 69 63 65 73 | 2e 20 28 4d 65 73 73 65 |services|. (Messe|
|00000f90| 6e 67 65 72 73 20 61 72 | 65 20 70 72 6f 74 6f 63 |ngers ar|e protoc|
|00000fa0| 6f 6c 2d 75 6e 73 70 65 | 63 69 66 69 63 20 69 6e |ol-unspe|cific in|
|00000fb0| 73 74 72 75 63 74 69 6f | 6e 0a 58 09 73 65 71 75 |structio|n.X.sequ|
|00000fc0| 65 6e 63 65 73 20 74 68 | 61 74 20 60 72 65 70 6c |ences th|at `repl|
|00000fd0| 61 63 65 27 20 74 68 65 | 20 70 72 6f 74 6f 63 6f |ace' the| protoco|
|00000fe0| 6c 2d 73 70 65 63 69 66 | 69 63 20 6d 65 73 73 61 |l-specif|ic messa|
|00000ff0| 67 65 73 20 6f 6e 0a 58 | 09 77 68 69 63 68 20 6f |ges on.X|.which o|
|00001000| 72 64 69 6e 61 72 79 20 | 63 6f 6d 70 75 74 65 72 |rdinary |computer|
|00001010| 20 63 6f 6d 6d 75 6e 69 | 63 61 74 69 6f 6e 20 70 | communi|cation p|
|00001020| 72 6f 74 6f 63 6f 6c 73 | 20 61 72 65 20 62 61 73 |rotocols| are bas|
|00001030| 65 64 29 2e 0a 58 0a 58 | 09 49 6e 20 61 20 66 69 |ed)..X.X|.In a fi|
|00001040| 72 73 74 20 70 6c 61 63 | 65 20 74 68 69 73 20 65 |rst plac|e this e|
|00001050| 78 70 65 72 69 6d 65 6e | 74 61 6c 20 70 61 63 6b |xperimen|tal pack|
|00001060| 61 67 65 20 63 6f 6e 74 | 61 69 6e 73 20 61 20 63 |age cont|ains a c|
|00001070| 6f 6d 70 6c 65 74 65 0a | 58 09 4d 30 20 69 6e 74 |omplete.|X.M0 int|
|00001080| 65 72 70 72 65 74 65 72 | 2e 20 54 68 65 72 65 20 |erpreter|. There |
|00001090| 69 73 20 61 6c 73 6f 20 | 61 20 33 30 2d 70 61 67 |is also |a 30-pag|
|000010a0| 65 20 72 65 70 6f 72 74 | 20 6f 6e 20 4d 30 20 28 |e report| on M0 (|
|000010b0| 73 65 65 20 74 68 65 0a | 58 09 66 69 6c 65 20 4d |see the.|X.file M|
|000010c0| 30 2e 70 73 29 20 74 68 | 61 74 20 70 72 6f 76 69 |0.ps) th|at provi|
|000010d0| 64 65 73 20 61 20 62 72 | 69 65 66 20 69 6e 74 72 |des a br|ief intr|
|000010e0| 6f 64 75 63 74 69 6f 6e | 20 74 6f 20 74 68 65 20 |oduction| to the |
|000010f0| 63 6f 6e 63 65 70 74 0a | 58 09 6f 66 20 6d 65 73 |concept.|X.of mes|
|00001100| 73 65 6e 67 65 72 2d 62 | 61 73 65 64 20 63 6f 6d |senger-b|ased com|
|00001110| 70 75 74 65 72 20 63 6f | 6d 6d 75 6e 69 63 61 74 |puter co|mmunicat|
|00001120| 69 6f 6e 73 20 61 6e 64 | 20 77 68 69 63 68 20 63 |ions and| which c|
|00001130| 6f 6e 74 61 69 6e 73 0a | 58 09 74 68 65 20 6d 61 |ontains.|X.the ma|
|00001140| 6e 75 61 6c 20 6f 66 20 | 74 68 65 20 4d 30 20 6c |nual of |the M0 l|
|00001150| 61 6e 67 75 61 67 65 20 | 61 6e 64 20 66 6f 72 6d |anguage |and form|
|00001160| 61 74 20 64 65 66 69 6e | 69 74 69 6f 6e 2e 20 53 |at defin|ition. S|
|00001170| 6f 6d 65 0a 58 09 73 6d | 61 6c 6c 20 65 78 61 6d |ome.X.sm|all exam|
|00001180| 70 6c 65 73 20 6f 66 20 | 4d 30 20 6d 65 73 73 65 |ples of |M0 messe|
|00001190| 6e 67 65 72 73 20 61 72 | 65 20 61 6c 73 6f 20 69 |ngers ar|e also i|
|000011a0| 6e 63 6c 75 64 65 64 20 | 61 6e 64 20 64 69 73 63 |ncluded |and disc|
|000011b0| 75 73 73 65 64 2e 0a 58 | 0a 58 09 4b 65 79 77 6f |ussed..X|.X.Keywo|
|000011c0| 72 64 73 3a 20 4d 30 20 | 70 72 6f 67 72 61 6d 6d |rds: M0 |programm|
|000011d0| 69 6e 67 20 6c 61 6e 67 | 75 61 67 65 2c 20 63 6f |ing lang|uage, co|
|000011e0| 6d 70 75 74 65 72 20 63 | 6f 6d 6d 75 6e 69 63 61 |mputer c|ommunica|
|000011f0| 74 69 6f 6e 73 2c 0a 58 | 09 63 6f 6d 6d 75 6e 69 |tions,.X|.communi|
|00001200| 63 61 74 69 6f 6e 20 62 | 79 20 6d 65 73 73 65 6e |cation b|y messen|
|00001210| 67 65 72 73 2c 20 70 72 | 6f 74 6f 63 6f 6c 20 69 |gers, pr|otocol i|
|00001220| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 2c 20 70 |mplement|ation, p|
|00001230| 72 6f 74 6f 63 6f 6c 0a | 58 09 69 6e 74 65 72 70 |rotocol.|X.interp|
|00001240| 72 65 74 61 74 69 6f 6e | 2e 0a 58 0a 58 2d 2d 2d |retation|..X.X---|
|00001250| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001260| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001270| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001280| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 59 |--------|---.X.XY|
|000012a0| 6f 75 20 6e 65 65 64 20 | 61 6e 20 41 4e 53 49 20 |ou need |an ANSI |
|000012b0| 63 6f 6d 70 6c 69 61 6e | 74 20 43 2d 63 6f 6d 70 |complian|t C-comp|
|000012c0| 69 6c 65 72 20 69 6e 20 | 6f 72 64 65 72 20 74 6f |iler in |order to|
|000012d0| 20 63 6f 6d 70 69 6c 65 | 20 74 68 65 20 70 72 65 | compile| the pre|
|000012e0| 73 65 6e 74 0a 58 43 2d | 73 6f 75 72 63 65 73 2e |sent.XC-|sources.|
|000012f0| 20 54 68 65 20 70 61 63 | 6b 61 67 65 20 68 61 73 | The pac|kage has|
|00001300| 20 62 65 65 6e 20 63 6f | 6d 70 69 6c 65 64 20 69 | been co|mpiled i|
|00001310| 6e 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |n the fo|llowing |
|00001320| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 73 3a 0a 58 0a |environm|ents:.X.|
|00001330| 58 0a 58 09 4f 70 65 72 | 61 74 69 6e 67 20 53 79 |X.X.Oper|ating Sy|
|00001340| 73 74 65 6d 09 43 6f 6d | 70 69 6c 65 72 73 09 09 |stem.Com|pilers..|
|00001350| 53 75 70 70 6f 72 74 65 | 64 20 4d 30 20 43 68 61 |Supporte|d M0 Cha|
|00001360| 6e 6e 65 6c 73 0a 58 09 | 09 09 09 09 09 09 63 6f |nnels.X.|......co|
|00001370| 6e 73 6f 6c 65 09 75 64 | 70 2f 69 70 09 65 74 68 |nsole.ud|p/ip.eth|
|00001380| 65 72 0a 58 09 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |er.X.---|--------|
|00001390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 09 2d 2d 2d 2d 2d |--------|--.-----|
|000013a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 09 2d 2d 2d 2d |--------|---.----|
|000013b0| 2d 2d 2d 20 2d 2d 2d 2d | 2d 2d 2d 20 2d 2d 2d 2d |--- ----|--- ----|
|000013c0| 2d 2d 0a 58 09 53 75 6e | 4f 53 20 34 2e 31 2e 33 |--.X.Sun|OS 4.1.3|
|000013d0| 09 09 67 63 63 20 32 2e | 35 2e 38 2c 20 61 63 63 |..gcc 2.|5.8, acc|
|000013e0| 09 09 78 09 78 09 78 0a | 58 09 53 6f 6c 61 72 69 |..x.x.x.|X.Solari|
|000013f0| 73 20 32 2e 31 09 09 53 | 50 41 52 43 77 6f 72 6b |s 2.1..S|PARCwork|
|00001400| 73 09 09 78 0a 58 09 55 | 6c 74 72 69 78 20 34 2e |s..x.X.U|ltrix 4.|
|00001410| 33 09 09 63 38 39 09 09 | 09 78 09 78 0a 58 09 4f |3..c89..|.x.x.X.O|
|00001420| 53 46 2f 31 20 31 2e 33 | 09 09 67 63 63 20 32 2e |SF/1 1.3|..gcc 2.|
|00001430| 35 2e 38 09 09 78 09 78 | 0a 58 09 4d 53 2f 44 4f |5.8..x.x|.X.MS/DO|
|00001440| 53 20 35 2e 30 09 09 54 | 75 72 62 6f 43 2b 2b 20 |S 5.0..T|urboC++ |
|00001450| 31 2e 30 09 09 78 0a 58 | 0a 58 49 6e 20 6f 74 68 |1.0..x.X|.XIn oth|
|00001460| 65 72 20 77 6f 72 64 73 | 3a 20 74 68 69 73 20 70 |er words|: this p|
|00001470| 61 63 6b 61 67 65 20 69 | 73 20 63 75 72 72 65 6e |ackage i|s curren|
|00001480| 74 6c 79 20 6e 6f 74 20 | 76 65 72 79 20 75 73 65 |tly not |very use|
|00001490| 66 75 6c 20 66 6f 72 20 | 74 68 65 20 4d 53 2f 44 |ful for |the MS/D|
|000014a0| 4f 53 20 61 6e 64 0a 58 | 53 6f 6c 61 72 69 73 20 |OS and.X|Solaris |
|000014b0| 65 6e 76 69 72 6f 6e 6d | 65 6e 74 2c 20 61 6c 74 |environm|ent, alt|
|000014c0| 68 6f 75 67 68 20 6f 6e | 65 20 63 61 6e 20 70 6c |hough on|e can pl|
|000014d0| 61 79 20 61 72 6f 75 6e | 64 20 77 69 74 68 20 74 |ay aroun|d with t|
|000014e0| 68 65 20 73 74 61 6e 64 | 2d 61 6c 6f 6e 65 0a 58 |he stand|-alone.X|
|000014f0| 4d 30 20 69 6e 74 65 72 | 70 72 65 74 65 72 20 28 |M0 inter|preter (|
|00001500| 74 68 65 20 63 6f 6e 73 | 6f 6c 65 20 70 72 6f 67 |the cons|ole prog|
|00001510| 72 61 6d 20 6d 30 63 29 | 2e 0a 58 0a 58 2d 2d 2d |ram m0c)|..X.X---|
|00001520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001530| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001540| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001550| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001560| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0a 58 0a 58 48 |--------|---.X.XH|
|00001570| 6f 77 20 74 6f 20 63 6f | 6d 70 69 6c 65 20 74 68 |ow to co|mpile th|
|00001580| 69 73 20 70 61 63 6b 61 | 67 65 3a 0a 58 0a 58 61 |is packa|ge:.X.Xa|
|00001590| 29 20 4d 6f 64 69 66 79 | 20 74 68 65 20 6d 61 69 |) Modify| the mai|
|000015a0| 6e 20 60 4d 61 6b 65 66 | 69 6c 65 27 3a 0a 58 09 |n `Makef|ile':.X.|
|000015b0| 2d 20 63 68 61 6e 67 65 | 20 74 68 65 20 4f 53 20 |- change| the OS |
|000015c0| 76 61 72 69 61 62 6c 65 | 20 74 6f 20 66 69 74 20 |variable| to fit |
|000015d0| 79 6f 75 72 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |your ope|rating s|
|000015e0| 79 73 74 65 6d 0a 58 09 | 2d 20 63 68 61 6e 67 65 |ystem.X.|- change|
|000015f0| 20 74 68 65 20 4d 30 44 | 45 46 42 49 4e 50 41 54 | the M0D|EFBINPAT|
|00001600| 48 20 74 6f 20 70 6f 69 | 6e 74 20 74 6f 20 74 68 |H to poi|nt to th|
|00001610| 65 20 66 69 6e 61 6c 20 | 6c 6f 63 61 74 69 6f 6e |e final |location|
|00001620| 0a 58 09 20 20 6f 66 20 | 74 68 65 20 4d 30 20 62 |.X. of |the M0 b|
|00001630| 69 6e 61 72 69 65 73 20 | 28 6d 30 2c 20 6d 30 63 |inaries |(m0, m0c|
|00001640| 2c 20 6d 30 75 63 20 61 | 6e 64 20 6d 30 73 74 72 |, m0uc a|nd m0str|
|00001650| 69 70 29 0a 58 09 2d 20 | 63 68 61 6e 67 65 20 74 |ip).X.- |change t|
|00001660| 68 65 20 4d 30 44 45 46 | 4c 49 42 50 41 54 48 20 |he M0DEF|LIBPATH |
|00001670| 74 6f 20 70 6f 69 6e 74 | 20 74 6f 20 74 68 65 20 |to point| to the |
|00001680| 66 69 6e 61 6c 20 6c 6f | 63 61 74 69 6f 6e 0a 58 |final lo|cation.X|
|00001690| 09 20 20 6f 66 20 74 68 | 65 20 4d 30 20 73 74 61 |. of th|e M0 sta|
|000016a0| 72 74 75 70 20 66 69 6c | 65 73 20 28 73 74 61 72 |rtup fil|es (star|
|000016b0| 74 75 70 2e 6d 30 2c 20 | 63 6f 6e 73 5f 69 6e 69 |tup.m0, |cons_ini|
|000016c0| 2e 6d 30 2c 20 6c 6f 6e | 67 64 69 63 74 2e 6d 30 |.m0, lon|gdict.m0|
|000016d0| 29 0a 58 09 2d 20 63 68 | 61 6e 67 65 20 74 68 65 |).X.- ch|ange the|
|000016e0| 20 4d 30 44 45 46 4d 41 | 4e 50 41 54 48 20 74 6f | M0DEFMA|NPATH to|
|000016f0| 20 70 6f 69 6e 74 20 74 | 6f 20 74 68 65 20 66 69 | point t|o the fi|
|00001700| 6e 61 6c 20 6c 6f 63 61 | 74 69 6f 6e 0a 58 09 20 |nal loca|tion.X. |
|00001710| 20 6f 66 20 74 68 65 20 | 4d 30 20 6d 61 6e 20 70 | of the |M0 man p|
|00001720| 61 67 65 73 20 28 6d 30 | 2e 31 2c 20 6d 30 63 2e |ages (m0|.1, m0c.|
|00001730| 31 2c 20 6d 30 75 63 2e | 31 2c 20 6d 30 73 74 72 |1, m0uc.|1, m0str|
|00001740| 69 70 2e 31 29 0a 58 09 | 2d 20 6f 72 20 69 66 20 |ip.1).X.|- or if |
|00001750| 79 6f 75 20 64 6f 20 6e | 6f 74 20 77 61 6e 74 20 |you do n|ot want |
|00001760| 74 6f 20 69 6e 73 74 61 | 6c 6c 20 74 68 65 20 70 |to insta|ll the p|
|00001770| 61 63 6b 61 67 65 2c 20 | 6c 65 74 20 74 68 65 6d |ackage, |let them|
|00001780| 20 61 6c 6c 20 70 6f 69 | 6e 74 0a 58 09 20 20 74 | all poi|nt.X. t|
|00001790| 6f 20 74 68 65 20 73 61 | 6d 65 20 70 6c 61 63 65 |o the sa|me place|
|000017a0| 20 77 68 65 72 65 20 79 | 6f 75 20 63 6f 6d 70 69 | where y|ou compi|
|000017b0| 6c 65 20 61 6e 64 20 63 | 68 61 6e 67 65 20 74 68 |le and c|hange th|
|000017c0| 65 20 43 57 44 20 76 61 | 72 69 61 62 6c 65 2e 0a |e CWD va|riable..|
|000017d0| 58 0a 58 62 29 20 56 65 | 72 69 66 79 20 74 68 65 |X.Xb) Ve|rify the|
|000017e0| 20 63 68 6f 73 65 6e 20 | 63 6f 6d 70 69 6c 65 72 | chosen |compiler|
|000017f0| 20 61 6e 64 20 74 68 65 | 20 63 6f 6d 70 69 6c 65 | and the| compile|
|00001800| 72 20 6f 70 74 69 6f 6e | 73 0a 58 09 2d 20 66 6f |r option|s.X.- fo|
|00001810| 72 20 74 68 69 73 2c 20 | 79 6f 75 20 68 61 76 65 |r this, |you have|
|00001820| 20 74 6f 20 6c 6f 6f 6b | 20 69 6e 74 6f 20 74 68 | to look| into th|
|00001830| 65 20 70 6c 61 74 66 6f | 72 6d 20 73 70 65 63 69 |e platfo|rm speci|
|00001840| 66 69 63 0a 58 09 20 20 | 6d 61 6b 65 66 69 6c 65 |fic.X. |makefile|
|00001850| 73 20 28 6d 61 6b 65 66 | 69 6c 65 2e 73 6f 34 2c |s (makef|ile.so4,|
|00001860| 20 6d 61 6b 65 66 69 6c | 65 2e 6f 73 66 20 65 74 | makefil|e.osf et|
|00001870| 63 29 0a 58 0a 58 63 29 | 20 4e 6f 74 65 20 66 6f |c).X.Xc)| Note fo|
|00001880| 72 20 4d 53 2f 44 4f 53 | 3a 20 79 6f 75 20 6e 65 |r MS/DOS|: you ne|
|00001890| 65 64 20 61 20 60 6d 61 | 6b 65 2e 65 78 65 27 20 |ed a `ma|ke.exe' |
|000018a0| 74 68 61 74 20 73 75 70 | 70 6f 72 74 73 20 74 68 |that sup|ports th|
|000018b0| 65 20 60 69 6e 63 6c 75 | 64 65 27 0a 58 09 63 6f |e `inclu|de'.X.co|
|000018c0| 6d 6d 61 6e 64 20 28 65 | 2e 67 2e 20 74 68 65 20 |mmand (e|.g. the |
|000018d0| 70 6f 72 74 20 6f 66 20 | 47 4e 55 2d 6d 61 6b 65 |port of |GNU-make|
|000018e0| 29 2e 20 49 66 20 79 6f | 75 20 64 6f 20 6e 6f 74 |). If yo|u do not|
|000018f0| 20 68 61 76 65 0a 58 09 | 73 75 63 68 20 61 20 6d | have.X.|such a m|
|00001900| 61 6b 65 2c 20 72 65 70 | 6c 61 63 65 20 74 68 65 |ake, rep|lace the|
|00001910| 20 74 77 6f 20 60 69 6e | 63 6c 75 64 65 27 20 6c | two `in|clude' l|
|00001920| 69 6e 65 73 20 69 6e 20 | 60 4d 61 6b 65 66 69 6c |ines in |`Makefil|
|00001930| 65 27 0a 58 09 77 69 74 | 68 20 74 68 65 20 63 6f |e'.X.wit|h the co|
|00001940| 6d 70 6c 65 74 65 20 63 | 6f 6e 74 65 6e 74 20 6f |mplete c|ontent o|
|00001950| 66 20 74 68 65 20 69 6e | 64 69 63 61 74 65 64 20 |f the in|dicated |
|00001960| 66 69 6c 65 73 2e 0a 58 | 0a 58 64 29 20 53 74 61 |files..X|.Xd) Sta|
|00001970| 72 74 20 6d 61 6b 65 0a | 58 09 2d 20 61 6e 64 20 |rt make.|X.- and |
|00001980| 68 6f 70 65 20 74 68 61 | 74 20 4d 75 72 70 68 79 |hope tha|t Murphy|
|00001990| 20 69 73 6e 27 74 20 6c | 6f 6f 6b 69 6e 67 20 2e | isn't l|ooking .|
|000019a0| 2e 2e 0a 58 0a 58 65 29 | 20 43 68 65 63 6b 20 74 |...X.Xe)| Check t|
|000019b0| 68 65 20 63 6f 6d 70 69 | 6c 61 74 69 6f 6e 20 62 |he compi|lation b|
|000019c0| 79 20 73 74 61 72 74 69 | 6e 67 20 74 68 65 20 6c |y starti|ng the l|
|000019d0| 6f 63 61 6c 20 63 6f 6e | 73 6f 6c 65 20 70 72 6f |ocal con|sole pro|
|000019e0| 67 72 61 6d 20 60 6d 30 | 63 27 3a 0a 58 09 61 20 |gram `m0|c':.X.a |
|000019f0| 60 4d 30 3e 27 20 70 72 | 6f 6d 70 74 20 73 68 6f |`M0>' pr|ompt sho|
|00001a00| 75 6c 64 20 61 70 70 65 | 61 72 20 6f 6e 20 79 6f |uld appe|ar on yo|
|00001a10| 75 72 20 74 65 72 6d 69 | 6e 61 6c 20 73 63 72 65 |ur termi|nal scre|
|00001a20| 65 6e 2e 0a 58 09 55 73 | 65 20 60 71 75 69 74 27 |en..X.Us|e `quit'|
|00001a30| 20 74 6f 20 74 65 72 6d | 69 6e 61 74 65 20 74 68 | to term|inate th|
|00001a40| 65 20 63 6f 6e 73 6f 6c | 65 2e 0a 58 0a 58 66 29 |e consol|e..X.Xf)|
|00001a50| 20 46 6f 72 20 55 4e 49 | 58 20 70 6c 61 74 66 6f | For UNI|X platfo|
|00001a60| 72 6d 73 20 77 69 74 68 | 20 65 74 68 65 72 6e 65 |rms with| etherne|
|00001a70| 74 20 61 63 63 65 73 73 | 3a 20 74 68 65 20 6d 30 |t access|: the m0|
|00001a80| 20 61 6e 64 20 6d 30 63 | 20 70 72 6f 67 72 61 6d | and m0c| program|
|00001a90| 20 6d 75 73 74 0a 58 20 | 20 20 65 78 65 63 75 74 | must.X | execut|
|00001aa0| 65 20 74 68 65 20 63 68 | 61 6e 6e 65 6c 20 69 6e |e the ch|annel in|
|00001ab0| 69 74 69 61 6c 69 73 61 | 74 69 6f 6e 20 63 6f 64 |itialisa|tion cod|
|00001ac0| 65 20 75 6e 64 65 72 20 | 74 68 65 20 72 6f 6f 74 |e under |the root|
|00001ad0| 20 61 63 63 6f 75 6e 74 | 2c 0a 58 20 20 20 6f 74 | account|,.X ot|
|00001ae0| 68 65 72 77 69 73 65 20 | 65 74 68 65 72 6e 65 74 |herwise |ethernet|
|00001af0| 20 63 68 61 6e 6e 65 6c | 73 20 77 69 6c 6c 20 6e | channel|s will n|
|00001b00| 6f 74 20 62 65 20 61 76 | 61 69 6c 61 62 6c 65 2e |ot be av|ailable.|
|00001b10| 20 54 68 75 73 2c 20 74 | 68 65 73 65 0a 58 20 20 | Thus, t|hese.X |
|00001b20| 20 70 72 6f 67 72 61 6d | 73 20 73 68 6f 75 6c 64 | program|s should|
|00001b30| 20 62 65 20 6f 77 6e 65 | 64 20 62 79 20 72 6f 6f | be owne|d by roo|
|00001b40| 74 20 61 6e 64 20 68 61 | 76 65 20 74 68 65 20 73 |t and ha|ve the s|
|00001b50| 65 74 75 69 64 20 62 69 | 74 20 73 65 74 0a 58 20 |etuid bi|t set.X |
|00001b60| 20 20 28 74 68 65 20 72 | 6f 6f 74 20 70 72 69 76 | (the r|oot priv|
|00001b70| 69 6c 65 67 65 73 20 61 | 72 65 20 64 72 6f 70 70 |ileges a|re dropp|
|00001b80| 65 64 20 62 65 66 6f 72 | 65 20 61 6e 79 20 66 69 |ed befor|e any fi|
|00001b90| 6c 65 20 61 63 63 65 73 | 73 20 69 73 20 6d 61 64 |le acces|s is mad|
|00001ba0| 65 29 2e 0a 58 20 20 20 | 49 66 20 74 68 65 20 70 |e)..X |If the p|
|00001bb0| 72 6f 67 72 61 6d 20 63 | 61 6e 6e 6f 74 20 6f 70 |rogram c|annot op|
|00001bc0| 65 6e 20 74 68 65 20 65 | 74 68 65 72 6e 65 74 20 |en the e|thernet |
|00001bd0| 64 65 76 69 63 65 2c 20 | 69 74 20 73 69 6d 70 6c |device, |it simpl|
|00001be0| 79 20 73 6b 69 70 73 20 | 74 68 69 73 0a 58 20 20 |y skips |this.X |
|00001bf0| 20 63 68 61 6e 6e 65 6c | 20 69 6e 74 65 72 66 61 | channel| interfa|
|00001c00| 63 65 20 62 75 74 20 63 | 6f 6e 74 69 6e 75 65 73 |ce but c|ontinues|
|00001c10| 20 6e 6f 72 6d 61 6c 20 | 6f 70 65 72 61 74 69 6f | normal |operatio|
|00001c20| 6e 2e 0a 58 0a 58 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |n..X.X--|--------|
|00001c30| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c40| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c50| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c60| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00001c70| 2d 2d 2d 2d 0a 58 0a 58 | 54 68 65 20 6c 61 74 65 |----.X.X|The late|
|00001c80| 73 74 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 4d 30 |st versi|on of M0|
|00001c90| 20 63 61 6e 20 62 65 20 | 66 6f 75 6e 64 20 76 69 | can be |found vi|
|00001ca0| 61 20 61 6e 6f 6e 79 6d | 6f 75 73 20 46 54 50 3a |a anonym|ous FTP:|
|00001cb0| 0a 58 09 68 6f 73 74 3a | 20 20 20 20 20 20 20 63 |.X.host:| c|
|00001cc0| 75 69 2e 75 6e 69 67 65 | 2e 63 68 20 28 31 32 39 |ui.unige|.ch (129|
|00001cd0| 2e 31 39 34 2e 37 30 2e | 31 29 0a 58 09 64 69 72 |.194.70.|1).X.dir|
|00001ce0| 65 63 74 6f 72 79 3a 20 | 20 2f 70 75 62 2f 6d 30 |ectory: | /pub/m0|
|00001cf0| 0a 58 0a 58 50 6c 65 61 | 73 65 20 72 65 70 6f 72 |.X.XPlea|se repor|
|00001d00| 74 20 62 75 67 73 2c 20 | 70 72 6f 62 6c 65 6d 73 |t bugs, |problems|
|00001d10| 2c 20 63 6f 6d 6d 65 6e | 74 73 20 61 6e 64 20 6d |, commen|ts and m|
|00001d20| 6f 64 69 66 69 63 61 74 | 69 6f 6e 73 20 74 6f 0a |odificat|ions to.|
|00001d30| 58 0a 58 09 43 68 72 69 | 73 74 69 61 6e 20 46 2e |X.X.Chri|stian F.|
|00001d40| 20 54 73 63 68 75 64 69 | 6e 0a 58 09 43 65 6e 74 | Tschudi|n.X.Cent|
|00001d50| 72 65 20 55 6e 69 76 65 | 72 73 69 74 61 69 72 65 |re Unive|rsitaire|
|00001d60| 20 64 27 49 6e 66 6f 72 | 6d 61 74 69 71 75 65 0a | d'Infor|matique.|
|00001d70| 58 09 55 6e 69 76 65 72 | 73 69 74 79 20 6f 66 20 |X.Univer|sity of |
|00001d80| 47 65 6e 65 76 61 0a 58 | 09 32 34 2c 20 72 75 65 |Geneva.X|.24, rue|
|00001d90| 20 64 75 20 47 65 6e 65 | 72 61 6c 20 44 75 66 6f | du Gene|ral Dufo|
|00001da0| 75 72 0a 58 09 43 48 20 | 2d 20 31 32 31 31 20 47 |ur.X.CH |- 1211 G|
|00001db0| 65 6e 65 76 61 20 34 2c | 20 53 77 69 74 7a 65 72 |eneva 4,| Switzer|
|00001dc0| 6c 61 6e 64 0a 58 0a 58 | 09 3c 74 73 63 68 75 64 |land.X.X|.<tschud|
|00001dd0| 69 6e 40 63 75 69 2e 75 | 6e 69 67 65 2e 63 68 3e |in@cui.u|nige.ch>|
|00001de0| 0a 58 0a 58 23 20 65 6f | 66 0a 45 4e 44 5f 4f 46 |.X.X# eo|f.END_OF|
|00001df0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 34 30 |_FILE.if| test 40|
|00001e00| 37 33 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |73 -ne `|wc -c <'|
|00001e10| 52 45 41 44 4d 45 27 60 | 3b 20 74 68 65 6e 0a 20 |README'`|; then. |
|00001e20| 20 20 20 65 63 68 6f 20 | 73 68 61 72 3a 20 5c 22 | echo |shar: \"|
|00001e30| 27 52 45 41 44 4d 45 27 | 5c 22 20 75 6e 70 61 63 |'README'|\" unpac|
|00001e40| 6b 65 64 20 77 69 74 68 | 20 77 72 6f 6e 67 20 73 |ked with| wrong s|
|00001e50| 69 7a 65 21 0a 66 69 0a | 23 20 65 6e 64 20 6f 66 |ize!.fi.|# end of|
|00001e60| 20 27 52 45 41 44 4d 45 | 27 0a 66 69 0a 69 66 20 | 'README|'.fi.if |
|00001e70| 74 65 73 74 20 2d 66 20 | 27 54 4f 44 4f 2e 64 6f |test -f |'TODO.do|
|00001e80| 63 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |c' -a "$|{1}" != |
|00001e90| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00001ea0| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00001eb0| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|00001ec0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 54 4f 44 4f |ing file| \"'TODO|
|00001ed0| 2e 64 6f 63 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |.doc'\".|else.ech|
|00001ee0| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00001ef0| 6e 67 20 5c 22 27 54 4f | 44 4f 2e 64 6f 63 27 5c |ng \"'TO|DO.doc'\|
|00001f00| 22 20 5c 28 31 34 36 35 | 20 63 68 61 72 61 63 74 |" \(1465| charact|
|00001f10| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|00001f20| 2f 22 20 3e 27 54 4f 44 | 4f 2e 64 6f 63 27 20 3c |/" >'TOD|O.doc' <|
|00001f30| 3c 27 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 27 0a 58 |<'END_OF|_FILE'.X|
|00001f40| 23 20 54 4f 44 4f 2e 64 | 6f 63 0a 58 23 20 74 68 |# TODO.d|oc.X# th|
|00001f50| 69 6e 67 73 20 74 6f 20 | 64 6f 20 6f 72 20 72 65 |ings to |do or re|
|00001f60| 76 69 65 77 20 28 4d 61 | 79 20 31 39 39 34 29 0a |view (Ma|y 1994).|
|00001f70| 58 0a 58 67 6c 6f 62 61 | 6c 64 69 63 74 0a 58 09 |X.Xgloba|ldict.X.|
|00001f80| 70 72 65 76 65 6e 74 20 | 6d 65 73 73 65 6e 67 65 |prevent |messenge|
|00001f90| 72 73 20 66 72 6f 6d 20 | 72 65 6d 6f 76 69 6e 67 |rs from |removing|
|00001fa0| 20 74 68 65 20 72 77 20 | 61 74 74 72 69 62 75 74 | the rw |attribut|
|00001fb0| 65 73 20 66 72 6f 6d 0a | 58 09 74 68 65 20 67 6c |es from.|X.the gl|
|00001fc0| 6f 62 61 6c 20 64 69 63 | 74 69 6f 6e 61 72 79 20 |obal dic|tionary |
|00001fd0| 5f 0a 58 0a 58 65 72 72 | 6f 72 20 68 61 6e 64 6c |_.X.Xerr|or handl|
|00001fe0| 69 6e 67 0a 58 09 72 65 | 76 69 65 77 20 74 68 65 |ing.X.re|view the|
|00001ff0| 20 70 72 6f 62 6c 65 6d | 20 6f 66 20 73 74 61 63 | problem| of stac|
|00002000| 6b 20 6f 76 65 72 66 6c | 6f 77 73 0a 58 0a 58 6c |k overfl|ows.X.Xl|
|00002010| 5f 63 6f 6d 70 61 74 0a | 58 09 61 75 74 6f 6d 61 |_compat.|X.automa|
|00002020| 74 69 63 20 68 6f 73 74 | 69 64 20 67 65 6e 65 72 |tic host|id gener|
|00002030| 61 74 69 6f 6e 20 66 6f | 72 20 4d 53 44 4f 53 3f |ation fo|r MSDOS?|
|00002040| 0a 58 0a 58 6c 5f 63 6f | 6d 70 61 74 2c 20 73 74 |.X.Xl_co|mpat, st|
|00002050| 64 2e 68 20 28 72 61 6e | 64 6f 6d 69 7a 65 29 0a |d.h (ran|domize).|
|00002060| 58 09 69 6e 63 6c 75 64 | 65 20 74 68 65 20 68 6f |X.includ|e the ho|
|00002070| 73 74 20 69 64 20 61 6e | 64 20 6f 74 68 65 72 20 |st id an|d other |
|00002080| 6c 6f 63 61 6c 20 69 6e | 66 6f 72 6d 61 74 69 6f |local in|formatio|
|00002090| 6e 20 66 6f 72 20 73 65 | 74 74 69 6e 67 20 74 68 |n for se|tting th|
|000020a0| 65 20 73 65 65 64 0a 58 | 0a 58 6d 30 2e 63 20 77 |e seed.X|.Xm0.c w|
|000020b0| 69 74 68 20 44 45 42 55 | 47 0a 58 09 61 64 64 20 |ith DEBU|G.X.add |
|000020c0| 6f 70 74 69 6f 6e 20 74 | 6f 20 74 6f 67 67 6c 65 |option t|o toggle|
|000020d0| 20 64 75 6d 70 69 6e 67 | 20 6f 66 20 61 62 6f 72 | dumping| of abor|
|000020e0| 74 65 64 20 70 72 6f 63 | 65 73 73 65 73 20 77 68 |ted proc|esses wh|
|000020f0| 65 6e 20 63 6f 6d 70 69 | 6c 65 64 0a 58 0a 58 6d |en compi|led.X.Xm|
|00002100| 65 73 73 65 6e 67 65 72 | 20 70 61 63 6b 61 67 69 |essenger| packagi|
|00002110| 6e 67 20 70 72 6f 67 72 | 61 6d 0a 58 09 63 72 65 |ng progr|am.X.cre|
|00002120| 61 74 65 20 6d 30 74 6f | 6d 73 67 72 2e 63 20 66 |ate m0to|msgr.c f|
|00002130| 6f 72 20 61 64 64 69 6e | 67 20 61 6e 64 20 63 6f |or addin|g and co|
|00002140| 6d 70 75 74 69 6e 67 20 | 74 68 65 20 4d 30 20 68 |mputing |the M0 h|
|00002150| 65 61 64 65 72 20 66 69 | 65 6c 64 73 2e 0a 58 0a |eader fi|elds..X.|
|00002160| 58 6d 65 73 73 65 6e 67 | 65 72 20 76 65 63 74 6f |Xmesseng|er vecto|
|00002170| 72 20 70 72 6f 67 72 61 | 6d 0a 58 09 63 72 65 61 |r progra|m.X.crea|
|00002180| 74 65 20 6d 30 76 2e 63 | 20 66 6f 72 20 73 65 6e |te m0v.c| for sen|
|00002190| 64 69 6e 67 20 61 20 6d | 65 73 73 65 6e 67 65 72 |ding a m|essenger|
|000021a0| 20 76 69 61 20 55 44 50 | 2c 20 4e 49 54 20 65 74 | via UDP|, NIT et|
|000021b0| 63 0a 58 0a 58 74 69 6d | 65 6f 75 74 20 6d 65 63 |c.X.Xtim|eout mec|
|000021c0| 68 61 6e 69 73 6d 20 28 | 20 6e 65 78 74 5f 74 69 |hanism (| next_ti|
|000021d0| 6d 65 6f 75 74 28 29 20 | 29 0a 58 09 63 68 65 63 |meout() |).X.chec|
|000021e0| 6b 20 66 6f 72 20 69 6e | 74 65 67 65 72 20 6f 76 |k for in|teger ov|
|000021f0| 65 72 66 6c 6f 77 20 28 | 6d 69 63 72 6f 73 65 63 |erflow (|microsec|
|00002200| 6f 6e 64 73 21 29 0a 58 | 0a 58 72 65 61 64 6d 65 |onds!).X|.Xreadme|
|00002210| 2e 64 6f 63 0a 58 09 45 | 78 70 6c 61 69 6e 20 68 |.doc.X.E|xplain h|
|00002220| 6f 77 20 74 6f 20 61 64 | 64 20 6e 65 77 20 63 68 |ow to ad|d new ch|
|00002230| 61 6e 6e 65 6c 73 20 74 | 6f 20 74 68 65 20 43 2d |annels t|o the C-|
|00002240| 73 6f 75 72 63 65 73 2c | 0a 58 09 61 6e 64 20 69 |sources,|.X.and i|
|00002250| 6e 20 74 68 65 20 43 2d | 73 6f 75 72 63 65 73 3a |n the C-|sources:|
|00002260| 20 66 69 6e 64 20 61 20 | 6d 6f 72 65 20 67 65 6e | find a |more gen|
|00002270| 65 72 69 63 20 77 61 79 | 20 74 6f 20 69 6e 69 74 |eric way| to init|
|00002280| 69 61 6c 69 7a 65 20 63 | 68 61 6e 6e 65 6c 73 0a |ialize c|hannels.|
|00002290| 58 0a 58 41 64 64 20 61 | 20 44 4c 50 49 20 63 68 |X.XAdd a| DLPI ch|
|000022a0| 61 6e 6e 65 6c 20 66 6f | 72 20 53 6f 6c 61 72 69 |annel fo|r Solari|
|000022b0| 73 0a 58 0a 58 41 64 64 | 20 61 20 70 61 63 6b 65 |s.X.XAdd| a packe|
|000022c0| 74 20 64 72 69 76 65 72 | 20 63 68 61 6e 6e 65 6c |t driver| channel|
|000022d0| 20 66 6f 72 20 4d 53 2f | 44 4f 53 0a 58 0a 58 63 | for MS/|DOS.X.Xc|
|000022e0| 6f 6e 73 5f 69 6e 69 2e | 6d 30 20 61 6e 64 20 6d |ons_ini.|m0 and m|
|000022f0| 30 63 2f 6d 30 75 63 0a | 58 09 61 64 64 20 65 78 |0c/m0uc.|X.add ex|
|00002300| 70 6c 69 63 69 74 20 73 | 69 67 6e 61 6c 20 6f 66 |plicit s|ignal of|
|00002310| 20 65 6e 64 2d 6f 66 2d | 64 6f 77 6e 6c 6f 61 64 | end-of-|download|
|00002320| 20 66 6f 72 20 69 74 65 | 72 61 74 69 6e 67 20 6f | for ite|rating o|
|00002330| 76 65 72 0a 58 09 73 65 | 76 65 72 61 6c 20 64 6f |ver.X.se|veral do|
|00002340| 77 6e 6c 6f 61 64 20 66 | 69 6c 65 73 0a 58 0a 58 |wnload f|iles.X.X|
|00002350| 63 79 63 6c 69 63 20 64 | 61 74 61 73 74 72 75 63 |cyclic d|atastruc|
|00002360| 74 75 72 65 73 0a 58 09 | 4d 30 20 69 6d 70 6c 65 |tures.X.|M0 imple|
|00002370| 6d 65 6e 74 73 20 61 20 | 72 65 66 65 72 65 6e 63 |ments a |referenc|
|00002380| 65 20 63 6f 75 6e 74 65 | 72 20 66 6f 72 20 65 61 |e counte|r for ea|
|00002390| 63 68 20 64 61 74 61 20 | 6f 62 6a 65 63 74 2e 20 |ch data |object. |
|000023a0| 54 68 69 73 0a 58 09 68 | 65 6c 70 73 20 69 6e 20 |This.X.h|elps in |
|000023b0| 66 72 65 65 69 6e 67 20 | 6d 65 6d 6f 72 79 20 61 |freeing |memory a|
|000023c0| 6e 64 20 61 76 6f 69 64 | 73 20 67 61 72 62 61 67 |nd avoid|s garbag|
|000023d0| 65 20 63 6f 6c 6c 65 63 | 74 69 6f 6e 20 72 75 6e |e collec|tion run|
|000023e0| 73 2e 0a 58 09 48 6f 77 | 65 76 65 72 2c 20 74 68 |s..X.How|ever, th|
|000023f0| 69 73 20 64 6f 65 73 20 | 6e 6f 74 20 77 6f 72 6b |is does |not work|
|00002400| 20 63 6f 72 72 65 63 74 | 6c 79 20 66 6f 72 20 63 | correct|ly for c|
|00002410| 79 63 6c 69 63 20 64 61 | 74 61 20 73 74 72 75 63 |yclic da|ta struc|
|00002420| 74 75 72 65 2c 0a 58 09 | 77 68 65 72 65 20 73 70 |ture,.X.|where sp|
|00002430| 65 63 69 61 6c 20 6d 65 | 6d 6f 72 79 20 73 77 65 |ecial me|mory swe|
|00002440| 65 70 73 20 61 72 65 20 | 28 77 6f 75 6c 64 20 62 |eps are |(would b|
|00002450| 65 29 20 6e 65 76 65 72 | 74 68 65 6c 65 73 73 20 |e) never|theless |
|00002460| 6e 65 63 65 73 73 61 72 | 79 2e 0a 58 0a 58 63 5f |necessar|y..X.Xc_|
|00002470| 6e 69 74 2c 20 63 5f 75 | 64 70 3a 0a 58 09 49 6d |nit, c_u|dp:.X.Im|
|00002480| 70 6c 65 6d 65 6e 74 20 | 61 20 67 61 74 68 65 72 |plement |a gather|
|00002490| 2d 77 72 69 74 65 20 73 | 74 72 61 74 65 67 79 20 |-write s|trategy |
|000024a0| 66 6f 72 20 73 65 6e 64 | 69 6e 67 20 61 20 6d 65 |for send|ing a me|
|000024b0| 73 73 65 6e 67 65 72 0a | 58 09 28 65 78 70 6c 6f |ssenger.|X.(explo|
|000024c0| 69 74 20 74 68 65 20 66 | 72 61 67 6d 65 6e 74 73 |it the f|ragments|
|000024d0| 29 2e 20 42 75 74 20 69 | 6e 20 6d 6f 73 74 20 63 |). But i|n most c|
|000024e0| 61 73 65 73 20 74 68 65 | 20 6d 73 67 72 20 73 74 |ases the| msgr st|
|000024f0| 72 69 6e 67 0a 58 09 69 | 73 20 61 6c 6c 6f 63 61 |ring.X.i|s alloca|
|00002500| 74 65 64 20 69 6e 20 6f | 6e 65 20 70 69 65 63 65 |ted in o|ne piece|
|00002510| 2e 20 28 72 65 73 75 6c | 74 20 6f 66 20 5f 63 74 |. (resul|t of _ct|
|00002520| 6d 29 0a 58 0a 58 23 20 | 65 6f 66 0a 45 4e 44 5f |m).X.X# |eof.END_|
|00002530| 4f 46 5f 46 49 4c 45 0a | 69 66 20 74 65 73 74 20 |OF_FILE.|if test |
|00002540| 31 34 36 35 20 2d 6e 65 | 20 60 77 63 20 2d 63 20 |1465 -ne| `wc -c |
|00002550| 3c 27 54 4f 44 4f 2e 64 | 6f 63 27 60 3b 20 74 68 |<'TODO.d|oc'`; th|
|00002560| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00002570| 3a 20 5c 22 27 54 4f 44 | 4f 2e 64 6f 63 27 5c 22 |: \"'TOD|O.doc'\"|
|00002580| 20 75 6e 70 61 63 6b 65 | 64 20 77 69 74 68 20 77 | unpacke|d with w|
|00002590| 72 6f 6e 67 20 73 69 7a | 65 21 0a 66 69 0a 23 20 |rong siz|e!.fi.# |
|000025a0| 65 6e 64 20 6f 66 20 27 | 54 4f 44 4f 2e 64 6f 63 |end of '|TODO.doc|
|000025b0| 27 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |'.fi.if |test -f |
|000025c0| 27 63 5f 63 6f 6e 2e 63 | 27 20 2d 61 20 22 24 7b |'c_con.c|' -a "${|
|000025d0| 31 7d 22 20 21 3d 20 22 | 2d 63 22 20 3b 20 74 68 |1}" != "|-c" ; th|
|000025e0| 65 6e 20 0a 20 20 65 63 | 68 6f 20 73 68 61 72 3a |en . ec|ho shar:|
|000025f0| 20 57 69 6c 6c 20 6e 6f | 74 20 63 6c 6f 62 62 65 | Will no|t clobbe|
|00002600| 72 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |r existi|ng file |
|00002610| 5c 22 27 63 5f 63 6f 6e | 2e 63 27 5c 22 0a 65 6c |\"'c_con|.c'\".el|
|00002620| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00002630| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 63 5f 63 6f |tracting| \"'c_co|
|00002640| 6e 2e 63 27 5c 22 20 5c | 28 32 34 31 35 20 63 68 |n.c'\" \|(2415 ch|
|00002650| 61 72 61 63 74 65 72 73 | 5c 29 0a 73 65 64 20 22 |aracters|\).sed "|
|00002660| 73 2f 5e 58 2f 2f 22 20 | 3e 27 63 5f 63 6f 6e 2e |s/^X//" |>'c_con.|
|00002670| 63 27 20 3c 3c 27 45 4e | 44 5f 4f 46 5f 46 49 4c |c' <<'EN|D_OF_FIL|
|00002680| 45 27 0a 58 2f 2a 0a 58 | 09 63 5f 63 6f 6e 2e 63 |E'.X/*.X|.c_con.c|
|00002690| 0a 58 2a 2f 0a 58 2f 2a | 20 20 43 6f 70 79 72 69 |.X*/.X/*| Copyri|
|000026a0| 67 68 74 20 28 63 29 20 | 31 39 39 34 20 43 68 72 |ght (c) |1994 Chr|
|000026b0| 69 73 74 69 61 6e 20 46 | 2e 20 54 73 63 68 75 64 |istian F|. Tschud|
|000026c0| 69 6e 2e 20 41 6c 6c 20 | 72 69 67 68 74 73 20 72 |in. All |rights r|
|000026d0| 65 73 65 72 76 65 64 2e | 0a 58 0a 58 20 20 20 20 |eserved.|.X.X |
|000026e0| 44 69 73 74 72 69 62 75 | 74 65 64 20 75 6e 64 65 |Distribu|ted unde|
|000026f0| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 20 74 |r the te|rms of t|
|00002700| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00002710| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 0a 58 20 |ublic Li|cense.X |
|00002720| 20 20 20 76 65 72 73 69 | 6f 6e 20 32 20 6f 66 20 | versi|on 2 of |
|00002730| 6a 75 6e 65 20 31 39 39 | 31 20 61 73 20 70 75 62 |june 199|1 as pub|
|00002740| 6c 69 73 68 65 64 20 62 | 79 20 74 68 65 20 46 72 |lished b|y the Fr|
|00002750| 65 65 20 53 6f 66 74 77 | 61 72 65 0a 58 20 20 20 |ee Softw|are.X |
|00002760| 20 46 6f 75 6e 64 61 74 | 69 6f 6e 2c 20 49 6e 63 | Foundat|ion, Inc|
|00002770| 2e 0a 58 0a 58 09 09 20 | 20 20 20 20 54 68 69 73 |..X.X.. | This|
|00002780| 20 66 69 6c 65 20 69 73 | 20 70 61 72 74 20 6f 66 | file is| part of|
|00002790| 20 4d 30 2e 0a 58 0a 58 | 4d 30 20 69 73 20 64 69 | M0..X.X|M0 is di|
|000027a0| 73 74 72 69 62 75 74 65 | 64 20 69 6e 20 74 68 65 |stribute|d in the|
|000027b0| 20 68 6f 70 65 20 74 68 | 61 74 20 69 74 20 77 69 | hope th|at it wi|
|000027c0| 6c 6c 20 62 65 20 75 73 | 65 66 75 6c 2c 20 62 75 |ll be us|eful, bu|
|000027d0| 74 20 57 49 54 48 4f 55 | 54 20 41 4e 59 0a 58 57 |t WITHOU|T ANY.XW|
|000027e0| 41 52 52 41 4e 54 59 2e | 20 20 4e 6f 20 61 75 74 |ARRANTY.| No aut|
|000027f0| 68 6f 72 20 6f 72 20 64 | 69 73 74 72 69 62 75 74 |hor or d|istribut|
|00002800| 6f 72 20 61 63 63 65 70 | 74 73 20 72 65 73 70 6f |or accep|ts respo|
|00002810| 6e 73 69 62 69 6c 69 74 | 79 20 74 6f 20 61 6e 79 |nsibilit|y to any|
|00002820| 6f 6e 65 20 66 6f 72 0a | 58 74 68 65 20 63 6f 6e |one for.|Xthe con|
|00002830| 73 65 71 75 65 6e 63 65 | 73 20 6f 66 20 75 73 69 |sequence|s of usi|
|00002840| 6e 67 20 69 74 20 6f 72 | 20 66 6f 72 20 77 68 65 |ng it or| for whe|
|00002850| 74 68 65 72 20 69 74 20 | 73 65 72 76 65 73 20 61 |ther it |serves a|
|00002860| 6e 79 20 70 61 72 74 69 | 63 75 6c 61 72 0a 58 70 |ny parti|cular.Xp|
|00002870| 75 72 70 6f 73 65 20 6f | 72 20 77 6f 72 6b 73 20 |urpose o|r works |
|00002880| 61 74 20 61 6c 6c 2c 20 | 75 6e 6c 65 73 73 20 68 |at all, |unless h|
|00002890| 65 20 73 61 79 73 20 73 | 6f 20 69 6e 20 77 72 69 |e says s|o in wri|
|000028a0| 74 69 6e 67 2e 20 20 52 | 65 66 65 72 20 74 6f 20 |ting. R|efer to |
|000028b0| 74 68 65 20 47 4e 55 0a | 58 47 65 6e 65 72 61 6c |the GNU.|XGeneral|
|000028c0| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 20 | Public |License |
|000028d0| 66 6f 72 20 66 75 6c 6c | 20 64 65 74 61 69 6c 73 |for full| details|
|000028e0| 2e 20 0a 58 0a 58 45 76 | 65 72 79 6f 6e 65 20 69 |. .X.XEv|eryone i|
|000028f0| 73 20 67 72 61 6e 74 65 | 64 20 70 65 72 6d 69 73 |s grante|d permis|
|00002900| 73 69 6f 6e 20 74 6f 20 | 63 6f 70 79 2c 20 6d 6f |sion to |copy, mo|
|00002910| 64 69 66 79 20 61 6e 64 | 20 72 65 64 69 73 74 72 |dify and| redistr|
|00002920| 69 62 75 74 65 20 4d 30 | 2c 20 62 75 74 0a 58 6f |ibute M0|, but.Xo|
|00002930| 6e 6c 79 20 75 6e 64 65 | 72 20 74 68 65 20 63 6f |nly unde|r the co|
|00002940| 6e 64 69 74 69 6f 6e 73 | 20 64 65 73 63 72 69 62 |nditions| describ|
|00002950| 65 64 20 69 6e 20 74 68 | 65 20 47 4e 55 20 47 65 |ed in th|e GNU Ge|
|00002960| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00002970| 65 6e 73 65 2e 20 0a 58 | 41 20 63 6f 70 79 20 6f |ense. .X|A copy o|
|00002980| 66 20 74 68 69 73 20 6c | 69 63 65 6e 73 65 20 69 |f this l|icense i|
|00002990| 73 20 73 75 70 70 6f 73 | 65 64 20 74 6f 20 68 61 |s suppos|ed to ha|
|000029a0| 76 65 20 62 65 65 6e 20 | 67 69 76 65 6e 20 74 6f |ve been |given to|
|000029b0| 20 79 6f 75 20 61 6c 6f | 6e 67 20 77 69 74 68 0a | you alo|ng with.|
|000029c0| 58 4d 30 20 73 6f 20 79 | 6f 75 20 63 61 6e 20 6b |XM0 so y|ou can k|
|000029d0| 6e 6f 77 20 79 6f 75 72 | 20 72 69 67 68 74 73 20 |now your| rights |
|000029e0| 61 6e 64 20 72 65 73 70 | 6f 6e 73 69 62 69 6c 69 |and resp|onsibili|
|000029f0| 74 69 65 73 2e 20 20 49 | 74 20 73 68 6f 75 6c 64 |ties. I|t should|
|00002a00| 20 62 65 20 69 6e 20 61 | 0a 58 66 69 6c 65 20 6e | be in a|.Xfile n|
|00002a10| 61 6d 65 64 20 4c 49 43 | 45 4e 53 45 2e 20 20 41 |amed LIC|ENSE. A|
|00002a20| 6d 6f 6e 67 20 6f 74 68 | 65 72 20 74 68 69 6e 67 |mong oth|er thing|
|00002a30| 73 2c 20 74 68 65 20 63 | 6f 70 79 72 69 67 68 74 |s, the c|opyright|
|00002a40| 20 6e 6f 74 69 63 65 20 | 61 6e 64 20 74 68 69 73 | notice |and this|
|00002a50| 0a 58 6e 6f 74 69 63 65 | 20 6d 75 73 74 20 62 65 |.Xnotice| must be|
|00002a60| 20 70 72 65 73 65 72 76 | 65 64 20 6f 6e 20 61 6c | preserv|ed on al|
|00002a70| 6c 20 63 6f 70 69 65 73 | 2e 20 20 2a 2f 0a 58 0a |l copies|. */.X.|
|00002a80| 58 23 69 6e 63 6c 75 64 | 65 20 22 63 5f 70 72 6f |X#includ|e "c_pro|
|00002a90| 74 6f 2e 68 22 0a 58 0a | 58 0a 58 23 69 66 64 65 |to.h".X.|X.X#ifde|
|00002aa0| 66 20 43 48 41 4e 4e 45 | 4c 5f 43 4f 4e 53 4f 4c |f CHANNE|L_CONSOL|
|00002ab0| 45 0a 58 0a 58 69 6e 74 | 20 6d 73 67 72 5f 77 61 |E.X.Xint| msgr_wa|
|00002ac0| 73 5f 65 6d 70 74 79 20 | 3d 20 30 3b 0a 58 65 69 |s_empty |= 0;.Xei|
|00002ad0| 6e 64 65 78 20 63 6f 6e | 73 6f 6c 65 5f 61 64 64 |ndex con|sole_add|
|00002ae0| 72 3b 0a 58 65 69 6e 64 | 65 78 20 63 6f 6e 73 6f |r;.Xeind|ex conso|
|00002af0| 6c 65 5f 6e 61 6d 65 3b | 0a 58 73 74 61 74 69 63 |le_name;|.Xstatic|
|00002b00| 20 62 79 74 65 70 74 72 | 20 6b 5f 71 75 65 75 65 | byteptr| k_queue|
|00002b10| 2c 20 6b 5f 76 65 63 74 | 3b 0a 58 0a 58 73 74 61 |, k_vect|;.X.Xsta|
|00002b20| 74 69 63 20 76 6f 69 64 | 0a 58 6c 69 6e 65 32 6d |tic void|.Xline2m|
|00002b30| 73 67 72 28 69 6e 74 20 | 66 64 2c 20 65 69 6e 64 |sgr(int |fd, eind|
|00002b40| 65 78 20 2a 6d 2c 20 65 | 69 6e 64 65 78 20 2a 6f |ex *m, e|index *o|
|00002b50| 29 0a 58 7b 0a 58 23 64 | 65 66 69 6e 65 20 4c 49 |).X{.X#d|efine LI|
|00002b60| 4e 45 53 49 5a 45 09 32 | 35 36 0a 58 09 62 79 74 |NESIZE.2|56.X.byt|
|00002b70| 65 20 6c 69 6e 65 5b 4c | 49 4e 45 53 49 5a 45 5d |e line[L|INESIZE]|
|00002b80| 3b 0a 58 09 69 6e 74 20 | 63 6e 74 3b 0a 58 0a 58 |;.X.int |cnt;.X.X|
|00002b90| 09 63 6e 74 20 3d 20 72 | 65 61 64 28 30 2c 20 6c |.cnt = r|ead(0, l|
|00002ba0| 69 6e 65 2c 20 4c 49 4e | 45 53 49 5a 45 29 3b 0a |ine, LIN|ESIZE);.|
|00002bb0| 58 09 69 66 20 28 63 6e | 74 20 3e 20 30 29 20 7b |X.if (cn|t > 0) {|
|00002bc0| 0a 58 09 09 75 69 6e 74 | 20 6d 73 67 72 6c 65 6e |.X..uint| msgrlen|
|00002bd0| 3b 0a 58 09 09 62 79 74 | 65 70 74 72 20 73 20 3d |;.X..byt|eptr s =|
|00002be0| 20 20 6d 61 6b 65 5f 6d | 73 67 72 28 6b 5f 71 75 | make_m|sgr(k_qu|
|00002bf0| 65 75 65 2c 0a 58 09 09 | 09 09 09 6b 5f 76 65 63 |eue,.X..|...k_vec|
|00002c00| 74 2c 20 73 74 72 6c 65 | 6e 28 28 63 68 61 72 2a |t, strle|n((char*|
|00002c10| 29 6b 5f 76 65 63 74 29 | 2c 0a 58 09 09 09 09 09 |)k_vect)|,.X.....|
|00002c20| 63 6e 74 3e 31 3f 28 62 | 79 74 65 70 74 72 29 6c |cnt>1?(b|yteptr)l|
|00002c30| 69 6e 65 3a 30 2c 20 63 | 6e 74 2d 31 2c 0a 58 09 |ine:0, c|nt-1,.X.|
|00002c40| 09 09 09 09 26 6d 73 67 | 72 6c 65 6e 29 3b 0a 58 |....&msg|rlen);.X|
|00002c50| 0a 58 09 09 54 52 41 43 | 45 28 33 2c 20 70 72 69 |.X..TRAC|E(3, pri|
|00002c60| 6e 74 66 28 22 63 6f 6e | 73 6f 6c 65 20 6c 69 6e |ntf("con|sole lin|
|00002c70| 65 32 6d 73 67 72 2c 20 | 25 64 20 62 79 74 65 73 |e2msgr, |%d bytes|
|00002c80| 5c 6e 22 2c 20 63 6e 74 | 29 29 0a 58 0a 58 09 09 |\n", cnt|)).X.X..|
|00002c90| 2a 6d 20 3d 20 73 74 72 | 5f 69 6d 70 6f 72 74 28 |*m = str|_import(|
|00002ca0| 30 2c 20 73 2c 20 6d 73 | 67 72 6c 65 6e 2c 20 6d |0, s, ms|grlen, m|
|00002cb0| 73 67 72 6c 65 6e 29 3b | 0a 58 09 09 2a 6f 20 3d |sgrlen);|.X..*o =|
|00002cc0| 20 6e 75 6c 6c 5f 76 61 | 6c 3b 0a 58 09 09 69 6e | null_va|l;.X..in|
|00002cd0| 63 72 65 66 70 28 67 61 | 64 64 72 28 6e 75 6c 6c |crefp(ga|ddr(null|
|00002ce0| 5f 76 61 6c 29 29 3b 0a | 58 09 7d 20 65 6c 73 65 |_val));.|X.} else|
|00002cf0| 0a 58 09 09 2a 6d 20 3d | 20 30 3b 0a 58 7d 0a 58 |.X..*m =| 0;.X}.X|
|00002d00| 0a 58 0a 58 69 6e 74 0a | 58 63 6f 6e 73 6f 6c 65 |.X.Xint.|Xconsole|
|00002d10| 5f 69 6e 69 74 28 62 79 | 74 65 70 74 72 20 6b 65 |_init(by|teptr ke|
|00002d20| 79 62 6f 61 72 64 5f 71 | 75 65 75 65 2c 20 62 79 |yboard_q|ueue, by|
|00002d30| 74 65 70 74 72 20 6b 65 | 79 62 6f 61 72 64 5f 76 |teptr ke|yboard_v|
|00002d40| 65 63 74 29 0a 58 7b 0a | 58 09 6b 5f 71 75 65 75 |ect).X{.|X.k_queu|
|00002d50| 65 20 3d 20 6b 65 79 62 | 6f 61 72 64 5f 71 75 65 |e = keyb|oard_que|
|00002d60| 75 65 3b 0a 58 09 6b 5f | 76 65 63 74 20 3d 20 6b |ue;.X.k_|vect = k|
|00002d70| 65 79 62 6f 61 72 64 5f | 76 65 63 74 3b 0a 58 0a |eyboard_|vect;.X.|
|00002d80| 58 09 63 6f 6e 73 6f 6c | 65 5f 6e 61 6d 65 20 3d |X.consol|e_name =|
|00002d90| 20 6e 61 6d 65 5f 61 64 | 64 28 28 62 79 74 65 70 | name_ad|d((bytep|
|00002da0| 74 72 29 22 63 6f 6e 73 | 6f 6c 65 22 2c 20 37 2c |tr)"cons|ole", 7,|
|00002db0| 20 41 5f 45 58 45 43 55 | 54 41 42 4c 45 29 3b 0a | A_EXECU|TABLE);.|
|00002dc0| 58 09 61 64 64 5f 69 6e | 63 6f 6d 69 6e 67 28 30 |X.add_in|coming(0|
|00002dd0| 2c 20 6c 69 6e 65 32 6d | 73 67 72 2c 20 63 6f 6e |, line2m|sgr, con|
|00002de0| 73 6f 6c 65 5f 6e 61 6d | 65 2c 20 30 29 3b 20 2f |sole_nam|e, 0); /|
|00002df0| 2a 20 73 74 64 69 6e 20 | 2a 2f 0a 58 0a 58 09 63 |* stdin |*/.X.X.c|
|00002e00| 6f 6e 73 6f 6c 65 5f 61 | 64 64 72 20 3d 20 6e 65 |onsole_a|ddr = ne|
|00002e10| 77 5f 61 72 72 61 79 28 | 30 2c 20 31 29 3b 0a 58 |w_array(|0, 1);.X|
|00002e20| 0a 58 09 72 65 74 75 72 | 6e 20 30 3b 0a 58 7d 0a |.X.retur|n 0;.X}.|
|00002e30| 58 0a 58 0a 58 73 74 61 | 74 69 63 20 76 6f 69 64 |X.X.Xsta|tic void|
|00002e40| 0a 58 63 6f 6e 73 6f 6c | 65 5f 73 75 62 6d 69 74 |.Xconsol|e_submit|
|00002e50| 28 6d 70 72 6f 63 20 70 | 2c 20 76 6f 69 64 20 2a |(mproc p|, void *|
|00002e60| 64 61 74 61 2c 20 65 69 | 6e 64 65 78 20 6d 29 0a |data, ei|ndex m).|
|00002e70| 58 7b 0a 58 09 65 69 6e | 64 65 78 20 6b 65 79 20 |X{.X.ein|dex key |
|00002e80| 3d 20 28 65 69 6e 64 65 | 78 29 20 64 61 74 61 3b |= (einde|x) data;|
|00002e90| 0a 58 09 75 69 6e 74 20 | 6c 65 6e 20 3d 20 65 6c |.X.uint |len = el|
|00002ea0| 65 6e 28 70 2c 6d 29 3b | 0a 58 0a 58 09 54 52 41 |en(p,m);|.X.X.TRA|
|00002eb0| 43 45 28 33 2c 20 70 72 | 69 6e 74 66 28 22 63 6f |CE(3, pr|intf("co|
|00002ec0| 6e 73 6f 6c 65 20 73 75 | 62 6d 69 74 20 25 64 20 |nsole su|bmit %d |
|00002ed0| 62 79 74 65 73 5c 6e 22 | 2c 20 6c 65 6e 29 29 0a |bytes\n"|, len)).|
|00002ee0| 58 0a 58 09 69 66 20 28 | 6c 65 6e 29 20 7b 0a 58 |X.X.if (|len) {.X|
|00002ef0| 09 09 62 79 74 65 70 74 | 72 20 73 20 3d 20 6d 61 |..bytept|r s = ma|
|00002f00| 6c 6c 6f 63 28 6c 65 6e | 29 3b 0a 58 09 09 73 74 |lloc(len|);.X..st|
|00002f10| 72 5f 65 78 70 6f 72 74 | 28 70 2c 20 73 2c 20 6d |r_export|(p, s, m|
|00002f20| 2c 20 30 2c 20 6c 65 6e | 29 3b 0a 58 09 09 77 72 |, 0, len|);.X..wr|
|00002f30| 69 74 65 28 31 2c 20 73 | 2c 20 6c 65 6e 29 3b 0a |ite(1, s|, len);.|
|00002f40| 58 09 09 66 72 65 65 28 | 28 63 68 61 72 2a 29 73 |X..free(|(char*)s|
|00002f50| 29 3b 0a 58 09 7d 20 65 | 6c 73 65 0a 58 09 09 6d |);.X.} e|lse.X..m|
|00002f60| 73 67 72 5f 77 61 73 5f | 65 6d 70 74 79 20 3d 20 |sgr_was_|empty = |
|00002f70| 31 3b 0a 58 09 64 69 63 | 74 5f 75 6e 64 65 66 28 |1;.X.dic|t_undef(|
|00002f80| 30 2c 20 63 68 61 6e 6e | 65 6c 64 69 63 74 2c 20 |0, chann|eldict, |
|00002f90| 6b 65 79 29 3b 0a 58 09 | 72 65 74 75 72 6e 3b 0a |key);.X.|return;.|
|00002fa0| 58 7d 0a 58 0a 58 0a 58 | 65 69 6e 64 65 78 0a 58 |X}.X.X.X|eindex.X|
|00002fb0| 61 64 64 5f 63 6f 6e 73 | 6f 6c 65 5f 63 68 61 6e |add_cons|ole_chan|
|00002fc0| 6e 65 6c 28 29 0a 58 7b | 0a 58 09 65 69 6e 64 65 |nel().X{|.X.einde|
|00002fd0| 78 20 6b 65 79 3b 0a 58 | 09 62 79 74 65 20 62 69 |x key;.X|.byte bi|
|00002fe0| 74 73 5b 38 5d 3b 0a 58 | 0a 58 09 72 61 6e 64 6f |ts[8];.X|.X.rando|
|00002ff0| 6d 36 34 28 62 69 74 73 | 29 3b 0a 58 09 6b 65 79 |m64(bits|);.X.key|
|00003000| 20 3d 20 6b 65 79 5f 61 | 64 64 28 62 69 74 73 29 | = key_a|dd(bits)|
|00003010| 3b 0a 58 09 6e 65 77 5f | 63 68 61 6e 6e 65 6c 28 |;.X.new_|channel(|
|00003020| 6b 65 79 2c 20 28 76 6f | 69 64 2a 29 6b 65 79 2c |key, (vo|id*)key,|
|00003030| 20 63 6f 6e 73 6f 6c 65 | 5f 73 75 62 6d 69 74 29 | console|_submit)|
|00003040| 3b 0a 58 0a 58 09 72 65 | 74 75 72 6e 20 6b 65 79 |;.X.X.re|turn key|
|00003050| 3b 0a 58 7d 0a 58 23 65 | 6e 64 69 66 0a 45 4e 44 |;.X}.X#e|ndif.END|
|00003060| 5f 4f 46 5f 46 49 4c 45 | 0a 69 66 20 74 65 73 74 |_OF_FILE|.if test|
|00003070| 20 32 34 31 35 20 2d 6e | 65 20 60 77 63 20 2d 63 | 2415 -n|e `wc -c|
|00003080| 20 3c 27 63 5f 63 6f 6e | 2e 63 27 60 3b 20 74 68 | <'c_con|.c'`; th|
|00003090| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|000030a0| 3a 20 5c 22 27 63 5f 63 | 6f 6e 2e 63 27 5c 22 20 |: \"'c_c|on.c'\" |
|000030b0| 75 6e 70 61 63 6b 65 64 | 20 77 69 74 68 20 77 72 |unpacked| with wr|
|000030c0| 6f 6e 67 20 73 69 7a 65 | 21 0a 66 69 0a 23 20 65 |ong size|!.fi.# e|
|000030d0| 6e 64 20 6f 66 20 27 63 | 5f 63 6f 6e 2e 63 27 0a |nd of 'c|_con.c'.|
|000030e0| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 63 |fi.if te|st -f 'c|
|000030f0| 5f 66 69 6c 65 2e 63 27 | 20 2d 61 20 22 24 7b 31 |_file.c'| -a "${1|
|00003100| 7d 22 20 21 3d 20 22 2d | 63 22 20 3b 20 74 68 65 |}" != "-|c" ; the|
|00003110| 6e 20 0a 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |n . ech|o shar: |
|00003120| 57 69 6c 6c 20 6e 6f 74 | 20 63 6c 6f 62 62 65 72 |Will not| clobber|
|00003130| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 5c | existin|g file \|
|00003140| 22 27 63 5f 66 69 6c 65 | 2e 63 27 5c 22 0a 65 6c |"'c_file|.c'\".el|
|00003150| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|00003160| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 63 5f 66 69 |tracting| \"'c_fi|
|00003170| 6c 65 2e 63 27 5c 22 20 | 5c 28 31 38 39 33 20 63 |le.c'\" |\(1893 c|
|00003180| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00003190| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 63 5f 66 69 6c |"s/^X//"| >'c_fil|
|000031a0| 65 2e 63 27 20 3c 3c 27 | 45 4e 44 5f 4f 46 5f 46 |e.c' <<'|END_OF_F|
|000031b0| 49 4c 45 27 0a 58 2f 2a | 0a 58 09 63 5f 66 69 6c |ILE'.X/*|.X.c_fil|
|000031c0| 65 2e 63 0a 58 2a 2f 0a | 58 2f 2a 20 20 43 6f 70 |e.c.X*/.|X/* Cop|
|000031d0| 79 72 69 67 68 74 20 28 | 63 29 20 31 39 39 34 20 |yright (|c) 1994 |
|000031e0| 43 68 72 69 73 74 69 61 | 6e 20 46 2e 20 54 73 63 |Christia|n F. Tsc|
|000031f0| 68 75 64 69 6e 2e 20 41 | 6c 6c 20 72 69 67 68 74 |hudin. A|ll right|
|00003200| 73 20 72 65 73 65 72 76 | 65 64 2e 0a 58 0a 58 20 |s reserv|ed..X.X |
|00003210| 20 20 20 44 69 73 74 72 | 69 62 75 74 65 64 20 75 | Distr|ibuted u|
|00003220| 6e 64 65 72 20 74 68 65 | 20 74 65 72 6d 73 20 6f |nder the| terms o|
|00003230| 66 20 74 68 65 20 47 4e | 55 20 47 65 6e 65 72 61 |f the GN|U Genera|
|00003240| 6c 20 50 75 62 6c 69 63 | 20 4c 69 63 65 6e 73 65 |l Public| License|
|00003250| 0a 58 20 20 20 20 76 65 | 72 73 69 6f 6e 20 32 20 |.X ve|rsion 2 |
|00003260| 6f 66 20 6a 75 6e 65 20 | 31 39 39 31 20 61 73 20 |of june |1991 as |
|00003270| 70 75 62 6c 69 73 68 65 | 64 20 62 79 20 74 68 65 |publishe|d by the|
|00003280| 20 46 72 65 65 20 53 6f | 66 74 77 61 72 65 0a 58 | Free So|ftware.X|
|00003290| 20 20 20 20 46 6f 75 6e | 64 61 74 69 6f 6e 2c 20 | Foun|dation, |
|000032a0| 49 6e 63 2e 0a 58 0a 58 | 09 09 20 20 20 20 20 54 |Inc..X.X|.. T|
|000032b0| 68 69 73 20 66 69 6c 65 | 20 69 73 20 70 61 72 74 |his file| is part|
|000032c0| 20 6f 66 20 4d 30 2e 0a | 58 0a 58 4d 30 20 69 73 | of M0..|X.XM0 is|
|000032d0| 20 64 69 73 74 72 69 62 | 75 74 65 64 20 69 6e 20 | distrib|uted in |
|000032e0| 74 68 65 20 68 6f 70 65 | 20 74 68 61 74 20 69 74 |the hope| that it|
|000032f0| 20 77 69 6c 6c 20 62 65 | 20 75 73 65 66 75 6c 2c | will be| useful,|
|00003300| 20 62 75 74 20 57 49 54 | 48 4f 55 54 20 41 4e 59 | but WIT|HOUT ANY|
|00003310| 0a 58 57 41 52 52 41 4e | 54 59 2e 20 20 4e 6f 20 |.XWARRAN|TY. No |
|00003320| 61 75 74 68 6f 72 20 6f | 72 20 64 69 73 74 72 69 |author o|r distri|
|00003330| 62 75 74 6f 72 20 61 63 | 63 65 70 74 73 20 72 65 |butor ac|cepts re|
|00003340| 73 70 6f 6e 73 69 62 69 | 6c 69 74 79 20 74 6f 20 |sponsibi|lity to |
|00003350| 61 6e 79 6f 6e 65 20 66 | 6f 72 0a 58 74 68 65 20 |anyone f|or.Xthe |
|00003360| 63 6f 6e 73 65 71 75 65 | 6e 63 65 73 20 6f 66 20 |conseque|nces of |
|00003370| 75 73 69 6e 67 20 69 74 | 20 6f 72 20 66 6f 72 20 |using it| or for |
|00003380| 77 68 65 74 68 65 72 20 | 69 74 20 73 65 72 76 65 |whether |it serve|
|00003390| 73 20 61 6e 79 20 70 61 | 72 74 69 63 75 6c 61 72 |s any pa|rticular|
|000033a0| 0a 58 70 75 72 70 6f 73 | 65 20 6f 72 20 77 6f 72 |.Xpurpos|e or wor|
|000033b0| 6b 73 20 61 74 20 61 6c | 6c 2c 20 75 6e 6c 65 73 |ks at al|l, unles|
|000033c0| 73 20 68 65 20 73 61 79 | 73 20 73 6f 20 69 6e 20 |s he say|s so in |
|000033d0| 77 72 69 74 69 6e 67 2e | 20 20 52 65 66 65 72 20 |writing.| Refer |
|000033e0| 74 6f 20 74 68 65 20 47 | 4e 55 0a 58 47 65 6e 65 |to the G|NU.XGene|
|000033f0| 72 61 6c 20 50 75 62 6c | 69 63 20 4c 69 63 65 6e |ral Publ|ic Licen|
|00003400| 73 65 20 66 6f 72 20 66 | 75 6c 6c 20 64 65 74 61 |se for f|ull deta|
|00003410| 69 6c 73 2e 20 0a 58 0a | 58 45 76 65 72 79 6f 6e |ils. .X.|XEveryon|
|00003420| 65 20 69 73 20 67 72 61 | 6e 74 65 64 20 70 65 72 |e is gra|nted per|
|00003430| 6d 69 73 73 69 6f 6e 20 | 74 6f 20 63 6f 70 79 2c |mission |to copy,|
|00003440| 20 6d 6f 64 69 66 79 20 | 61 6e 64 20 72 65 64 69 | modify |and redi|
|00003450| 73 74 72 69 62 75 74 65 | 20 4d 30 2c 20 62 75 74 |stribute| M0, but|
|00003460| 0a 58 6f 6e 6c 79 20 75 | 6e 64 65 72 20 74 68 65 |.Xonly u|nder the|
|00003470| 20 63 6f 6e 64 69 74 69 | 6f 6e 73 20 64 65 73 63 | conditi|ons desc|
|00003480| 72 69 62 65 64 20 69 6e | 20 74 68 65 20 47 4e 55 |ribed in| the GNU|
|00003490| 20 47 65 6e 65 72 61 6c | 20 50 75 62 6c 69 63 20 | General| Public |
|000034a0| 4c 69 63 65 6e 73 65 2e | 20 0a 58 41 20 63 6f 70 |License.| .XA cop|
|000034b0| 79 20 6f 66 20 74 68 69 | 73 20 6c 69 63 65 6e 73 |y of thi|s licens|
|000034c0| 65 20 69 73 20 73 75 70 | 70 6f 73 65 64 20 74 6f |e is sup|posed to|
|000034d0| 20 68 61 76 65 20 62 65 | 65 6e 20 67 69 76 65 6e | have be|en given|
|000034e0| 20 74 6f 20 79 6f 75 20 | 61 6c 6f 6e 67 20 77 69 | to you |along wi|
|000034f0| 74 68 0a 58 4d 30 20 73 | 6f 20 79 6f 75 20 63 61 |th.XM0 s|o you ca|
|00003500| 6e 20 6b 6e 6f 77 20 79 | 6f 75 72 20 72 69 67 68 |n know y|our righ|
|00003510| 74 73 20 61 6e 64 20 72 | 65 73 70 6f 6e 73 69 62 |ts and r|esponsib|
|00003520| 69 6c 69 74 69 65 73 2e | 20 20 49 74 20 73 68 6f |ilities.| It sho|
|00003530| 75 6c 64 20 62 65 20 69 | 6e 20 61 0a 58 66 69 6c |uld be i|n a.Xfil|
|00003540| 65 20 6e 61 6d 65 64 20 | 4c 49 43 45 4e 53 45 2e |e named |LICENSE.|
|00003550| 20 20 41 6d 6f 6e 67 20 | 6f 74 68 65 72 20 74 68 | Among |other th|
|00003560| 69 6e 67 73 2c 20 74 68 | 65 20 63 6f 70 79 72 69 |ings, th|e copyri|
|00003570| 67 68 74 20 6e 6f 74 69 | 63 65 20 61 6e 64 20 74 |ght noti|ce and t|
|00003580| 68 69 73 0a 58 6e 6f 74 | 69 63 65 20 6d 75 73 74 |his.Xnot|ice must|
|00003590| 20 62 65 20 70 72 65 73 | 65 72 76 65 64 20 6f 6e | be pres|erved on|
|000035a0| 20 61 6c 6c 20 63 6f 70 | 69 65 73 2e 20 20 2a 2f | all cop|ies. */|
|000035b0| 0a 58 0a 58 23 69 6e 63 | 6c 75 64 65 20 22 63 5f |.X.X#inc|lude "c_|
|000035c0| 70 72 6f 74 6f 2e 68 22 | 0a 58 0a 58 0a 58 23 69 |proto.h"|.X.X.X#i|
|000035d0| 66 64 65 66 20 43 48 41 | 4e 4e 45 4c 5f 46 49 4c |fdef CHA|NNEL_FIL|
|000035e0| 45 0a 58 0a 58 73 74 61 | 74 69 63 20 76 6f 69 64 |E.X.Xsta|tic void|
|000035f0| 0a 58 66 69 6c 65 5f 73 | 75 62 6d 69 74 28 6d 70 |.Xfile_s|ubmit(mp|
|00003600| 72 6f 63 20 70 2c 20 76 | 6f 69 64 20 2a 64 61 74 |roc p, v|oid *dat|
|00003610| 61 2c 20 65 69 6e 64 65 | 78 20 6d 29 0a 58 7b 0a |a, einde|x m).X{.|
|00003620| 58 09 75 69 6e 74 20 6c | 65 6e 20 3d 20 65 6c 65 |X.uint l|en = ele|
|00003630| 6e 28 70 2c 6d 29 3b 0a | 58 09 63 68 61 72 20 2a |n(p,m);.|X.char *|
|00003640| 66 6e 20 3d 20 75 6e 69 | 71 75 65 5f 66 69 6c 65 |fn = uni|que_file|
|00003650| 6e 61 6d 65 28 22 73 62 | 6d 74 22 29 3b 0a 58 09 |name("sb|mt");.X.|
|00003660| 46 49 4c 45 20 2a 66 20 | 3d 20 66 6f 70 65 6e 28 |FILE *f |= fopen(|
|00003670| 66 6e 2c 20 22 77 2b 62 | 22 29 3b 0a 58 0a 58 09 |fn, "w+b|");.X.X.|
|00003680| 69 66 20 28 21 66 29 20 | 7b 0a 58 09 09 66 70 72 |if (!f) |{.X..fpr|
|00003690| 69 6e 74 66 28 73 74 64 | 65 72 72 2c 20 22 20 20 |intf(std|err, " |
|000036a0| 23 23 20 77 72 69 74 69 | 6e 67 20 74 6f 20 66 69 |## writi|ng to fi|
|000036b0| 6c 65 20 3c 25 73 3e 20 | 66 61 69 6c 65 64 5c 6e |le <%s> |failed\n|
|000036c0| 22 29 3b 0a 58 09 09 72 | 65 74 75 72 6e 3b 0a 58 |");.X..r|eturn;.X|
|000036d0| 09 7d 0a 58 09 66 6f 72 | 20 28 69 20 3d 20 30 3b |.}.X.for| (i = 0;|
|000036e0| 20 69 20 3c 20 6c 65 6e | 3b 20 69 2b 2b 29 0a 58 | i < len|; i++).X|
|000036f0| 09 09 66 70 75 74 63 28 | 73 74 72 5f 67 65 74 28 |..fputc(|str_get(|
|00003700| 70 2c 20 6d 2c 20 69 29 | 2c 20 66 29 3b 0a 58 09 |p, m, i)|, f);.X.|
|00003710| 66 63 6c 6f 73 65 28 66 | 29 3b 0a 58 09 54 52 41 |fclose(f|);.X.TRA|
|00003720| 43 45 28 33 2c 20 70 72 | 69 6e 74 66 28 22 66 69 |CE(3, pr|intf("fi|
|00003730| 6c 65 20 73 75 62 6d 69 | 74 20 25 73 20 25 73 5c |le submi|t %s %s\|
|00003740| 6e 22 2c 20 66 6e 2c 20 | 28 63 68 61 72 20 2a 29 |n", fn, |(char *)|
|00003750| 20 64 61 74 61 29 29 0a | 58 09 72 65 74 75 72 6e | data)).|X.return|
|00003760| 3b 0a 58 7d 0a 58 0a 58 | 65 69 6e 64 65 78 0a 58 |;.X}.X.X|eindex.X|
|00003770| 61 64 64 5f 66 69 6c 65 | 5f 63 68 61 6e 6e 65 6c |add_file|_channel|
|00003780| 28 75 69 6e 74 20 69 29 | 0a 58 7b 0a 58 09 2f 2a |(uint i)|.X{.X./*|
|00003790| 20 69 6e 73 74 61 6c 6c | 73 20 75 6e 64 65 72 20 | install|s under |
|000037a0| 6b 65 79 20 60 69 27 20 | 61 20 66 69 6c 65 20 63 |key `i' |a file c|
|000037b0| 68 61 6e 6e 65 6c 2e 0a | 58 09 20 20 20 4e 6f 74 |hannel..|X. Not|
|000037c0| 65 3a 20 74 68 65 20 6b | 65 79 20 69 73 20 4e 4f |e: the k|ey is NO|
|000037d0| 54 20 72 65 6d 6f 76 65 | 64 20 61 66 74 65 72 20 |T remove|d after |
|000037e0| 68 61 76 69 6e 67 20 75 | 73 65 64 0a 58 09 20 20 |having u|sed.X. |
|000037f0| 20 74 68 65 20 63 68 61 | 6e 6e 65 6c 2e 20 49 6e | the cha|nnel. In|
|00003800| 73 74 65 61 64 2c 20 65 | 61 63 68 20 73 75 62 6d |stead, e|ach subm|
|00003810| 69 74 20 63 72 65 61 74 | 65 73 20 61 20 6e 65 77 |it creat|es a new|
|00003820| 0a 58 09 20 20 20 66 69 | 6c 65 20 77 69 74 68 20 |.X. fi|le with |
|00003830| 61 6e 20 75 6e 69 71 75 | 65 20 66 69 6c 65 20 6e |an uniqu|e file n|
|00003840| 61 6d 65 21 20 2a 2f 0a | 58 09 62 79 74 65 20 73 |ame! */.|X.byte s|
|00003850| 5b 38 5d 2c 20 74 5b 32 | 30 5d 3b 0a 58 09 65 69 |[8], t[2|0];.X.ei|
|00003860| 6e 64 65 78 20 6b 65 79 | 3b 0a 58 0a 58 09 6d 65 |ndex key|;.X.X.me|
|00003870| 6d 73 65 74 28 73 2c 30 | 2c 38 29 3b 0a 58 09 6d |mset(s,0|,8);.X.m|
|00003880| 65 6d 63 70 79 28 73 2b | 34 2c 26 69 2c 34 29 3b |emcpy(s+|4,&i,4);|
|00003890| 0a 58 0a 58 09 73 70 72 | 69 6e 74 66 28 28 63 68 |.X.X.spr|intf((ch|
|000038a0| 61 72 2a 29 74 2c 20 22 | 25 64 22 2c 20 28 69 6e |ar*)t, "|%d", (in|
|000038b0| 74 29 20 69 29 3b 0a 58 | 09 6b 65 79 20 3d 20 6b |t) i);.X|.key = k|
|000038c0| 65 79 5f 61 64 64 28 73 | 29 3b 0a 58 0a 58 09 69 |ey_add(s|);.X.X.i|
|000038d0| 66 20 28 64 69 63 74 5f | 67 65 74 28 30 2c 20 63 |f (dict_|get(0, c|
|000038e0| 68 61 6e 6e 65 6c 64 69 | 63 74 2c 20 6b 65 79 29 |hanneldi|ct, key)|
|000038f0| 20 21 3d 20 30 29 0a 58 | 09 09 72 65 74 75 72 6e | != 0).X|..return|
|00003900| 20 30 3b 0a 58 0a 58 09 | 6e 65 77 5f 63 68 61 6e | 0;.X.X.|new_chan|
|00003910| 6e 65 6c 28 6b 65 79 2c | 20 73 74 72 64 75 70 28 |nel(key,| strdup(|
|00003920| 74 29 2c 20 66 69 6c 65 | 5f 73 75 62 6d 69 74 29 |t), file|_submit)|
|00003930| 3b 0a 58 0a 58 09 72 65 | 74 75 72 6e 20 6b 65 79 |;.X.X.re|turn key|
|00003940| 3b 0a 58 7d 0a 58 0a 58 | 23 65 6e 64 69 66 20 2f |;.X}.X.X|#endif /|
|00003950| 2a 20 43 48 41 4e 4e 45 | 4c 5f 46 49 4c 45 20 2a |* CHANNE|L_FILE *|
|00003960| 2f 0a 45 4e 44 5f 4f 46 | 5f 46 49 4c 45 0a 69 66 |/.END_OF|_FILE.if|
|00003970| 20 74 65 73 74 20 31 38 | 39 33 20 2d 6e 65 20 60 | test 18|93 -ne `|
|00003980| 77 63 20 2d 63 20 3c 27 | 63 5f 66 69 6c 65 2e 63 |wc -c <'|c_file.c|
|00003990| 27 60 3b 20 74 68 65 6e | 0a 20 20 20 20 65 63 68 |'`; then|. ech|
|000039a0| 6f 20 73 68 61 72 3a 20 | 5c 22 27 63 5f 66 69 6c |o shar: |\"'c_fil|
|000039b0| 65 2e 63 27 5c 22 20 75 | 6e 70 61 63 6b 65 64 20 |e.c'\" u|npacked |
|000039c0| 77 69 74 68 20 77 72 6f | 6e 67 20 73 69 7a 65 21 |with wro|ng size!|
|000039d0| 0a 66 69 0a 23 20 65 6e | 64 20 6f 66 20 27 63 5f |.fi.# en|d of 'c_|
|000039e0| 66 69 6c 65 2e 63 27 0a | 66 69 0a 69 66 20 74 65 |file.c'.|fi.if te|
|000039f0| 73 74 20 2d 66 20 27 63 | 5f 70 72 6f 74 6f 2e 68 |st -f 'c|_proto.h|
|00003a00| 27 20 2d 61 20 22 24 7b | 31 7d 22 20 21 3d 20 22 |' -a "${|1}" != "|
|00003a10| 2d 63 22 20 3b 20 74 68 | 65 6e 20 0a 20 20 65 63 |-c" ; th|en . ec|
|00003a20| 68 6f 20 73 68 61 72 3a | 20 57 69 6c 6c 20 6e 6f |ho shar:| Will no|
|00003a30| 74 20 63 6c 6f 62 62 65 | 72 20 65 78 69 73 74 69 |t clobbe|r existi|
|00003a40| 6e 67 20 66 69 6c 65 20 | 5c 22 27 63 5f 70 72 6f |ng file |\"'c_pro|
|00003a50| 74 6f 2e 68 27 5c 22 0a | 65 6c 73 65 0a 65 63 68 |to.h'\".|else.ech|
|00003a60| 6f 20 73 68 61 72 3a 20 | 45 78 74 72 61 63 74 69 |o shar: |Extracti|
|00003a70| 6e 67 20 5c 22 27 63 5f | 70 72 6f 74 6f 2e 68 27 |ng \"'c_|proto.h'|
|00003a80| 5c 22 20 5c 28 32 35 35 | 39 20 63 68 61 72 61 63 |\" \(255|9 charac|
|00003a90| 74 65 72 73 5c 29 0a 73 | 65 64 20 22 73 2f 5e 58 |ters\).s|ed "s/^X|
|00003aa0| 2f 2f 22 20 3e 27 63 5f | 70 72 6f 74 6f 2e 68 27 |//" >'c_|proto.h'|
|00003ab0| 20 3c 3c 27 45 4e 44 5f | 4f 46 5f 46 49 4c 45 27 | <<'END_|OF_FILE'|
|00003ac0| 0a 58 2f 2a 0a 58 09 63 | 5f 70 72 6f 74 6f 2e 68 |.X/*.X.c|_proto.h|
|00003ad0| 0a 58 2a 2f 0a 58 2f 2a | 20 20 43 6f 70 79 72 69 |.X*/.X/*| Copyri|
|00003ae0| 67 68 74 20 28 63 29 20 | 31 39 39 34 20 43 68 72 |ght (c) |1994 Chr|
|00003af0| 69 73 74 69 61 6e 20 46 | 2e 20 54 73 63 68 75 64 |istian F|. Tschud|
|00003b00| 69 6e 2e 20 41 6c 6c 20 | 72 69 67 68 74 73 20 72 |in. All |rights r|
|00003b10| 65 73 65 72 76 65 64 2e | 0a 58 0a 58 20 20 20 20 |eserved.|.X.X |
|00003b20| 44 69 73 74 72 69 62 75 | 74 65 64 20 75 6e 64 65 |Distribu|ted unde|
|00003b30| 72 20 74 68 65 20 74 65 | 72 6d 73 20 6f 66 20 74 |r the te|rms of t|
|00003b40| 68 65 20 47 4e 55 20 47 | 65 6e 65 72 61 6c 20 50 |he GNU G|eneral P|
|00003b50| 75 62 6c 69 63 20 4c 69 | 63 65 6e 73 65 0a 58 20 |ublic Li|cense.X |
|00003b60| 20 20 20 76 65 72 73 69 | 6f 6e 20 32 20 6f 66 20 | versi|on 2 of |
|00003b70| 6a 75 6e 65 20 31 39 39 | 31 20 61 73 20 70 75 62 |june 199|1 as pub|
|00003b80| 6c 69 73 68 65 64 20 62 | 79 20 74 68 65 20 46 72 |lished b|y the Fr|
|00003b90| 65 65 20 53 6f 66 74 77 | 61 72 65 0a 58 20 20 20 |ee Softw|are.X |
|00003ba0| 20 46 6f 75 6e 64 61 74 | 69 6f 6e 2c 20 49 6e 63 | Foundat|ion, Inc|
|00003bb0| 2e 0a 58 0a 58 09 09 20 | 20 20 20 20 54 68 69 73 |..X.X.. | This|
|00003bc0| 20 66 69 6c 65 20 69 73 | 20 70 61 72 74 20 6f 66 | file is| part of|
|00003bd0| 20 4d 30 2e 0a 58 0a 58 | 4d 30 20 69 73 20 64 69 | M0..X.X|M0 is di|
|00003be0| 73 74 72 69 62 75 74 65 | 64 20 69 6e 20 74 68 65 |stribute|d in the|
|00003bf0| 20 68 6f 70 65 20 74 68 | 61 74 20 69 74 20 77 69 | hope th|at it wi|
|00003c00| 6c 6c 20 62 65 20 75 73 | 65 66 75 6c 2c 20 62 75 |ll be us|eful, bu|
|00003c10| 74 20 57 49 54 48 4f 55 | 54 20 41 4e 59 0a 58 57 |t WITHOU|T ANY.XW|
|00003c20| 41 52 52 41 4e 54 59 2e | 20 20 4e 6f 20 61 75 74 |ARRANTY.| No aut|
|00003c30| 68 6f 72 20 6f 72 20 64 | 69 73 74 72 69 62 75 74 |hor or d|istribut|
|00003c40| 6f 72 20 61 63 63 65 70 | 74 73 20 72 65 73 70 6f |or accep|ts respo|
|00003c50| 6e 73 69 62 69 6c 69 74 | 79 20 74 6f 20 61 6e 79 |nsibilit|y to any|
|00003c60| 6f 6e 65 20 66 6f 72 0a | 58 74 68 65 20 63 6f 6e |one for.|Xthe con|
|00003c70| 73 65 71 75 65 6e 63 65 | 73 20 6f 66 20 75 73 69 |sequence|s of usi|
|00003c80| 6e 67 20 69 74 20 6f 72 | 20 66 6f 72 20 77 68 65 |ng it or| for whe|
|00003c90| 74 68 65 72 20 69 74 20 | 73 65 72 76 65 73 20 61 |ther it |serves a|
|00003ca0| 6e 79 20 70 61 72 74 69 | 63 75 6c 61 72 0a 58 70 |ny parti|cular.Xp|
|00003cb0| 75 72 70 6f 73 65 20 6f | 72 20 77 6f 72 6b 73 20 |urpose o|r works |
|00003cc0| 61 74 20 61 6c 6c 2c 20 | 75 6e 6c 65 73 73 20 68 |at all, |unless h|
|00003cd0| 65 20 73 61 79 73 20 73 | 6f 20 69 6e 20 77 72 69 |e says s|o in wri|
|00003ce0| 74 69 6e 67 2e 20 20 52 | 65 66 65 72 20 74 6f 20 |ting. R|efer to |
|00003cf0| 74 68 65 20 47 4e 55 0a | 58 47 65 6e 65 72 61 6c |the GNU.|XGeneral|
|00003d00| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 20 | Public |License |
|00003d10| 66 6f 72 20 66 75 6c 6c | 20 64 65 74 61 69 6c 73 |for full| details|
|00003d20| 2e 20 0a 58 0a 58 45 76 | 65 72 79 6f 6e 65 20 69 |. .X.XEv|eryone i|
|00003d30| 73 20 67 72 61 6e 74 65 | 64 20 70 65 72 6d 69 73 |s grante|d permis|
|00003d40| 73 69 6f 6e 20 74 6f 20 | 63 6f 70 79 2c 20 6d 6f |sion to |copy, mo|
|00003d50| 64 69 66 79 20 61 6e 64 | 20 72 65 64 69 73 74 72 |dify and| redistr|
|00003d60| 69 62 75 74 65 20 4d 30 | 2c 20 62 75 74 0a 58 6f |ibute M0|, but.Xo|
|00003d70| 6e 6c 79 20 75 6e 64 65 | 72 20 74 68 65 20 63 6f |nly unde|r the co|
|00003d80| 6e 64 69 74 69 6f 6e 73 | 20 64 65 73 63 72 69 62 |nditions| describ|
|00003d90| 65 64 20 69 6e 20 74 68 | 65 20 47 4e 55 20 47 65 |ed in th|e GNU Ge|
|00003da0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00003db0| 65 6e 73 65 2e 20 0a 58 | 41 20 63 6f 70 79 20 6f |ense. .X|A copy o|
|00003dc0| 66 20 74 68 69 73 20 6c | 69 63 65 6e 73 65 20 69 |f this l|icense i|
|00003dd0| 73 20 73 75 70 70 6f 73 | 65 64 20 74 6f 20 68 61 |s suppos|ed to ha|
|00003de0| 76 65 20 62 65 65 6e 20 | 67 69 76 65 6e 20 74 6f |ve been |given to|
|00003df0| 20 79 6f 75 20 61 6c 6f | 6e 67 20 77 69 74 68 0a | you alo|ng with.|
|00003e00| 58 4d 30 20 73 6f 20 79 | 6f 75 20 63 61 6e 20 6b |XM0 so y|ou can k|
|00003e10| 6e 6f 77 20 79 6f 75 72 | 20 72 69 67 68 74 73 20 |now your| rights |
|00003e20| 61 6e 64 20 72 65 73 70 | 6f 6e 73 69 62 69 6c 69 |and resp|onsibili|
|00003e30| 74 69 65 73 2e 20 20 49 | 74 20 73 68 6f 75 6c 64 |ties. I|t should|
|00003e40| 20 62 65 20 69 6e 20 61 | 0a 58 66 69 6c 65 20 6e | be in a|.Xfile n|
|00003e50| 61 6d 65 64 20 4c 49 43 | 45 4e 53 45 2e 20 20 41 |amed LIC|ENSE. A|
|00003e60| 6d 6f 6e 67 20 6f 74 68 | 65 72 20 74 68 69 6e 67 |mong oth|er thing|
|00003e70| 73 2c 20 74 68 65 20 63 | 6f 70 79 72 69 67 68 74 |s, the c|opyright|
|00003e80| 20 6e 6f 74 69 63 65 20 | 61 6e 64 20 74 68 69 73 | notice |and this|
|00003e90| 0a 58 6e 6f 74 69 63 65 | 20 6d 75 73 74 20 62 65 |.Xnotice| must be|
|00003ea0| 20 70 72 65 73 65 72 76 | 65 64 20 6f 6e 20 61 6c | preserv|ed on al|
|00003eb0| 6c 20 63 6f 70 69 65 73 | 2e 20 20 2a 2f 0a 58 0a |l copies|. */.X.|
|00003ec0| 58 23 69 66 6e 64 65 66 | 20 43 5f 50 52 4f 54 4f |X#ifndef| C_PROTO|
|00003ed0| 5f 48 0a 58 23 64 65 66 | 69 6e 65 20 43 5f 50 52 |_H.X#def|ine C_PR|
|00003ee0| 4f 54 4f 5f 48 0a 58 0a | 58 23 69 6e 63 6c 75 64 |OTO_H.X.|X#includ|
|00003ef0| 65 20 22 6c 5f 70 72 6f | 74 6f 2e 68 22 0a 58 0a |e "l_pro|to.h".X.|
|00003f00| 58 0a 58 23 69 66 64 65 | 66 20 43 48 41 4e 4e 45 |X.X#ifde|f CHANNE|
|00003f10| 4c 5f 43 4f 4e 53 4f 4c | 45 09 2f 2a 20 63 5f 63 |L_CONSOL|E./* c_c|
|00003f20| 6f 6e 2e 63 20 2a 2f 0a | 58 65 78 74 65 72 6e 20 |on.c */.|Xextern |
|00003f30| 69 6e 74 09 6d 73 67 72 | 5f 77 61 73 5f 65 6d 70 |int.msgr|_was_emp|
|00003f40| 74 79 3b 0a 58 65 78 74 | 65 72 6e 20 65 69 6e 64 |ty;.Xext|ern eind|
|00003f50| 65 78 09 63 6f 6e 73 6f | 6c 65 5f 61 64 64 72 3b |ex.conso|le_addr;|
|00003f60| 0a 58 65 78 74 65 72 6e | 20 65 69 6e 64 65 78 09 |.Xextern| eindex.|
|00003f70| 63 6f 6e 73 6f 6c 65 5f | 6e 61 6d 65 3b 0a 58 65 |console_|name;.Xe|
|00003f80| 78 74 65 72 6e 20 69 6e | 74 09 63 6f 6e 73 6f 6c |xtern in|t.consol|
|00003f90| 65 5f 69 6e 69 74 28 62 | 79 74 65 70 74 72 20 6b |e_init(b|yteptr k|
|00003fa0| 65 79 62 6f 61 72 64 5f | 71 75 65 75 65 2c 20 62 |eyboard_|queue, b|
|00003fb0| 79 74 65 70 74 72 20 6b | 65 79 62 6f 61 72 64 5f |yteptr k|eyboard_|
|00003fc0| 76 65 63 74 29 3b 0a 58 | 65 78 74 65 72 6e 20 65 |vect);.X|extern e|
|00003fd0| 69 6e 64 65 78 09 61 64 | 64 5f 63 6f 6e 73 6f 6c |index.ad|d_consol|
|00003fe0| 65 5f 63 68 61 6e 6e 65 | 6c 28 29 3b 0a 58 23 65 |e_channe|l();.X#e|
|00003ff0| 6e 64 69 66 0a 58 0a 58 | 0a 58 23 69 66 64 65 66 |ndif.X.X|.X#ifdef|
|00004000| 20 43 48 41 4e 4e 45 4c | 5f 46 49 4c 45 20 2f 2a | CHANNEL|_FILE /*|
|00004010| 20 63 5f 66 69 6c 65 2e | 63 20 2a 2f 0a 58 65 78 | c_file.|c */.Xex|
|00004020| 74 65 72 6e 20 65 69 6e | 64 65 78 09 66 69 6c 65 |tern ein|dex.file|
|00004030| 5f 61 64 64 72 3b 0a 58 | 65 78 74 65 72 6e 20 69 |_addr;.X|extern i|
|00004040| 6e 74 09 66 69 6c 65 5f | 69 6e 69 74 28 29 3b 0a |nt.file_|init();.|
|00004050| 58 65 78 74 65 72 6e 20 | 65 69 6e 64 65 78 09 61 |Xextern |eindex.a|
|00004060| 64 64 5f 66 69 6c 65 5f | 63 68 61 6e 6e 65 6c 28 |dd_file_|channel(|
|00004070| 75 69 6e 74 20 69 29 3b | 0a 58 23 65 6e 64 69 66 |uint i);|.X#endif|
|00004080| 0a 58 0a 58 0a 58 23 69 | 66 64 65 66 20 43 48 41 |.X.X.X#i|fdef CHA|
|00004090| 4e 4e 45 4c 5f 4e 49 54 | 20 2f 2a 20 63 5f 6e 69 |NNEL_NIT| /* c_ni|
|000040a0| 74 2e 63 20 2a 2f 0a 58 | 74 79 70 65 64 65 66 20 |t.c */.X|typedef |
|000040b0| 62 79 74 65 09 65 74 68 | 5b 36 5d 3b 0a 58 65 78 |byte.eth|[6];.Xex|
|000040c0| 74 65 72 6e 20 65 69 6e | 64 65 78 09 6e 69 74 5f |tern ein|dex.nit_|
|000040d0| 61 64 64 72 3b 09 2f 2a | 20 61 72 72 61 79 20 77 |addr;./*| array w|
|000040e0| 69 74 68 20 74 68 65 20 | 6c 6f 63 61 6c 20 65 74 |ith the |local et|
|000040f0| 68 65 72 6e 65 74 20 61 | 64 64 72 65 73 73 65 73 |hernet a|ddresses|
|00004100| 20 2a 2f 0a 58 65 78 74 | 65 72 6e 20 65 69 6e 64 | */.Xext|ern eind|
|00004110| 65 78 09 6e 69 74 5f 6e | 61 6d 65 3b 0a 58 65 78 |ex.nit_n|ame;.Xex|
|00004120| 74 65 72 6e 20 63 68 61 | 72 2a 2a 09 67 65 74 5f |tern cha|r**.get_|
|00004130| 65 74 68 5f 64 65 76 69 | 63 65 73 28 29 3b 0a 58 |eth_devi|ces();.X|
|00004140| 65 78 74 65 72 6e 20 69 | 6e 74 09 6e 69 74 5f 69 |extern i|nt.nit_i|
|00004150| 6e 69 74 28 63 68 61 72 | 20 2a 2a 64 65 76 73 2c |nit(char| **devs,|
|00004160| 20 69 6e 74 20 70 72 6f | 74 6f 29 3b 20 2f 2a 20 | int pro|to); /* |
|00004170| 6e 61 6d 65 73 20 6f 66 | 20 64 65 76 69 63 65 73 |names of| devices|
|00004180| 20 74 6f 20 6f 70 65 6e | 20 2a 2f 0a 58 65 78 74 | to open| */.Xext|
|00004190| 65 72 6e 20 76 6f 69 64 | 09 6e 69 74 5f 72 65 63 |ern void|.nit_rec|
|000041a0| 76 28 69 6e 74 20 66 64 | 2c 20 65 69 6e 64 65 78 |v(int fd|, eindex|
|000041b0| 20 2a 6d 73 67 72 2c 20 | 65 69 6e 64 65 78 20 2a | *msgr, |eindex *|
|000041c0| 73 72 63 29 3b 0a 58 65 | 78 74 65 72 6e 20 69 6e |src);.Xe|xtern in|
|000041d0| 74 09 6e 69 74 5f 73 65 | 6e 64 28 73 69 6e 74 20 |t.nit_se|nd(sint |
|000041e0| 63 68 61 6e 2c 20 62 79 | 74 65 70 74 72 20 64 65 |chan, by|teptr de|
|000041f0| 73 74 2c 20 62 79 74 65 | 70 74 72 20 70 61 63 6b |st, byte|ptr pack|
|00004200| 65 74 2c 20 75 69 6e 74 | 20 6c 65 6e 29 3b 0a 58 |et, uint| len);.X|
|00004210| 23 64 65 66 69 6e 65 20 | 45 54 48 45 52 4e 45 54 |#define |ETHERNET|
|00004220| 5f 54 59 50 45 09 28 30 | 78 30 66 66 66 66 20 26 |_TYPE.(0|x0ffff &|
|00004230| 28 28 27 4d 27 3c 3c 38 | 29 20 7c 20 27 30 27 29 |(('M'<<8|) | '0')|
|00004240| 29 09 2f 2a 20 30 78 34 | 64 33 30 20 2a 2f 0a 58 |)./* 0x4|d30 */.X|
|00004250| 65 78 74 65 72 6e 20 65 | 69 6e 64 65 78 09 61 64 |extern e|index.ad|
|00004260| 64 5f 6e 69 74 5f 63 68 | 61 6e 6e 65 6c 28 73 69 |d_nit_ch|annel(si|
|00004270| 6e 74 20 63 68 61 6e 5f | 6e 6f 2c 20 62 79 74 65 |nt chan_|no, byte|
|00004280| 70 74 72 20 64 65 73 74 | 29 3b 0a 58 23 65 6e 64 |ptr dest|);.X#end|
|00004290| 69 66 0a 58 0a 58 0a 58 | 23 69 66 64 65 66 20 43 |if.X.X.X|#ifdef C|
|000042a0| 48 41 4e 4e 45 4c 5f 55 | 44 50 20 2f 2a 20 63 5f |HANNEL_U|DP /* c_|
|000042b0| 75 64 70 2e 63 20 2a 2f | 0a 58 65 78 74 65 72 6e |udp.c */|.Xextern|
|000042c0| 20 69 6e 74 09 75 64 70 | 5f 6c 69 73 74 65 6e 28 | int.udp|_listen(|
|000042d0| 75 69 6e 74 20 68 6f 73 | 74 2c 20 69 6e 74 20 70 |uint hos|t, int p|
|000042e0| 6f 72 74 29 3b 0a 58 65 | 78 74 65 72 6e 20 65 69 |ort);.Xe|xtern ei|
|000042f0| 6e 64 65 78 09 75 64 70 | 5f 61 64 64 72 3b 09 2f |ndex.udp|_addr;./|
|00004300| 2a 20 61 72 72 61 79 20 | 77 69 74 68 20 74 68 65 |* array |with the|
|00004310| 20 6c 6f 63 61 6c 20 75 | 64 70 20 61 64 64 72 65 | local u|dp addre|
|00004320| 73 73 65 73 20 2a 2f 0a | 58 65 78 74 65 72 6e 20 |sses */.|Xextern |
|00004330| 65 69 6e 64 65 78 09 75 | 64 70 5f 6e 61 6d 65 3b |eindex.u|dp_name;|
|00004340| 0a 58 65 78 74 65 72 6e | 20 75 69 6e 74 2a 09 67 |.Xextern| uint*.g|
|00004350| 65 74 5f 69 70 5f 61 64 | 64 72 65 73 73 65 73 28 |et_ip_ad|dresses(|
|00004360| 29 3b 0a 58 65 78 74 65 | 72 6e 20 69 6e 74 09 75 |);.Xexte|rn int.u|
|00004370| 64 70 5f 69 6e 69 74 28 | 75 69 6e 74 20 2a 69 70 |dp_init(|uint *ip|
|00004380| 2c 20 69 6e 74 20 70 6f | 72 74 29 3b 0a 58 65 78 |, int po|rt);.Xex|
|00004390| 74 65 72 6e 20 76 6f 69 | 64 09 75 64 70 5f 72 65 |tern voi|d.udp_re|
|000043a0| 63 76 28 69 6e 74 20 73 | 2c 20 65 69 6e 64 65 78 |cv(int s|, eindex|
|000043b0| 20 2a 6d 73 67 72 2c 20 | 65 69 6e 64 65 78 20 2a | *msgr, |eindex *|
|000043c0| 73 72 63 29 3b 0a 58 65 | 78 74 65 72 6e 20 69 6e |src);.Xe|xtern in|
|000043d0| 74 09 75 64 70 5f 73 65 | 6e 64 28 69 6e 74 20 73 |t.udp_se|nd(int s|
|000043e0| 2c 20 75 69 6e 74 20 68 | 6f 73 74 2c 20 69 6e 74 |, uint h|ost, int|
|000043f0| 20 70 6f 72 74 2c 0a 58 | 09 09 09 09 09 62 79 74 | port,.X|.....byt|
|00004400| 65 70 74 72 20 70 61 63 | 6b 65 74 2c 20 69 6e 74 |eptr pac|ket, int|
|00004410| 20 6c 65 6e 29 3b 0a 58 | 65 78 74 65 72 6e 20 63 | len);.X|extern c|
|00004420| 68 61 72 2a 20 69 70 74 | 6f 61 28 75 69 6e 74 20 |har* ipt|oa(uint |
|00004430| 68 6f 73 74 29 3b 09 09 | 2f 2a 20 75 6e 73 69 67 |host);..|/* unsig|
|00004440| 6e 65 64 20 69 6e 74 20 | 74 6f 20 61 2e 62 2e 63 |ned int |to a.b.c|
|00004450| 2e 64 20 66 6f 72 6d 61 | 74 20 2a 2f 0a 58 23 64 |.d forma|t */.X#d|
|00004460| 65 66 69 6e 65 20 55 44 | 50 5f 53 45 52 56 45 52 |efine UD|P_SERVER|
|00004470| 50 4f 52 54 09 28 30 78 | 30 66 66 66 66 20 26 28 |PORT.(0x|0ffff &(|
|00004480| 28 27 4d 27 3c 3c 38 29 | 20 7c 20 27 30 27 29 29 |('M'<<8)| | '0'))|
|00004490| 09 2f 2a 20 30 78 34 64 | 33 30 20 2a 2f 0a 58 65 |./* 0x4d|30 */.Xe|
|000044a0| 78 74 65 72 6e 20 65 69 | 6e 64 65 78 09 61 64 64 |xtern ei|ndex.add|
|000044b0| 5f 75 64 70 5f 63 68 61 | 6e 6e 65 6c 28 73 69 6e |_udp_cha|nnel(sin|
|000044c0| 74 20 63 68 61 6e 2c 20 | 75 69 6e 74 20 64 65 73 |t chan, |uint des|
|000044d0| 74 68 6f 73 74 2c 20 75 | 73 68 6f 72 74 20 70 6f |thost, u|short po|
|000044e0| 72 74 29 3b 0a 58 23 65 | 6e 64 69 66 20 2f 2a 20 |rt);.X#e|ndif /* |
|000044f0| 43 48 41 4e 4e 45 4c 5f | 55 44 50 20 2a 2f 0a 58 |CHANNEL_|UDP */.X|
|00004500| 0a 58 0a 58 23 65 6e 64 | 69 66 0a 45 4e 44 5f 4f |.X.X#end|if.END_O|
|00004510| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 32 |F_FILE.i|f test 2|
|00004520| 35 35 39 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |559 -ne |`wc -c <|
|00004530| 27 63 5f 70 72 6f 74 6f | 2e 68 27 60 3b 20 74 68 |'c_proto|.h'`; th|
|00004540| 65 6e 0a 20 20 20 20 65 | 63 68 6f 20 73 68 61 72 |en. e|cho shar|
|00004550| 3a 20 5c 22 27 63 5f 70 | 72 6f 74 6f 2e 68 27 5c |: \"'c_p|roto.h'\|
|00004560| 22 20 75 6e 70 61 63 6b | 65 64 20 77 69 74 68 20 |" unpack|ed with |
|00004570| 77 72 6f 6e 67 20 73 69 | 7a 65 21 0a 66 69 0a 23 |wrong si|ze!.fi.#|
|00004580| 20 65 6e 64 20 6f 66 20 | 27 63 5f 70 72 6f 74 6f | end of |'c_proto|
|00004590| 2e 68 27 0a 66 69 0a 69 | 66 20 74 65 73 74 20 2d |.h'.fi.i|f test -|
|000045a0| 66 20 27 63 68 6b 73 75 | 6d 2e 68 27 20 2d 61 20 |f 'chksu|m.h' -a |
|000045b0| 22 24 7b 31 7d 22 20 21 | 3d 20 22 2d 63 22 20 3b |"${1}" !|= "-c" ;|
|000045c0| 20 74 68 65 6e 20 0a 20 | 20 65 63 68 6f 20 73 68 | then . | echo sh|
|000045d0| 61 72 3a 20 57 69 6c 6c | 20 6e 6f 74 20 63 6c 6f |ar: Will| not clo|
|000045e0| 62 62 65 72 20 65 78 69 | 73 74 69 6e 67 20 66 69 |bber exi|sting fi|
|000045f0| 6c 65 20 5c 22 27 63 68 | 6b 73 75 6d 2e 68 27 5c |le \"'ch|ksum.h'\|
|00004600| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00004610| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00004620| 63 68 6b 73 75 6d 2e 68 | 27 5c 22 20 5c 28 31 31 |chksum.h|'\" \(11|
|00004630| 30 35 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |05 chara|cters\).|
|00004640| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 63 |sed "s/^|X//" >'c|
|00004650| 68 6b 73 75 6d 2e 68 27 | 20 3c 3c 27 45 4e 44 5f |hksum.h'| <<'END_|
|00004660| 4f 46 5f 46 49 4c 45 27 | 0a 58 2f 2a 0a 58 09 63 |OF_FILE'|.X/*.X.c|
|00004670| 68 6b 73 75 6d 2e 68 0a | 58 2a 2f 0a 58 2f 2a 20 |hksum.h.|X*/.X/* |
|00004680| 20 43 6f 70 79 72 69 67 | 68 74 20 28 63 29 20 31 | Copyrig|ht (c) 1|
|00004690| 39 39 34 20 43 68 72 69 | 73 74 69 61 6e 20 46 2e |994 Chri|stian F.|
|000046a0| 20 54 73 63 68 75 64 69 | 6e 2e 20 41 6c 6c 20 72 | Tschudi|n. All r|
|000046b0| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 0a |ights re|served..|
|000046c0| 58 0a 58 20 20 20 20 44 | 69 73 74 72 69 62 75 74 |X.X D|istribut|
|000046d0| 65 64 20 75 6e 64 65 72 | 20 74 68 65 20 74 65 72 |ed under| the ter|
|000046e0| 6d 73 20 6f 66 20 74 68 | 65 20 47 4e 55 20 47 65 |ms of th|e GNU Ge|
|000046f0| 6e 65 72 61 6c 20 50 75 | 62 6c 69 63 20 4c 69 63 |neral Pu|blic Lic|
|00004700| 65 6e 73 65 0a 58 20 20 | 20 20 76 65 72 73 69 6f |ense.X | versio|
|00004710| 6e 20 32 20 6f 66 20 6a | 75 6e 65 20 31 39 39 31 |n 2 of j|une 1991|
|00004720| 20 61 73 20 70 75 62 6c | 69 73 68 65 64 20 62 79 | as publ|ished by|
|00004730| 20 74 68 65 20 46 72 65 | 65 20 53 6f 66 74 77 61 | the Fre|e Softwa|
|00004740| 72 65 0a 58 20 20 20 20 | 46 6f 75 6e 64 61 74 69 |re.X |Foundati|
|00004750| 6f 6e 2c 20 49 6e 63 2e | 0a 58 0a 58 09 09 20 20 |on, Inc.|.X.X.. |
|00004760| 20 20 20 54 68 69 73 20 | 66 69 6c 65 20 69 73 20 | This |file is |
|00004770| 70 61 72 74 20 6f 66 20 | 4d 30 2e 0a 58 0a 58 4d |part of |M0..X.XM|
|00004780| 30 20 69 73 20 64 69 73 | 74 72 69 62 75 74 65 64 |0 is dis|tributed|
|00004790| 20 69 6e 20 74 68 65 20 | 68 6f 70 65 20 74 68 61 | in the |hope tha|
|000047a0| 74 20 69 74 20 77 69 6c | 6c 20 62 65 20 75 73 65 |t it wil|l be use|
|000047b0| 66 75 6c 2c 20 62 75 74 | 20 57 49 54 48 4f 55 54 |ful, but| WITHOUT|
|000047c0| 20 41 4e 59 0a 58 57 41 | 52 52 41 4e 54 59 2e 20 | ANY.XWA|RRANTY. |
|000047d0| 20 4e 6f 20 61 75 74 68 | 6f 72 20 6f 72 20 64 69 | No auth|or or di|
|000047e0| 73 74 72 69 62 75 74 6f | 72 20 61 63 63 65 70 74 |stributo|r accept|
|000047f0| 73 20 72 65 73 70 6f 6e | 73 69 62 69 6c 69 74 79 |s respon|sibility|
|00004800| 20 74 6f 20 61 6e 79 6f | 6e 65 20 66 6f 72 0a 58 | to anyo|ne for.X|
|00004810| 74 68 65 20 63 6f 6e 73 | 65 71 75 65 6e 63 65 73 |the cons|equences|
|00004820| 20 6f 66 20 75 73 69 6e | 67 20 69 74 20 6f 72 20 | of usin|g it or |
|00004830| 66 6f 72 20 77 68 65 74 | 68 65 72 20 69 74 20 73 |for whet|her it s|
|00004840| 65 72 76 65 73 20 61 6e | 79 20 70 61 72 74 69 63 |erves an|y partic|
|00004850| 75 6c 61 72 0a 58 70 75 | 72 70 6f 73 65 20 6f 72 |ular.Xpu|rpose or|
|00004860| 20 77 6f 72 6b 73 20 61 | 74 20 61 6c 6c 2c 20 75 | works a|t all, u|
|00004870| 6e 6c 65 73 73 20 68 65 | 20 73 61 79 73 20 73 6f |nless he| says so|
|00004880| 20 69 6e 20 77 72 69 74 | 69 6e 67 2e 20 20 52 65 | in writ|ing. Re|
|00004890| 66 65 72 20 74 6f 20 74 | 68 65 20 47 4e 55 0a 58 |fer to t|he GNU.X|
|000048a0| 47 65 6e 65 72 61 6c 20 | 50 75 62 6c 69 63 20 4c |General |Public L|
|000048b0| 69 63 65 6e 73 65 20 66 | 6f 72 20 66 75 6c 6c 20 |icense f|or full |
|000048c0| 64 65 74 61 69 6c 73 2e | 20 0a 58 0a 58 45 76 65 |details.| .X.XEve|
|000048d0| 72 79 6f 6e 65 20 69 73 | 20 67 72 61 6e 74 65 64 |ryone is| granted|
|000048e0| 20 70 65 72 6d 69 73 73 | 69 6f 6e 20 74 6f 20 63 | permiss|ion to c|
|000048f0| 6f 70 79 2c 20 6d 6f 64 | 69 66 79 20 61 6e 64 20 |opy, mod|ify and |
|00004900| 72 65 64 69 73 74 72 69 | 62 75 74 65 20 4d 30 2c |redistri|bute M0,|
|00004910| 20 62 75 74 0a 58 6f 6e | 6c 79 20 75 6e 64 65 72 | but.Xon|ly under|
|00004920| 20 74 68 65 20 63 6f 6e | 64 69 74 69 6f 6e 73 20 | the con|ditions |
|00004930| 64 65 73 63 72 69 62 65 | 64 20 69 6e 20 74 68 65 |describe|d in the|
|00004940| 20 47 4e 55 20 47 65 6e | 65 72 61 6c 20 50 75 62 | GNU Gen|eral Pub|
|00004950| 6c 69 63 20 4c 69 63 65 | 6e 73 65 2e 20 0a 58 41 |lic Lice|nse. .XA|
|00004960| 20 63 6f 70 79 20 6f 66 | 20 74 68 69 73 20 6c 69 | copy of| this li|
|00004970| 63 65 6e 73 65 20 69 73 | 20 73 75 70 70 6f 73 65 |cense is| suppose|
|00004980| 64 20 74 6f 20 68 61 76 | 65 20 62 65 65 6e 20 67 |d to hav|e been g|
|00004990| 69 76 65 6e 20 74 6f 20 | 79 6f 75 20 61 6c 6f 6e |iven to |you alon|
|000049a0| 67 20 77 69 74 68 0a 58 | 4d 30 20 73 6f 20 79 6f |g with.X|M0 so yo|
|000049b0| 75 20 63 61 6e 20 6b 6e | 6f 77 20 79 6f 75 72 20 |u can kn|ow your |
|000049c0| 72 69 67 68 74 73 20 61 | 6e 64 20 72 65 73 70 6f |rights a|nd respo|
|000049d0| 6e 73 69 62 69 6c 69 74 | 69 65 73 2e 20 20 49 74 |nsibilit|ies. It|
|000049e0| 20 73 68 6f 75 6c 64 20 | 62 65 20 69 6e 20 61 0a | should |be in a.|
|000049f0| 58 66 69 6c 65 20 6e 61 | 6d 65 64 20 4c 49 43 45 |Xfile na|med LICE|
|00004a00| 4e 53 45 2e 20 20 41 6d | 6f 6e 67 20 6f 74 68 65 |NSE. Am|ong othe|
|00004a10| 72 20 74 68 69 6e 67 73 | 2c 20 74 68 65 20 63 6f |r things|, the co|
|00004a20| 70 79 72 69 67 68 74 20 | 6e 6f 74 69 63 65 20 61 |pyright |notice a|
|00004a30| 6e 64 20 74 68 69 73 0a | 58 6e 6f 74 69 63 65 20 |nd this.|Xnotice |
|00004a40| 6d 75 73 74 20 62 65 20 | 70 72 65 73 65 72 76 65 |must be |preserve|
|00004a50| 64 20 6f 6e 20 61 6c 6c | 20 63 6f 70 69 65 73 2e |d on all| copies.|
|00004a60| 20 20 2a 2f 0a 58 0a 58 | 23 69 66 6e 64 65 66 20 | */.X.X|#ifndef |
|00004a70| 43 48 4b 53 55 4d 5f 48 | 0a 58 23 64 65 66 69 6e |CHKSUM_H|.X#defin|
|00004a80| 65 20 43 48 4b 53 55 4d | 5f 48 0a 58 0a 58 23 69 |e CHKSUM|_H.X.X#i|
|00004a90| 6e 63 6c 75 64 65 20 22 | 73 74 64 2e 68 22 0a 58 |nclude "|std.h".X|
|00004aa0| 0a 58 65 78 74 65 72 6e | 20 75 73 68 6f 72 74 20 |.Xextern| ushort |
|00004ab0| 63 72 63 5f 63 63 69 74 | 74 28 62 79 74 65 70 74 |crc_ccit|t(bytept|
|00004ac0| 72 20 73 2c 20 75 69 6e | 74 20 6c 65 6e 29 3b 0a |r s, uin|t len);.|
|00004ad0| 58 0a 58 23 65 6e 64 69 | 66 0a 45 4e 44 5f 4f 46 |X.X#endi|f.END_OF|
|00004ae0| 5f 46 49 4c 45 0a 69 66 | 20 74 65 73 74 20 31 31 |_FILE.if| test 11|
|00004af0| 30 35 20 2d 6e 65 20 60 | 77 63 20 2d 63 20 3c 27 |05 -ne `|wc -c <'|
|00004b00| 63 68 6b 73 75 6d 2e 68 | 27 60 3b 20 74 68 65 6e |chksum.h|'`; then|
|00004b10| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00004b20| 5c 22 27 63 68 6b 73 75 | 6d 2e 68 27 5c 22 20 75 |\"'chksu|m.h'\" u|
|00004b30| 6e 70 61 63 6b 65 64 20 | 77 69 74 68 20 77 72 6f |npacked |with wro|
|00004b40| 6e 67 20 73 69 7a 65 21 | 0a 66 69 0a 23 20 65 6e |ng size!|.fi.# en|
|00004b50| 64 20 6f 66 20 27 63 68 | 6b 73 75 6d 2e 68 27 0a |d of 'ch|ksum.h'.|
|00004b60| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 63 |fi.if te|st -f 'c|
|00004b70| 6f 70 79 72 67 68 74 2e | 68 27 20 2d 61 20 22 24 |opyrght.|h' -a "$|
|00004b80| 7b 31 7d 22 20 21 3d 20 | 22 2d 63 22 20 3b 20 74 |{1}" != |"-c" ; t|
|00004b90| 68 65 6e 20 0a 20 20 65 | 63 68 6f 20 73 68 61 72 |hen . e|cho shar|
|00004ba0| 3a 20 57 69 6c 6c 20 6e | 6f 74 20 63 6c 6f 62 62 |: Will n|ot clobb|
|00004bb0| 65 72 20 65 78 69 73 74 | 69 6e 67 20 66 69 6c 65 |er exist|ing file|
|00004bc0| 20 5c 22 27 63 6f 70 79 | 72 67 68 74 2e 68 27 5c | \"'copy|rght.h'\|
|00004bd0| 22 0a 65 6c 73 65 0a 65 | 63 68 6f 20 73 68 61 72 |".else.e|cho shar|
|00004be0| 3a 20 45 78 74 72 61 63 | 74 69 6e 67 20 5c 22 27 |: Extrac|ting \"'|
|00004bf0| 63 6f 70 79 72 67 68 74 | 2e 68 27 5c 22 20 5c 28 |copyrght|.h'\" \(|
|00004c00| 31 30 38 33 20 63 68 61 | 72 61 63 74 65 72 73 5c |1083 cha|racters\|
|00004c10| 29 0a 73 65 64 20 22 73 | 2f 5e 58 2f 2f 22 20 3e |).sed "s|/^X//" >|
|00004c20| 27 63 6f 70 79 72 67 68 | 74 2e 68 27 20 3c 3c 27 |'copyrgh|t.h' <<'|
|00004c30| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 2f 2a |END_OF_F|ILE'.X/*|
|00004c40| 0a 58 09 63 6f 70 79 72 | 67 68 74 2e 68 0a 58 2a |.X.copyr|ght.h.X*|
|00004c50| 2f 0a 58 2f 2a 20 20 43 | 6f 70 79 72 69 67 68 74 |/.X/* C|opyright|
|00004c60| 20 28 63 29 20 31 39 39 | 34 20 43 68 72 69 73 74 | (c) 199|4 Christ|
|00004c70| 69 61 6e 20 46 2e 20 54 | 73 63 68 75 64 69 6e 2e |ian F. T|schudin.|
|00004c80| 20 41 6c 6c 20 72 69 67 | 68 74 73 20 72 65 73 65 | All rig|hts rese|
|00004c90| 72 76 65 64 2e 0a 58 0a | 58 20 20 20 20 44 69 73 |rved..X.|X Dis|
|00004ca0| 74 72 69 62 75 74 65 64 | 20 75 6e 64 65 72 20 74 |tributed| under t|
|00004cb0| 68 65 20 74 65 72 6d 73 | 20 6f 66 20 74 68 65 20 |he terms| of the |
|00004cc0| 47 4e 55 20 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |GNU Gene|ral Publ|
|00004cd0| 69 63 20 4c 69 63 65 6e | 73 65 0a 58 20 20 20 20 |ic Licen|se.X |
|00004ce0| 76 65 72 73 69 6f 6e 20 | 32 20 6f 66 20 6a 75 6e |version |2 of jun|
|00004cf0| 65 20 31 39 39 31 20 61 | 73 20 70 75 62 6c 69 73 |e 1991 a|s publis|
|00004d00| 68 65 64 20 62 79 20 74 | 68 65 20 46 72 65 65 20 |hed by t|he Free |
|00004d10| 53 6f 66 74 77 61 72 65 | 0a 58 20 20 20 20 46 6f |Software|.X Fo|
|00004d20| 75 6e 64 61 74 69 6f 6e | 2c 20 49 6e 63 2e 0a 58 |undation|, Inc..X|
|00004d30| 0a 58 09 09 20 20 20 20 | 20 54 68 69 73 20 66 69 |.X.. | This fi|
|00004d40| 6c 65 20 69 73 20 70 61 | 72 74 20 6f 66 20 4d 30 |le is pa|rt of M0|
|00004d50| 2e 0a 58 0a 58 4d 30 20 | 69 73 20 64 69 73 74 72 |..X.XM0 |is distr|
|00004d60| 69 62 75 74 65 64 20 69 | 6e 20 74 68 65 20 68 6f |ibuted i|n the ho|
|00004d70| 70 65 20 74 68 61 74 20 | 69 74 20 77 69 6c 6c 20 |pe that |it will |
|00004d80| 62 65 20 75 73 65 66 75 | 6c 2c 20 62 75 74 20 57 |be usefu|l, but W|
|00004d90| 49 54 48 4f 55 54 20 41 | 4e 59 0a 58 57 41 52 52 |ITHOUT A|NY.XWARR|
|00004da0| 41 4e 54 59 2e 20 20 4e | 6f 20 61 75 74 68 6f 72 |ANTY. N|o author|
|00004db0| 20 6f 72 20 64 69 73 74 | 72 69 62 75 74 6f 72 20 | or dist|ributor |
|00004dc0| 61 63 63 65 70 74 73 20 | 72 65 73 70 6f 6e 73 69 |accepts |responsi|
|00004dd0| 62 69 6c 69 74 79 20 74 | 6f 20 61 6e 79 6f 6e 65 |bility t|o anyone|
|00004de0| 20 66 6f 72 0a 58 74 68 | 65 20 63 6f 6e 73 65 71 | for.Xth|e conseq|
|00004df0| 75 65 6e 63 65 73 20 6f | 66 20 75 73 69 6e 67 20 |uences o|f using |
|00004e00| 69 74 20 6f 72 20 66 6f | 72 20 77 68 65 74 68 65 |it or fo|r whethe|
|00004e10| 72 20 69 74 20 73 65 72 | 76 65 73 20 61 6e 79 20 |r it ser|ves any |
|00004e20| 70 61 72 74 69 63 75 6c | 61 72 0a 58 70 75 72 70 |particul|ar.Xpurp|
|00004e30| 6f 73 65 20 6f 72 20 77 | 6f 72 6b 73 20 61 74 20 |ose or w|orks at |
|00004e40| 61 6c 6c 2c 20 75 6e 6c | 65 73 73 20 68 65 20 73 |all, unl|ess he s|
|00004e50| 61 79 73 20 73 6f 20 69 | 6e 20 77 72 69 74 69 6e |ays so i|n writin|
|00004e60| 67 2e 20 20 52 65 66 65 | 72 20 74 6f 20 74 68 65 |g. Refe|r to the|
|00004e70| 20 47 4e 55 0a 58 47 65 | 6e 65 72 61 6c 20 50 75 | GNU.XGe|neral Pu|
|00004e80| 62 6c 69 63 20 4c 69 63 | 65 6e 73 65 20 66 6f 72 |blic Lic|ense for|
|00004e90| 20 66 75 6c 6c 20 64 65 | 74 61 69 6c 73 2e 20 0a | full de|tails. .|
|00004ea0| 58 0a 58 45 76 65 72 79 | 6f 6e 65 20 69 73 20 67 |X.XEvery|one is g|
|00004eb0| 72 61 6e 74 65 64 20 70 | 65 72 6d 69 73 73 69 6f |ranted p|ermissio|
|00004ec0| 6e 20 74 6f 20 63 6f 70 | 79 2c 20 6d 6f 64 69 66 |n to cop|y, modif|
|00004ed0| 79 20 61 6e 64 20 72 65 | 64 69 73 74 72 69 62 75 |y and re|distribu|
|00004ee0| 74 65 20 4d 30 2c 20 62 | 75 74 0a 58 6f 6e 6c 79 |te M0, b|ut.Xonly|
|00004ef0| 20 75 6e 64 65 72 20 74 | 68 65 20 63 6f 6e 64 69 | under t|he condi|
|00004f00| 74 69 6f 6e 73 20 64 65 | 73 63 72 69 62 65 64 20 |tions de|scribed |
|00004f10| 69 6e 20 74 68 65 20 47 | 4e 55 20 47 65 6e 65 72 |in the G|NU Gener|
|00004f20| 61 6c 20 50 75 62 6c 69 | 63 20 4c 69 63 65 6e 73 |al Publi|c Licens|
|00004f30| 65 2e 20 0a 58 41 20 63 | 6f 70 79 20 6f 66 20 74 |e. .XA c|opy of t|
|00004f40| 68 69 73 20 6c 69 63 65 | 6e 73 65 20 69 73 20 73 |his lice|nse is s|
|00004f50| 75 70 70 6f 73 65 64 20 | 74 6f 20 68 61 76 65 20 |upposed |to have |
|00004f60| 62 65 65 6e 20 67 69 76 | 65 6e 20 74 6f 20 79 6f |been giv|en to yo|
|00004f70| 75 20 61 6c 6f 6e 67 20 | 77 69 74 68 0a 58 4d 30 |u along |with.XM0|
|00004f80| 20 73 6f 20 79 6f 75 20 | 63 61 6e 20 6b 6e 6f 77 | so you |can know|
|00004f90| 20 79 6f 75 72 20 72 69 | 67 68 74 73 20 61 6e 64 | your ri|ghts and|
|00004fa0| 20 72 65 73 70 6f 6e 73 | 69 62 69 6c 69 74 69 65 | respons|ibilitie|
|00004fb0| 73 2e 20 20 49 74 20 73 | 68 6f 75 6c 64 20 62 65 |s. It s|hould be|
|00004fc0| 20 69 6e 20 61 0a 58 66 | 69 6c 65 20 6e 61 6d 65 | in a.Xf|ile name|
|00004fd0| 64 20 4c 49 43 45 4e 53 | 45 2e 20 20 41 6d 6f 6e |d LICENS|E. Amon|
|00004fe0| 67 20 6f 74 68 65 72 20 | 74 68 69 6e 67 73 2c 20 |g other |things, |
|00004ff0| 74 68 65 20 63 6f 70 79 | 72 69 67 68 74 20 6e 6f |the copy|right no|
|00005000| 74 69 63 65 20 61 6e 64 | 20 74 68 69 73 0a 58 6e |tice and| this.Xn|
|00005010| 6f 74 69 63 65 20 6d 75 | 73 74 20 62 65 20 70 72 |otice mu|st be pr|
|00005020| 65 73 65 72 76 65 64 20 | 6f 6e 20 61 6c 6c 20 63 |eserved |on all c|
|00005030| 6f 70 69 65 73 2e 20 20 | 2a 2f 0a 58 0a 58 23 64 |opies. |*/.X.X#d|
|00005040| 65 66 69 6e 65 20 43 4f | 50 59 52 49 47 48 54 20 |efine CO|PYRIGHT |
|00005050| 22 43 6f 70 79 72 69 67 | 68 74 20 28 63 29 20 31 |"Copyrig|ht (c) 1|
|00005060| 39 39 34 20 43 68 72 69 | 73 74 69 61 6e 20 46 2e |994 Chri|stian F.|
|00005070| 20 54 73 63 68 75 64 69 | 6e 2e 20 41 6c 6c 20 72 | Tschudi|n. All r|
|00005080| 69 67 68 74 73 20 72 65 | 73 65 72 76 65 64 2e 22 |ights re|served."|
|00005090| 0a 45 4e 44 5f 4f 46 5f | 46 49 4c 45 0a 69 66 20 |.END_OF_|FILE.if |
|000050a0| 74 65 73 74 20 31 30 38 | 33 20 2d 6e 65 20 60 77 |test 108|3 -ne `w|
|000050b0| 63 20 2d 63 20 3c 27 63 | 6f 70 79 72 67 68 74 2e |c -c <'c|opyrght.|
|000050c0| 68 27 60 3b 20 74 68 65 | 6e 0a 20 20 20 20 65 63 |h'`; the|n. ec|
|000050d0| 68 6f 20 73 68 61 72 3a | 20 5c 22 27 63 6f 70 79 |ho shar:| \"'copy|
|000050e0| 72 67 68 74 2e 68 27 5c | 22 20 75 6e 70 61 63 6b |rght.h'\|" unpack|
|000050f0| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005100| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005110| 27 63 6f 70 79 72 67 68 | 74 2e 68 27 0a 66 69 0a |'copyrgh|t.h'.fi.|
|00005120| 69 66 20 74 65 73 74 20 | 2d 66 20 27 65 72 72 6f |if test |-f 'erro|
|00005130| 72 2e 68 27 20 2d 61 20 | 22 24 7b 31 7d 22 20 21 |r.h' -a |"${1}" !|
|00005140| 3d 20 22 2d 63 22 20 3b | 20 74 68 65 6e 20 0a 20 |= "-c" ;| then . |
|00005150| 20 65 63 68 6f 20 73 68 | 61 72 3a 20 57 69 6c 6c | echo sh|ar: Will|
|00005160| 20 6e 6f 74 20 63 6c 6f | 62 62 65 72 20 65 78 69 | not clo|bber exi|
|00005170| 73 74 69 6e 67 20 66 69 | 6c 65 20 5c 22 27 65 72 |sting fi|le \"'er|
|00005180| 72 6f 72 2e 68 27 5c 22 | 0a 65 6c 73 65 0a 65 63 |ror.h'\"|.else.ec|
|00005190| 68 6f 20 73 68 61 72 3a | 20 45 78 74 72 61 63 74 |ho shar:| Extract|
|000051a0| 69 6e 67 20 5c 22 27 65 | 72 72 6f 72 2e 68 27 5c |ing \"'e|rror.h'\|
|000051b0| 22 20 5c 28 31 36 37 39 | 20 63 68 61 72 61 63 74 |" \(1679| charact|
|000051c0| 65 72 73 5c 29 0a 73 65 | 64 20 22 73 2f 5e 58 2f |ers\).se|d "s/^X/|
|000051d0| 2f 22 20 3e 27 65 72 72 | 6f 72 2e 68 27 20 3c 3c |/" >'err|or.h' <<|
|000051e0| 27 45 4e 44 5f 4f 46 5f | 46 49 4c 45 27 0a 58 2f |'END_OF_|FILE'.X/|
|000051f0| 2a 0a 58 09 65 72 72 6f | 72 2e 68 0a 58 2a 2f 0a |*.X.erro|r.h.X*/.|
|00005200| 58 2f 2a 20 20 43 6f 70 | 79 72 69 67 68 74 20 28 |X/* Cop|yright (|
|00005210| 63 29 20 31 39 39 34 20 | 43 68 72 69 73 74 69 61 |c) 1994 |Christia|
|00005220| 6e 20 46 2e 20 54 73 63 | 68 75 64 69 6e 2e 20 41 |n F. Tsc|hudin. A|
|00005230| 6c 6c 20 72 69 67 68 74 | 73 20 72 65 73 65 72 76 |ll right|s reserv|
|00005240| 65 64 2e 0a 58 0a 58 20 | 20 20 20 44 69 73 74 72 |ed..X.X | Distr|
|00005250| 69 62 75 74 65 64 20 75 | 6e 64 65 72 20 74 68 65 |ibuted u|nder the|
|00005260| 20 74 65 72 6d 73 20 6f | 66 20 74 68 65 20 47 4e | terms o|f the GN|
|00005270| 55 20 47 65 6e 65 72 61 | 6c 20 50 75 62 6c 69 63 |U Genera|l Public|
|00005280| 20 4c 69 63 65 6e 73 65 | 0a 58 20 20 20 20 76 65 | License|.X ve|
|00005290| 72 73 69 6f 6e 20 32 20 | 6f 66 20 6a 75 6e 65 20 |rsion 2 |of june |
|000052a0| 31 39 39 31 20 61 73 20 | 70 75 62 6c 69 73 68 65 |1991 as |publishe|
|000052b0| 64 20 62 79 20 74 68 65 | 20 46 72 65 65 20 53 6f |d by the| Free So|
|000052c0| 66 74 77 61 72 65 0a 58 | 20 20 20 20 46 6f 75 6e |ftware.X| Foun|
|000052d0| 64 61 74 69 6f 6e 2c 20 | 49 6e 63 2e 0a 58 0a 58 |dation, |Inc..X.X|
|000052e0| 09 09 20 20 20 20 20 54 | 68 69 73 20 66 69 6c 65 |.. T|his file|
|000052f0| 20 69 73 20 70 61 72 74 | 20 6f 66 20 4d 30 2e 0a | is part| of M0..|
|00005300| 58 0a 58 4d 30 20 69 73 | 20 64 69 73 74 72 69 62 |X.XM0 is| distrib|
|00005310| 75 74 65 64 20 69 6e 20 | 74 68 65 20 68 6f 70 65 |uted in |the hope|
|00005320| 20 74 68 61 74 20 69 74 | 20 77 69 6c 6c 20 62 65 | that it| will be|
|00005330| 20 75 73 65 66 75 6c 2c | 20 62 75 74 20 57 49 54 | useful,| but WIT|
|00005340| 48 4f 55 54 20 41 4e 59 | 0a 58 57 41 52 52 41 4e |HOUT ANY|.XWARRAN|
|00005350| 54 59 2e 20 20 4e 6f 20 | 61 75 74 68 6f 72 20 6f |TY. No |author o|
|00005360| 72 20 64 69 73 74 72 69 | 62 75 74 6f 72 20 61 63 |r distri|butor ac|
|00005370| 63 65 70 74 73 20 72 65 | 73 70 6f 6e 73 69 62 69 |cepts re|sponsibi|
|00005380| 6c 69 74 79 20 74 6f 20 | 61 6e 79 6f 6e 65 20 66 |lity to |anyone f|
|00005390| 6f 72 0a 58 74 68 65 20 | 63 6f 6e 73 65 71 75 65 |or.Xthe |conseque|
|000053a0| 6e 63 65 73 20 6f 66 20 | 75 73 69 6e 67 20 69 74 |nces of |using it|
|000053b0| 20 6f 72 20 66 6f 72 20 | 77 68 65 74 68 65 72 20 | or for |whether |
|000053c0| 69 74 20 73 65 72 76 65 | 73 20 61 6e 79 20 70 61 |it serve|s any pa|
|000053d0| 72 74 69 63 75 6c 61 72 | 0a 58 70 75 72 70 6f 73 |rticular|.Xpurpos|
|000053e0| 65 20 6f 72 20 77 6f 72 | 6b 73 20 61 74 20 61 6c |e or wor|ks at al|
|000053f0| 6c 2c 20 75 6e 6c 65 73 | 73 20 68 65 20 73 61 79 |l, unles|s he say|
|00005400| 73 20 73 6f 20 69 6e 20 | 77 72 69 74 69 6e 67 2e |s so in |writing.|
|00005410| 20 20 52 65 66 65 72 20 | 74 6f 20 74 68 65 20 47 | Refer |to the G|
|00005420| 4e 55 0a 58 47 65 6e 65 | 72 61 6c 20 50 75 62 6c |NU.XGene|ral Publ|
|00005430| 69 63 20 4c 69 63 65 6e | 73 65 20 66 6f 72 20 66 |ic Licen|se for f|
|00005440| 75 6c 6c 20 64 65 74 61 | 69 6c 73 2e 20 0a 58 0a |ull deta|ils. .X.|
|00005450| 58 45 76 65 72 79 6f 6e | 65 20 69 73 20 67 72 61 |XEveryon|e is gra|
|00005460| 6e 74 65 64 20 70 65 72 | 6d 69 73 73 69 6f 6e 20 |nted per|mission |
|00005470| 74 6f 20 63 6f 70 79 2c | 20 6d 6f 64 69 66 79 20 |to copy,| modify |
|00005480| 61 6e 64 20 72 65 64 69 | 73 74 72 69 62 75 74 65 |and redi|stribute|
|00005490| 20 4d 30 2c 20 62 75 74 | 0a 58 6f 6e 6c 79 20 75 | M0, but|.Xonly u|
|000054a0| 6e 64 65 72 20 74 68 65 | 20 63 6f 6e 64 69 74 69 |nder the| conditi|
|000054b0| 6f 6e 73 20 64 65 73 63 | 72 69 62 65 64 20 69 6e |ons desc|ribed in|
|000054c0| 20 74 68 65 20 47 4e 55 | 20 47 65 6e 65 72 61 6c | the GNU| General|
|000054d0| 20 50 75 62 6c 69 63 20 | 4c 69 63 65 6e 73 65 2e | Public |License.|
|000054e0| 20 0a 58 41 20 63 6f 70 | 79 20 6f 66 20 74 68 69 | .XA cop|y of thi|
|000054f0| 73 20 6c 69 63 65 6e 73 | 65 20 69 73 20 73 75 70 |s licens|e is sup|
|00005500| 70 6f 73 65 64 20 74 6f | 20 68 61 76 65 20 62 65 |posed to| have be|
|00005510| 65 6e 20 67 69 76 65 6e | 20 74 6f 20 79 6f 75 20 |en given| to you |
|00005520| 61 6c 6f 6e 67 20 77 69 | 74 68 0a 58 4d 30 20 73 |along wi|th.XM0 s|
|00005530| 6f 20 79 6f 75 20 63 61 | 6e 20 6b 6e 6f 77 20 79 |o you ca|n know y|
|00005540| 6f 75 72 20 72 69 67 68 | 74 73 20 61 6e 64 20 72 |our righ|ts and r|
|00005550| 65 73 70 6f 6e 73 69 62 | 69 6c 69 74 69 65 73 2e |esponsib|ilities.|
|00005560| 20 20 49 74 20 73 68 6f | 75 6c 64 20 62 65 20 69 | It sho|uld be i|
|00005570| 6e 20 61 0a 58 66 69 6c | 65 20 6e 61 6d 65 64 20 |n a.Xfil|e named |
|00005580| 4c 49 43 45 4e 53 45 2e | 20 20 41 6d 6f 6e 67 20 |LICENSE.| Among |
|00005590| 6f 74 68 65 72 20 74 68 | 69 6e 67 73 2c 20 74 68 |other th|ings, th|
|000055a0| 65 20 63 6f 70 79 72 69 | 67 68 74 20 6e 6f 74 69 |e copyri|ght noti|
|000055b0| 63 65 20 61 6e 64 20 74 | 68 69 73 0a 58 6e 6f 74 |ce and t|his.Xnot|
|000055c0| 69 63 65 20 6d 75 73 74 | 20 62 65 20 70 72 65 73 |ice must| be pres|
|000055d0| 65 72 76 65 64 20 6f 6e | 20 61 6c 6c 20 63 6f 70 |erved on| all cop|
|000055e0| 69 65 73 2e 20 20 2a 2f | 0a 58 0a 58 23 69 66 6e |ies. */|.X.X#ifn|
|000055f0| 64 65 66 20 45 52 52 4f | 52 5f 48 0a 58 23 64 65 |def ERRO|R_H.X#de|
|00005600| 66 69 6e 65 20 45 52 52 | 4f 52 5f 48 0a 58 0a 58 |fine ERR|OR_H.X.X|
|00005610| 23 69 6e 63 6c 75 64 65 | 20 22 73 74 64 2e 68 22 |#include| "std.h"|
|00005620| 0a 58 0a 58 65 6e 75 6d | 20 7b 0a 58 09 45 52 52 |.X.Xenum| {.X.ERR|
|00005630| 5f 53 54 41 43 4b 5f 55 | 4e 44 45 52 46 4c 4f 57 |_STACK_U|NDERFLOW|
|00005640| 2c 0a 58 09 45 52 52 5f | 4f 53 54 41 43 4b 5f 4f |,.X.ERR_|OSTACK_O|
|00005650| 56 45 52 46 4c 4f 57 2c | 0a 58 09 45 52 52 5f 44 |VERFLOW,|.X.ERR_D|
|00005660| 53 54 41 43 4b 5f 4f 56 | 45 52 46 4c 4f 57 2c 0a |STACK_OV|ERFLOW,.|
|00005670| 58 09 45 52 52 5f 45 53 | 54 41 43 4b 5f 4f 56 45 |X.ERR_ES|TACK_OVE|
|00005680| 52 46 4c 4f 57 2c 0a 58 | 0a 58 09 45 52 52 5f 54 |RFLOW,.X|.X.ERR_T|
|00005690| 59 50 45 5f 43 48 45 43 | 4b 2c 0a 58 09 45 52 52 |YPE_CHEC|K,.X.ERR|
|000056a0| 5f 52 41 4e 47 45 5f 43 | 48 45 43 4b 2c 0a 58 09 |_RANGE_C|HECK,.X.|
|000056b0| 45 52 52 5f 41 43 43 45 | 53 53 5f 43 48 45 43 4b |ERR_ACCE|SS_CHECK|
|000056c0| 2c 0a 58 09 45 52 52 5f | 44 49 56 49 53 49 4f 4e |,.X.ERR_|DIVISION|
|000056d0| 5f 42 59 5f 5a 45 52 4f | 2c 0a 58 0a 58 09 45 52 |_BY_ZERO|,.X.X.ER|
|000056e0| 52 5f 4e 4f 54 5f 49 4e | 5f 4c 4f 4f 50 2c 0a 58 |R_NOT_IN|_LOOP,.X|
|000056f0| 09 45 52 52 5f 4e 4f 54 | 5f 49 4e 5f 48 41 4c 54 |.ERR_NOT|_IN_HALT|
|00005700| 45 44 2c 0a 58 09 45 52 | 52 5f 4e 4f 5f 4d 41 52 |ED,.X.ER|R_NO_MAR|
|00005710| 4b 5f 46 4f 55 4e 44 2c | 0a 58 0a 58 09 45 52 52 |K_FOUND,|.X.X.ERR|
|00005720| 5f 44 49 43 54 5f 46 55 | 4c 4c 2c 0a 58 09 45 52 |_DICT_FU|LL,.X.ER|
|00005730| 52 5f 49 4e 56 41 4c 49 | 44 5f 43 48 41 4e 4e 45 |R_INVALI|D_CHANNE|
|00005740| 4c 2c 0a 58 09 45 52 52 | 5f 55 4e 44 45 46 49 4e |L,.X.ERR|_UNDEFIN|
|00005750| 45 44 2c 0a 58 0a 58 09 | 45 52 52 5f 53 59 4e 54 |ED,.X.X.|ERR_SYNT|
|00005760| 41 58 2c 0a 58 09 45 52 | 52 5f 4e 4f 54 5f 49 4d |AX,.X.ER|R_NOT_IM|
|00005770| 50 4c 45 4d 45 4e 54 45 | 44 2c 0a 58 09 45 52 52 |PLEMENTE|D,.X.ERR|
|00005780| 5f 49 4d 50 4c 45 4d 45 | 4e 54 41 54 49 4f 4e 5f |_IMPLEME|NTATION_|
|00005790| 4c 49 4d 49 54 2c 0a 58 | 0a 58 09 45 52 52 5f 43 |LIMIT,.X|.X.ERR_C|
|000057a0| 49 52 43 55 4c 41 52 5f | 44 41 54 41 2c 0a 58 0a |IRCULAR_|DATA,.X.|
|000057b0| 58 09 4c 41 53 54 5f 45 | 52 52 4f 52 2c 0a 58 0a |X.LAST_E|RROR,.X.|
|000057c0| 58 09 4f 4b 2c 0a 58 0a | 58 09 45 52 52 5f 49 4e |X.OK,.X.|X.ERR_IN|
|000057d0| 5f 49 4e 49 54 2c 0a 58 | 09 45 52 52 5f 49 4e 56 |_INIT,.X|.ERR_INV|
|000057e0| 41 4c 49 44 5f 46 49 4c | 45 5f 4e 41 4d 45 2c 0a |ALID_FIL|E_NAME,.|
|000057f0| 58 09 45 52 52 5f 57 48 | 49 4c 45 5f 52 45 41 44 |X.ERR_WH|ILE_READ|
|00005800| 49 4e 47 5f 46 49 4c 45 | 2c 0a 58 0a 58 09 45 52 |ING_FILE|,.X.X.ER|
|00005810| 52 5f 4d 41 4c 4c 4f 43 | 5f 46 41 49 4c 45 44 2c |R_MALLOC|_FAILED,|
|00005820| 0a 58 09 45 52 52 5f 4f | 55 54 5f 4f 46 5f 4c 4f |.X.ERR_O|UT_OF_LO|
|00005830| 43 41 4c 53 2c 0a 58 0a | 58 09 45 52 52 5f 53 48 |CALS,.X.|X.ERR_SH|
|00005840| 4f 52 54 5f 4d 53 47 52 | 2c 0a 58 09 45 52 52 5f |ORT_MSGR|,.X.ERR_|
|00005850| 4d 53 47 52 5f 43 52 43 | 2c 0a 58 09 45 52 52 5f |MSGR_CRC|,.X.ERR_|
|00005860| 4d 53 47 52 5f 57 52 4f | 4e 47 5f 56 45 52 53 49 |MSGR_WRO|NG_VERSI|
|00005870| 4f 4e 2c 0a 58 0a 58 09 | 45 52 52 5f 4e 4f 5f 50 |ON,.X.X.|ERR_NO_P|
|00005880| 52 4f 43 45 53 53 2c 0a | 58 09 59 49 45 4c 44 5f |ROCESS,.|X.YIELD_|
|00005890| 43 50 55 2c 0a 58 09 41 | 42 4f 52 54 2c 0a 58 09 |CPU,.X.A|BORT,.X.|
|000058a0| 49 44 4c 45 0a 58 7d 3b | 0a 58 0a 58 74 79 70 65 |IDLE.X};|.X.Xtype|
|000058b0| 64 65 66 20 69 6e 74 20 | 72 65 74 63 6f 64 65 3b |def int |retcode;|
|000058c0| 0a 58 0a 58 23 65 6e 64 | 69 66 0a 45 4e 44 5f 4f |.X.X#end|if.END_O|
|000058d0| 46 5f 46 49 4c 45 0a 69 | 66 20 74 65 73 74 20 31 |F_FILE.i|f test 1|
|000058e0| 36 37 39 20 2d 6e 65 20 | 60 77 63 20 2d 63 20 3c |679 -ne |`wc -c <|
|000058f0| 27 65 72 72 6f 72 2e 68 | 27 60 3b 20 74 68 65 6e |'error.h|'`; then|
|00005900| 0a 20 20 20 20 65 63 68 | 6f 20 73 68 61 72 3a 20 |. ech|o shar: |
|00005910| 5c 22 27 65 72 72 6f 72 | 2e 68 27 5c 22 20 75 6e |\"'error|.h'\" un|
|00005920| 70 61 63 6b 65 64 20 77 | 69 74 68 20 77 72 6f 6e |packed w|ith wron|
|00005930| 67 20 73 69 7a 65 21 0a | 66 69 0a 23 20 65 6e 64 |g size!.|fi.# end|
|00005940| 20 6f 66 20 27 65 72 72 | 6f 72 2e 68 27 0a 66 69 | of 'err|or.h'.fi|
|00005950| 0a 69 66 20 74 65 73 74 | 20 2d 66 20 27 66 72 61 |.if test| -f 'fra|
|00005960| 67 5f 30 2e 6d 30 27 20 | 2d 61 20 22 24 7b 31 7d |g_0.m0' |-a "${1}|
|00005970| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00005980| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00005990| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|000059a0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|000059b0| 27 66 72 61 67 5f 30 2e | 6d 30 27 5c 22 0a 65 6c |'frag_0.|m0'\".el|
|000059c0| 73 65 0a 65 63 68 6f 20 | 73 68 61 72 3a 20 45 78 |se.echo |shar: Ex|
|000059d0| 74 72 61 63 74 69 6e 67 | 20 5c 22 27 66 72 61 67 |tracting| \"'frag|
|000059e0| 5f 30 2e 6d 30 27 5c 22 | 20 5c 28 31 38 39 20 63 |_0.m0'\"| \(189 c|
|000059f0| 68 61 72 61 63 74 65 72 | 73 5c 29 0a 73 65 64 20 |haracter|s\).sed |
|00005a00| 22 73 2f 5e 58 2f 2f 22 | 20 3e 27 66 72 61 67 5f |"s/^X//"| >'frag_|
|00005a10| 30 2e 6d 30 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |0.m0' <<|'END_OF_|
|00005a20| 46 49 4c 45 27 0a 58 23 | 20 66 72 61 67 5f 30 2e |FILE'.X#| frag_0.|
|00005a30| 6d 30 0a 58 23 20 69 6e | 63 6c 75 64 65 64 20 62 |m0.X# in|cluded b|
|00005a40| 79 20 66 72 61 67 6d 65 | 6e 74 2e 6d 30 0a 58 0a |y fragme|nt.m0.X.|
|00005a50| 58 5f 2c 4b 7b 0a 58 20 | 20 5f 2c 47 0a 58 20 20 |X_,K{.X | _,G.X |
|00005a60| 58 31 49 58 31 2b 5f 64 | 61 74 3a 0a 58 20 20 30 |X1IX1+_d|at:.X 0|
|00005a70| 49 30 20 31 49 30 47 31 | 2b 20 3a 0a 58 20 20 30 |I0 1I0G1|+ :.X 0|
|00005a80| 49 30 47 32 49 3d 7b 0a | 58 20 20 20 20 30 49 31 |I0G2I={.|X 0I1|
|00005a90| 47 58 0a 58 20 20 20 20 | 5b 32 20 32 49 60 32 2d |GX.X |[2 2I`2-|
|00005aa0| 5d 47 20 7b 2b 7d 4c 0a | 58 20 20 20 20 5f 6f 72 |]G {+}L.|X _or|
|00005ab0| 69 20 58 20 24 0a 58 20 | 20 20 20 5f 2c 55 0a 58 |i X $.X | _,U.X|
|00005ac0| 20 20 7d 7b 7d 3f 0a 58 | 7d 7b 0a 58 20 20 5f 2c | }{}?.X|}{.X _,|
|00005ad0| 33 49 31 2b 41 3a 0a 58 | 20 20 5f 2c 47 20 30 49 |3I1+A:.X| _,G 0I|
|00005ae0| 30 20 31 3a 20 31 49 31 | 2b 20 5f 64 61 74 3a 0a |0 1: 1I1|+ _dat:.|
|00005af0| 58 7d 3f 0a 45 4e 44 5f | 4f 46 5f 46 49 4c 45 0a |X}?.END_|OF_FILE.|
|00005b00| 69 66 20 74 65 73 74 20 | 31 38 39 20 2d 6e 65 20 |if test |189 -ne |
|00005b10| 60 77 63 20 2d 63 20 3c | 27 66 72 61 67 5f 30 2e |`wc -c <|'frag_0.|
|00005b20| 6d 30 27 60 3b 20 74 68 | 65 6e 0a 20 20 20 20 65 |m0'`; th|en. e|
|00005b30| 63 68 6f 20 73 68 61 72 | 3a 20 5c 22 27 66 72 61 |cho shar|: \"'fra|
|00005b40| 67 5f 30 2e 6d 30 27 5c | 22 20 75 6e 70 61 63 6b |g_0.m0'\|" unpack|
|00005b50| 65 64 20 77 69 74 68 20 | 77 72 6f 6e 67 20 73 69 |ed with |wrong si|
|00005b60| 7a 65 21 0a 66 69 0a 23 | 20 65 6e 64 20 6f 66 20 |ze!.fi.#| end of |
|00005b70| 27 66 72 61 67 5f 30 2e | 6d 30 27 0a 66 69 0a 69 |'frag_0.|m0'.fi.i|
|00005b80| 66 20 74 65 73 74 20 2d | 66 20 27 66 72 61 67 6d |f test -|f 'fragm|
|00005b90| 65 6e 74 2e 6d 30 27 20 | 2d 61 20 22 24 7b 31 7d |ent.m0' |-a "${1}|
|00005ba0| 22 20 21 3d 20 22 2d 63 | 22 20 3b 20 74 68 65 6e |" != "-c|" ; then|
|00005bb0| 20 0a 20 20 65 63 68 6f | 20 73 68 61 72 3a 20 57 | . echo| shar: W|
|00005bc0| 69 6c 6c 20 6e 6f 74 20 | 63 6c 6f 62 62 65 72 20 |ill not |clobber |
|00005bd0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 5c 22 |existing| file \"|
|00005be0| 27 66 72 61 67 6d 65 6e | 74 2e 6d 30 27 5c 22 0a |'fragmen|t.m0'\".|
|00005bf0| 65 6c 73 65 0a 65 63 68 | 6f 20 73 68 61 72 3a 20 |else.ech|o shar: |
|00005c00| 45 78 74 72 61 63 74 69 | 6e 67 20 5c 22 27 66 72 |Extracti|ng \"'fr|
|00005c10| 61 67 6d 65 6e 74 2e 6d | 30 27 5c 22 20 5c 28 31 |agment.m|0'\" \(1|
|00005c20| 33 33 32 20 63 68 61 72 | 61 63 74 65 72 73 5c 29 |332 char|acters\)|
|00005c30| 0a 73 65 64 20 22 73 2f | 5e 58 2f 2f 22 20 3e 27 |.sed "s/|^X//" >'|
|00005c40| 66 72 61 67 6d 65 6e 74 | 2e 6d 30 27 20 3c 3c 27 |fragment|.m0' <<'|
|00005c50| 45 4e 44 5f 4f 46 5f 46 | 49 4c 45 27 0a 58 23 20 |END_OF_F|ILE'.X# |
|00005c60| 66 72 61 67 6d 65 6e 74 | 2e 6d 30 0a 58 0a 58 23 |fragment|.m0.X.X#|
|00005c70| 20 66 72 61 67 6d 65 6e | 74 61 74 69 6f 6e 20 70 | fragmen|tation p|
|00005c80| 72 6f 63 65 64 75 72 65 | 20 28 63 75 74 73 20 61 |rocedure| (cuts a|
|00005c90| 20 6d 65 73 73 65 6e 67 | 65 72 20 69 6e 74 6f 20 | messeng|er into |
|00005ca0| 6d 65 73 73 65 6e 67 65 | 72 20 66 72 61 67 6d 65 |messenge|r fragme|
|00005cb0| 6e 74 73 29 0a 58 23 20 | 75 73 61 67 65 3a 20 73 |nts).X# |usage: s|
|00005cc0| 74 72 69 6e 67 20 69 6e | 74 20 20 66 72 61 67 6d |tring in|t fragm|
|00005cd0| 65 6e 74 20 20 61 72 72 | 61 79 5f 6f 66 5f 73 74 |ent arr|ay_of_st|
|00005ce0| 72 69 6e 67 73 0a 58 23 | 20 20 20 20 20 20 20 20 |rings.X#| |
|00005cf0| 20 20 20 20 20 20 20 69 | 6e 74 20 69 73 20 74 68 | i|nt is th|
|00005d00| 65 20 6d 61 78 69 6d 75 | 6d 20 6c 65 6e 67 74 68 |e maximu|m length|
|00005d10| 20 61 20 66 72 61 67 6d | 65 6e 74 20 63 61 6e 20 | a fragm|ent can |
|00005d20| 68 61 76 65 0a 58 0a 58 | 23 20 4e 6f 74 65 3a 20 |have.X.X|# Note: |
|00005d30| 74 68 69 73 20 69 73 20 | 61 20 74 6f 79 20 65 78 |this is |a toy ex|
|00005d40| 61 6d 70 6c 65 20 62 65 | 63 61 75 73 65 20 69 74 |ample be|cause it|
|00005d50| 20 61 73 73 75 6d 65 73 | 20 61 20 72 65 6c 69 61 | assumes| a relia|
|00005d60| 62 6c 65 20 73 75 62 6d | 69 73 73 69 6f 6e 0a 58 |ble subm|ission.X|
|00005d70| 23 20 63 68 61 6e 6e 65 | 6c 20 28 77 69 74 68 20 |# channe|l (with |
|00005d80| 65 6e 20 65 78 61 63 74 | 6c 79 2d 6f 6e 63 65 20 |en exact|ly-once |
|00005d90| 74 72 61 6e 73 66 65 72 | 20 73 65 6d 61 6e 74 69 |transfer| semanti|
|00005da0| 63 73 2c 20 61 6c 74 68 | 6f 75 67 68 20 6d 65 73 |cs, alth|ough mes|
|00005db0| 73 65 6e 67 65 72 0a 58 | 23 20 66 72 61 67 6d 65 |senger.X|# fragme|
|00005dc0| 6e 74 73 20 61 72 65 20 | 61 6c 6c 6f 77 65 64 20 |nts are |allowed |
|00005dd0| 74 6f 20 61 72 72 69 76 | 65 20 6f 75 74 20 6f 66 |to arriv|e out of|
|00005de0| 20 6f 72 64 65 72 29 2e | 0a 58 23 20 41 20 72 65 | order).|.X# A re|
|00005df0| 61 6c 20 66 72 61 67 6d | 65 6e 74 61 74 69 6f 6e |al fragm|entation|
|00005e00| 20 6c 6f 67 69 63 20 73 | 68 6f 75 6c 64 20 62 65 | logic s|hould be|
|00005e10| 20 61 62 6c 65 20 74 6f | 20 63 6f 70 65 20 77 69 | able to| cope wi|
|00005e20| 74 68 20 66 72 61 67 6d | 65 6e 74 0a 58 23 20 6c |th fragm|ent.X# l|
|00005e30| 6f 73 73 20 61 6e 64 20 | 64 75 70 6c 69 66 69 63 |oss and |duplific|
|00005e40| 61 74 69 6f 6e 2e 0a 58 | 23 20 41 6e 6f 74 68 65 |ation..X|# Anothe|
|00005e50| 72 20 6c 69 6d 69 74 61 | 74 69 6f 6e 20 69 73 20 |r limita|tion is |
|00005e60| 74 68 61 74 20 69 74 20 | 63 61 6e 20 66 61 69 6c |that it |can fail|
|00005e70| 20 69 66 20 6d 6f 72 65 | 20 74 68 61 6e 20 39 39 | if more| than 99|
|00005e80| 39 20 66 72 61 67 6d 65 | 6e 74 73 0a 58 23 20 6d |9 fragme|nts.X# m|
|00005e90| 75 73 74 20 62 65 20 63 | 72 65 61 74 65 64 2e 0a |ust be c|reated..|
|00005ea0| 58 0a 58 0a 58 2e 20 27 | 66 72 61 67 6d 65 6e 74 |X.X.X. '|fragment|
|00005eb0| 20 7b 0a 58 20 20 44 20 | 28 20 2e 58 27 6d 58 3a | {.X D |( .X'mX:|
|00005ec0| 20 2e 58 27 73 58 3a 0a | 58 20 20 73 60 6d 3e 7b | .X'sX:.|X s`m>{|
|00005ed0| 0a 58 20 20 20 20 2e 27 | 61 0a 58 23 69 6e 63 6c |.X .'|a.X#incl|
|00005ee0| 75 64 65 73 74 72 69 6e | 67 20 66 72 61 67 5f 30 |udestrin|g frag_0|
|00005ef0| 2e 6d 30 0a 58 20 20 20 | 20 3a 0a 58 20 20 20 20 |.m0.X | :.X |
|00005f00| 2e 20 27 6d 20 6d 20 61 | 60 2d 20 33 30 2d 20 3a |. 'm m a|`- 30- :|
|00005f10| 09 23 20 68 65 61 64 65 | 72 3a 20 32 30 2c 20 32 |.# heade|r: 20, 2|
|00005f20| 78 69 6e 74 65 67 65 72 | 3a 20 37 2c 20 70 61 64 |xinteger|: 7, pad|
|00005f30| 64 69 6e 67 3a 20 33 0a | 58 20 20 20 20 2e 20 27 |ding: 3.|X . '|
|00005f40| 6e 20 73 60 20 6d 2b 31 | 2d 20 6d 20 2f 20 3a 0a |n s` m+1|- m / :.|
|00005f50| 58 20 20 20 20 2e 20 27 | 74 20 6e 20 5f 63 74 65 |X . '|t n _cte|
|00005f60| 20 22 20 22 2b 20 3a 0a | 58 20 20 20 20 2e 20 27 | " "+ :.|X . '|
|00005f70| 6b 20 3b 20 3a 0a 58 20 | 20 20 20 5b 20 6e 20 7b |k ; :.X | [ n {|
|00005f80| 0a 58 20 20 20 20 20 20 | 20 20 5b 6b 20 74 33 49 |.X | [k t3I|
|00005f90| 5f 63 74 65 2b 61 2b 20 | 73 5b 30 6d 20 73 60 3e |_cte+a+ |s[0m s`>|
|00005fa0| 7b 73 60 7d 7b 6d 7d 3f | 5d 47 20 2e 27 73 20 73 |{s`}{m}?|]G .'s s|
|00005fb0| 5b 34 49 60 73 60 31 49 | 2d 5d 47 3a 20 5d 5f 63 |[4I`s`1I|-]G: ]_c|
|00005fc0| 74 6d 20 58 50 0a 58 20 | 20 20 20 20 20 7d 4c 0a |tm XP.X | }L.|
|00005fd0| 58 20 20 20 20 5d 0a 58 | 20 20 7d 7b 5b 73 5d 7d |X ].X| }{[s]}|
|00005fe0| 3f 20 29 0a 58 7d 20 3a | 0a 58 0a 58 0a 58 27 70 |? ).X} :|.X.X.X'p|
|00005ff0| 72 69 6e 74 46 20 7b 20 | 50 09 23 20 64 65 66 69 |rintF { |P.# defi|
|00006000| 6e 65 20 74 68 65 20 74 | 65 73 74 20 70 72 6f 63 |ne the t|est proc|
|00006010| 65 64 75 72 65 20 6f 6e | 6c 79 20 69 66 20 74 68 |edure on|ly if th|
|00006020| 65 20 63 6f 6e 73 6f 6c | 65 20 69 73 20 64 65 66 |e consol|e is def|
|00006030| 69 6e 65 64 2e 0a 58 09 | 09 23 20 54 68 69 73 20 |ined..X.|.# This |
|00006040| 74 65 73 74 20 63 72 65 | 61 74 65 73 20 6d 61 6e |test cre|ates man|
|00006050| 79 20 66 72 61 67 6d 65 | 6e 74 73 20 61 6e 64 20 |y fragme|nts and |
|00006060| 73 75 62 6d 69 74 73 20 | 74 68 65 6d 20 6c 6f 63 |submits |them loc|
|00006070| 61 6c 79 2e 0a 58 09 09 | 23 20 54 68 65 79 20 72 |aly..X..|# They r|
|00006080| 65 61 73 73 65 6d 62 6c | 65 20 74 68 65 6d 73 65 |eassembl|e themse|
|00006090| 6c 76 65 73 20 2d 20 74 | 68 65 20 72 65 63 72 65 |lves - t|he recre|
|000060a0| 61 74 65 64 20 66 69 6e | 61 6c 20 6d 65 73 73 65 |ated fin|al messe|
|000060b0| 6e 67 65 72 0a 58 09 09 | 23 20 70 72 69 6e 74 73 |nger.X..|# prints|
|000060c0| 20 61 20 68 65 6c 6c 6f | 20 6d 73 67 20 6f 6e 20 | a hello| msg on |
|000060d0| 74 68 65 20 63 6f 6e 73 | 6f 6c 65 2e 0a 58 20 20 |the cons|ole..X |
|000060e0| 2e 27 74 65 73 74 5f 66 | 72 61 67 6d 65 6e 74 7b |.'test_f|ragment{|
|000060f0| 0a 58 20 20 20 20 5b 3b | 0a 58 20 20 20 20 20 22 |.X [;|.X "|
|00006100| 6e 75 6c 6c 30 7b 7d 5f | 63 68 61 27 63 6f 6e 73 |null0{}_|cha'cons|
|00006110| 6f 6c 65 47 27 5f 6b 65 | 79 47 21 5c 22 5c 78 30 |oleG'_ke|yG!\"\x0|
|00006120| 61 6f 72 69 3d 5c 22 5f | 6f 72 69 20 5f 63 74 65 |aori=\"_|ori _cte|
|00006130| 2b 5c 22 20 28 69 74 20 | 77 6f 72 6b 65 64 21 29 |+\" (it |worked!)|
|00006140| 5c 78 30 61 5c 22 2b 20 | 24 22 0a 58 20 20 20 20 |\x0a\"+ |$".X |
|00006150| 20 31 32 30 53 20 5d 5f | 63 74 6d 20 31 35 30 20 | 120S ]_|ctm 150 |
|00006160| 66 72 61 67 6d 65 6e 74 | 0a 58 20 20 20 20 20 7b |fragment|.X {|
|00006170| 5b 27 63 6f 6e 73 6f 6c | 65 20 30 20 6e 75 6c 6c |['consol|e 0 null|
|00006180| 5d 20 58 20 24 7d 20 4c | 0a 58 20 20 7d 3a 0a 58 |] X $} L|.X }:.X|
|00006190| 20 20 22 66 69 6c 65 20 | 60 66 72 61 67 6d 65 6e | "file |`fragmen|
|000061a0| 74 2e 6d 30 27 20 6c 6f | 61 64 65 64 5c 78 30 61 |t.m0' lo|aded\x0a|
|000061b0| 22 20 70 72 69 6e 74 0a | 58 7d 7b 7d 3f 0a 45 4e |" print.|X}{}?.EN|
|000061c0| 44 5f 4f 46 5f 46 49 4c | 45 0a 69 66 20 74 65 73 |D_OF_FIL|E.if tes|
|000061d0| 74 20 31 33 33 32 20 2d | 6e 65 20 60 77 63 20 2d |t 1332 -|ne `wc -|
|000061e0| 63 20 3c 27 66 72 61 67 | 6d 65 6e 74 2e 6d 30 27 |c <'frag|ment.m0'|
|000061f0| 60 3b 20 74 68 65 6e 0a | 20 20 20 20 65 63 68 6f |`; then.| echo|
|00006200| 20 73 68 61 72 3a 20 5c | 22 27 66 72 61 67 6d 65 | shar: \|"'fragme|
|00006210| 6e 74 2e 6d 30 27 5c 22 | 20 75 6e 70 61 63 6b 65 |nt.m0'\"| unpacke|
|00006220| 64 20 77 69 74 68 20 77 | 72 6f 6e 67 20 73 69 7a |d with w|rong siz|
|00006230| 65 21 0a 66 69 0a 23 20 | 65 6e 64 20 6f 66 20 27 |e!.fi.# |end of '|
|00006240| 66 72 61 67 6d 65 6e 74 | 2e 6d 30 27 0a 66 69 0a |fragment|.m0'.fi.|
|00006250| 69 66 20 74 65 73 74 20 | 2d 66 20 27 68 64 72 2e |if test |-f 'hdr.|
|00006260| 68 27 20 2d 61 20 22 24 | 7b 31 7d 22 20 21 3d 20 |h' -a "$|{1}" != |
|00006270| 22 2d 63 22 20 3b 20 74 | 68 65 6e 20 0a 20 20 65 |"-c" ; t|hen . e|
|00006280| 63 68 6f 20 73 68 61 72 | 3a 20 57 69 6c 6c 20 6e |cho shar|: Will n|
|00006290| 6f 74 20 63 6c 6f 62 62 | 65 72 20 65 78 69 73 74 |ot clobb|er exist|
|000062a0| 69 6e 67 20 66 69 6c 65 | 20 5c 22 27 68 64 72 2e |ing file| \"'hdr.|
|000062b0| 68 27 5c 22 0a 65 6c 73 | 65 0a 65 63 68 6f 20 73 |h'\".els|e.echo s|
|000062c0| 68 61 72 3a 20 45 78 74 | 72 61 63 74 69 6e 67 20 |har: Ext|racting |
|000062d0| 5c 22 27 68 64 72 2e 68 | 27 5c 22 20 5c 28 31 31 |\"'hdr.h|'\" \(11|
|000062e0| 36 32 20 63 68 61 72 61 | 63 74 65 72 73 5c 29 0a |62 chara|cters\).|
|000062f0| 73 65 64 20 22 73 2f 5e | 58 2f 2f 22 20 3e 27 68 |sed "s/^|X//" >'h|
|00006300| 64 72 2e 68 27 20 3c 3c | 27 45 4e 44 5f 4f 46 5f |dr.h' <<|'END_OF_|
|00006310| 46 49 4c 45 27 0a 58 2f | 2a 0a 58 09 68 64 72 2e |FILE'.X/|*.X.hdr.|
|00006320| 68 0a 58 2a 2f 0a 58 2f | 2a 20 20 43 6f 70 79 72 |h.X*/.X/|* Copyr|
|00006330| 69 67 68 74 20 28 63 29 | 20 31 39 39 34 20 43 68 |ight (c)| 1994 Ch|
|00006340| 72 69 73 74 69 61 6e 20 | 46 2e 20 54 73 63 68 75 |ristian |F. Tschu|
|00006350| 64 69 6e 2e 20 41 6c 6c | 20 72 69 67 68 74 73 20 |din. All| rights |
|00006360| 72 65 73 65 72 76 65 64 | 2e 0a 58 0a 58 20 20 20 |reserved|..X.X |
|00006370| 20 44 69 73 74 72 69 62 | 75 74 65 64 20 75 6e 64 | Distrib|uted und|
|00006380| 65 72 20 74 68 65 20 74 | 65 72 6d 73 20 6f 66 20 |er the t|erms of |
|00006390| 74 68 65 20 47 4e 55 20 | 47 65 6e 65 72 61 6c 20 |the GNU |General |
|000063a0| 50 75 62 6c 69 63 20 4c | 69 63 65 6e 73 65 0a 58 |Public L|icense.X|
|000063b0| 20 20 20 20 76 65 72 73 | 69 6f 6e 20 32 20 6f 66 | vers|ion 2 of|
|000063c0| 20 6a 75 6e 65 20 31 39 | 39 31 20 61 73 20 70 75 | june 19|91 as pu|
|000063d0| 62 6c 69 73 68 65 64 20 | 62 79 20 74 68 65 20 46 |blished |by the F|
|000063e0| 72 65 65 20 53 6f 66 74 | 77 61 72 65 0a 58 20 20 |ree Soft|ware.X |
|000063f0| 20 20 46 6f 75 6e 64 61 | 74 69 6f 6e 2c 20 49 6e | Founda|tion, In|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.