home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: SHell self-extracting ARchive
(archive/shar).
You can browse this item here: modemcap
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| SHell self-extracting ARchive (archive/shar)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/329 Shell Archive Format
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| message/rfc822
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 53 75 62 6a 65 63 74 3a | 20 20 76 31 33 69 30 35 |Subject:| v13i05|
|00000010| 39 3a 20 20 48 61 72 64 | 77 61 72 65 2d 69 6e 64 |9: Hard|ware-ind|
|00000020| 65 70 65 6e 64 61 6e 74 | 20 6d 6f 64 65 6d 20 72 |ependant| modem r|
|00000030| 6f 75 74 69 6e 65 73 0a | 4e 65 77 73 67 72 6f 75 |outines.|Newsgrou|
|00000040| 70 73 3a 20 63 6f 6d 70 | 2e 73 6f 75 72 63 65 73 |ps: comp|.sources|
|00000050| 2e 75 6e 69 78 0a 53 65 | 6e 64 65 72 3a 20 73 6f |.unix.Se|nder: so|
|00000060| 75 72 63 65 73 0a 41 70 | 70 72 6f 76 65 64 3a 20 |urces.Ap|proved: |
|00000070| 72 73 61 6c 7a 40 75 75 | 6e 65 74 2e 55 55 2e 4e |rsalz@uu|net.UU.N|
|00000080| 45 54 0a 0a 53 75 62 6d | 69 74 74 65 64 2d 62 79 |ET..Subm|itted-by|
|00000090| 3a 20 54 68 65 20 42 65 | 61 63 68 20 42 75 6d 20 |: The Be|ach Bum |
|000000a0| 3c 75 6c 79 73 73 65 73 | 21 69 68 6e 70 34 21 6b |<ulysses|!ihnp4!k|
|000000b0| 69 6c 6c 65 72 21 6a 66 | 68 40 73 65 69 73 6d 6f |iller!jf|h@seismo|
|000000c0| 2e 43 53 53 2e 47 4f 56 | 3e 0a 50 6f 73 74 69 6e |.CSS.GOV|>.Postin|
|000000d0| 67 2d 6e 75 6d 62 65 72 | 3a 20 56 6f 6c 75 6d 65 |g-number|: Volume|
|000000e0| 20 31 33 2c 20 49 73 73 | 75 65 20 35 39 0a 41 72 | 13, Iss|ue 59.Ar|
|000000f0| 63 68 69 76 65 2d 6e 61 | 6d 65 3a 20 6d 6f 64 65 |chive-na|me: mode|
|00000100| 6d 63 61 70 0a 0a 54 68 | 69 73 20 69 73 20 61 20 |mcap..Th|is is a |
|00000110| 6d 6f 64 65 6d 2d 69 6e | 64 65 70 65 6e 64 61 6e |modem-in|dependan|
|00000120| 74 20 64 69 61 6c 28 33 | 29 20 70 61 63 6b 61 67 |t dial(3|) packag|
|00000130| 65 2c 20 77 69 74 68 20 | 61 20 74 65 72 6d 63 61 |e, with |a termca|
|00000140| 70 2d 73 74 79 6c 65 0a | 64 65 73 63 72 69 70 74 |p-style.|descript|
|00000150| 69 6f 6e 20 66 69 6c 65 | 2e 20 20 4e 6f 20 6d 61 |ion file|. No ma|
|00000160| 6e 75 61 6c 20 70 61 67 | 65 20 2d 2d 20 72 65 66 |nual pag|e -- ref|
|00000170| 65 72 20 74 6f 20 74 68 | 65 20 72 65 6c 65 76 61 |er to th|e releva|
|00000180| 6e 74 20 28 53 79 73 74 | 65 6d 56 29 0a 6d 61 6e |nt (Syst|emV).man|
|00000190| 75 61 6c 73 2e 0a 0a 23 | 21 20 2f 62 69 6e 2f 73 |uals...#|! /bin/s|
|000001a0| 68 0a 23 20 54 68 69 73 | 20 69 73 20 61 20 73 68 |h.# This| is a sh|
|000001b0| 65 6c 6c 20 61 72 63 68 | 69 76 65 2c 20 6d 65 61 |ell arch|ive, mea|
|000001c0| 6e 69 6e 67 3a 0a 23 20 | 31 2e 20 52 65 6d 6f 76 |ning:.# |1. Remov|
|000001d0| 65 20 65 76 65 72 79 74 | 68 69 6e 67 20 61 62 6f |e everyt|hing abo|
|000001e0| 76 65 20 74 68 65 20 23 | 21 20 2f 62 69 6e 2f 73 |ve the #|! /bin/s|
|000001f0| 68 20 6c 69 6e 65 2e 0a | 23 20 32 2e 20 53 61 76 |h line..|# 2. Sav|
|00000200| 65 20 74 68 65 20 72 65 | 73 75 6c 74 69 6e 67 20 |e the re|sulting |
|00000210| 74 65 78 74 20 69 6e 20 | 61 20 66 69 6c 65 2e 0a |text in |a file..|
|00000220| 23 20 33 2e 20 45 78 65 | 63 75 74 65 20 74 68 65 |# 3. Exe|cute the|
|00000230| 20 66 69 6c 65 20 77 69 | 74 68 20 2f 62 69 6e 2f | file wi|th /bin/|
|00000240| 73 68 20 28 6e 6f 74 20 | 63 73 68 29 20 74 6f 20 |sh (not |csh) to |
|00000250| 63 72 65 61 74 65 3a 0a | 23 09 52 45 41 44 4d 45 |create:.|#.README|
|00000260| 0a 23 09 6d 61 6b 65 66 | 69 6c 65 0a 23 09 6d 6f |.#.makef|ile.#.mo|
|00000270| 64 65 6d 63 61 70 0a 23 | 09 6d 6f 64 65 6d 74 79 |demcap.#|.modemty|
|00000280| 70 65 0a 23 09 6d 6f 64 | 65 6d 63 61 70 2e 68 0a |pe.#.mod|emcap.h.|
|00000290| 23 09 6d 67 65 74 65 6e | 74 2e 63 0a 23 09 6d 67 |#.mgeten|t.c.#.mg|
|000002a0| 65 74 73 74 72 2e 63 0a | 23 09 6d 67 65 74 66 6c |etstr.c.|#.mgetfl|
|000002b0| 61 67 2e 63 0a 23 09 6d | 67 65 74 6e 75 6d 2e 63 |ag.c.#.m|getnum.c|
|000002c0| 0a 23 09 6d 64 69 61 6c | 2e 63 0a 23 09 6d 65 72 |.#.mdial|.c.#.mer|
|000002d0| 72 6f 72 2e 63 0a 23 09 | 69 6e 69 74 6d 6f 64 65 |ror.c.#.|initmode|
|000002e0| 6d 2e 63 0a 23 09 68 61 | 6e 67 75 70 2e 63 0a 23 |m.c.#.ha|ngup.c.#|
|000002f0| 09 64 69 61 6c 2e 63 0a | 23 09 63 61 6c 6c 2e 63 |.dial.c.|#.call.c|
|00000300| 0a 23 20 54 68 69 73 20 | 61 72 63 68 69 76 65 20 |.# This |archive |
|00000310| 63 72 65 61 74 65 64 3a | 20 4d 6f 6e 20 4e 6f 76 |created:| Mon Nov|
|00000320| 20 20 32 20 31 33 3a 33 | 32 3a 30 38 20 31 39 38 | 2 13:3|2:08 198|
|00000330| 37 0a 65 78 70 6f 72 74 | 20 50 41 54 48 3b 20 50 |7.export| PATH; P|
|00000340| 41 54 48 3d 2f 62 69 6e | 3a 2f 75 73 72 2f 62 69 |ATH=/bin|:/usr/bi|
|00000350| 6e 3a 24 50 41 54 48 0a | 69 66 20 74 65 73 74 20 |n:$PATH.|if test |
|00000360| 2d 66 20 27 52 45 41 44 | 4d 45 27 0a 74 68 65 6e |-f 'READ|ME'.then|
|00000370| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 22 77 69 |..echo s|har: "wi|
|00000380| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00000390| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|000003a0| 27 52 45 41 44 4d 45 27 | 22 0a 65 6c 73 65 0a 63 |'README'|".else.c|
|000003b0| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|000003c0| 3e 20 27 52 45 41 44 4d | 45 27 0a 54 68 69 73 20 |> 'READM|E'.This |
|000003d0| 70 61 63 6b 61 67 65 20 | 69 73 20 61 20 6d 6f 64 |package |is a mod|
|000003e0| 65 6d 20 69 6e 64 65 70 | 65 6e 64 65 6e 74 20 64 |em indep|endent d|
|000003f0| 69 61 6c 28 33 29 20 70 | 61 63 6b 61 67 65 2e 20 |ial(3) p|ackage. |
|00000400| 20 49 74 20 70 72 6f 76 | 69 64 65 73 20 61 20 64 | It prov|ides a d|
|00000410| 65 76 69 63 65 0a 69 6e | 64 65 70 65 6e 64 65 6e |evice.in|dependen|
|00000420| 74 20 6d 65 74 68 6f 64 | 20 66 6f 72 20 64 69 61 |t method| for dia|
|00000430| 6c 69 6e 67 20 61 6e 64 | 20 6d 61 6e 69 70 75 6c |ling and| manipul|
|00000440| 61 74 69 6e 67 20 6d 6f | 64 65 6d 73 2e 20 20 54 |ating mo|dems. T|
|00000450| 68 65 20 66 6f 72 6d 61 | 74 20 6f 66 20 74 68 65 |he forma|t of the|
|00000460| 0a 64 65 73 63 72 69 70 | 74 69 6f 6e 20 66 69 6c |.descrip|tion fil|
|00000470| 65 20 69 73 20 74 68 65 | 20 65 76 65 72 20 70 72 |e is the| ever pr|
|00000480| 65 73 65 6e 74 20 3b 2d | 29 20 74 65 72 6d 63 61 |esent ;-|) termca|
|00000490| 70 73 20 66 6f 72 6d 61 | 74 2e 20 20 59 6f 75 20 |ps forma|t. You |
|000004a0| 6d 61 79 20 77 61 6e 74 | 20 74 6f 0a 72 65 61 64 |may want| to.read|
|000004b0| 20 74 68 65 20 6d 6f 64 | 65 6d 63 61 70 20 66 69 | the mod|emcap fi|
|000004c0| 6c 65 20 74 6f 20 73 65 | 65 20 6a 75 73 74 20 77 |le to se|e just w|
|000004d0| 68 61 74 20 63 61 70 61 | 62 69 6c 69 74 69 65 73 |hat capa|bilities|
|000004e0| 20 61 72 65 20 70 72 65 | 73 65 6e 74 2e 0a 0a 54 | are pre|sent...T|
|000004f0| 68 69 73 20 69 73 20 52 | 65 6c 65 61 73 65 20 31 |his is R|elease 1|
|00000500| 2e 31 20 6f 66 20 74 68 | 69 73 20 73 6f 66 74 77 |.1 of th|is softw|
|00000510| 61 72 65 2e 20 20 50 6c | 65 61 73 65 20 62 65 61 |are. Pl|ease bea|
|00000520| 72 20 69 6e 20 6d 69 6e | 64 20 74 68 61 74 20 49 |r in min|d that I|
|00000530| 20 68 61 76 65 6e 27 74 | 0a 72 65 6c 65 61 73 65 | haven't|.release|
|00000540| 64 20 74 68 69 73 20 74 | 6f 20 74 68 65 20 70 75 |d this t|o the pu|
|00000550| 62 6c 69 63 20 62 65 66 | 6f 72 65 20 74 68 69 73 |blic bef|ore this|
|00000560| 20 72 65 6c 65 61 73 65 | 2e 0a 0a 2d 2d 3c 20 53 | release|...--< S|
|00000570| 74 61 72 74 20 6f 66 20 | 74 68 65 20 6c 65 67 61 |tart of |the lega|
|00000580| 6c 20 63 6f 6e 64 69 74 | 69 6f 6e 73 20 6f 66 20 |l condit|ions of |
|00000590| 74 68 69 73 20 73 6f 66 | 74 77 61 72 65 20 3e 2d |this sof|tware >-|
|000005a0| 2d 0a 0a 54 68 69 73 20 | 73 6f 66 74 77 61 72 65 |-..This |software|
|000005b0| 20 69 73 20 63 6f 70 79 | 72 69 67 68 74 20 31 39 | is copy|right 19|
|000005c0| 38 37 20 4a 6f 68 6e 20 | 46 2e 20 48 61 75 67 68 |87 John |F. Haugh|
|000005d0| 20 49 49 2c 20 61 6c 6c | 20 72 69 67 68 74 73 20 | II, all| rights |
|000005e0| 72 65 73 65 72 76 65 64 | 2e 0a 55 73 65 2c 20 64 |reserved|..Use, d|
|000005f0| 75 70 6c 69 63 61 74 69 | 6f 6e 20 61 6e 64 20 64 |uplicati|on and d|
|00000600| 69 73 63 6c 6f 73 75 72 | 65 20 73 75 62 6a 65 63 |isclosur|e subjec|
|00000610| 74 20 74 6f 20 74 68 65 | 20 74 65 72 6d 73 20 61 |t to the| terms a|
|00000620| 6e 64 20 63 6f 6e 64 69 | 74 69 6f 6e 73 20 6f 66 |nd condi|tions of|
|00000630| 0a 74 68 65 20 6c 69 63 | 65 6e 73 65 20 61 67 72 |.the lic|ense agr|
|00000640| 65 65 6d 65 6e 74 20 62 | 65 6c 6f 77 2e 20 20 54 |eement b|elow. T|
|00000650| 68 69 73 20 6e 6f 74 69 | 63 65 20 69 73 20 69 6e |his noti|ce is in|
|00000660| 74 65 6e 64 65 64 20 74 | 6f 20 68 61 76 65 20 6c |tended t|o have l|
|00000670| 65 67 61 6c 0a 73 69 67 | 6e 69 66 69 63 61 6e 63 |egal.sig|nificanc|
|00000680| 65 2c 20 61 6e 64 20 6e | 6f 74 20 74 6f 20 62 65 |e, and n|ot to be|
|00000690| 20 74 61 6b 65 6e 20 6c | 69 67 68 74 6c 79 2e 20 | taken l|ightly. |
|000006a0| 20 49 66 20 79 6f 75 20 | 68 61 76 65 20 61 6e 79 | If you |have any|
|000006b0| 20 71 75 65 73 74 69 6f | 6e 73 2c 0a 70 6c 65 61 | questio|ns,.plea|
|000006c0| 73 65 20 63 6f 6e 74 61 | 63 74 20 74 68 65 20 61 |se conta|ct the a|
|000006d0| 75 74 68 6f 72 20 61 74 | 20 74 68 65 20 61 64 64 |uthor at| the add|
|000006e0| 72 65 73 73 20 62 65 6c | 6f 77 2e 20 20 54 68 69 |ress bel|ow. Thi|
|000006f0| 73 20 63 6f 70 79 72 69 | 67 68 74 20 63 6f 76 65 |s copyri|ght cove|
|00000700| 72 73 0a 74 68 65 20 65 | 6e 74 69 72 65 20 73 6f |rs.the e|ntire so|
|00000710| 66 74 77 61 72 65 20 64 | 69 73 74 72 69 62 75 74 |ftware d|istribut|
|00000720| 69 6f 6e 20 69 74 20 69 | 73 20 65 6e 63 6c 6f 73 |ion it i|s enclos|
|00000730| 65 64 20 77 69 74 68 2e | 20 20 52 65 6d 6f 76 69 |ed with.| Removi|
|00000740| 6e 67 20 74 68 69 73 0a | 63 6f 70 79 72 69 67 68 |ng this.|copyrigh|
|00000750| 74 20 69 73 20 61 20 76 | 69 6f 6c 61 74 69 6f 6e |t is a v|iolation|
|00000760| 20 6f 66 20 66 65 64 65 | 72 61 6c 20 63 6f 70 79 | of fede|ral copy|
|00000770| 72 69 67 68 74 20 6c 61 | 77 2e 20 20 50 6c 65 61 |right la|w. Plea|
|00000780| 73 65 20 63 6f 6e 73 75 | 6c 74 20 61 6e 0a 61 74 |se consu|lt an.at|
|00000790| 74 6f 72 6e 65 79 20 69 | 66 20 79 6f 75 20 68 61 |torney i|f you ha|
|000007a0| 76 65 20 61 6e 79 20 71 | 75 65 73 74 69 6f 6e 73 |ve any q|uestions|
|000007b0| 20 72 65 67 61 72 64 69 | 6e 67 20 74 68 65 20 6c | regardi|ng the l|
|000007c0| 65 67 61 6c 20 72 61 6d | 69 66 69 63 61 74 69 6f |egal ram|ificatio|
|000007d0| 6e 73 20 6f 66 0a 74 68 | 69 73 20 61 67 72 65 65 |ns of.th|is agree|
|000007e0| 6d 65 6e 74 2e 0a 0a 54 | 68 69 73 20 73 6f 66 74 |ment...T|his soft|
|000007f0| 77 61 72 65 20 69 73 20 | 6c 69 63 65 6e 73 65 64 |ware is |licensed|
|00000800| 20 73 75 62 6a 65 63 74 | 20 74 6f 20 74 68 65 20 | subject| to the |
|00000810| 66 6f 6c 6c 6f 77 69 6e | 67 20 74 65 72 6d 73 20 |followin|g terms |
|00000820| 61 6e 64 20 63 6f 6e 64 | 69 74 69 6f 6e 73 2e 0a |and cond|itions..|
|00000830| 49 6e 20 6f 72 64 65 72 | 20 74 68 61 74 20 74 68 |In order| that th|
|00000840| 69 73 20 70 72 6f 64 75 | 63 74 20 6d 61 79 20 65 |is produ|ct may e|
|00000850| 78 70 61 6e 64 20 69 6e | 74 6f 20 74 68 65 20 75 |xpand in|to the u|
|00000860| 6e 69 76 65 72 73 65 20 | 74 6f 20 66 69 6c 6c 20 |niverse |to fill |
|00000870| 74 68 65 20 63 75 72 72 | 65 6e 74 0a 28 76 6f 69 |the curr|ent.(voi|
|00000880| 64 29 20 69 6e 20 74 68 | 69 73 20 61 72 65 61 2c |d) in th|is area,|
|00000890| 20 69 74 20 69 73 20 6d | 79 20 69 6e 74 65 6e 74 | it is m|y intent|
|000008a0| 69 6f 6e 20 74 68 61 74 | 20 74 68 69 73 20 73 6f |ion that| this so|
|000008b0| 66 74 77 61 72 65 20 62 | 65 20 77 69 64 65 6c 79 |ftware b|e widely|
|000008c0| 0a 64 69 73 74 72 69 62 | 75 74 65 64 2c 20 61 6e |.distrib|uted, an|
|000008d0| 64 20 6d 61 69 6e 74 61 | 69 6e 65 64 20 69 6e 20 |d mainta|ined in |
|000008e0| 61 20 63 6f 6e 73 69 73 | 74 65 6e 74 20 66 61 73 |a consis|tent fas|
|000008f0| 68 69 6f 6e 2e 20 20 54 | 6f 20 74 68 69 73 20 65 |hion. T|o this e|
|00000900| 6e 64 2c 20 79 6f 75 0a | 61 72 65 20 61 75 74 68 |nd, you.|are auth|
|00000910| 6f 72 69 7a 65 64 20 74 | 6f 20 72 65 64 69 73 74 |orized t|o redist|
|00000920| 72 69 62 75 74 65 20 74 | 68 69 73 20 73 6f 66 74 |ribute t|his soft|
|00000930| 77 61 72 65 20 69 6e 20 | 65 69 74 68 65 72 20 73 |ware in |either s|
|00000940| 6f 75 72 63 65 20 6f 72 | 20 62 69 6e 61 72 79 0a |ource or| binary.|
|00000950| 66 6f 72 6d 61 74 2c 20 | 70 72 6f 76 69 64 65 64 |format, |provided|
|00000960| 20 74 68 61 74 2c 20 74 | 68 69 73 20 61 67 72 65 | that, t|his agre|
|00000970| 65 6d 65 6e 74 20 69 73 | 20 72 65 74 61 69 6e 65 |ement is| retaine|
|00000980| 64 20 61 73 20 70 61 72 | 74 20 6f 66 20 74 68 65 |d as par|t of the|
|00000990| 20 72 65 6c 65 61 73 65 | 2c 0a 6e 6f 20 64 69 72 | release|,.no dir|
|000009a0| 65 63 74 20 70 72 6f 66 | 69 74 20 69 73 20 72 65 |ect prof|it is re|
|000009b0| 61 6c 69 7a 65 64 20 66 | 72 6f 6d 20 74 68 65 20 |alized f|rom the |
|000009c0| 73 61 6c 65 20 6f 72 20 | 74 72 61 6e 73 66 65 72 |sale or |transfer|
|000009d0| 20 6f 66 20 74 68 69 73 | 20 73 6f 66 74 77 61 72 | of this| softwar|
|000009e0| 65 2c 0a 61 6e 64 20 74 | 68 61 74 20 63 72 65 64 |e,.and t|hat cred|
|000009f0| 69 74 20 69 73 20 67 69 | 76 65 6e 20 74 68 65 20 |it is gi|ven the |
|00000a00| 61 75 74 68 6f 72 20 66 | 6f 72 20 74 68 69 73 20 |author f|or this |
|00000a10| 77 6f 72 6b 2e 20 20 54 | 6f 20 66 61 63 69 6c 69 |work. T|o facili|
|00000a20| 74 61 74 65 20 74 68 69 | 73 0a 70 61 63 6b 61 67 |tate thi|s.packag|
|00000a30| 65 20 63 6f 6d 69 6e 67 | 20 69 6e 74 6f 20 61 63 |e coming| into ac|
|00000a40| 63 65 70 74 61 6e 63 65 | 2c 20 79 6f 75 20 6d 75 |ceptance|, you mu|
|00000a50| 73 74 20 70 72 6f 76 69 | 64 65 20 6c 69 62 72 61 |st provi|de libra|
|00000a60| 72 79 20 76 65 72 73 69 | 6f 6e 73 20 6f 66 20 74 |ry versi|ons of t|
|00000a70| 68 69 73 0a 73 6f 66 74 | 77 61 72 65 20 61 6e 64 |his.soft|ware and|
|00000a80| 20 61 6e 79 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 | any doc|umentati|
|00000a90| 6f 6e 20 69 6e 63 6c 75 | 64 65 64 20 77 69 74 68 |on inclu|ded with|
|00000aa0| 20 74 68 69 73 20 70 61 | 63 6b 61 67 65 20 77 68 | this pa|ckage wh|
|00000ab0| 65 6e 20 64 69 73 74 72 | 69 62 75 74 69 6e 67 0a |en distr|ibuting.|
|00000ac0| 62 69 6e 61 72 79 20 76 | 65 72 73 69 6f 6e 73 20 |binary v|ersions |
|00000ad0| 65 6d 62 65 64 64 65 64 | 20 69 6e 20 79 6f 75 72 |embedded| in your|
|00000ae0| 20 70 72 6f 64 75 63 74 | 73 2e 20 20 50 61 79 69 | product|s. Payi|
|00000af0| 6e 67 20 72 6f 79 61 6c | 74 69 65 73 20 77 6f 75 |ng royal|ties wou|
|00000b00| 6c 64 20 62 65 0a 6e 69 | 63 65 20 61 6e 64 20 79 |ld be.ni|ce and y|
|00000b10| 6f 75 20 77 6f 6e 27 74 | 20 64 6f 20 69 74 20 61 |ou won't| do it a|
|00000b20| 6e 79 77 61 79 2c 20 73 | 6f 20 64 6f 6e 27 74 20 |nyway, s|o don't |
|00000b30| 65 76 65 6e 20 70 72 65 | 74 65 6e 64 20 74 6f 20 |even pre|tend to |
|00000b40| 62 65 20 6e 69 63 65 20 | 70 65 6f 70 6c 65 0a 75 |be nice |people.u|
|00000b50| 6e 6c 65 73 73 20 79 6f | 75 20 72 65 61 6c 6c 79 |nless yo|u really|
|00000b60| 20 77 61 6e 74 20 6d 65 | 20 74 6f 20 73 74 61 79 | want me| to stay|
|00000b70| 20 6f 6e 20 74 6f 70 20 | 6f 66 20 74 68 69 73 20 | on top |of this |
|00000b80| 74 68 69 6e 67 2e 20 20 | 41 75 74 68 6f 72 20 72 |thing. |Author r|
|00000b90| 65 74 61 69 6e 73 0a 61 | 6c 6c 20 72 69 67 68 74 |etains.a|ll right|
|00000ba0| 73 20 74 6f 20 64 65 72 | 69 76 65 64 20 77 6f 72 |s to der|ived wor|
|00000bb0| 6b 73 2c 20 61 6e 64 20 | 61 73 20 61 20 63 6f 6e |ks, and |as a con|
|00000bc0| 64 69 74 69 6f 6e 20 74 | 6f 20 79 6f 75 72 20 6d |dition t|o your m|
|00000bd0| 61 6b 69 6e 67 20 6d 6f | 64 69 66 69 63 61 74 69 |aking mo|dificati|
|00000be0| 6f 6e 73 0a 74 6f 20 74 | 68 65 20 73 6f 75 72 63 |ons.to t|he sourc|
|00000bf0| 65 20 63 6f 64 65 2c 20 | 79 6f 75 20 61 72 65 20 |e code, |you are |
|00000c00| 72 65 71 75 69 72 65 64 | 20 62 79 20 74 68 69 73 |required| by this|
|00000c10| 20 61 67 72 65 65 6d 65 | 6e 74 20 74 6f 20 70 72 | agreeme|nt to pr|
|00000c20| 6f 76 69 64 65 20 64 65 | 74 61 69 6c 65 64 0a 6e |ovide de|tailed.n|
|00000c30| 6f 74 65 73 20 63 6f 6e | 63 65 72 6e 69 6e 67 20 |otes con|cerning |
|00000c40| 74 68 65 20 61 63 74 75 | 61 6c 20 6d 6f 64 69 66 |the actu|al modif|
|00000c50| 69 63 61 74 69 6f 6e 73 | 20 61 6e 64 20 74 68 65 |ications| and the|
|00000c60| 20 6d 6f 74 69 76 61 74 | 69 6f 6e 20 62 65 68 69 | motivat|ion behi|
|00000c70| 6e 64 20 74 68 65 0a 6d | 6f 64 69 66 69 63 61 74 |nd the.m|odificat|
|00000c80| 69 6f 6e 20 69 74 73 65 | 6c 66 2e 20 20 4d 61 6b |ion itse|lf. Mak|
|00000c90| 69 6e 67 20 74 68 65 20 | 64 6f 63 75 6d 65 6e 74 |ing the |document|
|00000ca0| 61 74 69 6f 6e 20 6c 6f | 6f 6b 20 62 65 74 74 65 |ation lo|ok bette|
|00000cb0| 72 20 69 73 20 61 20 6e | 69 63 65 20 69 64 65 61 |r is a n|ice idea|
|00000cc0| 0a 61 6c 73 6f 2e 20 20 | 41 6e 64 20 73 69 6e 63 |.also. |And sinc|
|00000cd0| 65 20 49 27 6d 20 76 65 | 72 79 20 6c 61 7a 79 2c |e I'm ve|ry lazy,|
|00000ce0| 20 70 6c 65 61 73 65 20 | 73 65 6e 64 20 6d 65 20 | please |send me |
|00000cf0| 79 6f 75 72 20 64 6f 63 | 75 6d 65 6e 74 61 74 69 |your doc|umentati|
|00000d00| 6f 6e 2e 20 20 59 6f 75 | 0a 64 6f 6e 27 74 20 68 |on. You|.don't h|
|00000d10| 61 76 65 20 74 6f 2c 20 | 62 75 74 20 73 74 61 6e |ave to, |but stan|
|00000d20| 64 61 72 64 69 7a 65 64 | 20 64 6f 63 75 6d 65 6e |dardized| documen|
|00000d30| 74 61 74 69 6f 6e 20 69 | 73 20 61 20 47 6f 6f 64 |tation i|s a Good|
|00000d40| 20 54 68 69 6e 67 2e 0a | 0a 54 68 65 20 61 75 74 | Thing..|.The aut|
|00000d50| 68 6f 72 20 70 72 6f 76 | 69 64 65 73 20 74 68 69 |hor prov|ides thi|
|00000d60| 73 20 73 6f 66 74 77 61 | 72 65 20 77 69 74 68 6f |s softwa|re witho|
|00000d70| 75 74 20 77 61 72 72 61 | 6e 74 65 65 2e 20 20 54 |ut warra|ntee. T|
|00000d80| 68 65 20 75 73 65 72 20 | 61 63 63 65 70 74 73 20 |he user |accepts |
|00000d90| 62 79 0a 75 73 65 20 61 | 6c 6c 20 72 65 73 70 6f |by.use a|ll respo|
|00000da0| 6e 73 69 62 69 6c 69 74 | 79 20 66 6f 72 20 74 68 |nsibilit|y for th|
|00000db0| 65 20 70 65 72 66 6f 72 | 6d 61 6e 63 65 20 28 6f |e perfor|mance (o|
|00000dc0| 72 20 6c 61 63 6b 20 74 | 68 65 72 65 6f 66 20 3b |r lack t|hereof ;|
|00000dd0| 2d 29 20 6f 66 20 74 68 | 69 73 0a 73 6f 66 74 77 |-) of th|is.softw|
|00000de0| 61 72 65 2c 20 69 6e 63 | 6c 75 64 69 6e 67 20 6c |are, inc|luding l|
|00000df0| 6f 73 73 20 6f 66 20 70 | 72 6f 66 69 74 73 2c 20 |oss of p|rofits, |
|00000e00| 72 65 70 75 74 61 74 69 | 6f 6e 2c 20 6f 72 20 6a |reputati|on, or j|
|00000e10| 6f 62 2e 0a 0a 2d 2d 3c | 20 45 6e 64 20 6f 66 20 |ob...--<| End of |
|00000e20| 74 68 65 20 6c 65 67 61 | 6c 20 73 74 75 66 66 2c |the lega|l stuff,|
|00000e30| 20 6e 6f 77 20 66 6f 72 | 20 74 68 65 20 64 6f 63 | now for| the doc|
|00000e40| 75 6d 65 6e 74 61 74 69 | 6f 6e 2e 20 3e 2d 2d 0a |umentati|on. >--.|
|00000e50| 0a 63 61 6c 6c 2e 63 20 | 2d 20 61 20 74 65 73 74 |.call.c |- a test|
|00000e60| 20 70 72 6f 67 72 61 6d | 2e 20 20 64 6f 20 61 20 | program|. do a |
|00000e70| 60 6d 61 6b 65 20 61 6c | 6c 27 20 74 6f 20 63 72 |`make al|l' to cr|
|00000e80| 65 61 74 65 20 74 68 65 | 20 6c 69 62 72 61 72 79 |eate the| library|
|00000e90| 20 61 6e 64 20 63 6f 6d | 70 69 6c 65 0a 74 68 65 | and com|pile.the|
|00000ea0| 20 63 61 6c 6c 20 70 72 | 6f 67 72 61 6d 2e 20 20 | call pr|ogram. |
|00000eb0| 72 65 61 64 20 61 6c 6c | 20 74 68 65 20 64 6f 63 |read all| the doc|
|00000ec0| 75 6d 65 6e 74 61 74 69 | 6f 6e 20 62 65 66 6f 72 |umentati|on befor|
|00000ed0| 65 20 74 72 79 69 6e 67 | 20 69 74 20 6f 75 74 2e |e trying| it out.|
|00000ee0| 0a 0a 64 69 61 6c 28 33 | 4c 29 20 2d 20 61 20 76 |..dial(3|L) - a v|
|00000ef0| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 65 20 73 74 |ersion o|f the st|
|00000f00| 61 6e 64 61 72 64 20 64 | 69 61 6c 28 33 29 20 63 |andard d|ial(3) c|
|00000f10| 6f 6d 6d 61 6e 64 20 77 | 68 69 63 68 20 73 68 6f |ommand w|hich sho|
|00000f20| 75 6c 64 20 62 65 20 66 | 61 69 72 6c 79 0a 63 6f |uld be f|airly.co|
|00000f30| 6d 70 61 74 69 62 6c 65 | 20 77 69 74 68 20 74 68 |mpatible| with th|
|00000f40| 65 20 6f 6e 65 20 69 6e | 20 79 6f 75 72 20 6d 61 |e one in| your ma|
|00000f50| 6e 75 61 6c 20 2e 2e 2e | 20 20 68 61 73 20 62 6f |nual ...| has bo|
|00000f60| 74 68 20 64 69 61 6c 28 | 29 20 61 6e 64 20 75 6e |th dial(|) and un|
|00000f70| 64 69 61 6c 28 29 0a 72 | 6f 75 74 69 6e 65 73 2e |dial().r|outines.|
|00000f80| 20 20 73 65 65 20 79 6f | 75 72 20 6d 61 6e 70 61 | see yo|ur manpa|
|00000f90| 67 65 20 66 6f 72 20 6d | 6f 72 65 20 64 65 74 61 |ge for m|ore deta|
|00000fa0| 69 6c 73 2e 0a 0a 68 61 | 6e 67 75 70 2e 63 2f 68 |ils...ha|ngup.c/h|
|00000fb0| 61 6e 67 75 70 28 33 4c | 29 20 2d 20 61 20 72 6f |angup(3L|) - a ro|
|00000fc0| 75 74 69 6e 65 20 74 68 | 61 74 20 61 74 74 65 6d |utine th|at attem|
|00000fd0| 70 74 73 20 74 6f 20 61 | 62 73 6f 6c 75 74 65 6c |pts to a|bsolutel|
|00000fe0| 79 20 68 61 6e 67 75 70 | 20 61 20 6d 6f 64 65 6d |y hangup| a modem|
|00000ff0| 2e 0a 69 74 20 75 73 65 | 73 20 74 68 65 20 6d 6f |..it use|s the mo|
|00001000| 64 65 6d 20 63 61 70 61 | 62 69 6c 69 74 69 65 73 |dem capa|bilities|
|00001010| 20 64 61 74 61 62 61 73 | 65 20 74 6f 20 66 69 67 | databas|e to fig|
|00001020| 75 72 65 20 6f 75 74 20 | 74 68 65 20 62 65 73 74 |ure out |the best|
|00001030| 20 77 61 79 20 74 6f 0a | 68 61 6e 67 75 70 20 61 | way to.|hangup a|
|00001040| 20 6d 6f 64 65 6d 2e 20 | 20 69 74 20 73 75 70 70 | modem. | it supp|
|00001050| 6f 72 74 73 20 62 6f 74 | 68 20 68 61 6e 67 75 70 |orts bot|h hangup|
|00001060| 20 6f 6e 20 44 54 52 20 | 61 6e 64 20 68 61 6e 67 | on DTR |and hang|
|00001070| 75 70 20 6f 6e 20 63 6f | 6d 6d 61 6e 64 2e 0a 0a |up on co|mmand...|
|00001080| 69 6e 69 74 6d 6f 64 65 | 6d 2e 63 2f 69 6e 69 74 |initmode|m.c/init|
|00001090| 6d 6f 64 65 6d 28 33 4c | 29 20 2d 20 74 68 69 73 |modem(3L|) - this|
|000010a0| 20 72 6f 75 74 69 6e 65 | 20 74 61 6b 65 73 20 61 | routine| takes a|
|000010b0| 20 63 68 61 72 61 63 74 | 65 72 20 70 6f 69 6e 74 | charact|er point|
|000010c0| 65 72 20 74 6f 20 61 0a | 6d 6f 64 65 6d 20 6e 61 |er to a.|modem na|
|000010d0| 6d 65 20 61 73 20 69 74 | 20 61 70 70 65 61 72 73 |me as it| appears|
|000010e0| 20 69 6e 20 74 68 65 20 | 64 61 74 61 62 61 73 65 | in the |database|
|000010f0| 20 61 6e 64 20 61 20 66 | 69 6c 65 20 64 65 73 63 | and a f|ile desc|
|00001100| 72 69 70 74 6f 72 20 66 | 72 6f 6d 20 61 0a 6f 70 |riptor f|rom a.op|
|00001110| 65 6e 28 29 20 63 61 6c | 6c 2c 20 61 6e 64 20 6c |en() cal|l, and l|
|00001120| 6f 61 64 73 20 74 68 65 | 20 64 61 74 61 62 61 73 |oads the| databas|
|00001130| 65 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 2e 20 20 |e inform|ation. |
|00001140| 61 66 74 65 72 20 74 68 | 65 20 64 61 74 61 62 61 |after th|e databa|
|00001150| 73 65 20 69 73 0a 6c 6f | 61 64 65 64 2c 20 74 68 |se is.lo|aded, th|
|00001160| 65 20 6d 6f 64 65 6d 20 | 69 73 20 70 6c 61 63 65 |e modem |is place|
|00001170| 64 20 69 6e 20 74 68 65 | 20 63 6f 6d 6d 61 6e 64 |d in the| command|
|00001180| 20 6d 6f 64 65 2e 20 20 | 62 65 77 61 72 65 2c 20 | mode. |beware, |
|00001190| 69 6e 69 74 6d 6f 64 65 | 6d 28 29 0a 6d 61 79 20 |initmode|m().may |
|000011a0| 6d 61 6b 65 20 61 6e 20 | 61 6c 61 72 6d 28 32 29 |make an |alarm(2)|
|000011b0| 20 63 61 6c 6c 20 69 66 | 20 74 68 65 20 49 6e 69 | call if| the Ini|
|000011c0| 74 69 61 6c 69 7a 61 74 | 69 6f 6e 44 65 6c 61 79 |tializat|ionDelay|
|000011d0| 20 72 65 71 75 69 72 65 | 6d 65 6e 74 20 69 73 20 | require|ment is |
|000011e0| 70 72 65 73 65 6e 74 2e | 0a 0a 6d 64 69 61 6c 2e |present.|..mdial.|
|000011f0| 63 2f 6d 64 69 61 6c 28 | 33 4c 29 20 2d 20 74 68 |c/mdial(|3L) - th|
|00001200| 69 73 20 72 6f 75 74 69 | 6e 65 20 62 75 69 6c 64 |is routi|ne build|
|00001210| 73 20 61 20 64 69 61 6c | 20 63 6f 6d 6d 61 6e 64 |s a dial| command|
|00001220| 20 73 74 72 69 6e 67 20 | 74 6f 20 67 69 76 65 0a | string |to give.|
|00001230| 74 6f 20 74 68 65 20 64 | 69 61 6c 65 72 2e 20 20 |to the d|ialer. |
|00001240| 74 68 69 73 20 69 73 20 | 74 68 65 20 77 65 61 6b |this is |the weak|
|00001250| 65 73 74 20 72 6f 75 74 | 69 6e 65 20 69 6e 20 74 |est rout|ine in t|
|00001260| 68 65 20 70 61 63 6b 61 | 67 65 2c 20 62 65 63 61 |he packa|ge, beca|
|00001270| 75 73 65 20 69 20 64 6f | 6e 27 74 0a 68 61 76 65 |use i do|n't.have|
|00001280| 20 74 68 61 74 20 6d 61 | 6e 79 20 64 69 66 66 65 | that ma|ny diffe|
|00001290| 72 65 6e 74 20 6d 6f 64 | 65 6d 73 20 61 72 6f 75 |rent mod|ems arou|
|000012a0| 6e 64 20 68 65 72 65 2c | 20 61 6e 64 20 68 61 79 |nd here,| and hay|
|000012b0| 65 73 20 69 73 20 70 72 | 65 74 74 79 20 64 61 6d |es is pr|etty dam|
|000012c0| 6e 65 64 0a 63 6f 6d 6d | 6f 6e 2c 20 73 6f 20 69 |ned.comm|on, so i|
|000012d0| 20 64 6f 6e 27 74 20 73 | 65 65 20 6d 61 6e 79 20 | don't s|ee many |
|000012e0| 6f 74 68 65 72 73 2e 20 | 20 74 68 65 20 66 69 72 |others. | the fir|
|000012f0| 73 74 20 61 72 67 75 6d | 65 6e 74 20 69 73 20 61 |st argum|ent is a|
|00001300| 20 63 68 61 72 61 63 74 | 65 72 20 73 74 72 69 6e | charact|er strin|
|00001310| 67 0a 74 65 6c 65 70 68 | 6f 6e 65 20 6e 75 6d 62 |g.teleph|one numb|
|00001320| 65 72 2c 20 64 69 67 69 | 74 73 20 6f 6e 6c 79 2c |er, digi|ts only,|
|00001330| 20 6f 72 20 69 66 20 79 | 6f 75 20 75 6e 64 65 72 | or if y|ou under|
|00001340| 73 74 61 6e 64 20 79 6f | 75 72 20 6d 6f 64 65 6d |stand yo|ur modem|
|00001350| 20 28 62 6f 6f 20 6f 6e | 20 6d 65 29 0a 79 6f 75 | (boo on| me).you|
|00001360| 20 63 61 6e 20 70 75 74 | 20 69 6e 20 70 61 75 73 | can put| in paus|
|00001370| 65 20 63 6f 6d 6d 61 6e | 64 73 2e 20 20 74 68 65 |e comman|ds. the|
|00001380| 20 73 65 63 6f 6e 64 20 | 61 72 67 75 6d 65 6e 74 | second |argument|
|00001390| 20 69 73 20 61 20 66 69 | 6c 65 20 64 65 73 63 72 | is a fi|le descr|
|000013a0| 69 70 74 6f 72 0a 66 72 | 6f 6d 20 61 6e 20 6f 70 |iptor.fr|om an op|
|000013b0| 65 6e 28 29 20 63 61 6c | 6c 2e 20 74 68 69 73 20 |en() cal|l. this |
|000013c0| 72 6f 75 74 69 6e 65 20 | 5f 77 69 6c 6c 5f 20 62 |routine |_will_ b|
|000013d0| 65 20 74 68 65 20 66 69 | 72 73 74 20 74 6f 20 67 |e the fi|rst to g|
|000013e0| 65 74 20 66 69 78 65 64 | 2e 0a 0a 6d 65 72 72 6f |et fixed|...merro|
|000013f0| 72 2e 63 2f 6d 65 72 72 | 6f 72 28 33 4c 29 20 2d |r.c/merr|or(3L) -|
|00001400| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 73 | this ro|utine is|
|00001410| 20 61 20 6d 6f 64 65 6d | 63 61 70 20 72 65 70 6c | a modem|cap repl|
|00001420| 61 63 65 6d 65 6e 74 20 | 66 6f 72 20 70 65 72 72 |acement |for perr|
|00001430| 6f 72 2e 0a 61 6e 20 60 | 69 6e 74 20 6d 65 72 72 |or..an `|int merr|
|00001440| 6e 6f 27 20 76 61 72 69 | 61 62 6c 65 20 69 73 20 |no' vari|able is |
|00001450| 6d 61 69 6e 74 61 69 6e | 65 64 20 62 79 20 74 68 |maintain|ed by th|
|00001460| 65 20 72 6f 75 74 69 6e | 65 73 2e 20 20 61 66 74 |e routin|es. aft|
|00001470| 65 72 20 61 6e 20 65 72 | 72 6f 72 0a 72 65 74 75 |er an er|ror.retu|
|00001480| 72 6e 2c 20 79 6f 75 20 | 63 61 6e 20 63 61 6c 6c |rn, you |can call|
|00001490| 20 6d 65 72 72 6f 72 20 | 77 69 74 68 20 61 20 63 | merror |with a c|
|000014a0| 68 61 72 61 63 74 65 72 | 20 70 6f 69 6e 74 65 72 |haracter| pointer|
|000014b0| 20 6a 75 73 74 20 6c 69 | 6b 65 20 70 65 72 72 6f | just li|ke perro|
|000014c0| 72 28 33 29 0a 61 6e 64 | 20 68 61 76 65 20 61 20 |r(3).and| have a |
|000014d0| 6d 65 73 73 61 67 65 20 | 70 72 69 6e 74 65 64 20 |message |printed |
|000014e0| 6f 6e 20 79 6f 75 72 20 | 73 74 61 6e 64 61 72 64 |on your |standard|
|000014f0| 20 65 72 72 6f 72 20 6f | 75 74 70 75 74 2e 0a 0a | error o|utput...|
|00001500| 6d 67 65 74 65 6e 74 2e | 63 2f 6d 67 65 74 65 6e |mgetent.|c/mgeten|
|00001510| 74 28 33 4c 29 20 2d 20 | 74 68 69 73 20 69 73 20 |t(3L) - |this is |
|00001520| 61 20 6c 6f 77 20 6c 65 | 76 65 6c 20 72 6f 75 74 |a low le|vel rout|
|00001530| 69 6e 65 20 79 6f 75 20 | 73 68 6f 75 6c 64 6e 27 |ine you |shouldn'|
|00001540| 74 20 62 65 0a 63 61 6c | 6c 69 6e 67 20 61 6e 79 |t be.cal|ling any|
|00001550| 77 61 79 2e 20 20 69 74 | 20 77 6f 72 6b 73 20 6c |way. it| works l|
|00001560| 69 6b 65 20 74 67 65 74 | 65 6e 74 28 33 29 2c 20 |ike tget|ent(3), |
|00001570| 6f 6e 6c 79 20 64 69 66 | 66 65 72 65 6e 74 2e 20 |only dif|ferent. |
|00001580| 20 6d 6f 73 74 6c 79 2c | 20 69 74 0a 64 6f 65 73 | mostly,| it.does|
|00001590| 6e 27 74 20 68 61 76 65 | 20 74 68 65 20 6e 65 61 |n't have| the nea|
|000015a0| 74 20 74 68 69 6e 67 73 | 2e 20 20 74 68 65 20 66 |t things|. the f|
|000015b0| 69 72 73 74 20 61 72 67 | 75 6d 65 6e 74 20 69 73 |irst arg|ument is|
|000015c0| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 61 0a | a point|er to a.|
|000015d0| 63 68 61 72 61 63 74 65 | 72 20 62 75 66 66 65 72 |characte|r buffer|
|000015e0| 20 77 68 65 72 65 20 74 | 68 65 20 65 6e 74 72 79 | where t|he entry|
|000015f0| 20 77 69 6c 6c 20 62 65 | 20 70 6c 61 63 65 64 2e | will be| placed.|
|00001600| 20 20 74 68 65 20 73 65 | 63 6f 6e 64 20 61 72 67 | the se|cond arg|
|00001610| 75 6d 65 6e 74 0a 69 73 | 20 61 20 70 6f 69 6e 74 |ument.is| a point|
|00001620| 65 72 20 74 6f 20 74 68 | 65 20 6d 6f 64 65 6d 20 |er to th|e modem |
|00001630| 6e 61 6d 65 2e 0a 0a 6d | 67 65 74 66 6c 61 67 2e |name...m|getflag.|
|00001640| 63 2f 6d 67 65 74 66 6c | 61 67 28 33 4c 29 20 2d |c/mgetfl|ag(3L) -|
|00001650| 20 6a 75 73 74 20 6c 69 | 6b 65 20 74 67 65 74 66 | just li|ke tgetf|
|00001660| 6c 61 67 2e 20 20 74 68 | 69 73 20 69 73 20 61 20 |lag. th|is is a |
|00001670| 6c 6f 77 20 6c 65 76 65 | 6c 0a 72 6f 75 74 69 6e |low leve|l.routin|
|00001680| 65 20 79 6f 75 20 6d 69 | 67 68 74 20 6a 75 73 74 |e you mi|ght just|
|00001690| 20 77 61 6e 74 20 74 6f | 20 75 73 65 2e 20 20 69 | want to| use. i|
|000016a0| 6e 20 70 61 72 74 69 63 | 75 6c 61 72 2c 20 60 69 |n partic|ular, `i|
|000016b0| 66 20 28 6d 67 65 74 66 | 6c 61 67 20 28 22 68 63 |f (mgetf|lag ("hc|
|000016c0| 22 29 29 27 0a 74 65 73 | 74 73 20 66 6f 72 20 6d |"))'.tes|ts for m|
|000016d0| 6f 64 65 6d 20 68 61 6e | 67 69 6e 67 20 75 70 20 |odem han|ging up |
|000016e0| 6f 6e 20 44 54 52 20 62 | 65 69 6e 67 20 6e 65 67 |on DTR b|eing neg|
|000016f0| 61 74 65 64 2e 20 20 60 | 69 66 20 28 48 43 29 27 |ated. `|if (HC)'|
|00001700| 20 64 6f 65 73 20 74 68 | 65 0a 73 61 6d 65 20 74 | does th|e.same t|
|00001710| 68 69 6e 67 20 61 66 74 | 65 72 20 6d 67 65 74 65 |hing aft|er mgete|
|00001720| 6e 74 28 29 20 2e 2e 2e | 0a 0a 6d 67 65 74 6e 75 |nt() ...|..mgetnu|
|00001730| 6d 2e 63 2f 6d 67 65 74 | 6e 75 6d 28 33 4c 29 20 |m.c/mget|num(3L) |
|00001740| 2d 20 6a 75 73 74 20 6c | 69 6b 65 20 74 67 65 74 |- just l|ike tget|
|00001750| 6e 75 6d 2e 20 20 64 6f | 6e 27 74 20 73 65 65 20 |num. do|n't see |
|00001760| 6d 75 63 68 20 75 73 65 | 20 66 6f 72 20 75 73 69 |much use| for usi|
|00001770| 6e 67 0a 69 74 2e 0a 0a | 6d 67 65 74 73 74 72 2e |ng.it...|mgetstr.|
|00001780| 63 2f 6d 67 65 74 73 74 | 72 28 33 4c 29 20 2d 20 |c/mgetst|r(3L) - |
|00001790| 6a 75 73 74 20 6c 69 6b | 65 20 74 67 65 74 73 74 |just lik|e tgetst|
|000017a0| 72 2c 20 65 78 63 65 70 | 74 20 69 74 20 68 61 73 |r, excep|t it has|
|000017b0| 20 61 20 66 65 77 20 71 | 75 69 72 6b 73 2e 0a 6f | a few q|uirks..o|
|000017c0| 63 74 61 6c 20 65 73 63 | 61 70 65 73 20 61 72 65 |ctal esc|apes are|
|000017d0| 20 61 6c 6c 20 74 68 72 | 65 65 20 64 69 67 69 74 | all thr|ee digit|
|000017e0| 73 2e 20 20 74 68 65 20 | 66 6f 72 6d 61 74 20 27 |s. the |format '|
|000017f0| 5e 63 27 20 77 68 65 72 | 65 20 27 63 27 20 69 73 |^c' wher|e 'c' is|
|00001800| 20 73 6f 6d 65 0a 63 68 | 61 72 61 63 74 65 72 2c | some.ch|aracter,|
|00001810| 20 6f 6e 6c 79 20 77 6f | 72 6b 73 20 77 69 74 68 | only wo|rks with|
|00001820| 20 75 70 70 65 72 20 63 | 61 73 65 20 6c 65 74 74 | upper c|ase lett|
|00001830| 65 72 73 2e 20 20 63 6f | 72 72 65 63 74 6c 79 20 |ers. co|rrectly |
|00001840| 61 74 20 6c 65 61 73 74 | 2e 0a 61 69 6e 27 74 20 |at least|..ain't |
|00001850| 6e 6f 20 77 61 79 20 74 | 6f 20 67 65 74 20 61 20 |no way t|o get a |
|00001860| 6e 75 6c 6c 20 69 6e 74 | 6f 20 74 68 65 20 73 74 |null int|o the st|
|00001870| 72 69 6e 67 2c 20 6e 6f | 20 68 6f 77 2e 0a 0a 2f |ring, no| how.../|
|00001880| 65 74 63 2f 6d 6f 64 65 | 6d 63 61 70 20 2d 20 61 |etc/mode|mcap - a|
|00001890| 20 6d 6f 64 65 6d 20 63 | 61 70 61 62 69 6c 69 74 | modem c|apabilit|
|000018a0| 69 65 73 20 64 61 74 61 | 62 61 73 65 2e 20 20 72 |ies data|base. r|
|000018b0| 65 61 64 20 74 68 65 20 | 66 69 6c 65 20 66 6f 72 |ead the |file for|
|000018c0| 20 6d 6f 72 65 0a 64 65 | 74 61 69 6c 73 2e 0a 0a | more.de|tails...|
|000018d0| 2f 65 74 63 2f 6d 6f 64 | 65 6d 74 79 70 65 20 2d |/etc/mod|emtype -|
|000018e0| 20 61 20 6d 6f 64 65 6d | 2f 70 6f 72 74 20 6d 61 | a modem|/port ma|
|000018f0| 70 70 69 6e 67 20 74 61 | 62 6c 65 2e 20 20 6c 6f |pping ta|ble. lo|
|00001900| 6f 6b 20 61 74 20 74 68 | 65 20 65 78 61 6d 70 6c |ok at th|e exampl|
|00001910| 65 20 66 69 6c 65 2e 0a | 0a 79 6f 75 20 77 69 6c |e file..|.you wil|
|00001920| 6c 20 6e 65 65 64 20 74 | 6f 20 6d 61 6b 65 20 65 |l need t|o make e|
|00001930| 6e 74 72 69 65 73 20 66 | 6f 72 20 79 6f 75 72 20 |ntries f|or your |
|00001940| 64 65 76 69 63 65 73 20 | 69 6e 20 74 68 65 20 4c |devices |in the L|
|00001950| 2d 64 65 76 69 63 65 73 | 20 66 69 6c 65 2e 0a 74 |-devices| file..t|
|00001960| 68 65 20 73 70 65 65 64 | 20 6c 69 73 74 65 64 20 |he speed| listed |
|00001970| 6d 75 73 74 20 62 65 20 | 61 20 6c 65 67 61 6c 20 |must be |a legal |
|00001980| 73 70 65 65 64 20 61 63 | 63 6f 72 64 69 6e 67 20 |speed ac|cording |
|00001990| 74 6f 20 74 68 65 20 6d | 6f 64 65 6d 63 61 70 20 |to the m|odemcap |
|000019a0| 66 69 6c 65 2e 0a 61 6e | 79 20 63 6f 6d 70 69 6c |file..an|y compil|
|000019b0| 61 74 69 6f 6e 20 65 72 | 72 6f 72 73 20 6f 72 20 |ation er|rors or |
|000019c0| 77 61 72 6e 69 6e 67 73 | 20 73 68 6f 75 6c 64 20 |warnings| should |
|000019d0| 62 65 20 62 72 6f 75 67 | 68 74 20 74 6f 20 6d 79 |be broug|ht to my|
|000019e0| 20 61 74 74 65 6e 74 69 | 6f 6e 2e 20 69 0a 64 69 | attenti|on. i.di|
|000019f0| 64 6e 27 74 20 67 65 74 | 20 61 6e 79 20 74 68 65 |dn't get| any the|
|00001a00| 20 6c 61 73 74 20 74 69 | 6d 65 20 69 20 63 6f 6d | last ti|me i com|
|00001a10| 70 69 6c 65 64 20 61 6c | 6c 20 74 68 69 73 20 73 |piled al|l this s|
|00001a20| 74 75 66 66 2e 0a 0a 74 | 68 65 20 73 6f 75 72 63 |tuff...t|he sourc|
|00001a30| 65 20 69 73 20 77 65 6c | 6c 20 65 6e 6f 75 67 68 |e is wel|l enough|
|00001a40| 20 28 69 27 6d 20 6c 69 | 65 69 6e 67 29 20 64 6f | (i'm li|eing) do|
|00001a50| 63 75 6d 65 6e 74 65 64 | 20 66 6f 72 20 61 6e 79 |cumented| for any|
|00001a60| 6f 6e 65 20 74 6f 20 66 | 69 78 2e 0a 70 6c 65 61 |one to f|ix..plea|
|00001a70| 73 65 20 64 6f 6e 27 74 | 20 61 64 64 20 79 6f 75 |se don't| add you|
|00001a80| 72 20 6c 6f 63 61 6c 20 | 69 6d 70 72 6f 76 65 6d |r local |improvem|
|00001a90| 65 6e 74 2e 20 20 69 66 | 20 79 6f 75 20 69 6e 73 |ent. if| you ins|
|00001aa0| 69 73 74 2c 20 6d 61 6b | 65 20 74 68 65 20 6d 6f |ist, mak|e the mo|
|00001ab0| 64 73 0a 61 6e 64 20 73 | 65 6e 64 20 6d 65 20 63 |ds.and s|end me c|
|00001ac0| 6f 6e 74 65 78 74 20 64 | 69 66 66 73 2e 20 20 69 |ontext d|iffs. i|
|00001ad0| 27 6c 6c 20 74 65 6c 6c | 20 79 6f 75 20 77 68 61 |'ll tell| you wha|
|00001ae0| 74 20 69 20 74 68 69 6e | 6b 20 61 62 6f 75 74 20 |t i thin|k about |
|00001af0| 74 68 65 20 63 68 61 6e | 67 65 2e 0a 72 65 6d 65 |the chan|ge..reme|
|00001b00| 6d 62 65 72 2c 20 61 63 | 63 6f 72 64 69 6e 67 20 |mber, ac|cording |
|00001b10| 74 6f 20 74 68 65 20 6c | 69 63 65 6e 73 65 20 79 |to the l|icense y|
|00001b20| 6f 75 20 6d 75 73 74 20 | 6c 65 74 20 6d 65 20 69 |ou must |let me i|
|00001b30| 6e 20 6f 6e 20 77 68 61 | 74 20 79 6f 75 20 61 72 |n on wha|t you ar|
|00001b40| 65 0a 64 6f 69 6e 67 2e | 20 20 74 68 69 73 20 69 |e.doing.| this i|
|00001b50| 73 20 69 6e 20 65 76 65 | 72 79 6f 6e 65 73 20 62 |s in eve|ryones b|
|00001b60| 65 73 74 20 69 6e 74 65 | 72 65 73 74 2e 0a 0a 2d |est inte|rest...-|
|00001b70| 2d 3c 20 45 6e 64 20 6f | 66 20 74 68 65 20 64 6f |-< End o|f the do|
|00001b80| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 2c 20 6e 6f 77 |cumentat|ion, now|
|00001b90| 20 66 6f 72 20 6d 79 20 | 70 65 72 73 6f 6e 61 6c | for my |personal|
|00001ba0| 20 70 68 69 6c 6f 73 6f | 70 68 69 63 61 6c 20 62 | philoso|phical b|
|00001bb0| 2e 73 2e 20 3e 2d 2d 0a | 0a 49 74 20 69 73 20 6e |.s. >--.|.It is n|
|00001bc0| 6f 74 20 6d 79 20 69 6e | 74 65 6e 74 69 6f 6e 20 |ot my in|tention |
|00001bd0| 74 6f 20 6c 69 6d 69 74 | 20 74 68 65 20 75 73 65 |to limit| the use|
|00001be0| 20 6f 66 20 74 68 69 73 | 20 73 6f 66 74 77 61 72 | of this| softwar|
|00001bf0| 65 20 6f 72 20 79 6f 75 | 72 20 70 72 6f 66 69 74 |e or you|r profit|
|00001c00| 73 2c 0a 65 78 63 65 70 | 74 20 77 68 65 72 65 20 |s,.excep|t where |
|00001c10| 73 75 63 68 20 75 73 65 | 20 69 73 20 69 6e 63 6f |such use| is inco|
|00001c20| 6e 73 69 73 74 65 6e 74 | 20 77 69 74 68 20 74 68 |nsistent| with th|
|00001c30| 65 20 73 70 69 72 69 74 | 20 6f 66 20 68 75 6d 61 |e spirit| of huma|
|00001c40| 6e 69 74 79 2c 20 77 68 | 61 74 65 76 65 72 0a 74 |nity, wh|atever.t|
|00001c50| 68 65 20 68 65 6c 6c 20 | 74 68 61 74 20 6d 65 61 |he hell |that mea|
|00001c60| 6e 73 2e 20 20 49 20 64 | 6f 6e 27 74 20 63 61 72 |ns. I d|on't car|
|00001c70| 65 20 68 6f 77 20 6d 75 | 63 68 20 6d 6f 6e 65 79 |e how mu|ch money|
|00001c80| 20 79 6f 75 20 6d 61 6b | 65 20 73 65 6c 6c 69 6e | you mak|e sellin|
|00001c90| 67 20 79 6f 75 72 0a 6e | 65 77 20 74 65 72 6d 69 |g your.n|ew termi|
|00001ca0| 6e 61 6c 20 70 72 6f 67 | 72 61 6d 2c 20 6a 75 73 |nal prog|ram, jus|
|00001cb0| 74 20 64 6f 6e 27 74 20 | 67 6f 20 6a 61 63 6b 69 |t don't |go jacki|
|00001cc0| 6e 67 20 74 68 65 20 70 | 72 69 63 65 20 75 70 20 |ng the p|rice up |
|00001cd0| 62 65 63 61 75 73 65 20 | 79 6f 75 0a 68 61 76 65 |because |you.have|
|00001ce0| 20 61 64 64 65 64 20 74 | 68 69 73 20 74 68 69 6e | added t|his thin|
|00001cf0| 67 2e 20 20 49 20 77 69 | 6c 6c 20 6f 6e 6c 79 20 |g. I wi|ll only |
|00001d00| 77 6f 72 6b 20 6f 6e 20 | 74 68 69 73 20 70 61 63 |work on |this pac|
|00001d10| 6b 61 67 65 20 69 66 20 | 49 20 67 65 74 20 66 65 |kage if |I get fe|
|00001d20| 65 64 62 61 63 6b 0a 61 | 6e 64 20 49 20 68 61 76 |edback.a|nd I hav|
|00001d30| 65 20 73 6f 6d 65 20 6d | 6f 74 69 76 61 74 69 6f |e some m|otivatio|
|00001d40| 6e 2c 20 6f 74 68 65 72 | 20 74 68 61 6e 20 62 65 |n, other| than be|
|00001d50| 69 6e 67 20 61 20 6e 69 | 63 65 20 67 75 79 2e 20 |ing a ni|ce guy. |
|00001d60| 20 49 20 74 68 69 6e 6b | 20 49 27 76 65 20 62 65 | I think| I've be|
|00001d70| 65 6e 0a 6e 69 63 65 20 | 65 6e 6f 75 67 68 20 62 |en.nice |enough b|
|00001d80| 79 20 70 75 74 74 69 6e | 67 20 74 68 69 73 20 74 |y puttin|g this t|
|00001d90| 68 69 6e 67 20 6f 75 74 | 20 74 68 65 72 65 2e 20 |hing out| there. |
|00001da0| 20 49 66 20 77 68 61 74 | 20 79 6f 75 20 77 61 6e | If what| you wan|
|00001db0| 74 20 6d 61 6b 65 73 20 | 73 65 6e 73 65 0a 69 6e |t makes |sense.in|
|00001dc0| 20 61 20 72 65 61 6c 20 | 77 61 79 2c 20 49 20 77 | a real |way, I w|
|00001dd0| 69 6c 6c 20 70 72 6f 62 | 61 62 6c 79 20 69 6e 63 |ill prob|ably inc|
|00001de0| 6c 75 64 65 20 79 6f 75 | 72 20 73 75 67 67 65 73 |lude you|r sugges|
|00001df0| 74 69 6f 6e 73 2c 20 61 | 6e 64 20 69 66 20 79 6f |tions, a|nd if yo|
|00001e00| 75 20 61 72 65 0a 70 6f | 6c 69 74 65 2c 20 49 20 |u are.po|lite, I |
|00001e10| 6d 69 67 68 74 20 6a 75 | 73 74 20 67 69 76 65 20 |might ju|st give |
|00001e20| 79 6f 75 20 63 72 65 64 | 69 74 20 3b 2d 29 20 20 |you cred|it ;-) |
|00001e30| 53 6f 20 64 6f 6e 27 74 | 20 62 65 20 61 20 6a 65 |So don't| be a je|
|00001e40| 72 6b 20 61 6e 64 20 70 | 72 65 74 65 6e 64 0a 74 |rk and p|retend.t|
|00001e50| 68 61 74 20 61 6e 79 6f | 6e 65 20 61 63 74 75 61 |hat anyo|ne actua|
|00001e60| 6c 6c 79 20 77 6f 72 6b | 73 20 66 6f 72 20 66 72 |lly work|s for fr|
|00001e70| 65 65 2e 20 20 49 20 68 | 61 76 65 20 61 20 63 61 |ee. I h|ave a ca|
|00001e80| 72 20 6e 6f 74 65 20 6a | 75 73 74 20 6c 69 6b 65 |r note j|ust like|
|00001e90| 20 79 6f 75 2e 0a 0a 42 | 79 20 77 61 79 20 6f 66 | you...B|y way of|
|00001ea0| 20 74 68 69 73 20 6c 69 | 63 65 6e 73 65 20 61 6e | this li|cense an|
|00001eb0| 64 20 74 68 65 20 6c 65 | 67 61 6c 20 6d 75 6d 62 |d the le|gal mumb|
|00001ec0| 6f 2d 6a 75 6d 62 6f 2c | 20 49 20 68 6f 70 65 20 |o-jumbo,| I hope |
|00001ed0| 74 6f 20 6b 65 65 70 20 | 70 65 6f 70 6c 65 0a 66 |to keep |people.f|
|00001ee0| 72 6f 6d 20 72 69 70 70 | 69 6e 67 20 6d 65 20 6f |rom ripp|ing me o|
|00001ef0| 66 66 2c 20 61 6e 64 20 | 74 6f 74 61 6c 6c 79 20 |ff, and |totally |
|00001f00| 74 72 61 73 68 69 6e 67 | 20 61 6e 64 20 70 65 72 |trashing| and per|
|00001f10| 76 65 72 74 69 6e 67 20 | 74 68 65 20 69 6e 74 65 |verting |the inte|
|00001f20| 67 72 69 74 79 0a 6f 66 | 20 74 68 65 20 63 6f 64 |grity.of| the cod|
|00001f30| 65 2e 20 20 50 6c 65 61 | 73 65 2c 20 64 6f 6e 27 |e. Plea|se, don'|
|00001f40| 74 20 63 6f 6e 73 74 72 | 75 65 20 74 68 69 73 20 |t constr|ue this |
|00001f50| 61 67 72 65 65 6d 65 6e | 74 20 74 6f 20 62 65 20 |agreemen|t to be |
|00001f60| 6c 69 6d 69 74 69 6e 67 | 20 69 6e 0a 61 20 6e 65 |limiting| in.a ne|
|00001f70| 67 61 74 69 76 65 20 77 | 61 79 2e 20 20 49 20 68 |gative w|ay. I h|
|00001f80| 6f 70 65 20 74 6f 20 70 | 72 6f 76 69 64 65 20 6a |ope to p|rovide j|
|00001f90| 75 73 74 20 65 6e 6f 75 | 67 68 20 6c 69 6d 69 74 |ust enou|gh limit|
|00001fa0| 73 20 74 6f 20 6b 65 65 | 70 20 74 68 65 20 63 6f |s to kee|p the co|
|00001fb0| 64 65 0a 63 6f 6e 73 69 | 73 74 65 6e 74 20 61 6e |de.consi|stent an|
|00001fc0| 64 20 70 6f 72 74 61 62 | 6c 65 20 61 63 72 6f 73 |d portab|le acros|
|00001fd0| 73 20 61 6c 6c 20 6d 61 | 63 68 69 6e 65 20 65 6e |s all ma|chine en|
|00001fe0| 76 69 72 6f 6e 6d 65 6e | 74 73 2c 20 61 6e 64 20 |vironmen|ts, and |
|00001ff0| 68 6f 70 65 66 75 6c 6c | 79 2c 0a 79 6f 75 20 77 |hopefull|y,.you w|
|00002000| 69 6c 6c 20 75 73 65 20 | 74 68 69 73 20 74 68 69 |ill use |this thi|
|00002010| 6e 67 20 65 6e 6f 75 67 | 68 20 74 68 61 74 20 69 |ng enoug|h that i|
|00002020| 74 20 62 65 63 6f 6d 65 | 73 20 62 65 74 74 65 72 |t become|s better|
|00002030| 20 61 6e 64 20 6d 6f 72 | 65 20 75 73 65 66 75 6c | and mor|e useful|
|00002040| 0a 61 6e 64 20 66 69 6c | 6c 73 20 74 68 65 20 6e |.and fil|ls the n|
|00002050| 65 65 64 20 66 6f 72 20 | 73 75 63 68 20 61 20 74 |eed for |such a t|
|00002060| 68 69 6e 67 2e 20 20 57 | 68 6f 20 6b 6e 6f 77 73 |hing. W|ho knows|
|00002070| 2c 20 77 65 20 62 6f 74 | 68 20 6d 69 67 68 74 20 |, we bot|h might |
|00002080| 6a 75 73 74 20 6d 61 6b | 65 0a 73 6f 6d 65 20 6d |just mak|e.some m|
|00002090| 6f 6e 65 79 20 6f 66 66 | 20 6f 66 20 74 68 69 73 |oney off| of this|
|000020a0| 20 74 68 69 6e 67 2e 0a | 0a 2d 2d 0a 4a 6f 68 6e | thing..|.--.John|
|000020b0| 20 46 2e 20 48 61 75 67 | 68 20 49 49 09 09 51 55 | F. Haug|h II..QU|
|000020c0| 4f 54 45 3a 20 22 54 68 | 65 20 69 6d 70 6f 72 74 |OTE: "Th|e import|
|000020d0| 61 6e 74 20 74 68 69 6e | 67 20 69 73 20 74 6f 20 |ant thin|g is to |
|000020e0| 6e 6f 74 20 73 74 6f 70 | 0a 37 38 32 35 20 4d 63 |not stop|.7825 Mc|
|000020f0| 43 61 6c 6c 75 6d 20 42 | 6c 76 64 2e 09 09 09 71 |Callum B|lvd....q|
|00002100| 75 65 73 74 69 6f 6e 69 | 6e 67 22 20 2d 2d 20 41 |uestioni|ng" -- A|
|00002110| 6c 62 65 72 74 20 45 69 | 6e 73 74 65 69 6e 0a 41 |lbert Ei|nstein.A|
|00002120| 70 74 2e 20 35 31 30 09 | 09 09 54 45 4c 43 4f 3a |pt. 510.|..TELCO:|
|00002130| 20 28 32 31 34 29 20 32 | 35 30 2d 33 33 31 31 0a | (214) 2|50-3311.|
|00002140| 44 61 6c 6c 61 73 2c 20 | 54 58 20 37 35 32 35 32 |Dallas, |TX 75252|
|00002150| 09 09 55 55 43 50 3a 20 | 20 7b 20 62 61 63 6b 62 |..UUCP: | { backb|
|00002160| 6f 6e 65 20 7d 20 21 69 | 68 6e 70 34 21 6b 69 6c |one } !i|hnp4!kil|
|00002170| 6c 65 72 21 6a 66 68 0a | 53 48 41 52 5f 45 4f 46 |ler!jfh.|SHAR_EOF|
|00002180| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|00002190| 6d 61 6b 65 66 69 6c 65 | 27 0a 74 68 65 6e 0a 09 |makefile|'.then..|
|000021a0| 65 63 68 6f 20 73 68 61 | 72 3a 20 22 77 69 6c 6c |echo sha|r: "will|
|000021b0| 20 6e 6f 74 20 6f 76 65 | 72 2d 77 72 69 74 65 20 | not ove|r-write |
|000021c0| 65 78 69 73 74 69 6e 67 | 20 66 69 6c 65 20 27 6d |existing| file 'm|
|000021d0| 61 6b 65 66 69 6c 65 27 | 22 0a 65 6c 73 65 0a 63 |akefile'|".else.c|
|000021e0| 61 74 20 3c 3c 20 5c 53 | 48 41 52 5f 45 4f 46 20 |at << \S|HAR_EOF |
|000021f0| 3e 20 27 6d 61 6b 65 66 | 69 6c 65 27 0a 23 20 59 |> 'makef|ile'.# Y|
|00002200| 6f 75 72 20 6c 69 62 72 | 61 72 79 20 64 69 72 65 |our libr|ary dire|
|00002210| 63 74 6f 72 79 2e 0a 4c | 49 42 44 49 52 3d 2f 75 |ctory..L|IBDIR=/u|
|00002220| 73 72 2f 6c 69 62 0a 23 | 20 59 6f 75 72 20 6c 6f |sr/lib.#| Your lo|
|00002230| 63 61 6c 20 63 6f 6d 6d | 61 6e 64 20 64 69 72 65 |cal comm|and dire|
|00002240| 63 74 6f 72 79 2e 0a 4c | 42 49 4e 3d 2f 75 73 72 |ctory..L|BIN=/usr|
|00002250| 2f 6c 6f 63 61 6c 2f 62 | 69 6e 0a 4f 53 46 4c 41 |/local/b|in.OSFLA|
|00002260| 47 3d 2d 44 55 4e 49 58 | 5f 53 35 09 23 20 46 6f |G=-DUNIX|_S5.# Fo|
|00002270| 72 20 53 79 73 74 65 6d | 20 56 20 6d 61 63 68 69 |r System| V machi|
|00002280| 6e 65 73 2e 0a 23 20 4f | 53 46 4c 41 47 3d 2d 44 |nes..# O|SFLAG=-D|
|00002290| 55 4e 49 58 5f 56 37 09 | 23 20 46 6f 72 20 56 65 |UNIX_V7.|# For Ve|
|000022a0| 72 73 69 6f 6e 20 37 20 | 6d 61 63 68 69 6e 65 73 |rsion 7 |machines|
|000022b0| 2e 0a 23 20 46 6f 72 20 | 74 68 6f 73 65 20 70 6f |..# For |those po|
|000022c0| 6f 72 20 70 65 6f 70 6c | 65 20 77 68 6f 20 6e 65 |or peopl|e who ne|
|000022d0| 65 64 20 72 61 6e 6c 69 | 62 0a 23 20 52 41 4e 4c |ed ranli|b.# RANL|
|000022e0| 49 42 3d 72 61 6e 6c 69 | 62 20 24 28 4c 49 42 44 |IB=ranli|b $(LIBD|
|000022f0| 49 52 29 2f 6c 69 62 6d | 6f 64 65 6d 63 61 70 2e |IR)/libm|odemcap.|
|00002300| 61 0a 23 20 53 74 61 6e | 64 61 72 64 20 42 6f 75 |a.# Stan|dard Bou|
|00002310| 72 6e 65 20 73 68 65 6c | 6c 2e 0a 53 48 45 4c 4c |rne shel|l..SHELL|
|00002320| 3d 2f 62 69 6e 2f 73 68 | 0a 0a 43 46 4c 41 47 53 |=/bin/sh|..CFLAGS|
|00002330| 3d 2d 4f 0a 4c 44 46 4c | 41 47 53 3d 2d 73 0a 0a |=-O.LDFL|AGS=-s..|
|00002340| 4f 46 49 4c 45 53 3d 6d | 67 65 74 65 6e 74 2e 6f |OFILES=m|getent.o|
|00002350| 20 6d 67 65 74 73 74 72 | 2e 6f 20 6d 67 65 74 66 | mgetstr|.o mgetf|
|00002360| 6c 61 67 2e 6f 20 6d 67 | 65 74 6e 75 6d 2e 6f 20 |lag.o mg|etnum.o |
|00002370| 6d 64 69 61 6c 2e 6f 20 | 6d 65 72 72 6f 72 2e 6f |mdial.o |merror.o|
|00002380| 20 5c 0a 09 69 6e 69 74 | 6d 6f 64 65 6d 2e 6f 20 | \..init|modem.o |
|00002390| 68 61 6e 67 75 70 2e 6f | 20 64 69 61 6c 2e 6f 0a |hangup.o| dial.o.|
|000023a0| 0a 43 46 49 4c 45 53 3d | 6d 67 65 74 65 6e 74 2e |.CFILES=|mgetent.|
|000023b0| 63 20 6d 67 65 74 73 74 | 72 2e 63 20 6d 67 65 74 |c mgetst|r.c mget|
|000023c0| 66 6c 61 67 2e 63 20 6d | 67 65 74 6e 75 6d 2e 63 |flag.c m|getnum.c|
|000023d0| 20 6d 64 69 61 6c 2e 63 | 20 6d 65 72 72 6f 72 2e | mdial.c| merror.|
|000023e0| 63 20 5c 0a 09 69 6e 69 | 74 6d 6f 64 65 6d 2e 63 |c \..ini|tmodem.c|
|000023f0| 20 68 61 6e 67 75 70 2e | 63 20 64 69 61 6c 2e 63 | hangup.|c dial.c|
|00002400| 0a 0a 4c 46 49 4c 45 53 | 3d 6c 69 62 6d 6f 64 65 |..LFILES|=libmode|
|00002410| 6d 63 61 70 2e 61 28 6d | 67 65 74 65 6e 74 2e 6f |mcap.a(m|getent.o|
|00002420| 29 5c 0a 09 6c 69 62 6d | 6f 64 65 6d 63 61 70 2e |)\..libm|odemcap.|
|00002430| 61 28 6d 67 65 74 73 74 | 72 2e 6f 29 5c 0a 09 6c |a(mgetst|r.o)\..l|
|00002440| 69 62 6d 6f 64 65 6d 63 | 61 70 2e 61 28 6d 67 65 |ibmodemc|ap.a(mge|
|00002450| 74 66 6c 61 67 2e 6f 29 | 5c 0a 09 6c 69 62 6d 6f |tflag.o)|\..libmo|
|00002460| 64 65 6d 63 61 70 2e 61 | 28 6d 67 65 74 6e 75 6d |demcap.a|(mgetnum|
|00002470| 2e 6f 29 5c 0a 09 6c 69 | 62 6d 6f 64 65 6d 63 61 |.o)\..li|bmodemca|
|00002480| 70 2e 61 28 6d 64 69 61 | 6c 2e 6f 29 5c 0a 09 6c |p.a(mdia|l.o)\..l|
|00002490| 69 62 6d 6f 64 65 6d 63 | 61 70 2e 61 28 6d 65 72 |ibmodemc|ap.a(mer|
|000024a0| 72 6f 72 2e 6f 29 5c 0a | 09 6c 69 62 6d 6f 64 65 |ror.o)\.|.libmode|
|000024b0| 6d 63 61 70 2e 61 28 69 | 6e 69 74 6d 6f 64 65 6d |mcap.a(i|nitmodem|
|000024c0| 2e 6f 29 5c 0a 09 6c 69 | 62 6d 6f 64 65 6d 63 61 |.o)\..li|bmodemca|
|000024d0| 70 2e 61 28 68 61 6e 67 | 75 70 2e 6f 29 5c 0a 09 |p.a(hang|up.o)\..|
|000024e0| 6c 69 62 6d 6f 64 65 6d | 63 61 70 2e 61 28 64 69 |libmodem|cap.a(di|
|000024f0| 61 6c 2e 6f 29 0a 0a 61 | 6c 6c 3a 09 24 28 4c 46 |al.o)..a|ll:.$(LF|
|00002500| 49 4c 45 53 29 0a 0a 69 | 6e 73 74 61 6c 6c 3a 09 |ILES)..i|nstall:.|
|00002510| 61 6c 6c 20 63 61 6c 6c | 0a 09 63 70 20 6d 6f 64 |all call|..cp mod|
|00002520| 65 6d 63 61 70 2e 68 20 | 2f 75 73 72 2f 69 6e 63 |emcap.h |/usr/inc|
|00002530| 6c 75 64 65 0a 09 63 70 | 20 6d 6f 64 65 6d 63 61 |lude..cp| modemca|
|00002540| 70 20 2f 65 74 63 2f 6d | 6f 64 65 6d 63 61 70 0a |p /etc/m|odemcap.|
|00002550| 09 63 70 20 6d 6f 64 65 | 6d 74 79 70 65 20 2f 65 |.cp mode|mtype /e|
|00002560| 74 63 2f 6d 6f 64 65 6d | 74 79 70 65 0a 09 63 70 |tc/modem|type..cp|
|00002570| 20 6c 69 62 6d 6f 64 65 | 6d 63 61 70 2e 61 20 24 | libmode|mcap.a $|
|00002580| 28 4c 49 42 44 49 52 29 | 0a 09 63 68 6d 6f 64 20 |(LIBDIR)|..chmod |
|00002590| 36 34 34 20 2f 75 73 72 | 2f 69 6e 63 6c 75 64 65 |644 /usr|/include|
|000025a0| 2f 6d 6f 64 65 6d 63 61 | 70 2e 68 20 2f 65 74 63 |/modemca|p.h /etc|
|000025b0| 2f 6d 6f 64 65 6d 63 61 | 70 20 2f 65 74 63 2f 6d |/modemca|p /etc/m|
|000025c0| 6f 64 65 6d 74 79 70 65 | 20 24 28 4c 49 42 44 49 |odemtype| $(LIBDI|
|000025d0| 52 29 2f 6c 69 62 6d 6f | 64 65 6d 63 61 70 2e 61 |R)/libmo|demcap.a|
|000025e0| 0a 09 63 70 20 63 61 6c | 6c 20 24 28 4c 42 49 4e |..cp cal|l $(LBIN|
|000025f0| 29 2f 63 61 6c 6c 0a 09 | 63 68 6d 6f 64 20 37 31 |)/call..|chmod 71|
|00002600| 31 20 24 28 4c 42 49 4e | 29 2f 63 61 6c 6c 0a 0a |1 $(LBIN|)/call..|
|00002610| 63 61 6c 6c 3a 09 63 61 | 6c 6c 2e 63 20 6c 69 62 |call:.ca|ll.c lib|
|00002620| 6d 6f 64 65 6d 63 61 70 | 2e 61 0a 09 63 63 20 24 |modemcap|.a..cc $|
|00002630| 28 4c 44 46 4c 41 47 53 | 29 20 24 28 43 46 4c 41 |(LDFLAGS|) $(CFLA|
|00002640| 47 53 29 20 63 61 6c 6c | 2e 63 20 6c 69 62 6d 6f |GS) call|.c libmo|
|00002650| 64 65 6d 63 61 70 2e 61 | 20 2d 6f 20 63 61 6c 6c |demcap.a| -o call|
|00002660| 0a 0a 69 6e 69 74 6d 6f | 64 65 6d 2e 6f 3a 09 69 |..initmo|dem.o:.i|
|00002670| 6e 69 74 6d 6f 64 65 6d | 2e 63 20 2f 75 73 72 2f |nitmodem|.c /usr/|
|00002680| 69 6e 63 6c 75 64 65 2f | 6d 6f 64 65 6d 63 61 70 |include/|modemcap|
|00002690| 2e 68 0a 0a 6d 64 69 61 | 6c 2e 6f 3a 09 6d 64 69 |.h..mdia|l.o:.mdi|
|000026a0| 61 6c 2e 63 20 2f 75 73 | 72 2f 69 6e 63 6c 75 64 |al.c /us|r/includ|
|000026b0| 65 2f 6d 6f 64 65 6d 63 | 61 70 2e 68 0a 0a 68 61 |e/modemc|ap.h..ha|
|000026c0| 6e 67 75 70 2e 6f 3a 09 | 68 61 6e 67 75 70 2e 63 |ngup.o:.|hangup.c|
|000026d0| 20 2f 75 73 72 2f 69 6e | 63 6c 75 64 65 2f 6d 6f | /usr/in|clude/mo|
|000026e0| 64 65 6d 63 61 70 2e 68 | 0a 0a 64 69 61 6c 2e 6f |demcap.h|..dial.o|
|000026f0| 3a 09 64 69 61 6c 2e 63 | 09 2f 75 73 72 2f 69 6e |:.dial.c|./usr/in|
|00002700| 63 6c 75 64 65 2f 6d 6f | 64 65 6d 63 61 70 2e 68 |clude/mo|demcap.h|
|00002710| 0a 0a 73 68 61 72 3a 09 | 52 45 41 44 4d 45 20 24 |..shar:.|README $|
|00002720| 28 43 46 49 4c 45 53 29 | 20 6d 61 6b 65 66 69 6c |(CFILES)| makefil|
|00002730| 65 20 6d 6f 64 65 6d 63 | 61 70 20 6d 6f 64 65 6d |e modemc|ap modem|
|00002740| 74 79 70 65 20 6d 6f 64 | 65 6d 63 61 70 2e 68 20 |type mod|emcap.h |
|00002750| 63 61 6c 6c 2e 63 0a 09 | 73 68 61 72 20 52 45 41 |call.c..|shar REA|
|00002760| 44 4d 45 20 6d 61 6b 65 | 66 69 6c 65 20 6d 6f 64 |DME make|file mod|
|00002770| 65 6d 63 61 70 20 6d 6f | 64 65 6d 74 79 70 65 20 |emcap mo|demtype |
|00002780| 6d 6f 64 65 6d 63 61 70 | 2e 68 20 24 28 43 46 49 |modemcap|.h $(CFI|
|00002790| 4c 45 53 29 20 63 61 6c | 6c 2e 63 20 3e 20 6d 6f |LES) cal|l.c > mo|
|000027a0| 64 65 6d 2e 73 68 61 72 | 0a 53 48 41 52 5f 45 4f |dem.shar|.SHAR_EO|
|000027b0| 46 0a 66 69 0a 69 66 20 | 74 65 73 74 20 2d 66 20 |F.fi.if |test -f |
|000027c0| 27 6d 6f 64 65 6d 63 61 | 70 27 0a 74 68 65 6e 0a |'modemca|p'.then.|
|000027d0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 22 77 69 6c |.echo sh|ar: "wil|
|000027e0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|000027f0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 27 | existin|g file '|
|00002800| 6d 6f 64 65 6d 63 61 70 | 27 22 0a 65 6c 73 65 0a |modemcap|'".else.|
|00002810| 63 61 74 20 3c 3c 20 5c | 53 48 41 52 5f 45 4f 46 |cat << \|SHAR_EOF|
|00002820| 20 3e 20 27 6d 6f 64 65 | 6d 63 61 70 27 0a 23 0a | > 'mode|mcap'.#.|
|00002830| 23 20 20 20 20 20 20 20 | 40 28 23 29 6d 6f 64 65 |# |@(#)mode|
|00002840| 6d 63 61 70 20 20 20 20 | 31 2e 30 0a 23 0a 23 20 |mcap |1.0.#.# |
|00002850| 20 20 20 20 20 20 46 69 | 72 73 74 20 61 74 74 65 | Fi|rst atte|
|00002860| 6d 70 74 20 61 74 20 61 | 20 6d 6f 64 65 6d 20 63 |mpt at a| modem c|
|00002870| 61 70 61 62 69 6c 69 74 | 69 65 73 20 64 61 74 61 |apabilit|ies data|
|00002880| 62 61 73 65 2e 0a 23 0a | 23 20 20 20 20 20 20 20 |base..#.|# |
|00002890| 43 61 70 61 62 69 6c 69 | 74 69 65 73 20 61 72 65 |Capabili|ties are|
|000028a0| 3a 0a 23 0a 23 20 20 20 | 20 20 20 20 4e 61 6d 65 |:.#.# | Name|
|000028b0| 20 20 20 20 54 79 70 65 | 20 20 20 20 4d 65 61 6e | Type| Mean|
|000028c0| 69 6e 67 0a 23 0a 23 20 | 20 20 20 20 20 20 61 73 |ing.#.# | as|
|000028d0| 20 20 20 20 20 20 66 6c | 61 67 20 20 20 20 4e 75 | fl|ag Nu|
|000028e0| 6d 62 65 72 73 20 61 72 | 65 20 69 6e 20 41 53 43 |mbers ar|e in ASC|
|000028f0| 49 49 2c 20 6e 6f 74 20 | 62 69 6e 61 72 79 0a 23 |II, not |binary.#|
|00002900| 20 20 20 20 20 20 20 61 | 74 20 20 20 20 20 20 73 | a|t s|
|00002910| 74 72 69 6e 67 20 20 41 | 74 74 65 6e 74 69 6f 6e |tring A|ttention|
|00002920| 20 73 74 72 69 6e 67 2c | 20 66 6f 72 63 65 73 20 | string,| forces |
|00002930| 6d 6f 64 65 6c 20 69 6e | 74 6f 20 63 6f 6d 6d 61 |model in|to comma|
|00002940| 6e 64 20 6d 6f 64 65 20 | 66 72 6f 6d 20 6f 6e 6c |nd mode |from onl|
|00002950| 69 6e 65 20 6d 6f 64 65 | 0a 23 20 20 20 20 20 20 |ine mode|.# |
|00002960| 20 61 64 20 20 20 20 20 | 20 6e 75 6d 62 65 72 20 | ad | number |
|00002970| 20 44 65 6c 61 79 20 61 | 66 74 65 72 20 41 53 0a | Delay a|fter AS.|
|00002980| 23 20 20 20 20 20 20 20 | 62 64 20 20 20 20 20 20 |# |bd |
|00002990| 6e 75 6d 62 65 72 20 20 | 48 69 67 68 65 73 74 20 |number |Highest |
|000029a0| 6f 6e 6c 69 6e 65 20 62 | 61 75 64 20 72 61 74 65 |online b|aud rate|
|000029b0| 0a 23 20 20 20 20 20 20 | 20 62 6c 20 20 20 20 20 |.# | bl |
|000029c0| 20 6e 75 6d 62 65 72 20 | 20 41 6c 74 65 72 6e 61 | number | Alterna|
|000029d0| 74 65 20 6c 6f 77 65 72 | 20 62 61 75 64 20 72 61 |te lower| baud ra|
|000029e0| 74 65 0a 23 20 20 20 20 | 20 20 20 63 73 20 20 20 |te.# | cs |
|000029f0| 20 20 20 73 74 72 69 6e | 67 20 20 43 6f 6d 6d 61 | strin|g Comma|
|00002a00| 6e 64 20 73 74 61 72 74 | 20 73 74 72 69 6e 67 0a |nd start| string.|
|00002a10| 23 20 20 20 20 20 20 20 | 63 65 20 20 20 20 20 20 |# |ce |
|00002a20| 73 74 72 69 6e 67 20 20 | 43 6f 6d 6d 61 6e 64 20 |string |Command |
|00002a30| 65 6e 64 20 73 74 72 69 | 6e 67 20 28 72 65 71 75 |end stri|ng (requ|
|00002a40| 69 72 65 64 20 69 66 20 | 43 53 20 69 73 20 70 72 |ired if |CS is pr|
|00002a50| 65 73 65 6e 74 29 0a 23 | 20 20 20 20 20 20 20 63 |esent).#| c|
|00002a60| 6f 20 20 20 20 20 20 73 | 74 72 69 6e 67 20 20 53 |o s|tring S|
|00002a70| 74 72 69 6e 67 20 66 72 | 6f 6d 20 6d 6f 64 65 6d |tring fr|om modem|
|00002a80| 20 6f 6e 20 72 65 6d 6f | 74 65 20 63 6f 6e 6e 65 | on remo|te conne|
|00002a90| 63 74 69 6f 6e 20 61 74 | 20 42 44 20 62 61 75 64 |ction at| BD baud|
|00002aa0| 20 72 61 74 65 0a 23 20 | 20 20 20 20 20 20 63 6c | rate.# | cl|
|00002ab0| 20 20 20 20 20 20 73 74 | 72 69 6e 67 20 20 53 74 | st|ring St|
|00002ac0| 72 69 6e 67 20 66 72 6f | 6d 20 6d 6f 64 65 6d 20 |ring fro|m modem |
|00002ad0| 6f 6e 20 72 65 6d 6f 74 | 65 20 63 6f 6e 6e 65 63 |on remot|e connec|
|00002ae0| 74 69 6f 6e 20 61 74 20 | 42 4c 20 62 61 75 64 20 |tion at |BL baud |
|00002af0| 72 61 74 65 0a 23 20 20 | 20 20 20 20 20 64 69 20 |rate.# | di |
|00002b00| 20 20 20 20 20 66 6c 61 | 67 20 20 20 20 4d 6f 64 | fla|g Mod|
|00002b10| 65 6d 20 68 61 73 20 61 | 20 64 69 61 6c 65 72 0a |em has a| dialer.|
|00002b20| 23 20 20 20 20 20 20 20 | 64 73 20 20 20 20 20 20 |# |ds |
|00002b30| 73 74 72 69 6e 67 20 20 | 53 74 61 72 74 20 64 69 |string |Start di|
|00002b40| 61 6c 20 63 6f 6d 6d 61 | 6e 64 20 73 74 72 69 6e |al comma|nd strin|
|00002b50| 67 0a 23 20 20 20 20 20 | 20 20 64 65 20 20 20 20 |g.# | de |
|00002b60| 20 20 73 74 72 69 6e 67 | 20 20 45 6e 64 20 64 69 | string| End di|
|00002b70| 61 6c 20 63 6f 6d 6d 61 | 6e 64 20 73 74 72 69 6e |al comma|nd strin|
|00002b80| 67 20 28 72 65 71 75 69 | 72 65 64 20 69 66 20 44 |g (requi|red if D|
|00002b90| 53 20 69 73 20 70 72 65 | 73 65 6e 74 29 0a 23 20 |S is pre|sent).# |
|00002ba0| 20 20 20 20 20 20 69 73 | 20 20 20 20 20 20 73 74 | is| st|
|00002bb0| 72 69 6e 67 20 20 49 6e | 69 74 69 61 6c 69 7a 61 |ring In|itializa|
|00002bc0| 74 69 6f 6e 20 73 74 72 | 69 6e 67 2c 20 72 65 73 |tion str|ing, res|
|00002bd0| 65 74 73 20 6d 6f 64 65 | 6d 20 74 6f 20 6f 66 66 |ets mode|m to off|
|00002be0| 6c 69 6e 65 2c 20 72 65 | 61 64 79 20 74 6f 20 64 |line, re|ady to d|
|00002bf0| 69 61 6c 0a 23 20 20 20 | 20 20 20 20 69 64 20 20 |ial.# | id |
|00002c00| 20 20 20 20 6e 75 6d 62 | 65 72 20 20 44 65 6c 61 | numb|er Dela|
|00002c10| 79 20 61 66 74 65 72 20 | 49 53 0a 23 20 20 20 20 |y after |IS.# |
|00002c20| 20 20 20 68 63 20 20 20 | 20 20 20 66 6c 61 67 20 | hc | flag |
|00002c30| 20 20 20 4d 6f 64 65 6d | 20 68 61 6e 67 73 20 75 | Modem| hangs u|
|00002c40| 70 20 77 68 65 6e 20 44 | 54 52 20 64 72 6f 70 73 |p when D|TR drops|
|00002c50| 0a 23 20 20 20 20 20 20 | 20 68 75 20 20 20 20 20 |.# | hu |
|00002c60| 20 73 74 72 69 6e 67 20 | 20 48 61 6e 67 75 70 20 | string | Hangup |
|00002c70| 63 6f 6d 6d 61 6e 64 0a | 23 20 20 20 20 20 20 20 |command.|# |
|00002c80| 74 74 20 20 20 20 20 20 | 66 6c 61 67 20 20 20 20 |tt |flag |
|00002c90| 4d 6f 64 65 6d 20 64 69 | 61 6c 73 20 74 6f 75 63 |Modem di|als touc|
|00002ca0| 68 74 6f 6e 65 20 62 79 | 20 64 65 66 61 75 6c 74 |htone by| default|
|00002cb0| 20 28 6f 72 20 44 53 20 | 69 73 20 73 65 74 20 74 | (or DS |is set t|
|00002cc0| 68 61 74 20 77 61 79 29 | 0a 23 0a 23 20 20 20 20 |hat way)|.#.# |
|00002cd0| 20 20 20 41 6c 6c 20 63 | 6f 6d 6d 61 6e 64 73 2c | All c|ommands,|
|00002ce0| 20 73 75 63 68 20 61 73 | 20 44 53 20 28 64 69 61 | such as| DS (dia|
|00002cf0| 6c 20 63 6f 6d 6d 61 6e | 64 29 20 61 6e 64 20 48 |l comman|d) and H|
|00002d00| 55 20 28 68 61 6e 67 20 | 75 70 29 20 77 69 6c 6c |U (hang |up) will|
|00002d10| 20 62 65 20 70 72 65 66 | 69 78 65 64 20 62 79 0a | be pref|ixed by.|
|00002d20| 23 20 20 20 20 20 20 20 | 43 53 20 61 6e 64 20 65 |# |CS and e|
|00002d30| 6e 64 65 64 20 77 69 74 | 68 20 43 45 2e 20 20 49 |nded wit|h CE. I|
|00002d40| 66 20 74 68 65 72 65 20 | 69 73 20 61 20 63 6f 6d |f there |is a com|
|00002d50| 6d 6f 6e 20 70 72 65 66 | 69 78 20 61 6e 64 20 73 |mon pref|ix and s|
|00002d60| 75 66 66 69 78 2c 20 75 | 73 65 20 74 68 69 73 20 |uffix, u|se this |
|00002d70| 66 65 61 74 75 72 65 2e | 0a 23 20 20 20 20 20 20 |feature.|.# |
|00002d80| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 65 61 63 68 | Otherwi|se, each|
|00002d90| 20 63 6f 6d 6d 61 6e 64 | 20 77 69 6c 6c 20 68 61 | command| will ha|
|00002da0| 76 65 20 74 6f 20 68 61 | 76 65 20 74 68 65 20 65 |ve to ha|ve the e|
|00002db0| 6e 74 69 72 65 20 73 74 | 72 69 6e 67 20 62 75 69 |ntire st|ring bui|
|00002dc0| 6c 74 20 69 6e 2e 0a 23 | 0a 68 79 7c 68 61 79 65 |lt in..#|.hy|haye|
|00002dd0| 73 7c 48 61 79 65 73 20 | 53 6d 61 72 74 6d 6f 64 |s|Hayes |Smartmod|
|00002de0| 65 6d 20 31 32 30 30 3a | 5c 0a 09 3a 61 73 3a 61 |em 1200:|\..:as:a|
|00002df0| 74 3d 2b 2b 2b 3a 61 64 | 23 36 3a 62 64 23 31 32 |t=+++:ad|#6:bd#12|
|00002e00| 30 30 3a 62 6c 23 33 30 | 30 3a 63 73 3d 41 54 3a |00:bl#30|0:cs=AT:|
|00002e10| 63 65 3d 5c 72 3a 63 6f | 3d 43 4f 4e 4e 45 43 54 |ce=\r:co|=CONNECT|
|00002e20| 3a 5c 0a 09 3a 63 6c 3d | 43 4f 4e 4e 45 43 54 3a |:\..:cl=|CONNECT:|
|00002e30| 64 69 3a 64 73 3d 44 54 | 20 3a 64 65 3d 3a 69 73 |di:ds=DT| :de=:is|
|00002e40| 3d 41 54 51 30 20 56 31 | 20 45 31 5c 72 3a 69 64 |=ATQ0 V1| E1\r:id|
|00002e50| 23 32 3a 5c 0a 09 3a 68 | 63 3a 68 75 3d 48 30 20 |#2:\..:h|c:hu=H0 |
|00002e60| 56 30 20 45 30 20 51 31 | 3a 74 74 3a 0a 73 69 7c |V0 E0 Q1|:tt:.si||
|00002e70| 6d 6b 31 32 7c 53 69 67 | 6e 61 6c 6d 61 6e 20 4d |mk12|Sig|nalman M|
|00002e80| 61 72 6b 20 58 49 49 3a | 5c 0a 20 20 20 20 20 20 |ark XII:|\. |
|00002e90| 20 20 3a 61 73 3a 61 74 | 3d 2b 2b 2b 3a 61 64 23 | :as:at|=+++:ad#|
|00002ea0| 36 3a 62 64 23 31 32 30 | 30 3a 62 6c 23 33 30 30 |6:bd#120|0:bl#300|
|00002eb0| 3a 63 73 3d 41 54 3a 63 | 65 3d 5c 72 3a 63 6f 3d |:cs=AT:c|e=\r:co=|
|00002ec0| 43 4f 4e 4e 45 43 54 20 | 31 32 30 30 3a 5c 0a 20 |CONNECT |1200:\. |
|00002ed0| 20 20 20 20 20 20 20 3a | 63 6c 3d 43 4f 4e 4e 45 | :|cl=CONNE|
|00002ee0| 43 54 3a 64 69 3a 64 73 | 3d 44 54 20 3a 64 65 3d |CT:di:ds|=DT :de=|
|00002ef0| 3a 69 73 3d 41 54 51 30 | 20 56 31 20 45 31 5c 72 |:is=ATQ0| V1 E1\r|
|00002f00| 3a 69 64 23 32 3a 5c 0a | 20 20 20 20 20 20 20 20 |:id#2:\.| |
|00002f10| 3a 68 75 3d 48 30 20 56 | 30 20 45 30 20 51 31 3a |:hu=H0 V|0 E0 Q1:|
|00002f20| 74 74 3a 0a 64 73 7c 64 | 63 33 30 30 7c 52 61 64 |tt:.ds|d|c300|Rad|
|00002f30| 69 6f 20 53 68 61 63 6b | 20 44 69 72 65 63 74 2d |io Shack| Direct-|
|00002f40| 43 6f 6e 6e 65 63 74 20 | 33 30 30 20 4d 6f 64 65 |Connect |300 Mode|
|00002f50| 6d 3a 5c 0a 20 20 20 20 | 20 20 20 20 3a 62 64 23 |m:\. | :bd#|
|00002f60| 33 30 30 3a 62 6c 23 31 | 31 30 3a 0a 53 48 41 52 |300:bl#1|10:.SHAR|
|00002f70| 5f 45 4f 46 0a 66 69 0a | 69 66 20 74 65 73 74 20 |_EOF.fi.|if test |
|00002f80| 2d 66 20 27 6d 6f 64 65 | 6d 74 79 70 65 27 0a 74 |-f 'mode|mtype'.t|
|00002f90| 68 65 6e 0a 09 65 63 68 | 6f 20 73 68 61 72 3a 20 |hen..ech|o shar: |
|00002fa0| 22 77 69 6c 6c 20 6e 6f | 74 20 6f 76 65 72 2d 77 |"will no|t over-w|
|00002fb0| 72 69 74 65 20 65 78 69 | 73 74 69 6e 67 20 66 69 |rite exi|sting fi|
|00002fc0| 6c 65 20 27 6d 6f 64 65 | 6d 74 79 70 65 27 22 0a |le 'mode|mtype'".|
|00002fd0| 65 6c 73 65 0a 63 61 74 | 20 3c 3c 20 5c 53 48 41 |else.cat| << \SHA|
|00002fe0| 52 5f 45 4f 46 20 3e 20 | 27 6d 6f 64 65 6d 74 79 |R_EOF > |'modemty|
|00002ff0| 70 65 27 0a 68 61 79 65 | 73 31 32 30 30 20 74 74 |pe'.haye|s1200 tt|
|00003000| 79 33 38 0a 68 61 79 65 | 73 31 32 30 30 20 74 74 |y38.haye|s1200 tt|
|00003010| 79 33 39 0a 63 68 31 37 | 37 30 20 6d 6f 64 65 6d |y39.ch17|70 modem|
|00003020| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 0a 69 66 20 |.SHAR_EO|F.fi.if |
|00003030| 74 65 73 74 20 2d 66 20 | 27 6d 6f 64 65 6d 63 61 |test -f |'modemca|
|00003040| 70 2e 68 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |p.h'.the|n..echo |
|00003050| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|00003060| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00003070| 69 6e 67 20 66 69 6c 65 | 20 27 6d 6f 64 65 6d 63 |ing file| 'modemc|
|00003080| 61 70 2e 68 27 22 0a 65 | 6c 73 65 0a 63 61 74 20 |ap.h'".e|lse.cat |
|00003090| 3c 3c 20 5c 53 48 41 52 | 5f 45 4f 46 20 3e 20 27 |<< \SHAR|_EOF > '|
|000030a0| 6d 6f 64 65 6d 63 61 70 | 2e 68 27 0a 2f 2a 20 0a |modemcap|.h'./* .|
|000030b0| 20 2a 20 20 20 20 20 20 | 40 28 23 29 6d 6f 64 65 | * |@(#)mode|
|000030c0| 6d 63 61 70 2e 68 20 20 | 31 2e 30 0a 20 2a 0a 20 |mcap.h |1.0. *. |
|000030d0| 2a 20 20 20 20 20 20 6e | 61 6d 65 73 20 6f 66 20 |* n|ames of |
|000030e0| 76 61 72 69 61 62 6c 65 | 73 20 61 6e 64 20 77 68 |variable|s and wh|
|000030f0| 61 74 6e 6f 74 73 20 66 | 6f 72 20 6d 6f 64 65 6d |atnots f|or modem|
|00003100| 63 61 70 20 66 69 6c 65 | 0a 20 2a 2f 0a 0a 63 68 |cap file|. */..ch|
|00003110| 61 72 20 20 20 20 41 53 | 2c 20 20 20 20 20 20 20 |ar AS|, |
|00003120| 20 20 20 20 20 20 2f 2a | 20 54 72 75 65 20 69 66 | /*| True if|
|00003130| 20 6e 75 6d 62 65 72 73 | 20 64 69 61 6c 65 64 20 | numbers| dialed |
|00003140| 69 6e 20 41 53 43 49 49 | 2c 20 46 61 6c 73 65 20 |in ASCII|, False |
|00003150| 66 6f 72 20 62 69 6e 61 | 72 79 20 64 69 67 69 74 |for bina|ry digit|
|00003160| 73 20 20 20 20 20 2a 2f | 0a 20 20 20 20 20 20 20 |s */|. |
|00003170| 20 44 49 2c 20 20 20 20 | 20 20 20 20 20 20 20 20 | DI, | |
|00003180| 20 2f 2a 20 54 72 75 65 | 20 69 66 20 6d 6f 64 65 | /* True| if mode|
|00003190| 6d 20 63 61 6e 20 64 69 | 61 6c 20 6e 75 6d 62 65 |m can di|al numbe|
|000031a0| 72 73 2c 20 46 61 6c 73 | 65 20 6f 74 68 65 72 77 |rs, Fals|e otherw|
|000031b0| 69 73 65 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |ise | |
|000031c0| 20 2a 2f 0a 20 20 20 20 | 20 20 20 20 48 43 2c 20 | */. | HC, |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 2f 2a 20 54 | | /* T|
|000031e0| 72 75 65 20 69 66 20 6d | 6f 64 65 6d 20 68 61 6e |rue if m|odem han|
|000031f0| 67 73 20 75 70 20 77 68 | 65 6e 20 44 54 52 20 64 |gs up wh|en DTR d|
|00003200| 72 6f 70 73 2c 20 46 61 | 6c 73 65 20 6f 74 68 65 |rops, Fa|lse othe|
|00003210| 72 77 69 73 65 20 20 20 | 20 20 20 20 2a 2f 0a 20 |rwise | */. |
|00003220| 20 20 20 20 20 20 20 54 | 54 3b 20 20 20 20 20 20 | T|T; |
|00003230| 20 20 20 20 20 20 20 2f | 2a 20 54 72 75 65 20 69 | /|* True i|
|00003240| 66 20 6d 6f 64 65 6d 20 | 75 73 65 73 20 74 6f 75 |f modem |uses tou|
|00003250| 63 68 74 6f 6e 65 20 62 | 79 20 64 65 66 61 75 6c |chtone b|y defaul|
|00003260| 74 2c 20 46 61 6c 73 65 | 20 66 6f 72 20 70 75 6c |t, False| for pul|
|00003270| 73 65 20 20 20 20 20 2a | 2f 0a 0a 63 68 61 72 20 |se *|/..char |
|00003280| 20 20 20 2a 41 54 2c 20 | 20 20 20 20 20 20 20 20 | *AT, | |
|00003290| 20 20 20 2f 2a 20 45 6e | 74 65 72 20 63 6f 6d 6d | /* En|ter comm|
|000032a0| 61 6e 64 20 73 74 61 74 | 65 20 77 68 65 6e 20 6f |and stat|e when o|
|000032b0| 6e 6c 69 6e 65 20 20 20 | 20 20 20 20 20 20 20 20 |nline | |
|000032c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000032d0| 20 20 20 2a 2f 0a 20 20 | 20 20 20 20 20 20 2a 43 | */. | *C|
|000032e0| 53 2c 20 20 20 20 20 20 | 20 20 20 20 20 20 2f 2a |S, | /*|
|000032f0| 20 43 6f 6d 6d 61 6e 64 | 20 73 74 61 72 74 20 73 | Command| start s|
|00003300| 74 72 69 6e 67 20 20 20 | 20 20 20 20 20 20 20 20 |tring | |
|00003310| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 2a 2f | | */|
|00003330| 0a 20 20 20 20 20 20 20 | 20 2a 43 45 2c 20 20 20 |. | *CE, |
|00003340| 20 20 20 20 20 20 20 20 | 20 2f 2a 20 43 6f 6d 6d | | /* Comm|
|00003350| 61 6e 64 20 65 6e 64 20 | 73 74 72 69 6e 67 20 2d |and end |string -|
|00003360| 20 6d 75 73 74 20 62 65 | 20 70 72 65 73 65 6e 74 | must be| present|
|00003370| 20 69 66 20 43 53 20 69 | 73 20 20 20 20 20 20 20 | if CS i|s |
|00003380| 20 20 20 20 20 20 20 20 | 20 2a 2f 0a 20 20 20 20 | | */. |
|00003390| 20 20 20 20 2a 44 53 2c | 20 20 20 20 20 20 20 20 | *DS,| |
|000033a0| 20 20 20 20 2f 2a 20 44 | 69 61 6c 20 63 6f 6d 6d | /* D|ial comm|
|000033b0| 61 6e 64 20 73 74 72 69 | 6e 67 20 20 20 20 20 20 |and stri|ng |
|000033c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000033e0| 20 20 20 20 2a 2f 0a 20 | 20 20 20 20 20 20 20 2a | */. | *|
|000033f0| 44 45 2c 20 20 20 20 20 | 20 20 20 20 20 20 20 2f |DE, | /|
|00003400| 2a 20 45 6e 64 20 6f 66 | 20 64 69 61 6c 20 63 6f |* End of| dial co|
|00003410| 6d 6d 61 6e 64 20 73 74 | 72 69 6e 67 20 2d 20 6d |mmand st|ring - m|
|00003420| 75 73 74 20 62 65 20 70 | 72 65 73 65 6e 74 20 69 |ust be p|resent i|
|00003430| 66 20 44 53 20 69 73 20 | 20 20 20 20 20 20 20 2a |f DS is | *|
|00003440| 2f 0a 20 20 20 20 20 20 | 20 20 2a 43 4f 2c 20 20 |/. | *CO, |
|00003450| 20 20 20 20 20 20 20 20 | 20 20 2f 2a 20 43 6f 6e | | /* Con|
|00003460| 6e 65 63 74 69 6f 6e 20 | 6d 61 64 65 20 61 74 20 |nection |made at |
|00003470| 70 72 69 6d 61 72 79 20 | 62 61 75 64 20 72 61 74 |primary |baud rat|
|00003480| 65 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |e | |
|00003490| 20 20 20 20 20 20 20 20 | 20 20 2a 2f 0a 20 20 20 | | */. |
|000034a0| 20 20 20 20 20 2a 43 4c | 2c 20 20 20 20 20 20 20 | *CL|, |
|000034b0| 20 20 20 20 20 2f 2a 20 | 43 6f 6e 6e 65 63 74 69 | /* |Connecti|
|000034c0| 6f 6e 20 6d 61 64 65 20 | 61 74 20 73 65 63 6f 6e |on made |at secon|
|000034d0| 64 61 72 79 20 28 6c 6f | 77 65 72 29 20 62 61 75 |dary (lo|wer) bau|
|000034e0| 64 20 72 61 74 65 20 20 | 20 20 20 20 20 20 20 20 |d rate | |
|000034f0| 20 20 20 20 20 2a 2f 0a | 20 20 20 20 20 20 20 20 | */.| |
|00003500| 2a 49 53 2c 20 20 20 20 | 20 20 20 20 20 20 20 20 |*IS, | |
|00003510| 2f 2a 20 49 6e 69 74 69 | 61 6c 69 7a 61 74 69 6f |/* Initi|alizatio|
|00003520| 6e 20 73 74 72 69 6e 67 | 20 2d 20 72 65 73 65 74 |n string| - reset|
|00003530| 20 6d 6f 64 65 6d 20 74 | 6f 20 6f 6e 68 6f 6f 6b | modem t|o onhook|
|00003540| 20 61 6e 64 20 72 65 61 | 64 79 20 20 20 20 20 20 | and rea|dy |
|00003550| 2a 2f 0a 20 20 20 20 20 | 20 20 20 2a 48 55 3b 20 |*/. | *HU; |
|00003560| 20 20 20 20 20 20 20 20 | 20 20 20 2f 2a 20 48 61 | | /* Ha|
|00003570| 6e 67 75 70 20 63 6f 6d | 6d 61 6e 64 20 20 20 20 |ngup com|mand |
|00003580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003590| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000035a0| 20 20 20 20 20 20 20 20 | 20 20 20 2a 2f 0a 0a 69 | | */..i|
|000035b0| 6e 74 20 20 20 20 20 41 | 44 2c 20 20 20 20 20 20 |nt A|D, |
|000035c0| 20 20 20 20 20 20 20 2f | 2a 20 44 65 6c 61 79 20 | /|* Delay |
|000035d0| 61 66 74 65 72 20 41 54 | 20 73 74 72 69 6e 67 20 |after AT| string |
|000035e0| 62 65 66 6f 72 65 20 6e | 65 78 74 20 63 6f 6d 6d |before n|ext comm|
|000035f0| 61 6e 64 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |and | |
|00003600| 20 20 20 20 20 20 20 2a | 2f 0a 20 20 20 20 20 20 | *|/. |
|00003610| 20 20 42 44 2c 20 20 20 | 20 20 20 20 20 20 20 20 | BD, | |
|00003620| 20 20 2f 2a 20 48 69 67 | 68 65 73 74 20 63 6f 6d | /* Hig|hest com|
|00003630| 6d 75 6e 69 63 61 74 69 | 6f 6e 73 20 62 61 75 64 |municati|ons baud|
|00003640| 20 72 61 74 65 20 20 20 | 20 20 20 20 20 20 20 20 | rate | |
|00003650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003660| 20 20 2a 2f 0a 20 20 20 | 20 20 20 20 20 42 4c 2c | */. | BL,|
|00003670| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2f 2a 20 | | /* |
|00003680| 41 6e 6f 74 68 65 72 2c | 20 6c 6f 77 65 72 20 62 |Another,| lower b|
|00003690| 61 75 64 20 72 61 74 65 | 20 20 20 20 20 20 20 20 |aud rate| |
|000036a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000036b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 2a 2f 0a | | */.|
|000036c0| 20 20 20 20 20 20 20 20 | 49 44 3b 20 20 20 20 20 | |ID; |
|000036d0| 20 20 20 20 20 20 20 20 | 2f 2a 20 44 65 6c 61 79 | |/* Delay|
|000036e0| 20 74 69 6d 65 20 61 66 | 74 65 72 20 69 6e 69 74 | time af|ter init|
|000036f0| 69 61 6c 69 7a 61 74 69 | 6f 6e 20 20 20 20 20 20 |ializati|on |
|00003700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003710| 20 20 20 20 20 20 20 20 | 2a 2f 0a 0a 2f 2a 0a 20 | |*/../*. |
|00003720| 2a 20 54 68 65 20 64 69 | 61 6c 20 63 6f 6d 6d 61 |* The di|al comma|
|00003730| 6e 64 20 69 73 20 74 68 | 65 20 70 72 69 6e 63 69 |nd is th|e princi|
|00003740| 70 6c 65 20 73 74 72 69 | 6e 67 20 74 68 61 74 20 |ple stri|ng that |
|00003750| 6d 75 73 74 20 62 65 20 | 62 75 69 6c 74 2e 0a 20 |must be |built.. |
|00003760| 2a 20 54 68 65 20 72 6f | 75 74 69 6e 65 73 20 77 |* The ro|utines w|
|00003770| 69 6c 6c 20 62 75 69 6c | 64 20 61 20 64 69 61 6c |ill buil|d a dial|
|00003780| 20 63 6f 6d 6d 61 6e 64 | 20 61 73 20 66 6f 6c 6c | command| as foll|
|00003790| 6f 77 73 3a 0a 20 2a 0a | 20 2a 20 20 20 20 20 20 |ows:. *.| * |
|000037a0| 3c 43 53 3e 3c 44 53 3e | 3c 70 68 6f 6e 65 2d 6e |<CS><DS>|<phone-n|
|000037b0| 75 6d 62 65 72 3e 3c 44 | 45 3e 3c 43 45 3e 0a 20 |umber><D|E><CE>. |
|000037c0| 2a 0a 20 2a 20 4e 6f 74 | 65 20 74 68 61 74 20 74 |*. * Not|e that t|
|000037d0| 68 65 20 44 45 20 61 6e | 64 20 43 45 20 73 74 72 |he DE an|d CE str|
|000037e0| 69 6e 67 73 20 61 72 65 | 20 70 72 65 73 65 6e 74 |ings are| present|
|000037f0| 20 41 4c 57 41 59 53 2e | 0a 20 2a 20 54 68 69 73 | ALWAYS.|. * This|
|00003800| 20 70 72 6f 63 65 64 75 | 72 65 20 77 69 6c 6c 20 | procedu|re will |
|00003810| 62 65 20 75 73 65 64 20 | 74 6f 20 64 69 61 6c 20 |be used |to dial |
|00003820| 70 68 6f 6e 65 20 6e 75 | 6d 62 65 72 73 20 69 66 |phone nu|mbers if|
|00003830| 20 74 68 65 20 44 49 20 | 66 6c 61 67 20 69 73 20 | the DI |flag is |
|00003840| 74 72 75 65 2e 0a 20 2a | 20 49 66 20 74 68 69 73 |true.. *| If this|
|00003850| 20 69 73 6e 27 74 20 74 | 68 65 20 77 61 79 20 74 | isn't t|he way t|
|00003860| 6f 20 64 69 61 6c 20 6e | 75 6d 62 65 72 73 2c 0a |o dial n|umbers,.|
|00003870| 20 2a 20 44 4f 20 4e 4f | 54 20 53 45 54 20 44 49 | * DO NO|T SET DI|
|00003880| 20 49 4e 20 54 48 45 20 | 4d 4f 44 45 4d 43 41 50 | IN THE |MODEMCAP|
|00003890| 20 46 49 4c 45 21 21 21 | 0a 20 2a 2f 0a 0a 2f 2a | FILE!!!|. */../*|
|000038a0| 0a 20 2a 20 54 68 65 20 | 74 79 70 65 20 6f 66 20 |. * The |type of |
|000038b0| 6d 6f 64 65 6d 20 69 73 | 20 64 65 74 65 72 6d 69 |modem is| determi|
|000038c0| 6e 65 64 20 62 79 20 72 | 65 61 64 69 6e 67 20 74 |ned by r|eading t|
|000038d0| 68 65 20 66 69 6c 65 20 | 22 5f 4d 4f 44 45 4d 54 |he file |"_MODEMT|
|000038e0| 59 50 45 5f 22 2e 20 20 | 54 68 69 73 0a 20 2a 20 |YPE_". |This. * |
|000038f0| 69 73 20 73 69 6d 69 6c | 69 61 72 20 74 6f 20 74 |is simil|iar to t|
|00003900| 68 65 20 77 61 79 20 63 | 75 72 73 65 73 20 77 6f |he way c|urses wo|
|00003910| 72 6b 73 20 62 79 20 72 | 65 61 64 69 6e 67 20 74 |rks by r|eading t|
|00003920| 68 65 20 74 74 79 74 79 | 70 65 20 66 69 6c 65 2e |he ttyty|pe file.|
|00003930| 0a 20 2a 2f 0a 0a 23 64 | 65 66 69 6e 65 09 5f 4d |. */..#d|efine._M|
|00003940| 4f 44 45 4d 54 59 50 45 | 5f 09 22 2f 65 74 63 2f |ODEMTYPE|_."/etc/|
|00003950| 6d 6f 64 65 6d 74 79 70 | 65 22 0a 0a 2f 2a 0a 20 |modemtyp|e"../*. |
|00003960| 2a 20 61 20 68 61 6e 67 | 75 70 20 63 6f 6d 6d 61 |* a hang|up comma|
|00003970| 6e 64 20 77 69 6c 6c 20 | 62 65 20 70 65 72 66 6f |nd will |be perfo|
|00003980| 72 6d 65 64 20 61 73 20 | 66 6f 6c 6c 6f 77 73 3a |rmed as |follows:|
|00003990| 0a 20 2a 0a 20 2a 20 20 | 20 20 20 20 31 29 2e 20 |. *. * | 1). |
|000039a0| 61 6e 79 20 61 74 74 65 | 6e 74 69 6f 6e 20 73 74 |any atte|ntion st|
|000039b0| 72 69 6e 67 20 28 41 54 | 29 20 77 69 6c 6c 20 62 |ring (AT|) will b|
|000039c0| 65 20 73 65 6e 74 20 66 | 6f 6c 6c 6f 77 65 64 20 |e sent f|ollowed |
|000039d0| 62 79 20 74 68 65 20 64 | 65 6c 61 79 20 28 41 44 |by the d|elay (AD|
|000039e0| 29 0a 20 2a 20 20 20 20 | 20 20 32 29 2e 20 6d 6f |). * | 2). mo|
|000039f0| 64 65 6d 20 73 68 6f 75 | 6c 64 20 6e 6f 77 20 62 |dem shou|ld now b|
|00003a00| 65 20 69 6e 20 63 6f 6d | 6d 61 6e 64 20 73 74 61 |e in com|mand sta|
|00003a10| 74 65 2c 20 73 65 6e 64 | 20 68 61 6e 67 75 70 20 |te, send| hangup |
|00003a20| 28 48 55 29 20 63 6f 6d | 6d 61 6e 64 0a 20 2a 20 |(HU) com|mand. * |
|00003a30| 20 20 20 20 20 33 29 2e | 20 73 65 6e 64 20 69 6e | 3).| send in|
|00003a40| 69 74 69 61 6c 69 7a 61 | 74 69 6f 6e 20 73 74 72 |itializa|tion str|
|00003a50| 69 6e 67 20 28 49 53 29 | 20 66 6f 6c 6c 6f 77 65 |ing (IS)| followe|
|00003a60| 64 20 62 79 20 74 68 65 | 20 64 65 6c 61 79 20 28 |d by the| delay (|
|00003a70| 49 44 29 0a 20 2a 0a 20 | 2a 20 49 74 20 69 73 20 |ID). *. |* It is |
|00003a80| 69 6d 70 6f 72 74 61 6e | 74 20 74 68 61 74 20 79 |importan|t that y|
|00003a90| 6f 75 20 64 65 74 65 72 | 6d 69 6e 65 20 61 20 63 |ou deter|mine a c|
|00003aa0| 6f 72 72 65 63 74 20 41 | 54 20 61 6e 64 20 48 55 |orrect A|T and HU|
|00003ab0| 20 73 74 72 69 6e 67 0a | 20 2a 20 20 74 6f 20 70 | string.| * to p|
|00003ac0| 65 72 66 6f 72 6d 20 74 | 68 69 73 20 66 75 6e 63 |erform t|his func|
|00003ad0| 74 69 6f 6e 2e 0a 20 2a | 20 49 66 20 74 68 65 20 |tion.. *| If the |
|00003ae0| 6d 6f 64 65 6d 20 68 61 | 6e 67 73 20 75 70 20 77 |modem ha|ngs up w|
|00003af0| 68 65 6e 20 44 54 52 20 | 66 61 6c 6c 73 20 28 65 |hen DTR |falls (e|
|00003b00| 76 65 6e 20 69 66 20 74 | 68 65 72 65 20 69 73 20 |ven if t|here is |
|00003b10| 61 20 48 55 20 73 74 72 | 69 6e 67 29 2c 0a 20 2a |a HU str|ing),. *|
|00003b20| 20 20 64 65 63 6c 61 72 | 65 20 74 68 65 20 66 6c | declar|e the fl|
|00003b30| 61 67 20 48 43 20 28 66 | 6f 72 20 48 61 6e 67 75 |ag HC (f|or Hangu|
|00003b40| 70 20 6f 6e 20 43 6c 6f | 73 65 29 2e 0a 20 2a 2f |p on Clo|se).. */|
|00003b50| 0a 0a 53 48 41 52 5f 45 | 4f 46 0a 66 69 0a 69 66 |..SHAR_E|OF.fi.if|
|00003b60| 20 74 65 73 74 20 2d 66 | 20 27 6d 67 65 74 65 6e | test -f| 'mgeten|
|00003b70| 74 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |t.c'.the|n..echo |
|00003b80| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|00003b90| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00003ba0| 69 6e 67 20 66 69 6c 65 | 20 27 6d 67 65 74 65 6e |ing file| 'mgeten|
|00003bb0| 74 2e 63 27 22 0a 65 6c | 73 65 0a 63 61 74 20 3c |t.c'".el|se.cat <|
|00003bc0| 3c 20 5c 53 48 41 52 5f | 45 4f 46 20 3e 20 27 6d |< \SHAR_|EOF > 'm|
|00003bd0| 67 65 74 65 6e 74 2e 63 | 27 0a 23 69 6e 63 6c 75 |getent.c|'.#inclu|
|00003be0| 64 65 20 3c 73 74 64 69 | 6f 2e 68 3e 0a 0a 63 68 |de <stdi|o.h>..ch|
|00003bf0| 61 72 09 2a 5f 5f 6d 6f | 64 65 6d 63 61 70 3b 0a |ar.*__mo|demcap;.|
|00003c00| 63 68 61 72 09 2a 4d 4f | 44 45 4d 43 41 50 20 3d |char.*MO|DEMCAP =|
|00003c10| 20 22 2f 65 74 63 2f 6d | 6f 64 65 6d 63 61 70 22 | "/etc/m|odemcap"|
|00003c20| 3b 0a 0a 73 74 61 74 69 | 63 09 69 73 65 6e 74 20 |;..stati|c.isent |
|00003c30| 28 65 6e 74 2c 20 6e 61 | 6d 65 29 0a 63 68 61 72 |(ent, na|me).char|
|00003c40| 09 2a 65 6e 74 3b 0a 63 | 68 61 72 09 2a 6e 61 6d |.*ent;.c|har.*nam|
|00003c50| 65 3b 0a 7b 0a 09 63 68 | 61 72 09 62 75 66 5b 31 |e;.{..ch|ar.buf[1|
|00003c60| 36 5d 3b 0a 09 72 65 67 | 69 73 74 65 72 20 69 6e |6];..reg|ister in|
|00003c70| 74 09 69 3b 0a 0a 09 77 | 68 69 6c 65 20 28 2a 65 |t.i;...w|hile (*e|
|00003c80| 6e 74 20 21 3d 20 27 3a | 27 20 26 26 20 2a 65 6e |nt != ':|' && *en|
|00003c90| 74 20 21 3d 20 30 29 20 | 7b 0a 09 09 66 6f 72 20 |t != 0) |{...for |
|00003ca0| 28 69 20 3d 20 30 3b 2a | 65 6e 74 20 21 3d 20 27 |(i = 0;*|ent != '|
|00003cb0| 3a 27 20 26 26 20 2a 65 | 6e 74 20 21 3d 20 27 7c |:' && *e|nt != '||
|00003cc0| 27 20 26 26 20 2a 65 6e | 74 20 21 3d 20 30 20 26 |' && *en|t != 0 &|
|00003cd0| 26 20 69 20 3c 20 31 35 | 3b 69 2b 2b 29 0a 09 09 |& i < 15|;i++)...|
|00003ce0| 09 62 75 66 5b 69 5d 20 | 3d 20 2a 65 6e 74 2b 2b |.buf[i] |= *ent++|
|00003cf0| 3b 0a 0a 09 09 69 66 20 | 28 2a 65 6e 74 20 3d 3d |;....if |(*ent ==|
|00003d00| 20 27 7c 27 29 0a 09 09 | 09 65 6e 74 2b 2b 3b 0a | '|')...|.ent++;.|
|00003d10| 0a 09 09 62 75 66 5b 69 | 5d 20 3d 20 30 3b 0a 09 |...buf[i|] = 0;..|
|00003d20| 09 69 66 20 28 73 74 72 | 63 6d 70 20 28 62 75 66 |.if (str|cmp (buf|
|00003d30| 2c 20 6e 61 6d 65 29 20 | 3d 3d 20 30 29 0a 09 09 |, name) |== 0)...|
|00003d40| 09 72 65 74 75 72 6e 20 | 28 31 29 3b 0a 09 7d 0a |.return |(1);..}.|
|00003d50| 09 72 65 74 75 72 6e 20 | 28 30 29 3b 0a 7d 0a 0a |.return |(0);.}..|
|00003d60| 6d 67 65 74 65 6e 74 20 | 28 62 70 2c 20 6e 61 6d |mgetent |(bp, nam|
|00003d70| 65 29 0a 63 68 61 72 09 | 2a 62 70 3b 0a 63 68 61 |e).char.|*bp;.cha|
|00003d80| 72 09 2a 6e 61 6d 65 3b | 0a 7b 0a 09 63 68 61 72 |r.*name;|.{..char|
|00003d90| 09 62 75 66 5b 31 30 32 | 34 5d 3b 0a 09 72 65 67 |.buf[102|4];..reg|
|00003da0| 69 73 74 65 72 20 63 68 | 61 72 09 2a 63 70 3b 0a |ister ch|ar.*cp;.|
|00003db0| 09 72 65 67 69 73 74 65 | 72 20 46 49 4c 45 09 2a |.registe|r FILE.*|
|00003dc0| 6d 6f 64 65 6d 63 61 70 | 3b 0a 09 72 65 67 69 73 |modemcap|;..regis|
|00003dd0| 74 65 72 20 69 6e 74 09 | 69 3b 0a 09 63 68 61 72 |ter int.|i;..char|
|00003de0| 09 2a 67 65 74 65 6e 76 | 20 28 29 3b 0a 0a 09 69 |.*getenv| ();...i|
|00003df0| 66 20 28 28 63 70 20 3d | 20 67 65 74 65 6e 76 20 |f ((cp =| getenv |
|00003e00| 28 22 4d 4f 44 45 4d 43 | 41 50 22 29 29 20 21 3d |("MODEMC|AP")) !=|
|00003e10| 20 4e 55 4c 4c 29 20 7b | 0a 09 09 69 66 20 28 2a | NULL) {|...if (*|
|00003e20| 63 70 20 21 3d 20 27 2f | 27 29 20 7b 0a 09 09 09 |cp != '/|') {....|
|00003e30| 69 66 20 28 69 73 65 6e | 74 20 28 63 70 2c 20 6e |if (isen|t (cp, n|
|00003e40| 61 6d 65 29 29 20 7b 0a | 09 09 09 09 73 74 72 63 |ame)) {.|....strc|
|00003e50| 70 79 20 28 62 75 66 2c | 20 63 70 29 3b 0a 09 09 |py (buf,| cp);...|
|00003e60| 09 09 72 65 74 75 72 6e | 20 28 31 29 3b 0a 09 09 |..return| (1);...|
|00003e70| 09 7d 0a 09 09 7d 0a 09 | 09 4d 4f 44 45 4d 43 41 |.}...}..|.MODEMCA|
|00003e80| 50 20 3d 20 63 70 3b 0a | 09 7d 0a 09 69 66 20 28 |P = cp;.|.}..if (|
|00003e90| 28 6d 6f 64 65 6d 63 61 | 70 20 3d 20 66 6f 70 65 |(modemca|p = fope|
|00003ea0| 6e 20 28 4d 4f 44 45 4d | 43 41 50 2c 20 22 72 22 |n (MODEM|CAP, "r"|
|00003eb0| 29 29 20 3d 3d 20 4e 55 | 4c 4c 29 0a 09 09 72 65 |)) == NU|LL)...re|
|00003ec0| 74 75 72 6e 20 28 2d 31 | 29 3b 0a 0a 09 77 68 69 |turn (-1|);...whi|
|00003ed0| 6c 65 20 28 66 67 65 74 | 73 20 28 62 75 66 2c 20 |le (fget|s (buf, |
|00003ee0| 35 31 32 2c 20 6d 6f 64 | 65 6d 63 61 70 29 20 21 |512, mod|emcap) !|
|00003ef0| 3d 20 4e 55 4c 4c 29 20 | 7b 0a 09 09 69 66 20 28 |= NULL) |{...if (|
|00003f00| 62 75 66 5b 30 5d 20 3d | 3d 20 27 23 27 29 09 09 |buf[0] =|= '#')..|
|00003f10| 09 09 2f 2a 20 73 6b 69 | 70 20 61 6c 6c 20 63 6f |../* ski|p all co|
|00003f20| 6d 6d 65 6e 74 20 6c 69 | 6e 65 73 09 09 2a 2f 0a |mment li|nes..*/.|
|00003f30| 09 09 09 63 6f 6e 74 69 | 6e 75 65 3b 0a 0a 09 09 |...conti|nue;....|
|00003f40| 69 20 3d 20 73 74 72 6c | 65 6e 20 28 62 75 66 29 |i = strl|en (buf)|
|00003f50| 20 2d 20 31 3b 09 09 09 | 09 2f 2a 20 66 69 6e 64 | - 1;...|./* find|
|00003f60| 20 6c 61 73 74 20 63 68 | 61 72 61 63 74 65 72 20 | last ch|aracter |
|00003f70| 69 6e 20 6c 69 6e 65 09 | 09 2a 2f 0a 09 09 62 75 |in line.|.*/...bu|
|00003f80| 66 5b 69 5d 20 3d 20 30 | 3b 09 09 09 09 09 2f 2a |f[i] = 0|;...../*|
|00003f90| 20 72 65 6d 6f 76 65 20 | 74 72 61 69 6c 69 6e 67 | remove |trailing|
|00003fa0| 20 6e 65 77 6c 69 6e 65 | 09 09 2a 2f 0a 09 09 69 | newline|..*/...i|
|00003fb0| 66 20 28 69 20 3d 3d 20 | 30 29 09 09 09 09 09 2f |f (i == |0)...../|
|00003fc0| 2a 20 69 67 6e 6f 72 65 | 20 62 6c 61 6e 6b 20 6c |* ignore| blank l|
|00003fd0| 69 6e 65 73 09 09 09 2a | 2f 0a 09 09 09 63 6f 6e |ines...*|/....con|
|00003fe0| 74 69 6e 75 65 3b 0a 0a | 09 09 77 68 69 6c 65 20 |tinue;..|..while |
|00003ff0| 28 62 75 66 5b 28 69 20 | 3d 20 73 74 72 6c 65 6e |(buf[(i |= strlen|
|00004000| 20 28 62 75 66 29 20 2d | 20 31 29 5d 20 3d 3d 20 | (buf) -| 1)] == |
|00004010| 27 5c 5c 27 29 20 7b 09 | 2f 2a 20 69 73 20 6c 61 |'\\') {.|/* is la|
|00004020| 73 74 20 63 68 61 72 61 | 63 74 65 72 20 61 20 5c |st chara|cter a \|
|00004030| 5c 2c 20 73 74 69 6c 6c | 20 6d 6f 72 65 09 2a 2f |\, still| more.*/|
|00004040| 0a 09 09 09 63 70 20 3d | 20 26 62 75 66 5b 69 5d |....cp =| &buf[i]|
|00004050| 3b 09 09 09 09 2f 2a 20 | 66 69 6e 64 20 6c 61 73 |;..../* |find las|
|00004060| 74 20 63 68 61 72 61 63 | 74 65 72 09 09 09 2a 2f |t charac|ter...*/|
|00004070| 0a 09 09 09 63 70 5b 30 | 5d 20 3d 20 30 3b 09 09 |....cp[0|] = 0;..|
|00004080| 09 09 2f 2a 20 6e 75 6c | 6c 69 66 79 2c 20 65 6e |../* nul|lify, en|
|00004090| 64 20 6f 66 20 74 68 69 | 73 20 70 61 72 74 09 09 |d of thi|s part..|
|000040a0| 2a 2f 0a 09 09 09 69 66 | 20 28 66 67 65 74 73 20 |*/....if| (fgets |
|000040b0| 28 63 70 2c 20 35 31 32 | 2c 20 6d 6f 64 65 6d 63 |(cp, 512|, modemc|
|000040c0| 61 70 29 20 3d 3d 20 4e | 55 4c 4c 29 09 2f 2a 20 |ap) == N|ULL)./* |
|000040d0| 65 6e 64 20 6f 66 20 66 | 69 6c 65 3f 09 2e 2e 2e |end of f|ile?....|
|000040e0| 09 09 09 2a 2f 0a 09 09 | 09 09 62 72 65 61 6b 3b |...*/...|..break;|
|000040f0| 09 09 09 09 2f 2a 20 2e | 2e 2e 20 65 6e 64 20 6f |..../* .|.. end o|
|00004100| 66 20 65 6e 74 72 79 09 | 09 09 2a 2f 0a 0a 09 09 |f entry.|..*/....|
|00004110| 09 63 70 5b 73 74 72 6c | 65 6e 20 28 63 70 29 20 |.cp[strl|en (cp) |
|00004120| 2d 20 31 5d 20 3d 20 30 | 3b 09 09 2f 2a 20 72 65 |- 1] = 0|;../* re|
|00004130| 6d 6f 76 65 20 74 72 61 | 69 6c 69 6e 67 20 6e 65 |move tra|iling ne|
|00004140| 77 6c 69 6e 65 09 09 2a | 2f 0a 09 09 09 69 66 20 |wline..*|/....if |
|00004150| 28 63 70 5b 30 5d 20 3d | 3d 20 27 23 27 29 20 7b |(cp[0] =|= '#') {|
|00004160| 09 09 09 2f 2a 20 63 6f | 6d 6d 65 6e 74 20 6c 69 |.../* co|mment li|
|00004170| 6e 65 3f 20 2e 2e 2e 09 | 09 09 2a 2f 0a 09 09 09 |ne? ....|..*/....|
|00004180| 09 63 70 5b 30 5d 20 3d | 20 30 3b 09 09 09 2f 2a |.cp[0] =| 0;.../*|
|00004190| 20 72 65 6d 6f 76 65 20 | 74 68 61 74 20 6c 69 6e | remove |that lin|
|000041a0| 65 09 09 09 2a 2f 0a 09 | 09 09 09 63 6f 6e 74 69 |e...*/..|...conti|
|000041b0| 6e 75 65 3b 09 09 09 2f | 2a 20 67 6f 20 67 65 74 |nue;.../|* go get|
|000041c0| 20 61 6e 6f 74 68 65 72 | 20 6c 69 6e 65 09 09 09 | another| line...|
|000041d0| 2a 2f 0a 09 09 09 7d 0a | 09 09 7d 0a 09 09 69 66 |*/....}.|..}...if|
|000041e0| 20 28 69 73 65 6e 74 20 | 28 62 75 66 2c 20 6e 61 | (isent |(buf, na|
|000041f0| 6d 65 29 29 20 7b 0a 09 | 09 09 5f 5f 6d 6f 64 65 |me)) {..|..__mode|
|00004200| 6d 63 61 70 20 3d 20 62 | 70 3b 0a 09 09 09 73 74 |mcap = b|p;....st|
|00004210| 72 63 70 79 20 28 62 70 | 2c 20 62 75 66 29 3b 0a |rcpy (bp|, buf);.|
|00004220| 09 09 09 66 63 6c 6f 73 | 65 20 28 6d 6f 64 65 6d |...fclos|e (modem|
|00004230| 63 61 70 29 3b 0a 09 09 | 09 72 65 74 75 72 6e 20 |cap);...|.return |
|00004240| 28 31 29 3b 0a 09 09 7d | 0a 09 7d 0a 09 66 63 6c |(1);...}|..}..fcl|
|00004250| 6f 73 65 20 28 6d 6f 64 | 65 6d 63 61 70 29 3b 0a |ose (mod|emcap);.|
|00004260| 09 72 65 74 75 72 6e 20 | 28 30 29 3b 0a 7d 0a 53 |.return |(0);.}.S|
|00004270| 48 41 52 5f 45 4f 46 0a | 66 69 0a 69 66 20 74 65 |HAR_EOF.|fi.if te|
|00004280| 73 74 20 2d 66 20 27 6d | 67 65 74 73 74 72 2e 63 |st -f 'm|getstr.c|
|00004290| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|000042a0| 72 3a 20 22 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |r: "will| not ove|
|000042b0| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|000042c0| 20 66 69 6c 65 20 27 6d | 67 65 74 73 74 72 2e 63 | file 'm|getstr.c|
|000042d0| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|000042e0| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 6d 67 65 74 |SHAR_EOF| > 'mget|
|000042f0| 73 74 72 2e 63 27 0a 65 | 78 74 65 72 6e 09 63 68 |str.c'.e|xtern.ch|
|00004300| 61 72 09 2a 5f 5f 6d 6f | 64 65 6d 63 61 70 3b 0a |ar.*__mo|demcap;.|
|00004310| 0a 63 68 61 72 09 2a 6d | 67 65 74 73 74 72 20 28 |.char.*m|getstr (|
|00004320| 69 64 2c 20 61 72 65 61 | 29 0a 72 65 67 69 73 74 |id, area|).regist|
|00004330| 65 72 20 63 68 61 72 09 | 2a 69 64 3b 0a 72 65 67 |er char.|*id;.reg|
|00004340| 69 73 74 65 72 20 63 68 | 61 72 09 2a 2a 61 72 65 |ister ch|ar.**are|
|00004350| 61 3b 0a 7b 0a 09 72 65 | 67 69 73 74 65 72 20 63 |a;.{..re|gister c|
|00004360| 68 61 72 09 2a 63 70 20 | 3d 20 5f 5f 6d 6f 64 65 |har.*cp |= __mode|
|00004370| 6d 63 61 70 3b 0a 09 72 | 65 67 69 73 74 65 72 20 |mcap;..r|egister |
|00004380| 63 68 61 72 09 2a 73 74 | 72 20 3d 20 2a 61 72 65 |char.*st|r = *are|
|00004390| 61 3b 09 09 2f 2a 20 73 | 74 61 72 74 20 6f 66 20 |a;../* s|tart of |
|000043a0| 63 75 72 72 65 6e 74 20 | 73 74 72 69 6e 67 09 09 |current |string..|
|000043b0| 2a 2f 0a 0a 09 69 66 20 | 28 5f 5f 6d 6f 64 65 6d |*/...if |(__modem|
|000043c0| 63 61 70 20 3d 3d 20 28 | 63 68 61 72 20 2a 29 20 |cap == (|char *) |
|000043d0| 30 29 09 09 2f 2a 20 68 | 61 73 20 6d 67 65 74 65 |0)../* h|as mgete|
|000043e0| 6e 74 28 29 20 62 65 65 | 6e 20 63 61 6c 6c 65 64 |nt() bee|n called|
|000043f0| 3f 20 2e 2e 2e 09 2a 2f | 0a 09 09 72 65 74 75 72 |? ....*/|...retur|
|00004400| 6e 20 28 28 63 68 61 72 | 20 2a 29 20 30 29 3b 09 |n ((char| *) 0);.|
|00004410| 09 09 2f 2a 20 2e 2e 2e | 20 6e 6f 2c 20 63 61 6e |../* ...| no, can|
|00004420| 27 74 20 66 69 6e 64 20 | 73 74 72 69 6e 67 09 2a |'t find |string.*|
|00004430| 2f 0a 0a 09 77 68 69 6c | 65 20 28 2a 63 70 20 21 |/...whil|e (*cp !|
|00004440| 3d 20 27 3a 27 20 26 26 | 20 2a 63 70 20 21 3d 20 |= ':' &&| *cp != |
|00004450| 30 29 09 09 2f 2a 20 66 | 69 6e 64 20 66 69 72 73 |0)../* f|ind firs|
|00004460| 74 20 65 6e 74 72 79 20 | 69 6e 20 63 61 70 09 09 |t entry |in cap..|
|00004470| 2a 2f 0a 09 09 63 70 2b | 2b 3b 0a 0a 09 69 66 20 |*/...cp+|+;...if |
|00004480| 28 2a 63 70 20 3d 3d 20 | 30 29 09 09 09 09 2f 2a |(*cp == |0)..../*|
|00004490| 20 65 6d 70 74 79 20 65 | 6e 74 72 79 3f 3f 3f 09 | empty e|ntry???.|
|000044a0| 09 09 2a 2f 0a 09 09 72 | 65 74 75 72 6e 20 28 28 |..*/...r|eturn ((|
|000044b0| 63 68 61 72 20 2a 29 20 | 30 29 3b 09 09 09 2f 2a |char *) |0);.../*|
|000044c0| 20 2e 2e 2e 20 79 65 73 | 2c 20 62 61 64 20 6d 6f | ... yes|, bad mo|
|000044d0| 64 65 6d 63 61 70 20 65 | 6e 74 72 79 09 09 2a 2f |demcap e|ntry..*/|
|000044e0| 0a 09 65 6c 73 65 0a 09 | 09 63 70 2b 2b 3b 09 09 |..else..|.cp++;..|
|000044f0| 09 09 2f 2a 20 70 6f 69 | 6e 74 20 74 6f 20 66 69 |../* poi|nt to fi|
|00004500| 72 73 74 20 63 68 61 72 | 61 63 74 65 72 20 69 6e |rst char|acter in|
|00004510| 20 6e 65 78 74 09 2a 2f | 0a 0a 09 77 68 69 6c 65 | next.*/|...while|
|00004520| 20 28 2a 63 70 20 21 3d | 20 30 29 20 7b 09 09 09 | (*cp !=| 0) {...|
|00004530| 2f 2a 20 75 6e 74 69 6c | 20 65 6e 74 72 79 20 66 |/* until| entry f|
|00004540| 6f 75 6e 64 20 6f 72 20 | 65 6e 64 20 6f 66 20 65 |ound or |end of e|
|00004550| 6e 74 72 79 09 2a 2f 0a | 09 09 69 66 20 28 63 70 |ntry.*/.|..if (cp|
|00004560| 5b 30 5d 20 3d 3d 20 69 | 64 5b 30 5d 20 26 26 20 |[0] == i|d[0] && |
|00004570| 63 70 5b 31 5d 20 3d 3d | 20 69 64 5b 31 5d 29 20 |cp[1] ==| id[1]) |
|00004580| 7b 09 2f 2a 20 66 6f 75 | 6e 64 20 65 6e 74 72 79 |{./* fou|nd entry|
|00004590| 21 21 21 09 09 2a 2f 0a | 09 09 09 69 66 20 28 63 |!!!..*/.|...if (c|
|000045a0| 70 5b 32 5d 20 21 3d 20 | 27 3d 27 29 09 2f 2a 20 |p[2] != |'=')./* |
|000045b0| 69 73 20 69 74 20 61 20 | 73 74 72 69 6e 67 20 76 |is it a |string v|
|000045c0| 61 6c 75 65 3f 3f 3f 09 | 09 2a 2f 0a 09 09 09 09 |alue???.|.*/.....|
|000045d0| 72 65 74 75 72 6e 20 28 | 28 63 68 61 72 20 2a 29 |return (|(char *)|
|000045e0| 20 30 29 3b 09 2f 2a 20 | 6e 6f 2c 20 73 6f 6d 65 | 0);./* |no, some|
|000045f0| 74 68 69 6e 67 20 65 6c | 73 65 09 09 09 2a 2f 0a |thing el|se...*/.|
|00004600| 09 09 09 65 6c 73 65 0a | 09 09 09 09 62 72 65 61 |...else.|....brea|
|00004610| 6b 3b 09 09 2f 2a 20 79 | 65 73 2c 20 65 6e 74 72 |k;../* y|es, entr|
|00004620| 79 20 77 61 73 20 66 6f | 75 6e 64 09 09 09 2a 2f |y was fo|und...*/|
|00004630| 0a 09 09 7d 20 65 6c 73 | 65 20 7b 09 09 09 2f 2a |...} els|e {.../*|
|00004640| 20 6e 6f 74 20 65 6e 74 | 72 79 2c 20 73 6b 69 70 | not ent|ry, skip|
|00004650| 20 74 68 69 73 20 65 6e | 74 69 72 65 20 65 6e 74 | this en|tire ent|
|00004660| 72 79 09 2a 2f 0a 09 09 | 09 77 68 69 6c 65 20 28 |ry.*/...|.while (|
|00004670| 2a 63 70 20 21 3d 20 27 | 3a 27 20 26 26 20 2a 63 |*cp != '|:' && *c|
|00004680| 70 20 21 3d 20 30 29 0a | 09 09 09 09 63 70 2b 2b |p != 0).|....cp++|
|00004690| 3b 09 09 2f 2a 20 73 65 | 61 72 63 68 20 66 6f 72 |;../* se|arch for|
|000046a0| 20 65 6e 64 20 6f 66 20 | 63 75 72 72 65 6e 74 20 | end of |current |
|000046b0| 65 6e 74 72 79 09 2a 2f | 0a 0a 09 09 09 69 66 20 |entry.*/|.....if |
|000046c0| 28 2a 63 70 20 21 3d 20 | 30 29 0a 09 09 09 09 63 |(*cp != |0).....c|
|000046d0| 70 2b 2b 3b 09 09 2f 2a | 20 73 6b 69 70 20 74 65 |p++;../*| skip te|
|000046e0| 72 6d 69 6e 61 74 69 6e | 67 20 63 68 61 72 61 63 |rminatin|g charac|
|000046f0| 74 65 72 09 09 2a 2f 0a | 09 09 7d 0a 09 7d 0a 09 |ter..*/.|..}..}..|
|00004700| 69 66 20 28 2a 63 70 20 | 3d 3d 20 30 29 09 09 09 |if (*cp |== 0)...|
|00004710| 09 2f 2a 20 65 6e 64 20 | 6f 66 20 6d 6f 64 65 6d |./* end |of modem|
|00004720| 20 63 61 70 20 65 6e 74 | 72 79 09 09 2a 2f 0a 09 | cap ent|ry..*/..|
|00004730| 09 72 65 74 75 72 6e 20 | 28 28 63 68 61 72 20 2a |.return |((char *|
|00004740| 29 20 30 29 3b 0a 0a 09 | 63 70 20 2b 3d 20 33 3b |) 0);...|cp += 3;|
|00004750| 09 09 09 09 2f 2a 20 70 | 6f 69 6e 74 20 74 6f 20 |..../* p|oint to |
|00004760| 61 63 74 75 61 6c 20 73 | 74 72 69 6e 67 09 09 2a |actual s|tring..*|
|00004770| 2f 0a 09 77 68 69 6c 65 | 20 28 2a 63 70 20 21 3d |/..while| (*cp !=|
|00004780| 20 27 3a 27 20 26 26 20 | 2a 63 70 20 21 3d 20 30 | ':' && |*cp != 0|
|00004790| 29 20 7b 09 2f 2a 20 66 | 6f 72 20 65 76 65 72 79 |) {./* f|or every|
|000047a0| 20 63 68 61 72 61 63 74 | 65 72 20 69 6e 20 73 74 | charact|er in st|
|000047b0| 72 69 6e 67 20 2e 2e 2e | 09 2a 2f 0a 09 09 69 66 |ring ...|.*/...if|
|000047c0| 20 28 2a 63 70 20 3d 3d | 20 27 5c 5c 27 29 20 7b | (*cp ==| '\\') {|
|000047d0| 09 09 2f 2a 20 74 72 61 | 6e 73 6c 61 74 65 20 65 |../* tra|nslate e|
|000047e0| 73 63 61 70 65 64 20 63 | 68 61 72 61 63 74 65 72 |scaped c|haracter|
|000047f0| 09 09 2a 2f 0a 09 09 09 | 63 70 2b 2b 3b 0a 09 09 |..*/....|cp++;...|
|00004800| 09 73 77 69 74 63 68 20 | 28 2a 63 70 29 20 7b 0a |.switch |(*cp) {.|
|00004810| 09 09 09 09 63 61 73 65 | 20 27 6e 27 3a 09 2f 2a |....case| 'n':./*|
|00004820| 20 6e 65 77 6c 69 6e 65 | 09 09 09 2a 2f 0a 09 09 | newline|...*/...|
|00004830| 09 09 09 2a 2a 61 72 65 | 61 20 3d 20 27 5c 6e 27 |...**are|a = '\n'|
|00004840| 3b 0a 09 09 09 09 09 28 | 2a 61 72 65 61 29 2b 2b |;......(|*area)++|
|00004850| 3b 0a 09 09 09 09 09 63 | 70 2b 2b 3b 0a 09 09 09 |;......c|p++;....|
|00004860| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 09 63 61 73 |..break;|.....cas|
|00004870| 65 20 27 72 27 3a 09 2f | 2a 20 63 61 72 72 69 61 |e 'r':./|* carria|
|00004880| 67 65 20 72 65 74 75 72 | 6e 09 09 2a 2f 0a 09 09 |ge retur|n..*/...|
|00004890| 09 09 09 2a 2a 61 72 65 | 61 20 3d 20 27 5c 72 27 |...**are|a = '\r'|
|000048a0| 3b 0a 09 09 09 09 09 28 | 2a 61 72 65 61 29 2b 2b |;......(|*area)++|
|000048b0| 3b 0a 09 09 09 09 09 63 | 70 2b 2b 3b 0a 09 09 09 |;......c|p++;....|
|000048c0| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 09 63 61 73 |..break;|.....cas|
|000048d0| 65 20 27 62 27 3a 09 2f | 2a 20 62 61 63 6b 73 70 |e 'b':./|* backsp|
|000048e0| 61 63 65 09 09 09 2a 2f | 0a 09 09 09 09 09 2a 2a |ace...*/|......**|
|000048f0| 61 72 65 61 20 3d 20 27 | 5c 62 27 3b 0a 09 09 09 |area = '|\b';....|
|00004900| 09 09 28 2a 61 72 65 61 | 29 2b 2b 3b 0a 09 09 09 |..(*area|)++;....|
|00004910| 09 09 63 70 2b 2b 3b 0a | 09 09 09 09 09 62 72 65 |..cp++;.|.....bre|
|00004920| 61 6b 3b 0a 09 09 09 09 | 63 61 73 65 20 27 66 27 |ak;.....|case 'f'|
|00004930| 3a 09 2f 2a 20 66 6f 72 | 6d 20 66 65 65 64 09 09 |:./* for|m feed..|
|00004940| 09 2a 2f 0a 09 09 09 09 | 09 2a 2a 61 72 65 61 20 |.*/.....|.**area |
|00004950| 3d 20 27 5c 66 27 3b 0a | 09 09 09 09 09 28 2a 61 |= '\f';.|.....(*a|
|00004960| 72 65 61 29 2b 2b 3b 0a | 09 09 09 09 09 63 70 2b |rea)++;.|.....cp+|
|00004970| 2b 3b 0a 09 09 09 09 09 | 62 72 65 61 6b 3b 0a 09 |+;......|break;..|
|00004980| 09 09 09 63 61 73 65 20 | 27 74 27 3a 09 2f 2a 20 |...case |'t':./* |
|00004990| 74 61 62 09 09 09 09 2a | 2f 0a 09 09 09 09 09 2a |tab....*|/......*|
|000049a0| 2a 61 72 65 61 20 3d 20 | 27 5c 74 27 3b 0a 09 09 |*area = |'\t';...|
|000049b0| 09 09 09 28 2a 61 72 65 | 61 29 2b 2b 3b 0a 09 09 |...(*are|a)++;...|
|000049c0| 09 09 09 63 70 2b 2b 3b | 0a 09 09 09 09 09 62 72 |...cp++;|......br|
|000049d0| 65 61 6b 3b 0a 09 09 09 | 09 63 61 73 65 20 27 45 |eak;....|.case 'E|
|000049e0| 27 3a 09 2f 2a 20 45 73 | 63 61 70 65 20 63 68 61 |':./* Es|cape cha|
|000049f0| 72 61 63 74 65 72 09 09 | 2a 2f 0a 09 09 09 09 09 |racter..|*/......|
|00004a00| 2a 2a 61 72 65 61 20 3d | 20 30 33 33 3b 0a 09 09 |**area =| 033;...|
|00004a10| 09 09 09 28 2a 61 72 65 | 61 29 2b 2b 3b 0a 09 09 |...(*are|a)++;...|
|00004a20| 09 09 09 63 70 2b 2b 3b | 0a 09 09 09 09 09 62 72 |...cp++;|......br|
|00004a30| 65 61 6b 3b 0a 09 09 09 | 09 63 61 73 65 20 27 30 |eak;....|.case '0|
|00004a40| 27 3a 0a 09 09 09 09 63 | 61 73 65 20 27 31 27 3a |':.....c|ase '1':|
|00004a50| 0a 09 09 09 09 63 61 73 | 65 20 27 32 27 3a 0a 09 |.....cas|e '2':..|
|00004a60| 09 09 09 63 61 73 65 20 | 27 33 27 3a 0a 09 09 09 |...case |'3':....|
|00004a70| 09 63 61 73 65 20 27 34 | 27 3a 0a 09 09 09 09 63 |.case '4|':.....c|
|00004a80| 61 73 65 20 27 35 27 3a | 0a 09 09 09 09 63 61 73 |ase '5':|.....cas|
|00004a90| 65 20 27 36 27 3a 0a 09 | 09 09 09 63 61 73 65 20 |e '6':..|...case |
|00004aa0| 27 37 27 3a 0a 09 09 09 | 09 09 2a 2a 61 72 65 61 |'7':....|..**area|
|00004ab0| 20 3d 20 28 28 63 70 5b | 30 5d 20 2d 20 27 30 27 | = ((cp[|0] - '0'|
|00004ac0| 29 20 3c 3c 20 36 29 20 | 2b 0a 09 09 09 09 09 09 |) << 6) |+.......|
|00004ad0| 20 28 28 63 70 5b 31 5d | 20 2d 20 27 30 27 29 20 | ((cp[1]| - '0') |
|00004ae0| 3c 3c 20 33 29 20 2b 0a | 09 09 09 09 09 09 20 20 |<< 3) +.|...... |
|00004af0| 28 63 70 5b 32 5d 20 2d | 20 27 30 27 29 3b 0a 09 |(cp[2] -| '0');..|
|00004b00| 09 09 09 09 28 2a 61 72 | 65 61 29 2b 2b 3b 0a 09 |....(*ar|ea)++;..|
|00004b10| 09 09 09 09 63 70 20 2b | 3d 20 33 3b 0a 09 09 09 |....cp +|= 3;....|
|00004b20| 09 09 62 72 65 61 6b 3b | 0a 09 09 09 09 64 65 66 |..break;|.....def|
|00004b30| 61 75 6c 74 3a 0a 09 09 | 09 09 09 2a 2a 61 72 65 |ault:...|...**are|
|00004b40| 61 20 3d 20 2a 63 70 2b | 2b 3b 0a 09 09 09 09 09 |a = *cp+|+;......|
|00004b50| 28 2a 61 72 65 61 29 2b | 2b 3b 0a 09 09 09 09 09 |(*area)+|+;......|
|00004b60| 62 72 65 61 6b 3b 0a 09 | 09 09 7d 0a 09 09 7d 20 |break;..|..}...} |
|00004b70| 65 6c 73 65 20 69 66 20 | 28 2a 63 70 20 3d 3d 20 |else if |(*cp == |
|00004b80| 27 5e 27 29 20 7b 09 2f | 2a 20 73 6f 6d 65 20 63 |'^') {./|* some c|
|00004b90| 6f 6e 74 72 6f 6c 20 63 | 68 61 72 61 63 74 65 72 |ontrol c|haracter|
|00004ba0| 09 09 2a 2f 0a 09 09 09 | 63 70 2b 2b 3b 0a 09 09 |..*/....|cp++;...|
|00004bb0| 09 69 66 20 28 2a 63 70 | 20 3e 3d 20 27 40 27 20 |.if (*cp| >= '@' |
|00004bc0| 26 26 20 2a 63 70 20 3c | 3d 20 27 5f 27 29 20 7b |&& *cp <|= '_') {|
|00004bd0| 0a 09 09 09 09 2a 2a 61 | 72 65 61 20 3d 20 2a 63 |.....**a|rea = *c|
|00004be0| 70 20 2d 20 27 40 27 3b | 0a 09 09 09 09 28 2a 61 |p - '@';|.....(*a|
|00004bf0| 72 65 61 29 2b 2b 3b 0a | 09 09 09 7d 0a 09 09 09 |rea)++;.|...}....|
|00004c00| 63 70 2b 2b 3b 0a 09 09 | 7d 20 65 6c 73 65 20 7b |cp++;...|} else {|
|00004c10| 09 09 09 2f 2a 20 73 6f | 6d 65 20 6e 6f 72 6d 61 |.../* so|me norma|
|00004c20| 6c 20 63 68 61 72 61 63 | 74 65 72 09 09 2a 2f 0a |l charac|ter..*/.|
|00004c30| 09 09 09 2a 2a 61 72 65 | 61 20 3d 20 2a 63 70 2b |...**are|a = *cp+|
|00004c40| 2b 3b 09 09 2f 2a 20 70 | 75 74 20 63 68 61 72 61 |+;../* p|ut chara|
|00004c50| 63 74 65 72 20 69 6e 20 | 61 72 65 61 09 09 2a 2f |cter in |area..*/|
|00004c60| 0a 09 09 09 28 2a 61 72 | 65 61 29 2b 2b 3b 0a 09 |....(*ar|ea)++;..|
|00004c70| 09 7d 0a 09 7d 0a 09 2a | 28 28 2a 61 72 65 61 29 |.}..}..*|((*area)|
|00004c80| 2b 2b 29 20 3d 20 30 3b | 09 09 09 2f 2a 20 6e 75 |++) = 0;|.../* nu|
|00004c90| 6c 6c 20 74 65 72 6d 69 | 6e 61 74 65 20 61 72 65 |ll termi|nate are|
|00004ca0| 61 20 61 6e 64 20 73 74 | 72 69 6e 67 09 2a 2f 0a |a and st|ring.*/.|
|00004cb0| 09 72 65 74 75 72 6e 20 | 28 73 74 72 29 3b 09 09 |.return |(str);..|
|00004cc0| 09 09 2f 2a 20 72 65 74 | 75 72 6e 20 70 6f 69 6e |../* ret|urn poin|
|00004cd0| 74 65 72 20 74 6f 20 73 | 74 61 72 74 20 6f 66 20 |ter to s|tart of |
|00004ce0| 73 74 72 69 6e 67 09 2a | 2f 0a 7d 0a 53 48 41 52 |string.*|/.}.SHAR|
|00004cf0| 5f 45 4f 46 0a 66 69 0a | 69 66 20 74 65 73 74 20 |_EOF.fi.|if test |
|00004d00| 2d 66 20 27 6d 67 65 74 | 66 6c 61 67 2e 63 27 0a |-f 'mget|flag.c'.|
|00004d10| 74 68 65 6e 0a 09 65 63 | 68 6f 20 73 68 61 72 3a |then..ec|ho shar:|
|00004d20| 20 22 77 69 6c 6c 20 6e | 6f 74 20 6f 76 65 72 2d | "will n|ot over-|
|00004d30| 77 72 69 74 65 20 65 78 | 69 73 74 69 6e 67 20 66 |write ex|isting f|
|00004d40| 69 6c 65 20 27 6d 67 65 | 74 66 6c 61 67 2e 63 27 |ile 'mge|tflag.c'|
|00004d50| 22 0a 65 6c 73 65 0a 63 | 61 74 20 3c 3c 20 5c 53 |".else.c|at << \S|
|00004d60| 48 41 52 5f 45 4f 46 20 | 3e 20 27 6d 67 65 74 66 |HAR_EOF |> 'mgetf|
|00004d70| 6c 61 67 2e 63 27 0a 65 | 78 74 65 72 6e 09 63 68 |lag.c'.e|xtern.ch|
|00004d80| 61 72 09 2a 5f 5f 6d 6f | 64 65 6d 63 61 70 3b 0a |ar.*__mo|demcap;.|
|00004d90| 0a 6d 67 65 74 66 6c 61 | 67 20 28 69 64 29 0a 72 |.mgetfla|g (id).r|
|00004da0| 65 67 69 73 74 65 72 20 | 63 68 61 72 09 2a 69 64 |egister |char.*id|
|00004db0| 3b 0a 7b 0a 09 72 65 67 | 69 73 74 65 72 20 63 68 |;.{..reg|ister ch|
|00004dc0| 61 72 09 2a 63 70 20 3d | 20 5f 5f 6d 6f 64 65 6d |ar.*cp =| __modem|
|00004dd0| 63 61 70 3b 0a 0a 09 69 | 66 20 28 5f 5f 6d 6f 64 |cap;...i|f (__mod|
|00004de0| 65 6d 63 61 70 20 3d 3d | 20 28 63 68 61 72 20 2a |emcap ==| (char *|
|00004df0| 29 20 30 29 09 09 2f 2a | 20 68 61 73 20 6d 67 65 |) 0)../*| has mge|
|00004e00| 74 65 6e 74 28 29 20 62 | 65 65 6e 20 63 61 6c 6c |tent() b|een call|
|00004e10| 65 64 3f 20 2e 2e 2e 09 | 2a 2f 0a 09 09 72 65 74 |ed? ....|*/...ret|
|00004e20| 75 72 6e 20 28 2d 31 29 | 3b 09 09 09 2f 2a 20 2e |urn (-1)|;.../* .|
|00004e30| 2e 2e 20 6e 6f 2c 20 63 | 61 6e 27 74 20 66 69 6e |.. no, c|an't fin|
|00004e40| 64 20 6e 75 6d 62 65 72 | 09 09 2a 2f 0a 0a 09 77 |d number|..*/...w|
|00004e50| 68 69 6c 65 20 28 2a 63 | 70 20 21 3d 20 27 3a 27 |hile (*c|p != ':'|
|00004e60| 20 26 26 20 2a 63 70 20 | 21 3d 20 30 29 09 09 2f | && *cp |!= 0)../|
|00004e70| 2a 20 66 69 6e 64 20 66 | 69 72 73 74 20 65 6e 74 |* find f|irst ent|
|00004e80| 72 79 20 69 6e 20 63 61 | 70 09 09 2a 2f 0a 09 09 |ry in ca|p..*/...|
|00004e90| 63 70 2b 2b 3b 0a 0a 09 | 69 66 20 28 2a 63 70 20 |cp++;...|if (*cp |
|00004ea0| 3d 3d 20 30 29 09 09 09 | 09 2f 2a 20 65 6d 70 74 |== 0)...|./* empt|
|00004eb0| 79 20 65 6e 74 72 79 3f | 3f 3f 09 09 09 2a 2f 0a |y entry?|??...*/.|
|00004ec0| 09 09 72 65 74 75 72 6e | 20 28 30 29 3b 09 09 09 |..return| (0);...|
|00004ed0| 2f 2a 20 2e 2e 2e 20 79 | 65 73 2c 20 62 61 64 20 |/* ... y|es, bad |
|00004ee0| 6d 6f 64 65 6d 63 61 70 | 20 65 6e 74 72 79 09 09 |modemcap| entry..|
|00004ef0| 2a 2f 0a 09 65 6c 73 65 | 0a 09 09 63 70 2b 2b 3b |*/..else|...cp++;|
|00004f00| 09 09 09 09 2f 2a 20 70 | 6f 69 6e 74 20 74 6f 20 |..../* p|oint to |
|00004f10| 66 69 72 73 74 20 63 68 | 61 72 61 63 74 65 72 20 |first ch|aracter |
|00004f20| 69 6e 20 6e 65 78 74 09 | 2a 2f 0a 0a 09 77 68 69 |in next.|*/...whi|
|00004f30| 6c 65 20 28 2a 63 70 20 | 21 3d 20 30 29 20 7b 09 |le (*cp |!= 0) {.|
|00004f40| 09 09 2f 2a 20 75 6e 74 | 69 6c 20 65 6e 74 72 79 |../* unt|il entry|
|00004f50| 20 66 6f 75 6e 64 20 6f | 72 20 65 6e 64 20 6f 66 | found o|r end of|
|00004f60| 20 65 6e 74 72 79 09 2a | 2f 0a 09 09 69 66 20 28 | entry.*|/...if (|
|00004f70| 63 70 5b 30 5d 20 3d 3d | 20 69 64 5b 30 5d 20 26 |cp[0] ==| id[0] &|
|00004f80| 26 20 63 70 5b 31 5d 20 | 3d 3d 20 69 64 5b 31 5d |& cp[1] |== id[1]|
|00004f90| 29 09 2f 2a 20 66 6f 75 | 6e 64 20 65 6e 74 72 79 |)./* fou|nd entry|
|00004fa0| 21 21 21 09 09 2a 2f 0a | 09 09 09 72 65 74 75 72 |!!!..*/.|...retur|
|00004fb0| 6e 20 28 31 29 3b 09 09 | 2f 2a 20 72 65 74 75 72 |n (1);..|/* retur|
|00004fc0| 6e 20 74 72 75 65 09 09 | 09 09 2a 2f 0a 09 09 65 |n true..|..*/...e|
|00004fd0| 6c 73 65 20 7b 09 09 09 | 2f 2a 20 6e 6f 74 20 65 |lse {...|/* not e|
|00004fe0| 6e 74 72 79 2c 20 73 6b | 69 70 20 74 68 69 73 20 |ntry, sk|ip this |
|00004ff0| 65 6e 74 69 72 65 20 65 | 6e 74 72 79 09 2a 2f 0a |entire e|ntry.*/.|
|00005000| 09 09 09 77 68 69 6c 65 | 20 28 2a 63 70 20 21 3d |...while| (*cp !=|
|00005010| 20 27 3a 27 20 26 26 20 | 2a 63 70 20 21 3d 20 30 | ':' && |*cp != 0|
|00005020| 29 0a 09 09 09 09 63 70 | 2b 2b 3b 09 09 2f 2a 20 |).....cp|++;../* |
|00005030| 73 65 61 72 63 68 20 66 | 6f 72 20 65 6e 64 20 6f |search f|or end o|
|00005040| 66 20 63 75 72 72 65 6e | 74 20 65 6e 74 72 79 09 |f curren|t entry.|
|00005050| 2a 2f 0a 0a 09 09 09 69 | 66 20 28 2a 63 70 20 21 |*/.....i|f (*cp !|
|00005060| 3d 20 30 29 0a 09 09 09 | 09 63 70 2b 2b 3b 09 09 |= 0)....|.cp++;..|
|00005070| 2f 2a 20 73 6b 69 70 20 | 74 65 72 6d 69 6e 61 74 |/* skip |terminat|
|00005080| 69 6e 67 20 63 68 61 72 | 61 63 74 65 72 09 09 2a |ing char|acter..*|
|00005090| 2f 0a 09 09 7d 0a 09 7d | 0a 09 72 65 74 75 72 6e |/...}..}|..return|
|000050a0| 20 28 30 29 3b 0a 7d 0a | 53 48 41 52 5f 45 4f 46 | (0);.}.|SHAR_EOF|
|000050b0| 0a 66 69 0a 69 66 20 74 | 65 73 74 20 2d 66 20 27 |.fi.if t|est -f '|
|000050c0| 6d 67 65 74 6e 75 6d 2e | 63 27 0a 74 68 65 6e 0a |mgetnum.|c'.then.|
|000050d0| 09 65 63 68 6f 20 73 68 | 61 72 3a 20 22 77 69 6c |.echo sh|ar: "wil|
|000050e0| 6c 20 6e 6f 74 20 6f 76 | 65 72 2d 77 72 69 74 65 |l not ov|er-write|
|000050f0| 20 65 78 69 73 74 69 6e | 67 20 66 69 6c 65 20 27 | existin|g file '|
|00005100| 6d 67 65 74 6e 75 6d 2e | 63 27 22 0a 65 6c 73 65 |mgetnum.|c'".else|
|00005110| 0a 63 61 74 20 3c 3c 20 | 5c 53 48 41 52 5f 45 4f |.cat << |\SHAR_EO|
|00005120| 46 20 3e 20 27 6d 67 65 | 74 6e 75 6d 2e 63 27 0a |F > 'mge|tnum.c'.|
|00005130| 65 78 74 65 72 6e 09 63 | 68 61 72 09 2a 5f 5f 6d |extern.c|har.*__m|
|00005140| 6f 64 65 6d 63 61 70 3b | 0a 0a 6d 67 65 74 6e 75 |odemcap;|..mgetnu|
|00005150| 6d 20 28 69 64 29 0a 72 | 65 67 69 73 74 65 72 20 |m (id).r|egister |
|00005160| 63 68 61 72 09 2a 69 64 | 3b 0a 7b 0a 09 72 65 67 |char.*id|;.{..reg|
|00005170| 69 73 74 65 72 20 63 68 | 61 72 09 2a 63 70 20 3d |ister ch|ar.*cp =|
|00005180| 20 5f 5f 6d 6f 64 65 6d | 63 61 70 3b 0a 0a 09 69 | __modem|cap;...i|
|00005190| 66 20 28 5f 5f 6d 6f 64 | 65 6d 63 61 70 20 3d 3d |f (__mod|emcap ==|
|000051a0| 20 28 63 68 61 72 20 2a | 29 20 30 29 09 09 2f 2a | (char *|) 0)../*|
|000051b0| 20 68 61 73 20 6d 67 65 | 74 65 6e 74 28 29 20 62 | has mge|tent() b|
|000051c0| 65 65 6e 20 63 61 6c 6c | 65 64 3f 20 2e 2e 2e 09 |een call|ed? ....|
|000051d0| 2a 2f 0a 09 09 72 65 74 | 75 72 6e 20 28 2d 31 29 |*/...ret|urn (-1)|
|000051e0| 3b 09 09 09 2f 2a 20 2e | 2e 2e 20 6e 6f 2c 20 63 |;.../* .|.. no, c|
|000051f0| 61 6e 27 74 20 66 69 6e | 64 20 6e 75 6d 62 65 72 |an't fin|d number|
|00005200| 09 09 2a 2f 0a 0a 09 77 | 68 69 6c 65 20 28 2a 63 |..*/...w|hile (*c|
|00005210| 70 20 21 3d 20 27 3a 27 | 20 26 26 20 2a 63 70 20 |p != ':'| && *cp |
|00005220| 21 3d 20 30 29 09 09 2f | 2a 20 66 69 6e 64 20 66 |!= 0)../|* find f|
|00005230| 69 72 73 74 20 65 6e 74 | 72 79 20 69 6e 20 63 61 |irst ent|ry in ca|
|00005240| 70 09 09 2a 2f 0a 09 09 | 63 70 2b 2b 3b 0a 0a 09 |p..*/...|cp++;...|
|00005250| 69 66 20 28 2a 63 70 20 | 3d 3d 20 30 29 09 09 09 |if (*cp |== 0)...|
|00005260| 09 2f 2a 20 65 6d 70 74 | 79 20 65 6e 74 72 79 3f |./* empt|y entry?|
|00005270| 3f 3f 09 09 09 2a 2f 0a | 09 09 72 65 74 75 72 6e |??...*/.|..return|
|00005280| 20 28 2d 31 29 3b 09 09 | 09 2f 2a 20 2e 2e 2e 20 | (-1);..|./* ... |
|00005290| 79 65 73 2c 20 62 61 64 | 20 6d 6f 64 65 6d 63 61 |yes, bad| modemca|
|000052a0| 70 20 65 6e 74 72 79 09 | 09 2a 2f 0a 09 65 6c 73 |p entry.|.*/..els|
|000052b0| 65 0a 09 09 63 70 2b 2b | 3b 09 09 09 09 2f 2a 20 |e...cp++|;..../* |
|000052c0| 70 6f 69 6e 74 20 74 6f | 20 66 69 72 73 74 20 63 |point to| first c|
|000052d0| 68 61 72 61 63 74 65 72 | 20 69 6e 20 6e 65 78 74 |haracter| in next|
|000052e0| 09 2a 2f 0a 0a 09 77 68 | 69 6c 65 20 28 2a 63 70 |.*/...wh|ile (*cp|
|000052f0| 20 21 3d 20 30 29 20 7b | 09 09 09 2f 2a 20 75 6e | != 0) {|.../* un|
|00005300| 74 69 6c 20 65 6e 74 72 | 79 20 66 6f 75 6e 64 20 |til entr|y found |
|00005310| 6f 72 20 65 6e 64 20 6f | 66 20 65 6e 74 72 79 09 |or end o|f entry.|
|00005320| 2a 2f 0a 09 09 69 66 20 | 28 63 70 5b 30 5d 20 3d |*/...if |(cp[0] =|
|00005330| 3d 20 69 64 5b 30 5d 20 | 26 26 20 63 70 5b 31 5d |= id[0] |&& cp[1]|
|00005340| 20 3d 3d 20 69 64 5b 31 | 5d 29 20 7b 09 2f 2a 20 | == id[1|]) {./* |
|00005350| 66 6f 75 6e 64 20 65 6e | 74 72 79 21 21 21 09 09 |found en|try!!!..|
|00005360| 2a 2f 0a 09 09 09 69 66 | 20 28 63 70 5b 32 5d 20 |*/....if| (cp[2] |
|00005370| 21 3d 20 27 23 27 29 09 | 2f 2a 20 69 73 20 69 74 |!= '#').|/* is it|
|00005380| 20 61 20 6e 75 6d 65 72 | 69 63 20 76 61 6c 75 65 | a numer|ic value|
|00005390| 3f 3f 3f 09 09 2a 2f 0a | 09 09 09 09 72 65 74 75 |???..*/.|....retu|
|000053a0| 72 6e 20 28 2d 31 29 3b | 09 2f 2a 20 6e 6f 2c 20 |rn (-1);|./* no, |
|000053b0| 73 6f 6d 65 74 68 69 6e | 67 20 65 6c 73 65 09 09 |somethin|g else..|
|000053c0| 09 2a 2f 0a 0a 09 09 09 | 72 65 74 75 72 6e 20 28 |.*/.....|return (|
|000053d0| 61 74 6f 69 20 28 26 63 | 70 5b 33 5d 29 29 3b 09 |atoi (&c|p[3]));.|
|000053e0| 2f 2a 20 72 65 74 75 72 | 6e 20 76 61 6c 75 65 20 |/* retur|n value |
|000053f0| 28 6a 75 73 74 20 61 66 | 74 65 72 20 23 29 09 09 |(just af|ter #)..|
|00005400| 2a 2f 0a 09 09 7d 20 65 | 6c 73 65 20 7b 09 09 09 |*/...} e|lse {...|
|00005410| 2f 2a 20 6e 6f 74 20 65 | 6e 74 72 79 2c 20 73 6b |/* not e|ntry, sk|
|00005420| 69 70 20 74 68 69 73 20 | 65 6e 74 69 72 65 20 65 |ip this |entire e|
|00005430| 6e 74 72 79 09 2a 2f 0a | 09 09 09 77 68 69 6c 65 |ntry.*/.|...while|
|00005440| 20 28 2a 63 70 20 21 3d | 20 27 3a 27 20 26 26 20 | (*cp !=| ':' && |
|00005450| 2a 63 70 20 21 3d 20 30 | 29 0a 09 09 09 09 63 70 |*cp != 0|).....cp|
|00005460| 2b 2b 3b 09 09 2f 2a 20 | 73 65 61 72 63 68 20 66 |++;../* |search f|
|00005470| 6f 72 20 65 6e 64 20 6f | 66 20 63 75 72 72 65 6e |or end o|f curren|
|00005480| 74 20 65 6e 74 72 79 09 | 2a 2f 0a 0a 09 09 09 69 |t entry.|*/.....i|
|00005490| 66 20 28 2a 63 70 20 21 | 3d 20 30 29 0a 09 09 09 |f (*cp !|= 0)....|
|000054a0| 09 63 70 2b 2b 3b 09 09 | 2f 2a 20 73 6b 69 70 20 |.cp++;..|/* skip |
|000054b0| 74 65 72 6d 69 6e 61 74 | 69 6e 67 20 63 68 61 72 |terminat|ing char|
|000054c0| 61 63 74 65 72 09 09 2a | 2f 0a 09 09 7d 0a 09 7d |acter..*|/...}..}|
|000054d0| 0a 09 72 65 74 75 72 6e | 20 28 2d 31 29 3b 0a 7d |..return| (-1);.}|
|000054e0| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 0a 69 66 20 |.SHAR_EO|F.fi.if |
|000054f0| 74 65 73 74 20 2d 66 20 | 27 6d 64 69 61 6c 2e 63 |test -f |'mdial.c|
|00005500| 27 0a 74 68 65 6e 0a 09 | 65 63 68 6f 20 73 68 61 |'.then..|echo sha|
|00005510| 72 3a 20 22 77 69 6c 6c | 20 6e 6f 74 20 6f 76 65 |r: "will| not ove|
|00005520| 72 2d 77 72 69 74 65 20 | 65 78 69 73 74 69 6e 67 |r-write |existing|
|00005530| 20 66 69 6c 65 20 27 6d | 64 69 61 6c 2e 63 27 22 | file 'm|dial.c'"|
|00005540| 0a 65 6c 73 65 0a 63 61 | 74 20 3c 3c 20 5c 53 48 |.else.ca|t << \SH|
|00005550| 41 52 5f 45 4f 46 20 3e | 20 27 6d 64 69 61 6c 2e |AR_EOF >| 'mdial.|
|00005560| 63 27 0a 23 69 6e 63 6c | 75 64 65 20 22 6d 6f 64 |c'.#incl|ude "mod|
|00005570| 65 6d 63 61 70 2e 68 22 | 0a 23 69 6e 63 6c 75 64 |emcap.h"|.#includ|
|00005580| 65 20 3c 73 65 74 6a 6d | 70 2e 68 3e 0a 23 69 6e |e <setjm|p.h>.#in|
|00005590| 63 6c 75 64 65 20 3c 73 | 69 67 6e 61 6c 2e 68 3e |clude <s|ignal.h>|
|000055a0| 0a 23 69 6e 63 6c 75 64 | 65 20 3c 64 69 61 6c 2e |.#includ|e <dial.|
|000055b0| 68 3e 0a 0a 73 74 61 74 | 69 63 09 6a 6d 70 5f 62 |h>..stat|ic.jmp_b|
|000055c0| 75 66 09 65 6e 76 3b 09 | 09 2f 2a 20 6c 6f 6e 67 |uf.env;.|./* long|
|000055d0| 20 6a 75 6d 70 20 62 75 | 66 66 65 72 20 69 66 20 | jump bu|ffer if |
|000055e0| 74 69 6d 65 6f 75 74 20 | 69 6e 20 72 65 61 64 09 |timeout |in read.|
|000055f0| 2a 2f 0a 65 78 74 65 72 | 6e 09 69 6e 74 09 6d 65 |*/.exter|n.int.me|
|00005600| 72 72 6e 6f 3b 0a 0a 73 | 74 61 74 69 63 09 74 69 |rrno;..s|tatic.ti|
|00005610| 6d 65 6f 75 74 20 28 29 | 0a 7b 0a 09 6c 6f 6e 67 |meout ()|.{..long|
|00005620| 6a 6d 70 20 20 28 65 6e | 76 2c 20 31 29 3b 0a 7d |jmp (en|v, 1);.}|
|00005630| 0a 0a 6d 64 69 61 6c 20 | 28 74 65 6c 6e 6f 2c 20 |..mdial |(telno, |
|00005640| 66 64 29 0a 63 68 61 72 | 09 2a 74 65 6c 6e 6f 3b |fd).char|.*telno;|
|00005650| 0a 69 6e 74 09 66 64 3b | 0a 7b 0a 09 63 68 61 72 |.int.fd;|.{..char|
|00005660| 09 62 75 66 5b 36 34 5d | 3b 09 2f 2a 20 74 65 6c |.buf[64]|;./* tel|
|00005670| 65 70 68 6f 6e 65 20 62 | 75 66 66 65 72 20 69 66 |ephone b|uffer if|
|00005680| 20 41 53 20 69 73 20 66 | 61 6c 73 65 20 2a 2f 0a | AS is f|alse */.|
|00005690| 09 63 68 61 72 09 63 6f | 6d 6d 61 6e 64 5b 38 30 |.char.co|mmand[80|
|000056a0| 5d 3b 09 2f 2a 20 64 69 | 61 6c 20 63 6f 6d 6d 61 |];./* di|al comma|
|000056b0| 6e 64 20 62 75 66 66 65 | 72 20 2a 2f 0a 09 69 6e |nd buffe|r */..in|
|000056c0| 74 09 69 2c 20 6a 3b 09 | 09 2f 2a 20 69 6e 64 65 |t.i, j;.|./* inde|
|000056d0| 78 20 61 6e 64 20 6c 65 | 6e 67 74 68 20 6f 66 20 |x and le|ngth of |
|000056e0| 74 65 6c 65 70 68 6f 6e | 65 20 6e 75 6d 62 65 72 |telephon|e number|
|000056f0| 20 2a 2f 0a 09 63 68 61 | 72 09 63 3b 09 09 2f 2a | */..cha|r.c;../*|
|00005700| 20 73 69 6e 67 6c 65 20 | 63 68 61 72 61 63 74 65 | single |characte|
|00005710| 72 20 66 6f 72 20 63 6f | 6e 6e 65 63 74 69 6f 6e |r for co|nnection|
|00005720| 20 76 65 72 69 66 69 63 | 61 74 69 6f 6e 20 2a 2f | verific|ation */|
|00005730| 0a 0a 09 69 66 20 28 21 | 20 44 49 29 0a 09 09 72 |...if (!| DI)...r|
|00005740| 65 74 75 72 6e 20 28 6d | 65 72 72 6e 6f 20 3d 20 |eturn (m|errno = |
|00005750| 41 5f 50 52 4f 42 29 3b | 20 2f 2a 20 63 61 6e 27 |A_PROB);| /* can'|
|00005760| 74 20 64 69 61 6c 20 70 | 68 6f 6e 65 20 61 6e 79 |t dial p|hone any|
|00005770| 68 6f 77 20 2a 2f 0a 0a | 09 69 66 20 28 21 20 41 |how */..|.if (! A|
|00005780| 53 29 09 09 2f 2a 20 6e | 65 76 65 72 20 75 73 65 |S)../* n|ever use|
|00005790| 64 20 61 6e 79 20 6f 74 | 68 65 72 20 6b 69 6e 64 |d any ot|her kind|
|000057a0| 20 6f 66 20 6d 6f 64 65 | 6d 20 2a 2f 0a 09 09 72 | of mode|m */...r|
|000057b0| 65 74 75 72 6e 20 28 6d | 65 72 72 6e 6f 20 3d 20 |eturn (m|errno = |
|000057c0| 41 5f 50 52 4f 42 29 3b | 0a 09 65 6c 73 65 09 09 |A_PROB);|..else..|
|000057d0| 09 2f 2a 20 6e 6f 72 6d | 61 6c 20 61 73 63 69 69 |./* norm|al ascii|
|000057e0| 20 63 68 61 72 61 63 74 | 65 72 20 70 68 6f 6e 65 | charact|er phone|
|000057f0| 20 6e 75 6d 62 65 72 73 | 09 2a 2f 0a 09 09 73 74 | numbers|.*/...st|
|00005800| 72 63 70 79 20 28 62 75 | 66 2c 20 74 65 6c 6e 6f |rcpy (bu|f, telno|
|00005810| 29 3b 0a 0a 09 73 70 72 | 69 6e 74 66 20 28 63 6f |);...spr|intf (co|
|00005820| 6d 6d 61 6e 64 2c 20 22 | 25 73 25 73 25 73 25 73 |mmand, "|%s%s%s%s|
|00005830| 25 73 22 2c 20 43 53 2c | 20 44 53 2c 20 62 75 66 |%s", CS,| DS, buf|
|00005840| 2c 20 44 45 2c 20 43 45 | 29 3b 0a 09 69 66 20 28 |, DE, CE|);..if (|
|00005850| 73 65 74 6a 6d 70 20 28 | 65 6e 76 29 20 21 3d 20 |setjmp (|env) != |
|00005860| 30 29 20 7b 09 0a 09 09 | 73 69 67 6e 61 6c 20 28 |0) {....|signal (|
|00005870| 53 49 47 41 4c 52 4d 2c | 20 53 49 47 5f 44 46 4c |SIGALRM,| SIG_DFL|
|00005880| 29 3b 0a 09 09 72 65 74 | 75 72 6e 20 28 6d 65 72 |);...ret|urn (mer|
|00005890| 72 6e 6f 20 3d 20 44 5f | 48 55 4e 47 29 3b 0a 09 |rno = D_|HUNG);..|
|000058a0| 7d 0a 09 73 69 67 6e 61 | 6c 20 28 53 49 47 41 4c |}..signa|l (SIGAL|
|000058b0| 52 4d 2c 20 74 69 6d 65 | 6f 75 74 29 3b 0a 09 61 |RM, time|out);..a|
|000058c0| 6c 61 72 6d 20 28 31 30 | 29 3b 0a 09 77 72 69 74 |larm (10|);..writ|
|000058d0| 65 20 28 66 64 2c 20 63 | 6f 6d 6d 61 6e 64 2c 20 |e (fd, c|ommand, |
|000058e0| 73 74 72 6c 65 6e 20 28 | 63 6f 6d 6d 61 6e 64 29 |strlen (|command)|
|000058f0| 29 3b 0a 0a 09 69 66 20 | 28 43 4f 29 20 7b 09 2f |);...if |(CO) {./|
|00005900| 2a 20 76 65 72 69 66 79 | 20 63 6f 6e 6e 65 63 74 |* verify| connect|
|00005910| 69 6f 6e 20 2a 2f 0a 09 | 09 69 66 20 28 73 65 74 |ion */..|.if (set|
|00005920| 6a 6d 70 20 28 65 6e 76 | 29 20 21 3d 20 30 29 20 |jmp (env|) != 0) |
|00005930| 7b 09 0a 09 09 09 73 69 | 67 6e 61 6c 20 28 53 49 |{.....si|gnal (SI|
|00005940| 47 41 4c 52 4d 2c 20 53 | 49 47 5f 44 46 4c 29 3b |GALRM, S|IG_DFL);|
|00005950| 0a 09 09 09 72 65 74 75 | 72 6e 20 28 6d 65 72 72 |....retu|rn (merr|
|00005960| 6e 6f 20 3d 20 41 5f 50 | 52 4f 42 29 3b 0a 09 09 |no = A_P|ROB);...|
|00005970| 7d 0a 09 09 73 69 67 6e | 61 6c 20 28 53 49 47 41 |}...sign|al (SIGA|
|00005980| 4c 52 4d 2c 20 74 69 6d | 65 6f 75 74 29 3b 0a 09 |LRM, tim|eout);..|
|00005990| 09 69 66 20 28 54 54 29 | 0a 09 09 09 61 6c 61 72 |.if (TT)|....alar|
|000059a0| 6d 20 28 33 30 29 3b 0a | 09 09 65 6c 73 65 0a 09 |m (30);.|..else..|
|000059b0| 09 09 61 6c 61 72 6d 20 | 28 33 30 20 2b 20 73 74 |..alarm |(30 + st|
|000059c0| 72 6c 65 6e 20 28 74 65 | 6c 6e 6f 29 20 2f 20 32 |rlen (te|lno) / 2|
|000059d0| 29 3b 0a 0a 09 09 66 6f | 72 20 28 69 20 3d 20 30 |);....fo|r (i = 0|
|000059e0| 3b 43 4f 5b 69 5d 20 21 | 3d 20 30 3b 29 20 7b 0a |;CO[i] !|= 0;) {.|
|000059f0| 09 09 09 69 66 20 28 72 | 65 61 64 20 28 66 64 2c |...if (r|ead (fd,|
|00005a00| 20 26 63 2c 20 31 29 20 | 21 3d 20 31 29 0a 09 09 | &c, 1) |!= 1)...|
|00005a10| 09 09 63 6f 6e 74 69 6e | 75 65 3b 0a 09 09 09 0a |..contin|ue;.....|
|00005a20| 09 09 09 69 66 20 28 43 | 4f 5b 69 5d 20 3d 3d 20 |...if (C|O[i] == |
|00005a30| 63 29 0a 09 09 09 09 69 | 2b 2b 3b 0a 09 09 09 65 |c).....i|++;....e|
|00005a40| 6c 73 65 0a 09 09 09 09 | 69 20 3d 20 30 3b 0a 09 |lse.....|i = 0;..|
|00005a50| 09 7d 0a 09 09 72 65 74 | 75 72 6e 20 28 30 29 3b |.}...ret|urn (0);|
|00005a60| 0a 09 7d 0a 09 72 65 74 | 75 72 6e 20 28 30 29 3b |..}..ret|urn (0);|
|00005a70| 0a 7d 0a 53 48 41 52 5f | 45 4f 46 0a 66 69 0a 69 |.}.SHAR_|EOF.fi.i|
|00005a80| 66 20 74 65 73 74 20 2d | 66 20 27 6d 65 72 72 6f |f test -|f 'merro|
|00005a90| 72 2e 63 27 0a 74 68 65 | 6e 0a 09 65 63 68 6f 20 |r.c'.the|n..echo |
|00005aa0| 73 68 61 72 3a 20 22 77 | 69 6c 6c 20 6e 6f 74 20 |shar: "w|ill not |
|00005ab0| 6f 76 65 72 2d 77 72 69 | 74 65 20 65 78 69 73 74 |over-wri|te exist|
|00005ac0| 69 6e 67 20 66 69 6c 65 | 20 27 6d 65 72 72 6f 72 |ing file| 'merror|
|00005ad0| 2e 63 27 22 0a 65 6c 73 | 65 0a 63 61 74 20 3c 3c |.c'".els|e.cat <<|
|00005ae0| 20 5c 53 48 41 52 5f 45 | 4f 46 20 3e 20 27 6d 65 | \SHAR_E|OF > 'me|
|00005af0| 72 72 6f 72 2e 63 27 0a | 23 69 6e 63 6c 75 64 65 |rror.c'.|#include|
|00005b00| 20 3c 73 74 64 69 6f 2e | 68 3e 0a 0a 69 6e 74 09 | <stdio.|h>..int.|
|00005b10| 6d 65 72 72 6e 6f 3b 0a | 0a 63 68 61 72 09 2a 5f |merrno;.|.char.*_|
|00005b20| 6d 65 72 72 5f 6c 69 73 | 74 5b 5d 20 3d 20 7b 0a |merr_lis|t[] = {.|
|00005b30| 09 22 4e 6f 20 65 72 72 | 6f 72 22 2c 0a 09 22 49 |."No err|or",.."I|
|00005b40| 6e 74 65 72 72 75 70 74 | 20 6f 63 63 75 72 72 65 |nterrupt| occurre|
|00005b50| 64 22 2c 0a 09 22 44 69 | 61 6c 65 72 20 48 75 6e |d",.."Di|aler Hun|
|00005b60| 67 22 2c 0a 09 22 4e 6f | 20 61 6e 73 77 65 72 22 |g",.."No| answer"|
|00005b70| 2c 0a 09 22 49 6c 6c 65 | 67 61 6c 20 62 61 75 64 |,.."Ille|gal baud|
|00005b80| 20 72 61 74 65 22 2c 0a | 09 22 41 43 55 20 50 72 | rate",.|."ACU Pr|
|00005b90| 6f 62 6c 65 6d 22 2c 0a | 09 22 4c 69 6e 65 20 50 |oblem",.|."Line P|
|00005ba0| 72 6f 62 6c 65 6d 22 2c | 0a 09 22 43 61 6e 27 74 |roblem",|.."Can't|
|00005bb0| 20 6f 70 65 6e 20 4c 44 | 45 56 53 20 66 69 6c 65 | open LD|EVS file|
|00005bc0| 22 2c 0a 09 22 52 65 71 | 75 65 73 74 65 64 20 64 |",.."Req|uested d|
|00005bd0| 65 76 69 63 65 20 6e 6f | 74 20 61 76 61 69 6c 61 |evice no|t availa|
|00005be0| 62 6c 65 22 2c 0a 09 22 | 52 65 71 75 65 73 74 65 |ble",.."|Requeste|
|00005bf0| 64 20 64 65 76 69 63 65 | 20 6e 6f 74 20 6b 6e 6f |d device| not kno|
|00005c00| 77 6e 22 2c 0a 09 22 4e | 6f 20 64 65 76 69 63 65 |wn",.."N|o device|
|00005c10| 20 61 76 61 69 6c 61 62 | 6c 65 20 61 74 20 72 65 | availab|le at re|
|00005c20| 71 75 65 73 74 65 64 20 | 62 61 75 64 22 2c 0a 09 |quested |baud",..|
|00005c30| 22 4e 6f 20 64 65 76 69 | 63 65 20 6b 6e 6f 77 6e |"No devi|ce known|
|00005c40| 20 61 74 20 72 65 71 75 | 65 73 74 65 64 20 62 61 | at requ|ested ba|
|00005c50| 75 64 22 0a 7d 3b 0a 0a | 69 6e 74 09 5f 6d 73 79 |ud".};..|int._msy|
|00005c60| 73 5f 6e 65 72 72 20 3d | 20 28 73 69 7a 65 6f 66 |s_nerr =| (sizeof|
|00005c70| 20 28 5f 6d 65 72 72 5f | 6c 69 73 74 29 20 2f 20 | (_merr_|list) / |
|00005c80| 73 69 7a 65 6f 66 20 28 | 63 68 61 72 20 2a 29 29 |sizeof (|char *))|
|00005c90| 3b 0a 0a 6d 65 72 72 6f | 72 20 28 73 29 0a 63 68 |;..merro|r (s).ch|
|00005ca0| 61 72 09 2a 73 3b 0a 7b | 0a 09 69 6e 74 09 69 20 |ar.*s;.{|..int.i |
|00005cb0| 3d 20 2d 20 6d 65 72 72 | 6e 6f 3b 0a 0a 09 69 66 |= - merr|no;...if|
|00005cc0| 20 28 30 20 3c 3d 20 69 | 20 26 26 20 69 20 3c 20 | (0 <= i| && i < |
|00005cd0| 5f 6d 73 79 73 5f 6e 65 | 72 72 29 0a 09 09 66 70 |_msys_ne|rr)...fp|
|00005ce0| 72 69 6e 74 66 20 28 73 | 74 64 65 72 72 2c 20 22 |rintf (s|tderr, "|
|00005cf0| 25 73 3a 20 25 73 5c 6e | 22 2c 20 73 2c 20 5f 6d |%s: %s\n|", s, _m|
|00005d00| 65 72 72 5f 6c 69 73 74 | 5b 69 5d 29 3b 0a 09 65 |err_list|[i]);..e|
|00005d10| 6c 73 65 0a 09 09 66 70 | 72 69 6e 74 66 20 28 73 |lse...fp|rintf (s|
|00005d20| 74 64 65 72 72 2c 20 22 | 25 73 3a 20 45 72 72 6f |tderr, "|%s: Erro|
|00005d30| 72 20 25 64 5c 6e 22 2c | 20 73 2c 20 6d 65 72 72 |r %d\n",| s, merr|
|00005d40| 6e 6f 29 3b 0a 7d 0a 53 | 48 41 52 5f 45 4f 46 0a |no);.}.S|HAR_EOF.|
|00005d50| 66 69 0a 69 66 20 74 65 | 73 74 20 2d 66 20 27 69 |fi.if te|st -f 'i|
|00005d60| 6e 69 74 6d 6f 64 65 6d | 2e 63 27 0a 74 68 65 6e |nitmodem|.c'.then|
|00005d70| 0a 09 65 63 68 6f 20 73 | 68 61 72 3a 20 22 77 69 |..echo s|har: "wi|
|00005d80| 6c 6c 20 6e 6f 74 20 6f | 76 65 72 2d 77 72 69 74 |ll not o|ver-writ|
|00005d90| 65 20 65 78 69 73 74 69 | 6e 67 20 66 69 6c 65 20 |e existi|ng file |
|00005da0| 27 69 6e 69 74 6d 6f 64 | 65 6d 2e 63 27 22 0a 65 |'initmod|em.c'".e|
|00005db0| 6c 73 65 0a 63 61 74 20 | 3c 3c 20 5c 53 48 41 52 |lse.cat |<< \SHAR|
|00005dc0| 5f 45 4f 46 20 3e 20 27 | 69 6e 69 74 6d 6f 64 65 |_EOF > '|initmode|
|00005dd0| 6d 2e 63 27 0a 23 69 6e | 63 6c 75 64 65 20 22 6d |m.c'.#in|clude "m|
|00005de0| 6f 64 65 6d 63 61 70 2e | 68 22 0a 0a 73 74 61 74 |odemcap.|h"..stat|
|00005df0| 69 63 09 63 68 61 72 09 | 66 5f 6e 61 6d 65 73 5b |ic.char.|f_names[|
|00005e00| 5d 20 3d 20 22 61 73 64 | 69 74 74 68 63 22 3b 0a |] = "asd|itthc";.|
|00005e10| 73 74 61 74 69 63 09 63 | 68 61 72 09 2a 66 5f 63 |static.c|har.*f_c|
|00005e20| 61 70 73 5b 5d 20 3d 20 | 7b 0a 09 26 41 53 2c 20 |aps[] = |{..&AS, |
|00005e30| 26 44 49 2c 20 26 54 54 | 2c 20 26 48 43 0a 7d 3b |&DI, &TT|, &HC.};|
|00005e40| 0a 0a 73 74 61 74 69 63 | 09 63 68 61 72 09 69 5f |..static|.char.i_|
|00005e50| 6e 61 6d 65 73 5b 5d 20 | 3d 20 22 62 64 62 6c 69 |names[] |= "bdbli|
|00005e60| 64 61 64 22 3b 0a 73 74 | 61 74 69 63 09 69 6e 74 |dad";.st|atic.int|
|00005e70| 09 2a 69 5f 63 61 70 73 | 5b 5d 20 3d 20 7b 0a 09 |.*i_caps|[] = {..|
|00005e80| 26 42 44 2c 20 26 42 4c | 2c 20 26 49 44 2c 20 26 |&BD, &BL|, &ID, &|
|00005e90| 41 44 0a 7d 3b 0a 0a 73 | 74 61 74 69 63 09 63 68 |AD.};..s|tatic.ch|
|00005ea0| 61 72 09 63 5f 6e 61 6d | 65 73 5b 5d 20 3d 20 22 |ar.c_nam|es[] = "|
|00005eb0| 63 73 63 65 64 73 64 65 | 69 73 63 6f 63 6c 61 74 |cscedsde|iscoclat|
|00005ec0| 68 75 22 3b 0a 73 74 61 | 74 69 63 09 63 68 61 72 |hu";.sta|tic.char|
|00005ed0| 09 2a 2a 63 5f 63 61 70 | 73 5b 5d 20 3d 20 7b 0a |.**c_cap|s[] = {.|
|00005ee0| 09 26 43 53 2c 20 26 43 | 45 2c 20 26 44 53 2c 20 |.&CS, &C|E, &DS, |
|00005ef0| 26 44 45 2c 20 26 49 53 | 2c 20 26 43 4f 2c 20 26 |&DE, &IS|, &CO, &|
|00005f00| 43 4c 2c 20 26 41 54 2c | 20 26 48 55 0a 7d 3b 0a |CL, &AT,| &HU.};.|
|00005f10| 0a 69 6e 69 74 6d 6f 64 | 65 6d 20 28 6d 6f 64 65 |.initmod|em (mode|
|00005f20| 6d 2c 20 66 64 29 0a 63 | 68 61 72 09 2a 6d 6f 64 |m, fd).c|har.*mod|
|00005f30| 65 6d 3b 09 09 09 09 09 | 2f 2a 20 6e 61 6d 65 20 |em;.....|/* name |
|00005f40| 6f 66 20 6d 6f 64 65 6d | 09 09 2a 2f 0a 69 6e 74 |of modem|..*/.int|
|00005f50| 09 66 64 3b 09 09 09 09 | 09 2f 2a 20 63 68 61 6e |.fd;....|./* chan|
|00005f60| 6e 65 6c 20 74 6f 20 6d | 6f 64 65 6d 09 09 2a 2f |nel to m|odem..*/|
|00005f70| 0a 7b 0a 09 73 74 61 74 | 69 63 09 63 68 61 72 09 |.{..stat|ic.char.|
|00005f80| 6d 63 61 70 62 75 66 5b | 31 30 32 34 5d 3b 0a 09 |mcapbuf[|1024];..|
|00005f90| 73 74 61 74 69 63 09 63 | 68 61 72 09 61 72 65 61 |static.c|har.area|
|00005fa0| 5b 31 30 32 34 5d 3b 0a | 09 63 68 61 72 09 2a 61 |[1024];.|.char.*a|
|00005fb0| 70 20 3d 20 61 72 65 61 | 3b 0a 09 72 65 67 69 73 |p = area|;..regis|
|00005fc0| 74 65 72 20 63 68 61 72 | 09 2a 63 70 3b 0a 09 72 |ter char|.*cp;..r|
|00005fd0| 65 67 69 73 74 65 72 20 | 69 6e 74 09 69 2c 20 6a |egister |int.i, j|
|00005fe0| 3b 0a 09 72 65 67 69 73 | 74 65 72 20 63 68 61 72 |;..regis|ter char|
|00005ff0| 09 2a 73 3b 0a 09 63 68 | 61 72 09 2a 6d 67 65 74 |.*s;..ch|ar.*mget|
|00006000| 73 74 72 20 28 29 3b 0a | 0a 09 69 66 20 28 6d 67 |str ();.|..if (mg|
|00006010| 65 74 65 6e 74 20 28 6d | 63 61 70 62 75 66 2c 20 |etent (m|capbuf, |
|00006020| 6d 6f 64 65 6d 29 20 21 | 3d 20 31 29 0a 09 09 72 |modem) !|= 1)...r|
|00006030| 65 74 75 72 6e 20 28 30 | 29 3b 0a 0a 09 66 6f 72 |eturn (0|);...for|
|00006040| 20 28 69 20 3d 20 30 2c | 20 63 70 20 3d 20 66 5f | (i = 0,| cp = f_|
|00006050| 6e 61 6d 65 73 3b 2a 63 | 70 3b 69 2b 2b 2c 20 63 |names;*c|p;i++, c|
|00006060| 70 20 2b 3d 20 32 29 0a | 09 09 2a 28 66 5f 63 61 |p += 2).|..*(f_ca|
|00006070| 70 73 5b 69 5d 29 20 3d | 20 6d 67 65 74 66 6c 61 |ps[i]) =| mgetfla|
|00006080| 67 20 28 63 70 29 3b 0a | 0a 09 66 6f 72 20 28 69 |g (cp);.|..for (i|
|00006090| 20 3d 20 30 2c 20 63 70 | 20 3d 20 69 5f 6e 61 6d | = 0, cp| = i_nam|
|000060a0| 65 73 3b 2a 63 70 3b 69 | 2b 2b 2c 20 63 70 20 2b |es;*cp;i|++, cp +|
|000060b0| 3d 20 32 29 20 7b 0a 09 | 09 6a 20 3d 20 6d 67 65 |= 2) {..|.j = mge|
|000060c0| 74 6e 75 6d 20 28 63 70 | 29 3b 0a 09 09 69 66 20 |tnum (cp|);...if |
|000060d0| 28 6a 20 3e 3d 20 30 29 | 0a 09 09 09 2a 28 69 5f |(j >= 0)|....*(i_|
|000060e0| 63 61 70 73 5b 69 5d 29 | 20 3d 20 6a 3b 0a 09 09 |caps[i])| = j;...|
|000060f0| 65 6c 73 65 0a 09 09 09 | 2a 28 69 5f 63 61 70 73 |else....|*(i_caps|
|00006100| 5b 69 5d 29 20 3d 20 30 | 3b 0a 09 7d 0a 09 66 6f |[i]) = 0|;..}..fo|
|00006110| 72 20 28 69 20 3d 20 30 | 2c 20 63 70 20 3d 20 63 |r (i = 0|, cp = c|
|00006120| 5f 6e 61 6d 65 73 3b 2a | 63 70 3b 69 2b 2b 2c 20 |_names;*|cp;i++, |
|00006130| 63 70 20 2b 3d 20 32 29 | 0a 09 09 2a 28 63 5f 63 |cp += 2)|...*(c_c|
|00006140| 61 70 73 5b 69 5d 29 20 | 3d 20 6d 67 65 74 73 74 |aps[i]) |= mgetst|
|00006150| 72 20 28 63 70 2c 20 26 | 61 70 29 3b 0a 0a 09 69 |r (cp, &|ap);...i|
|00006160| 66 20 28 49 53 20 21 3d | 20 28 63 68 61 72 20 2a |f (IS !=| (char *|
|00006170| 29 20 30 29 20 7b 0a 09 | 09 77 72 69 74 65 20 28 |) 0) {..|.write (|
|00006180| 66 64 2c 20 49 53 2c 20 | 73 74 72 6c 65 6e 20 28 |fd, IS, |strlen (|
|00006190| 49 53 29 29 3b 0a 09 09 | 69 66 20 28 49 44 29 0a |IS));...|if (ID).|
|000061a0| 09 09 09 73 6c 65 65 70 | 20 28 49 44 29 3b 0a 09 |...sleep| (ID);..|
|000061b0| 7d 0a 09 72 65 74 75 72 | 6e 20 28 31 29 3b 0a 7d |}..retur|n (1);.}|
|000061c0| 0a 53 48 41 52 5f 45 4f | 46 0a 66 69 0a 69 66 20 |.SHAR_EO|F.fi.if |
|000061d0| 74 65 73 74 20 2d 66 20 | 27 68 61 6e 67 75 70 2e |test -f |'hangup.|
|000061e0| 63 27 0a 74 68 65 6e 0a | 09 65 63 68 6f 20 73 68 |c'.then.|.echo sh|
|000061f0| 61 72 3a 20 22 77 69 6c | 6c 20 6e 6f 74 20 6f 76 |ar: "wil|l not ov|
|00006200| 65 72 2d 77 72 69 74 65 | 20 65 78 69 73 74 69 6e |er-write| existin|
|00006210| 67 20 66 69 6c 65 20 27 | 68 61 6e 67 75 70 2e 63 |g file '|hangup.c|
|00006220| 27 22 0a 65 6c 73 65 0a | 63 61 74 20 3c 3c 20 5c |'".else.|cat << \|
|00006230| 53 48 41 52 5f 45 4f 46 | 20 3e 20 27 68 61 6e 67 |SHAR_EOF| > 'hang|
|00006240| 75 70 2e 63 27 0a 23 69 | 6e 63 6c 75 64 65 20 22 |up.c'.#i|nclude "|
|00006250| 6d 6f 64 65 6d 63 61 70 | 2e 68 22 0a 23 69 66 64 |modemcap|.h".#ifd|
|00006260| 65 66 09 55 4e 49 58 5f | 53 35 0a 23 69 6e 63 6c |ef.UNIX_|S5.#incl|
|00006270| 75 64 65 20 3c 74 65 72 | 6d 69 6f 2e 68 3e 0a 23 |ude <ter|mio.h>.#|
|00006280| 65 6e 64 69 66 0a 23 69 | 66 64 65 66 09 55 4e 49 |endif.#i|fdef.UNI|
|00006290| 58 5f 56 37 0a 23 69 6e | 63 6c 75 64 65 20 3c 73 |X_V7.#in|clude <s|
|000062a0| 67 74 74 79 2e 68 3e 0a | 23 65 6e 64 69 66 0a 0a |gtty.h>.|#endif..|
|000062b0| 65 78 74 65 72 6e 09 69 | 6e 74 09 6d 65 72 72 6e |extern.i|nt.merrn|
|000062c0| 6f 3b 0a 0a 68 61 6e 67 | 75 70 20 28 66 64 29 0a |o;..hang|up (fd).|
|000062d0| 69 6e 74 09 66 64 3b 0a | 7b 0a 23 69 66 64 65 66 |int.fd;.|{.#ifdef|
|000062e0| 09 55 4e 49 58 5f 53 35 | 0a 09 73 74 72 75 63 74 |.UNIX_S5|..struct|
|000062f0| 09 74 65 72 6d 69 6f 09 | 74 65 72 6d 69 6f 3b 0a |.termio.|termio;.|
|00006300| 09 73 74 72 75 63 74 09 | 74 65 72 6d 69 6f 09 68 |.struct.|termio.h|
|00006310| 75 70 63 6c 3b 0a 23 65 | 6e 64 69 66 0a 23 69 66 |upcl;.#e|ndif.#if|
|00006320| 64 65 66 09 55 4e 49 58 | 5f 56 37 0a 09 73 74 72 |def.UNIX|_V7..str|
|00006330| 75 63 74 09 73 67 74 74 | 79 62 09 74 65 72 6d 69 |uct.sgtt|yb.termi|
|00006340| 6f 3b 0a 09 73 74 72 75 | 63 74 09 73 67 74 74 79 |o;..stru|ct.sgtty|
|00006350| 62 09 68 75 70 63 6c 3b | 0a 23 65 6e 64 69 66 0a |b.hupcl;|.#endif.|
|00006360| 09 69 66 20 28 48 55 20 | 3d 3d 20 28 63 68 61 72 |.if (HU |== (char|
|00006370| 20 2a 29 20 30 20 26 26 | 20 48 43 20 3d 3d 20 30 | *) 0 &&| HC == 0|
|00006380| 29 20 7b 0a 09 09 75 6e | 64 69 61 6c 20 28 66 64 |) {...un|dial (fd|
|00006390| 29 3b 0a 09 09 72 65 74 | 75 72 6e 20 28 30 29 3b |);...ret|urn (0);|
|000063a0| 0a 09 7d 0a 09 69 66 20 | 28 41 54 20 21 3d 20 28 |..}..if |(AT != (|
|000063b0| 63 68 61 72 20 2a 29 20 | 30 29 20 7b 0a 09 09 77 |char *) |0) {...w|
|000063c0| 72 69 74 65 20 28 66 64 | 2c 20 41 54 2c 20 73 74 |rite (fd|, AT, st|
|000063d0| 72 6c 65 6e 20 28 41 54 | 29 29 3b 0a 09 09 69 66 |rlen (AT|));...if|
|000063e0| 20 28 41 44 29 0a 09 09 | 09 73 6c 65 65 70 20 28 | (AD)...|.sleep (|
|000063f0| 41 44 29 3b 0a 09 7d 0a | 09 69 66 20 28 48 55 29 |AD);..}.|.if (HU)|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.