home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-2.iso / Files II / Prog / M / Mini.sit / mini / dialer.c < prev    next >
MacBinary  |  1987-09-16  |  10.8 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: dialer.c

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Wed Sep 16 18:33:38 1987, modified Wed Sep 16 18:33:38 1987, creator 'MPS ', type ASCII, 10490 bytes "dialer.c" , at 0x297a 382 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 64 69 61 6c 65 72 | 2e 63 00 00 00 00 00 00 |..dialer|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 00 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 28 fa 00 | 00 01 7e 9d 74 c2 42 9d |.....(..|..~.t.B.|
|00000060| 74 c2 42 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |t.B.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 68 cf 00 00 |........|....h...|
|00000080| 2f 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |/*******|********|
|00000090| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000a0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000b0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000000c0| 2a 2a 2a 2a 2a 2a 2a 2a | 0d 2a 0d 2a 09 41 20 6d |********|.*.*.A m|
|000000d0| 6f 64 75 6c 65 20 66 6f | 72 20 6d 61 69 6e 74 61 |odule fo|r mainta|
|000000e0| 69 6e 69 6e 67 20 61 20 | 70 68 6f 6e 65 20 62 6f |ining a |phone bo|
|000000f0| 6f 6b 0d 2a 0d 2a 09 4a | 65 72 72 79 20 4c 65 56 |ok.*.*.J|erry LeV|
|00000100| 61 6e 0d 2a 09 33 32 35 | 20 42 6f 6f 6e 65 20 54 |an.*.325| Boone T|
|00000110| 72 61 69 6c 0d 2a 09 52 | 69 63 68 6d 6f 6e 64 20 |rail.*.R|ichmond |
|00000120| 4b 79 20 34 30 34 37 35 | 0d 2a 0d 2a 09 4e 65 77 |Ky 40475|.*.*.New|
|00000130| 20 46 69 6c 65 3a 20 53 | 65 70 74 20 31 34 2c 31 | File: S|ept 14,1|
|00000140| 39 38 37 0d 2a 0d 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |987.*.**|********|
|00000150| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000160| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000170| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000180| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2f 0d 0d 23 |********|****/..#|
|00000190| 20 69 6e 63 6c 75 64 65 | 20 3c 74 79 70 65 73 2e | include| <types.|
|000001a0| 68 3e 20 09 09 09 09 2f | 2a 20 4e 65 61 72 6c 79 |h> ..../|* Nearly|
|000001b0| 20 61 6c 77 61 79 73 20 | 72 65 71 75 69 72 65 64 | always |required|
|000001c0| 20 2a 2f 0d 23 20 69 6e | 63 6c 75 64 65 20 3c 71 | */.# in|clude <q|
|000001d0| 75 69 63 6b 64 72 61 77 | 2e 68 3e 20 09 09 09 2f |uickdraw|.h> .../|
|000001e0| 2a 20 54 6f 20 61 63 63 | 65 73 73 20 74 68 65 20 |* To acc|ess the |
|000001f0| 71 64 20 67 6c 6f 62 61 | 6c 73 20 2a 2f 0d 23 20 |qd globa|ls */.# |
|00000200| 69 6e 63 6c 75 64 65 20 | 3c 66 6f 6e 74 73 2e 68 |include |<fonts.h|
|00000210| 3e 20 09 09 09 09 2f 2a | 20 4f 6e 6c 79 20 66 6f |> ..../*| Only fo|
|00000220| 72 20 49 6e 69 74 46 6f | 6e 74 73 28 29 20 74 72 |r InitFo|nts() tr|
|00000230| 61 70 20 2a 2f 0d 23 20 | 69 6e 63 6c 75 64 65 20 |ap */.# |include |
|00000240| 3c 4c 69 73 74 73 2e 68 | 3e 0d 23 20 69 6e 63 6c |<Lists.h|>.# incl|
|00000250| 75 64 65 20 3c 54 65 78 | 74 65 64 69 74 2e 68 3e |ude <Tex|tedit.h>|
|00000260| 0d 23 20 69 6e 63 6c 75 | 64 65 20 3c 57 69 6e 64 |.# inclu|de <Wind|
|00000270| 6f 77 73 2e 68 3e 0d 23 | 20 69 6e 63 6c 75 64 65 |ows.h>.#| include|
|00000280| 20 3c 45 76 65 6e 74 73 | 2e 68 3e 0d 23 20 69 6e | <Events|.h>.# in|
|00000290| 63 6c 75 64 65 20 3c 4d | 65 6e 75 73 2e 68 3e 0d |clude <M|enus.h>.|
|000002a0| 23 20 69 6e 63 6c 75 64 | 65 20 3c 44 69 61 6c 6f |# includ|e <Dialo|
|000002b0| 67 73 2e 68 3e 0d 23 20 | 69 6e 63 6c 75 64 65 20 |gs.h>.# |include |
|000002c0| 3c 73 65 67 6c 6f 61 64 | 2e 68 3e 09 09 09 09 2f |<segload|.h>..../|
|000002d0| 2a 20 55 6e 6c 6f 61 64 | 53 65 67 28 29 20 2a 2f |* Unload|Seg() */|
|000002e0| 0d 23 20 69 6e 63 6c 75 | 64 65 20 3c 72 65 73 6f |.# inclu|de <reso|
|000002f0| 75 72 63 65 73 2e 68 3e | 0d 23 20 69 6e 63 6c 75 |urces.h>|.# inclu|
|00000300| 64 65 20 3c 4f 53 55 74 | 69 6c 73 2e 68 3e 0d 0d |de <OSUt|ils.h>..|
|00000310| 2f 2a 20 44 65 66 69 6e | 65 20 49 74 65 6d 20 6e |/* Defin|e Item n|
|00000320| 75 6d 62 65 72 73 20 61 | 6e 64 20 64 69 61 6c 6f |umbers a|nd dialo|
|00000330| 67 20 69 64 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |g id */.|#define |
|00000340| 4d 59 44 49 41 4c 4f 47 | 20 32 30 30 0d 0d 23 64 |MYDIALOG| 200..#d|
|00000350| 65 66 69 6e 65 20 4e 41 | 4d 45 20 37 0d 23 64 65 |efine NA|ME 7.#de|
|00000360| 66 69 6e 65 20 4e 55 4d | 42 45 52 20 38 0d 23 64 |fine NUM|BER 8.#d|
|00000370| 65 66 69 6e 65 20 55 53 | 45 52 20 39 0d 23 64 65 |efine US|ER 9.#de|
|00000380| 66 69 6e 65 20 43 41 4e | 43 45 4c 20 32 0d 23 64 |fine CAN|CEL 2.#d|
|00000390| 65 66 69 6e 65 20 44 49 | 41 4c 20 31 0d 23 64 65 |efine DI|AL 1.#de|
|000003a0| 66 69 6e 65 20 41 44 44 | 20 33 0d 23 64 65 66 69 |fine ADD| 3.#defi|
|000003b0| 6e 65 20 44 45 4c 45 54 | 45 20 34 0d 23 64 65 66 |ne DELET|E 4.#def|
|000003c0| 69 6e 65 20 43 4e 55 4d | 42 45 52 20 31 31 0d 0d |ine CNUM|BER 11..|
|000003d0| 2f 2a 20 6b 65 79 20 63 | 6f 64 65 73 20 2a 2f 0d |/* key c|odes */.|
|000003e0| 23 64 65 66 69 6e 65 20 | 43 52 20 31 33 0d 23 64 |#define |CR 13.#d|
|000003f0| 65 66 69 6e 65 20 45 4e | 54 45 52 20 33 0d 0d 2f |efine EN|TER 3../|
|00000400| 2a 20 6d 61 78 20 63 68 | 61 72 61 63 74 65 72 73 |* max ch|aracters|
|00000410| 20 69 6e 20 62 75 66 66 | 65 72 73 20 2a 2f 0d 23 | in buff|ers */.#|
|00000420| 64 65 66 69 6e 65 20 4d | 41 58 43 48 41 52 53 20 |define M|AXCHARS |
|00000430| 38 30 0d 0d 0d 23 64 65 | 66 69 6e 65 20 5f 5f 53 |80...#de|fine __S|
|00000440| 45 47 5f 5f 20 44 69 61 | 6c 65 72 0d 2f 2a 2a 2a |EG__ Dia|ler./***|
|00000450| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000460| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000470| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000480| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000490| 2a 2a 2a 2f 0d 73 74 61 | 74 69 63 20 4c 69 73 74 |***/.sta|tic List|
|000004a0| 48 61 6e 64 6c 65 20 49 | 6e 69 74 4c 69 73 74 28 |Handle I|nitList(|
|000004b0| 74 68 65 57 69 6e 64 6f | 77 29 0d 20 44 69 61 6c |theWindo|w). Dial|
|000004c0| 6f 67 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |ogPtr th|eWindow;|
|000004d0| 0d 7b 20 43 65 6c 6c 20 | 74 68 65 43 65 6c 6c 3b |.{ Cell |theCell;|
|000004e0| 0d 20 20 73 68 6f 72 74 | 20 69 3b 0d 20 20 73 68 |. short| i;. sh|
|000004f0| 6f 72 74 20 74 6d 70 3b | 0d 20 20 63 68 61 72 20 |ort tmp;|. char |
|00000500| 6e 61 6d 65 5b 4d 41 58 | 43 48 41 52 53 5d 2c 2a |name[MAX|CHARS],*|
|00000510| 70 3b 0d 20 20 73 68 6f | 72 74 20 72 65 73 63 6e |p;. sho|rt rescn|
|00000520| 74 2c 69 64 2c 77 68 69 | 63 68 52 6f 77 3b 0d 20 |t,id,whi|chRow;. |
|00000530| 20 46 6f 6e 74 49 6e 66 | 6f 20 66 69 6e 66 6f 3b | FontInf|o finfo;|
|00000540| 0d 20 20 48 61 6e 64 6c | 65 20 61 48 61 6e 64 6c |. Handl|e aHandl|
|00000550| 65 3b 0d 20 20 52 65 73 | 54 79 70 65 20 61 54 79 |e;. Res|Type aTy|
|00000560| 70 65 3b 0d 20 20 52 65 | 63 74 20 62 6f 78 2c 6c |pe;. Re|ct box,l|
|00000570| 69 73 74 52 65 63 74 2c | 74 68 65 52 65 63 74 3b |istRect,|theRect;|
|00000580| 0d 20 20 4c 69 73 74 48 | 61 6e 64 6c 65 20 74 68 |. ListH|andle th|
|00000590| 65 4c 69 73 74 3b 0d 20 | 20 0d 20 20 2f 2a 20 67 |eList;. | . /* g|
|000005a0| 65 74 20 74 68 65 20 75 | 73 65 72 20 69 74 65 6d |et the u|ser item|
|000005b0| 20 62 6f 78 20 2a 2f 0d | 20 20 20 47 65 74 44 49 | box */.| GetDI|
|000005c0| 74 65 6d 28 74 68 65 57 | 69 6e 64 6f 77 2c 55 53 |tem(theW|indow,US|
|000005d0| 45 52 2c 26 61 54 79 70 | 65 2c 26 61 48 61 6e 64 |ER,&aTyp|e,&aHand|
|000005e0| 6c 65 2c 26 62 6f 78 29 | 3b 0d 20 20 20 0d 20 20 |le,&box)|;. . |
|000005f0| 2f 2a 20 73 65 74 20 74 | 68 65 20 76 69 65 77 20 |/* set t|he view |
|00000600| 72 65 63 74 61 6e 67 6c | 65 20 73 6f 20 74 68 61 |rectangl|e so tha|
|00000610| 74 20 77 65 20 68 61 76 | 65 20 61 20 73 6e 75 67 |t we hav|e a snug|
|00000620| 20 66 69 74 20 2a 2f 0d | 20 20 47 65 74 46 6f 6e | fit */.| GetFon|
|00000630| 74 49 6e 66 6f 28 26 66 | 69 6e 66 6f 29 3b 0d 20 |tInfo(&f|info);. |
|00000640| 20 74 6d 70 20 3d 20 66 | 69 6e 66 6f 2e 61 73 63 | tmp = f|info.asc|
|00000650| 65 6e 74 2b 66 69 6e 66 | 6f 2e 64 65 73 63 65 6e |ent+finf|o.descen|
|00000660| 74 2b 66 69 6e 66 6f 2e | 6c 65 61 64 69 6e 67 3b |t+finfo.|leading;|
|00000670| 0d 20 20 74 68 65 52 65 | 63 74 2e 74 6f 70 20 3d |. theRe|ct.top =|
|00000680| 20 62 6f 78 2e 74 6f 70 | 3b 0d 20 20 74 68 65 52 | box.top|;. theR|
|00000690| 65 63 74 2e 6c 65 66 74 | 20 3d 20 62 6f 78 2e 6c |ect.left| = box.l|
|000006a0| 65 66 74 3b 0d 20 20 74 | 68 65 52 65 63 74 2e 62 |eft;. t|heRect.b|
|000006b0| 6f 74 74 6f 6d 20 3d 20 | 62 6f 78 2e 74 6f 70 20 |ottom = |box.top |
|000006c0| 2b 20 28 28 62 6f 78 2e | 62 6f 74 74 6f 6d 2d 62 |+ ((box.|bottom-b|
|000006d0| 6f 78 2e 74 6f 70 29 2f | 74 6d 70 29 2a 74 6d 70 |ox.top)/|tmp)*tmp|
|000006e0| 3b 20 0d 20 20 74 68 65 | 52 65 63 74 2e 72 69 67 |; . the|Rect.rig|
|000006f0| 68 74 20 3d 20 62 6f 78 | 2e 72 69 67 68 74 2d 32 |ht = box|.right-2|
|00000700| 30 3b 20 2f 2a 20 32 30 | 20 69 73 20 72 6f 6f 6d |0; /* 20| is room|
|00000710| 20 66 6f 72 20 73 63 72 | 6f 6c 6c 20 62 61 72 20 | for scr|oll bar |
|00000720| 2a 2f 0d 20 20 0d 20 20 | 2f 2a 20 73 65 74 20 63 |*/. . |/* set c|
|00000730| 65 6c 6c 20 73 69 7a 65 | 20 2a 2f 0d 20 20 74 68 |ell size| */. th|
|00000740| 65 43 65 6c 6c 2e 76 3d | 30 3b 09 09 09 09 2f 2a |eCell.v=|0;..../*|
|00000750| 20 74 61 6b 65 20 64 65 | 66 61 75 6c 74 20 68 65 | take de|fault he|
|00000760| 69 67 68 74 20 2a 2f 0d | 20 20 74 68 65 43 65 6c |ight */.| theCel|
|00000770| 6c 2e 68 3d 74 68 65 52 | 65 63 74 2e 72 69 67 68 |l.h=theR|ect.righ|
|00000780| 74 2d 74 68 65 52 65 63 | 74 2e 6c 65 66 74 3b 09 |t-theRec|t.left;.|
|00000790| 2f 2a 20 61 6e 64 20 75 | 73 65 20 72 65 63 74 20 |/* and u|se rect |
|000007a0| 61 73 20 77 69 64 74 68 | 20 2a 2f 20 0d 20 20 0d |as width| */ . .|
|000007b0| 20 20 2f 2a 20 53 65 74 | 20 74 68 65 20 6c 69 73 | /* Set| the lis|
|000007c0| 74 20 73 69 7a 65 20 2a | 2f 0d 20 20 53 65 74 52 |t size *|/. SetR|
|000007d0| 65 63 74 28 26 6c 69 73 | 74 52 65 63 74 2c 30 2c |ect(&lis|tRect,0,|
|000007e0| 30 2c 30 2c 30 29 3b 09 | 2f 2a 20 65 6d 70 74 79 |0,0,0);.|/* empty|
|000007f0| 20 6c 69 73 74 20 2a 2f | 0d 20 20 0d 20 20 2f 2a | list */|. . /*|
|00000800| 20 63 72 65 61 74 65 20 | 74 68 65 20 6c 69 73 74 | create |the list|
|00000810| 20 2a 2f 0d 20 20 74 68 | 65 4c 69 73 74 20 3d 20 | */. th|eList = |
|00000820| 4c 4e 65 77 28 26 74 68 | 65 52 65 63 74 2c 09 2f |LNew(&th|eRect,./|
|00000830| 2a 20 44 69 73 70 6c 61 | 79 20 72 65 63 74 61 6e |* Displa|y rectan|
|00000840| 67 6c 65 20 2a 2f 0d 20 | 20 09 09 20 26 6c 69 73 |gle */. | .. &lis|
|00000850| 74 52 65 63 74 2c 09 2f | 2a 20 49 6e 69 74 69 61 |tRect,./|* Initia|
|00000860| 6c 20 73 69 7a 65 20 6f | 66 20 6c 69 73 74 20 2a |l size o|f list *|
|00000870| 2f 0d 09 09 20 26 74 68 | 65 43 65 6c 6c 2c 09 2f |/... &th|eCell,./|
|00000880| 2a 20 43 65 6c 6c 20 73 | 69 7a 65 20 2a 2f 0d 09 |* Cell s|ize */..|
|00000890| 09 20 30 2c 09 09 2f 2a | 20 55 73 65 20 73 74 61 |. 0,../*| Use sta|
|000008a0| 6e 64 61 72 64 20 6c 69 | 73 74 20 70 72 6f 63 20 |ndard li|st proc |
|000008b0| 2a 2f 0d 09 09 20 74 68 | 65 57 69 6e 64 6f 77 2c |*/... th|eWindow,|
|000008c0| 09 2f 2a 20 77 69 6e 64 | 6f 77 20 74 6f 20 64 72 |./* wind|ow to dr|
|000008d0| 61 77 20 69 6e 20 2a 2f | 0d 09 09 20 30 2c 09 09 |aw in */|... 0,..|
|000008e0| 2f 2a 20 64 72 61 77 69 | 6e 67 20 6f 66 66 20 2a |/* drawi|ng off *|
|000008f0| 2f 0d 09 09 20 30 2c 09 | 09 2f 2a 20 6e 6f 20 67 |/... 0,.|./* no g|
|00000900| 72 6f 77 20 62 6f 78 20 | 2a 2f 0d 09 09 20 30 2c |row box |*/... 0,|
|00000910| 09 09 2f 2a 20 68 61 73 | 20 6e 6f 20 68 6f 72 69 |../* has| no hori|
|00000920| 7a 6f 6e 74 61 6c 20 73 | 63 72 6f 6c 6c 20 62 61 |zontal s|croll ba|
|00000930| 72 20 2a 2f 0d 09 09 20 | 31 29 3b 09 2f 2a 20 68 |r */... |1);./* h|
|00000940| 61 73 20 76 65 72 74 69 | 63 61 6c 20 73 63 72 6f |as verti|cal scro|
|00000950| 6c 6c 20 62 61 72 20 2a | 2f 0d 09 20 0d 20 20 2f |ll bar *|/.. . /|
|00000960| 2a 20 4c 6f 61 64 20 74 | 68 65 20 63 65 6c 6c 73 |* Load t|he cells|
|00000970| 20 2a 2f 0d 20 20 0d 20 | 20 2f 2a 20 73 74 65 70 | */. . | /* step|
|00000980| 20 6f 6e 65 2e 2e 2e 20 | 63 6f 75 6e 74 20 74 68 | one... |count th|
|00000990| 65 20 6e 61 6d 65 73 20 | 2a 2f 0d 20 20 72 65 73 |e names |*/. res|
|000009a0| 63 6e 74 20 3d 20 43 6f | 75 6e 74 52 65 73 6f 75 |cnt = Co|untResou|
|000009b0| 72 63 65 73 28 27 44 49 | 41 4c 27 29 3b 0d 20 20 |rces('DI|AL');. |
|000009c0| 0d 20 20 2f 2a 20 73 74 | 65 70 20 74 77 6f 2e 2e |. /* st|ep two..|
|000009d0| 2e 41 64 64 20 54 68 65 | 20 43 65 6c 6c 73 20 2a |.Add The| Cells *|
|000009e0| 2f 0d 20 20 4c 41 64 64 | 43 6f 6c 75 6d 6e 28 31 |/. LAdd|Column(1|
|000009f0| 2c 30 2c 74 68 65 4c 69 | 73 74 29 3b 09 2f 2a 20 |,0,theLi|st);./* |
|00000a00| 61 64 64 20 74 68 65 20 | 66 69 72 73 74 20 63 6f |add the |first co|
|00000a10| 6c 75 6d 6e 20 2a 2f 0d | 20 20 0d 20 20 2f 2a 20 |lumn */.| . /* |
|00000a20| 53 74 65 70 20 74 68 72 | 65 65 2e 2e 2e 41 64 64 |Step thr|ee...Add|
|00000a30| 20 74 68 65 20 63 6f 6e | 74 65 6e 74 73 20 2a 2f | the con|tents */|
|00000a40| 0d 20 20 77 68 69 63 68 | 52 6f 77 20 3d 20 30 3b |. which|Row = 0;|
|00000a50| 0d 20 20 0d 20 20 66 6f | 72 28 69 3d 30 3b 69 3c |. . fo|r(i=0;i<|
|00000a60| 72 65 73 63 6e 74 3b 69 | 2b 2b 29 7b 0d 09 0d 09 |rescnt;i|++){....|
|00000a70| 53 65 74 52 65 73 4c 6f | 61 64 28 30 29 3b 20 20 |SetResLo|ad(0); |
|00000a80| 0d 09 61 48 61 6e 64 6c | 65 20 3d 20 47 65 74 49 |..aHandl|e = GetI|
|00000a90| 6e 64 52 65 73 6f 75 72 | 63 65 28 27 44 49 41 4c |ndResour|ce('DIAL|
|00000aa0| 27 2c 69 2b 31 29 3b 0d | 09 47 65 74 52 65 73 49 |',i+1);.|.GetResI|
|00000ab0| 6e 66 6f 28 61 48 61 6e | 64 6c 65 2c 26 69 64 2c |nfo(aHan|dle,&id,|
|00000ac0| 26 61 54 79 70 65 2c 6e | 61 6d 65 29 3b 0d 09 52 |&aType,n|ame);..R|
|00000ad0| 65 6c 65 61 73 65 52 65 | 73 6f 75 72 63 65 28 61 |eleaseRe|source(a|
|00000ae0| 48 61 6e 64 6c 65 29 3b | 0d 09 53 65 74 52 65 73 |Handle);|..SetRes|
|00000af0| 4c 6f 61 64 28 31 29 3b | 0d 09 0d 09 74 6d 70 20 |Load(1);|....tmp |
|00000b00| 3d 20 30 3b 20 70 20 3d | 20 28 63 68 61 72 20 2a |= 0; p =| (char *|
|00000b10| 29 6e 61 6d 65 3b 0d 09 | 77 68 69 6c 65 28 2a 70 |)name;..|while(*p|
|00000b20| 2b 2b 29 74 6d 70 2b 2b | 3b 0d 09 0d 09 69 66 20 |++)tmp++|;....if |
|00000b30| 28 74 6d 70 29 7b 0d 09 | 09 74 68 65 43 65 6c 6c |(tmp){..|.theCell|
|00000b40| 2e 76 20 3d 20 77 68 69 | 63 68 52 6f 77 2b 2b 3b |.v = whi|chRow++;|
|00000b50| 09 2f 2a 20 72 6f 77 20 | 20 20 20 2a 2f 0d 09 09 |./* row | */...|
|00000b60| 74 68 65 43 65 6c 6c 2e | 68 20 3d 20 30 3b 09 2f |theCell.|h = 0;./|
|00000b70| 2a 20 66 69 72 73 74 20 | 63 6f 6c 75 6d 6e 20 2a |* first |column *|
|00000b80| 2f 0d 09 09 4c 41 64 64 | 52 6f 77 28 31 2c 72 65 |/...LAdd|Row(1,re|
|00000b90| 73 63 6e 74 2b 31 2c 74 | 68 65 4c 69 73 74 29 3b |scnt+1,t|heList);|
|00000ba0| 20 2f 2a 20 67 75 61 72 | 61 6e 74 65 65 20 61 64 | /* guar|antee ad|
|00000bb0| 64 69 74 69 6f 6e 20 61 | 74 20 65 6e 64 20 6f 66 |dition a|t end of|
|00000bc0| 20 6c 69 73 74 20 2a 2f | 0d 09 09 4c 53 65 74 43 | list */|...LSetC|
|00000bd0| 65 6c 6c 28 6e 61 6d 65 | 2c 74 6d 70 2c 26 74 68 |ell(name|,tmp,&th|
|00000be0| 65 43 65 6c 6c 2c 74 68 | 65 4c 69 73 74 29 3b 20 |eCell,th|eList); |
|00000bf0| 2f 2a 20 73 65 74 20 74 | 68 65 20 76 61 6c 75 65 |/* set t|he value|
|00000c00| 20 2a 2f 0d 09 20 7d 0d | 20 20 20 7d 0d 20 20 20 | */.. }.| }. |
|00000c10| 20 28 2a 74 68 65 4c 69 | 73 74 29 2d 3e 73 65 6c | (*theLi|st)->sel|
|00000c20| 46 6c 61 67 73 20 3d 20 | 6c 4f 6e 6c 79 4f 6e 65 |Flags = |lOnlyOne|
|00000c30| 3b 09 2f 2a 20 6f 6e 6c | 79 20 6f 6e 65 20 73 65 |;./* onl|y one se|
|00000c40| 6c 65 63 74 69 6f 6e 20 | 61 74 20 61 20 74 69 6d |lection |at a tim|
|00000c50| 65 20 2a 2f 0d 09 72 65 | 74 75 72 6e 20 74 68 65 |e */..re|turn the|
|00000c60| 4c 69 73 74 3b 0d 20 7d | 0d 2f 2a 2a 2a 2a 2a 2a |List;. }|./******|
|00000c70| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c80| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000c90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000ca0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000cb0| 2f 0d 2f 2a 20 74 68 69 | 73 20 69 73 20 74 68 65 |/./* thi|s is the|
|00000cc0| 20 22 75 73 65 72 49 74 | 65 6d 22 20 74 6f 20 62 | "userIt|em" to b|
|00000cd0| 65 20 69 6e 73 74 61 6c | 6c 65 64 20 69 6e 20 74 |e instal|led in t|
|00000ce0| 68 65 20 64 69 61 6c 6f | 67 20 2a 2f 0d 0d 73 74 |he dialo|g */..st|
|00000cf0| 61 74 69 63 20 70 61 73 | 63 61 6c 20 76 6f 69 64 |atic pas|cal void|
|00000d00| 20 44 6f 55 70 44 61 74 | 65 28 74 68 65 57 69 6e | DoUpDat|e(theWin|
|00000d10| 64 6f 77 2c 69 74 65 6d | 29 0d 20 44 69 61 6c 6f |dow,item|). Dialo|
|00000d20| 67 50 74 72 20 74 68 65 | 57 69 6e 64 6f 77 3b 0d |gPtr the|Window;.|
|00000d30| 20 73 68 6f 72 74 20 69 | 74 65 6d 3b 0d 20 7b 20 | short i|tem;. { |
|00000d40| 73 68 6f 72 74 20 61 74 | 79 70 65 2c 74 6d 70 3b |short at|ype,tmp;|
|00000d50| 0d 20 20 20 48 61 6e 64 | 6c 65 20 61 68 61 6e 64 |. Hand|le ahand|
|00000d60| 6c 65 3b 0d 20 20 20 52 | 65 63 74 20 62 6f 78 2c |le;. R|ect box,|
|00000d70| 74 68 65 52 65 63 74 3b | 0d 20 20 20 46 6f 6e 74 |theRect;|. Font|
|00000d80| 49 6e 66 6f 20 66 69 6e | 66 6f 3b 0d 20 20 20 0d |Info fin|fo;. .|
|00000d90| 20 20 20 0d 20 20 20 47 | 65 74 44 49 74 65 6d 28 | . G|etDItem(|
|00000da0| 74 68 65 57 69 6e 64 6f | 77 2c 69 74 65 6d 2c 26 |theWindo|w,item,&|
|00000db0| 61 74 79 70 65 2c 26 61 | 68 61 6e 64 6c 65 2c 26 |atype,&a|handle,&|
|00000dc0| 62 6f 78 29 3b 0d 20 20 | 20 47 65 74 46 6f 6e 74 |box);. | GetFont|
|00000dd0| 49 6e 66 6f 28 26 66 69 | 6e 66 6f 29 3b 0d 20 20 |Info(&fi|nfo);. |
|00000de0| 20 0d 20 20 20 74 6d 70 | 20 3d 20 66 69 6e 66 6f | . tmp| = finfo|
|00000df0| 2e 61 73 63 65 6e 74 2b | 66 69 6e 66 6f 2e 64 65 |.ascent+|finfo.de|
|00000e00| 73 63 65 6e 74 2b 66 69 | 6e 66 6f 2e 6c 65 61 64 |scent+fi|nfo.lead|
|00000e10| 69 6e 67 3b 0d 20 20 20 | 74 68 65 52 65 63 74 2e |ing;. |theRect.|
|00000e20| 74 6f 70 20 3d 20 62 6f | 78 2e 74 6f 70 3b 0d 20 |top = bo|x.top;. |
|00000e30| 20 20 74 68 65 52 65 63 | 74 2e 6c 65 66 74 20 3d | theRec|t.left =|
|00000e40| 20 62 6f 78 2e 6c 65 66 | 74 3b 0d 20 20 20 74 68 | box.lef|t;. th|
|00000e50| 65 52 65 63 74 2e 62 6f | 74 74 6f 6d 20 3d 20 62 |eRect.bo|ttom = b|
|00000e60| 6f 78 2e 74 6f 70 20 2b | 20 28 28 62 6f 78 2e 62 |ox.top +| ((box.b|
|00000e70| 6f 74 74 6f 6d 2d 62 6f | 78 2e 74 6f 70 29 2f 74 |ottom-bo|x.top)/t|
|00000e80| 6d 70 29 2a 74 6d 70 3b | 20 0d 20 20 20 74 68 65 |mp)*tmp;| . the|
|00000e90| 52 65 63 74 2e 72 69 67 | 68 74 20 3d 20 62 6f 78 |Rect.rig|ht = box|
|00000ea0| 2e 72 69 67 68 74 2d 32 | 30 3b 20 2f 2a 20 32 30 |.right-2|0; /* 20|
|00000eb0| 20 69 73 20 72 6f 6f 6d | 20 66 6f 72 20 73 63 72 | is room| for scr|
|00000ec0| 6f 6c 6c 20 62 61 72 20 | 2a 2f 0d 20 20 20 0d 20 |oll bar |*/. . |
|00000ed0| 20 20 49 6e 73 65 74 52 | 65 63 74 28 26 74 68 65 | InsetR|ect(&the|
|00000ee0| 52 65 63 74 2c 2d 31 2c | 2d 31 29 3b 09 2f 2a 20 |Rect,-1,|-1);./* |
|00000ef0| 73 68 72 69 6e 6b 20 66 | 6f 72 20 61 20 6e 69 63 |shrink f|or a nic|
|00000f00| 65 20 66 69 74 20 2a 2f | 0d 20 20 20 46 72 61 6d |e fit */|. Fram|
|00000f10| 65 52 65 63 74 28 26 74 | 68 65 52 65 63 74 29 3b |eRect(&t|heRect);|
|00000f20| 09 09 09 2f 2a 20 72 65 | 64 72 61 77 20 74 68 65 |.../* re|draw the|
|00000f30| 20 66 72 61 6d 65 20 2a | 2f 0d 20 20 20 4c 55 70 | frame *|/. LUp|
|00000f40| 64 61 74 65 28 74 68 65 | 57 69 6e 64 6f 77 2d 3e |date(the|Window->|
|00000f50| 76 69 73 52 67 6e 2c 28 | 4c 69 73 74 48 61 6e 64 |visRgn,(|ListHand|
|00000f60| 6c 65 29 28 28 57 69 6e | 64 6f 77 50 65 65 6b 29 |le)((Win|dowPeek)|
|00000f70| 74 68 65 57 69 6e 64 6f | 77 29 2d 3e 72 65 66 43 |theWindo|w)->refC|
|00000f80| 6f 6e 29 3b 20 20 20 0d | 20 20 20 7d 0d 2f 2a 2a |on); .| }./**|
|00000f90| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fa0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fb0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fc0| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00000fd0| 2a 2a 2a 2a 2f 20 0d 2f | 2a 20 74 68 69 73 20 70 |****/ ./|* this p|
|00000fe0| 72 6f 63 65 64 75 72 65 | 20 69 73 20 63 61 6c 6c |rocedure| is call|
|00000ff0| 65 64 20 62 79 20 4d 6f | 64 61 6c 44 69 61 6c 6f |ed by Mo|dalDialo|
|00001000| 67 20 2a 2f 0d 0d 73 74 | 61 74 69 63 20 70 61 73 |g */..st|atic pas|
|00001010| 63 61 6c 20 63 68 61 72 | 20 6d 79 46 69 6c 74 65 |cal char| myFilte|
|00001020| 72 28 74 68 65 57 69 6e | 64 6f 77 2c 65 76 65 6e |r(theWin|dow,even|
|00001030| 74 2c 69 74 65 6d 29 0d | 20 20 20 20 44 69 61 6c |t,item).| Dial|
|00001040| 6f 67 50 74 72 20 74 68 | 65 57 69 6e 64 6f 77 3b |ogPtr th|eWindow;|
|00001050| 0d 20 20 20 20 45 76 65 | 6e 74 52 65 63 6f 72 64 |. Eve|ntRecord|
|00001060| 20 2a 65 76 65 6e 74 3b | 0d 20 20 20 20 73 68 6f | *event;|. sho|
|00001070| 72 74 20 2a 69 74 65 6d | 3b 0d 20 20 20 20 0d 20 |rt *item|;. . |
|00001080| 7b 20 20 50 6f 69 6e 74 | 20 74 68 65 4c 6f 63 3b |{ Point| theLoc;|
|00001090| 0d 20 20 20 20 63 68 61 | 72 20 72 65 73 75 6c 74 |. cha|r result|
|000010a0| 2c 62 75 66 66 65 72 5b | 4d 41 58 43 48 41 52 53 |,buffer[|MAXCHARS|
|000010b0| 5d 3b 0d 20 20 20 20 43 | 65 6c 6c 20 74 6d 70 43 |];. C|ell tmpC|
|000010c0| 65 6c 6c 2c 74 68 65 43 | 65 6c 6c 3b 0d 20 20 20 |ell,theC|ell;. |
|000010d0| 20 52 65 63 74 20 62 6f | 78 3b 0d 20 20 20 20 73 | Rect bo|x;. s|
|000010e0| 68 6f 72 74 20 61 74 79 | 70 65 2c 64 61 74 61 4c |hort aty|pe,dataL|
|000010f0| 65 6e 3b 0d 20 20 20 20 | 48 61 6e 64 6c 65 20 61 |en;. |Handle a|
|00001100| 68 61 6e 64 6c 65 2c 6e | 75 6d 48 61 6e 64 6c 65 |handle,n|umHandle|
|00001110| 3b 0d 09 4c 69 73 74 48 | 61 6e 64 6c 65 20 74 68 |;..ListH|andle th|
|00001120| 65 4c 69 73 74 3b 0d 09 | 0d 20 20 20 20 2f 2a 20 |eList;..|. /* |
|00001130| 72 65 63 6f 76 65 72 20 | 61 20 68 61 6e 64 6c 65 |recover |a handle|
|00001140| 20 74 6f 20 74 68 65 20 | 6c 69 73 74 20 2a 2f 0d | to the |list */.|
|00001150| 09 74 68 65 4c 69 73 74 | 20 3d 20 28 4c 69 73 74 |.theList| = (List|
|00001160| 48 61 6e 64 6c 65 29 28 | 28 57 69 6e 64 6f 77 50 |Handle)(|(WindowP|
|00001170| 65 65 6b 29 74 68 65 57 | 69 6e 64 6f 77 29 2d 3e |eek)theW|indow)->|
|00001180| 72 65 66 43 6f 6e 3b 0d | 09 0d 20 20 20 20 72 65 |refCon;.|.. re|
|00001190| 73 75 6c 74 20 3d 20 30 | 3b 20 20 20 20 2f 2a 20 |sult = 0|; /* |
|000011a0| 61 73 73 75 6d 65 20 77 | 65 20 64 6f 6e 27 74 20 |assume w|e don't |
|000011b0| 77 61 6e 74 20 74 6f 20 | 68 61 6e 64 6c 65 20 2a |want to |handle *|
|000011c0| 2f 0d 09 0d 20 09 73 77 | 69 74 63 68 20 28 65 76 |/... .sw|itch (ev|
|000011d0| 65 6e 74 2d 3e 77 68 61 | 74 29 20 7b 0d 09 20 20 |ent->wha|t) {.. |
|000011e0| 20 20 63 61 73 65 20 6d | 6f 75 73 65 44 6f 77 6e | case m|ouseDown|
|000011f0| 3a 0d 09 20 20 20 20 20 | 20 20 20 20 7b 20 20 0d |:.. | { .|
|00001200| 09 09 20 20 20 20 74 68 | 65 4c 6f 63 20 3d 20 65 |.. th|eLoc = e|
|00001210| 76 65 6e 74 2d 3e 77 68 | 65 72 65 3b 0d 09 09 20 |vent->wh|ere;... |
|00001220| 20 20 20 47 65 74 44 49 | 74 65 6d 28 74 68 65 57 | GetDI|tem(theW|
|00001230| 69 6e 64 6f 77 2c 55 53 | 45 52 2c 26 61 74 79 70 |indow,US|ER,&atyp|
|00001240| 65 2c 26 61 68 61 6e 64 | 6c 65 2c 26 62 6f 78 29 |e,&ahand|le,&box)|
|00001250| 3b 0d 09 09 20 20 20 20 | 47 6c 6f 62 61 6c 54 6f |;... |GlobalTo|
|00001260| 4c 6f 63 61 6c 28 26 74 | 68 65 4c 6f 63 29 3b 0d |Local(&t|heLoc);.|
|00001270| 09 09 20 20 20 20 0d 09 | 09 20 20 20 20 2f 2a 20 |.. ..|. /* |
|00001280| 63 68 65 63 6b 20 69 66 | 20 6d 6f 75 73 65 64 6f |check if| mousedo|
|00001290| 77 6e 20 69 6e 20 75 73 | 65 72 20 69 74 65 6d 20 |wn in us|er item |
|000012a0| 2a 2f 0d 09 09 20 20 20 | 20 69 66 20 28 50 74 49 |*/... | if (PtI|
|000012b0| 6e 52 65 63 74 28 26 74 | 68 65 4c 6f 63 2c 26 62 |nRect(&t|heLoc,&b|
|000012c0| 6f 78 29 29 0d 09 09 20 | 20 20 20 20 7b 0d 09 09 |ox))... | {...|
|000012d0| 20 20 20 20 20 20 69 66 | 28 4c 43 6c 69 63 6b 28 | if|(LClick(|
|000012e0| 26 74 68 65 4c 6f 63 2c | 65 76 65 6e 74 2d 3e 6d |&theLoc,|event->m|
|000012f0| 6f 64 69 66 69 65 72 73 | 2c 74 68 65 4c 69 73 74 |odifiers|,theList|
|00001300| 29 29 7b 0d 09 09 09 20 | 20 20 09 2a 69 74 65 6d |)){.... | .*item|
|00001310| 20 3d 20 44 49 41 4c 3b | 20 2f 2a 20 67 6f 74 20 | = DIAL;| /* got |
|00001320| 61 20 64 6f 75 62 6c 65 | 20 63 6c 69 63 6b 20 2a |a double| click *|
|00001330| 2f 0d 09 09 09 20 20 09 | 20 72 65 73 75 6c 74 20 |/.... .| result |
|00001340| 3d 20 31 3b 0d 09 09 09 | 20 7d 20 2f 2a 20 65 6e |= 1;....| } /* en|
|00001350| 64 20 6f 66 20 64 6f 75 | 62 6c 65 20 63 6c 69 63 |d of dou|ble clic|
|00001360| 6b 20 70 72 6f 63 65 73 | 73 69 6e 67 20 2a 2f 09 |k proces|sing */.|
|00001370| 09 20 20 20 0d 09 09 20 | 20 20 20 65 6c 73 65 20 |. ... | else |
|00001380| 7b 20 2f 2a 20 72 65 66 | 72 65 73 68 20 74 68 65 |{ /* ref|resh the|
|00001390| 20 63 75 72 72 65 6e 74 | 20 6e 75 6d 62 65 72 20 | current| number |
|000013a0| 66 69 65 6c 64 20 2a 2f | 0d 09 09 09 09 53 65 74 |field */|.....Set|
|000013b0| 52 65 63 74 28 26 74 68 | 65 43 65 6c 6c 2c 30 2c |Rect(&th|eCell,0,|
|000013c0| 30 2c 30 2c 30 29 3b 0d | 09 09 09 09 69 66 28 4c |0,0,0);.|....if(L|
|000013d0| 47 65 74 53 65 6c 65 63 | 74 28 74 72 75 65 2c 26 |GetSelec|t(true,&|
|000013e0| 74 68 65 43 65 6c 6c 2c | 74 68 65 4c 69 73 74 29 |theCell,|theList)|
|000013f0| 29 7b 0d 09 09 09 09 09 | 20 2f 2a 20 67 65 74 20 |){......| /* get |
|00001400| 74 68 65 20 73 65 6c 65 | 63 74 69 6f 6e 20 2a 2f |the sele|ction */|
|00001410| 0d 09 09 09 09 09 20 64 | 61 74 61 4c 65 6e 20 3d |...... d|ataLen =|
|00001420| 20 4d 41 58 43 48 41 52 | 53 3b 20 2f 2a 20 6d 61 | MAXCHAR|S; /* ma|
|00001430| 78 20 6c 65 6e 67 74 68 | 20 2a 2f 0d 09 09 09 09 |x length| */.....|
|00001440| 09 20 4c 47 65 74 43 65 | 6c 6c 28 62 75 66 66 65 |. LGetCe|ll(buffe|
|00001450| 72 2c 26 64 61 74 61 4c | 65 6e 2c 26 74 68 65 43 |r,&dataL|en,&theC|
|00001460| 65 6c 6c 2c 74 68 65 4c | 69 73 74 29 3b 0d 09 09 |ell,theL|ist);...|
|00001470| 09 09 09 20 62 75 66 66 | 65 72 5b 64 61 74 61 4c |... buff|er[dataL|
|00001480| 65 6e 5d 20 3d 20 30 3b | 20 2f 2a 20 6d 61 6b 65 |en] = 0;| /* make|
|00001490| 20 69 6e 74 6f 20 63 2d | 73 74 72 69 6e 67 20 2a | into c-|string *|
|000014a0| 2f 0d 09 09 09 09 09 20 | 6e 75 6d 48 61 6e 64 6c |/...... |numHandl|
|000014b0| 65 3d 47 65 74 4e 61 6d | 65 64 52 65 73 6f 75 72 |e=GetNam|edResour|
|000014c0| 63 65 28 27 44 49 41 4c | 27 2c 62 75 66 66 65 72 |ce('DIAL|',buffer|
|000014d0| 29 3b 0d 09 09 09 09 09 | 20 48 4c 6f 63 6b 28 6e |);......| HLock(n|
|000014e0| 75 6d 48 61 6e 64 6c 65 | 29 3b 09 2f 2a 20 6c 6f |umHandle|);./* lo|
|000014f0| 63 6b 20 69 74 20 2a 2f | 0d 09 09 09 09 09 09 0d |ck it */|........|
|00001500| 09 09 09 09 09 20 47 65 | 74 44 49 74 65 6d 28 74 |..... Ge|tDItem(t|
|00001510| 68 65 57 69 6e 64 6f 77 | 2c 43 4e 55 4d 42 45 52 |heWindow|,CNUMBER|
|00001520| 2c 26 61 74 79 70 65 2c | 26 61 68 61 6e 64 6c 65 |,&atype,|&ahandle|
|00001530| 2c 26 62 6f 78 29 3b 0d | 09 09 09 09 09 20 53 65 |,&box);.|..... Se|
|00001540| 74 49 54 65 78 74 28 61 | 68 61 6e 64 6c 65 2c 2a |tIText(a|handle,*|
|00001550| 6e 75 6d 48 61 6e 64 6c | 65 29 3b 0d 09 09 09 09 |numHandl|e);.....|
|00001560| 09 20 0d 09 09 09 09 09 | 20 48 55 6e 6c 6f 63 6b |. ......| HUnlock|
|00001570| 28 6e 75 6d 48 61 6e 64 | 6c 65 29 3b 0d 09 09 09 |(numHand|le);....|
|00001580| 09 09 20 52 65 6c 65 61 | 73 65 52 65 73 6f 75 72 |.. Relea|seResour|
|00001590| 63 65 28 6e 75 6d 48 61 | 6e 64 6c 65 29 3b 0d 09 |ce(numHa|ndle);..|
|000015a0| 09 09 09 7d 20 65 6c 73 | 65 7b 20 2f 2a 20 65 72 |...} els|e{ /* er|
|000015b0| 61 73 65 20 74 68 65 20 | 6e 75 6d 62 65 72 20 2a |ase the |number *|
|000015c0| 2f 0d 09 09 09 09 09 47 | 65 74 44 49 74 65 6d 28 |/......G|etDItem(|
|000015d0| 74 68 65 57 69 6e 64 6f | 77 2c 43 4e 55 4d 42 45 |theWindo|w,CNUMBE|
|000015e0| 52 2c 26 61 74 79 70 65 | 2c 26 61 68 61 6e 64 6c |R,&atype|,&ahandl|
|000015f0| 65 2c 26 62 6f 78 29 3b | 0d 09 09 09 09 09 53 65 |e,&box);|......Se|
|00001600| 74 49 54 65 78 74 28 61 | 68 61 6e 64 6c 65 2c 22 |tIText(a|handle,"|
|00001610| 22 29 3b 0d 09 09 09 09 | 20 20 20 7d 0d 09 09 09 |");.....| }....|
|00001620| 20 20 20 7d 20 2f 2a 20 | 69 66 20 70 6f 69 6e 74 | } /* |if point|
|00001630| 20 69 6e 20 72 65 63 74 | 20 2a 2f 0d 09 09 20 20 | in rect| */... |
|00001640| 20 20 7d 20 20 20 20 20 | 2f 2a 20 63 6c 69 63 6b | } |/* click|
|00001650| 20 2a 2f 0d 09 09 20 20 | 7d 20 2f 2a 20 6d 6f 75 | */... |} /* mou|
|00001660| 73 65 20 64 6f 77 6e 20 | 2a 2f 0d 09 09 20 20 20 |se down |*/... |
|00001670| 20 62 72 65 61 6b 3b 0d | 09 20 20 20 20 63 61 73 | break;.|. cas|
|00001680| 65 20 6b 65 79 44 6f 77 | 6e 3a 0d 09 20 20 20 20 |e keyDow|n:.. |
|00001690| 63 61 73 65 20 61 75 74 | 6f 4b 65 79 3a 20 2f 2a |case aut|oKey: /*|
|000016a0| 20 66 61 6b 65 20 61 20 | 64 69 61 6c 20 62 75 74 | fake a |dial but|
|000016b0| 74 6f 6e 20 68 69 74 20 | 2a 2f 0d 09 20 20 20 20 |ton hit |*/.. |
|000016c0| 09 09 69 66 28 28 28 63 | 68 61 72 29 65 76 65 6e |..if(((c|har)even|
|000016d0| 74 2d 3e 6d 65 73 73 61 | 67 65 20 3d 3d 43 52 29 |t->messa|ge ==CR)|
|000016e0| 20 7c 7c 20 28 28 63 68 | 61 72 29 65 76 65 6e 74 | || ((ch|ar)event|
|000016f0| 2d 3e 6d 65 73 73 61 67 | 65 3d 3d 45 4e 54 45 52 |->messag|e==ENTER|
|00001700| 29 29 0d 09 09 09 20 20 | 20 20 7b 2a 69 74 65 6d |)).... | {*item|
|00001710| 20 3d 20 44 49 41 4c 3b | 20 72 65 73 75 6c 74 20 | = DIAL;| result |
|00001720| 3d 31 3b 7d 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d |=1;};...|.break;.|
|00001730| 09 20 20 20 20 62 72 65 | 61 6b 3b 0d 09 20 20 20 |. bre|ak;.. |
|00001740| 20 7d 0d 20 20 20 20 20 | 72 65 74 75 72 6e 28 72 | }. |return(r|
|00001750| 65 73 75 6c 74 29 3b 0d | 7d 0d 2f 2a 2a 2a 2a 2a |esult);.|}./*****|
|00001760| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001770| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001780| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00001790| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|000017a0| 2a 2f 0d 50 68 6f 6e 65 | 4d 61 6e 61 67 65 72 28 |*/.Phone|Manager(|
|000017b0| 72 65 66 6e 75 6d 29 0d | 20 20 73 68 6f 72 74 20 |refnum).| short |
|000017c0| 72 65 66 6e 75 6d 3b 0d | 7b 0d 20 20 52 65 63 74 |refnum;.|{. Rect|
|000017d0| 20 42 6f 78 2c 74 68 65 | 52 65 63 74 3b 0d 20 20 | Box,the|Rect;. |
|000017e0| 73 68 6f 72 74 20 69 74 | 65 6d 20 3b 0d 20 20 73 |short it|em ;. s|
|000017f0| 68 6f 72 74 20 74 79 70 | 65 3b 0d 20 20 48 61 6e |hort typ|e;. Han|
|00001800| 64 6c 65 20 74 68 65 48 | 61 6e 64 6c 65 2c 6e 75 |dle theH|andle,nu|
|00001810| 6d 48 61 6e 64 6c 65 2c | 61 68 61 6e 64 6c 65 3b |mHandle,|ahandle;|
|00001820| 0d 20 20 43 65 6c 6c 20 | 74 68 65 43 65 6c 6c 2c |. Cell |theCell,|
|00001830| 74 6d 70 43 65 6c 6c 3b | 0d 20 20 63 68 61 72 20 |tmpCell;|. char |
|00001840| 62 75 66 66 65 72 5b 4d | 41 58 43 48 41 52 53 5d |buffer[M|AXCHARS]|
|00001850| 2c 6e 75 6d 62 75 66 66 | 5b 4d 41 58 43 48 41 52 |,numbuff|[MAXCHAR|
|00001860| 53 5d 2c 2a 70 3b 0d 20 | 20 73 68 6f 72 74 20 64 |S],*p;. | short d|
|00001870| 61 74 61 4c 65 6e 2c 69 | 64 2c 74 6d 70 3b 0d 20 |ataLen,i|d,tmp;. |
|00001880| 20 6c 6f 6e 67 20 74 77 | 6f 2c 6f 6e 65 2c 74 6d | long tw|o,one,tm|
|00001890| 70 6c 6f 6e 67 3b 0d 20 | 20 47 72 61 66 50 74 72 |plong;. | GrafPtr|
|000018a0| 20 09 73 61 76 65 50 6f | 72 74 3b 0d 20 20 44 69 | .savePo|rt;. Di|
|000018b0| 61 6c 6f 67 50 74 72 20 | 74 68 65 57 69 6e 64 6f |alogPtr |theWindo|
|000018c0| 77 3b 0d 20 20 4c 69 73 | 74 48 61 6e 64 6c 65 20 |w;. Lis|tHandle |
|000018d0| 74 68 65 4c 69 73 74 3b | 0d 20 20 0d 09 47 65 74 |theList;|. ..Get|
|000018e0| 50 6f 72 74 28 26 73 61 | 76 65 50 6f 72 74 29 3b |Port(&sa|vePort);|
|000018f0| 0d 0d 20 20 20 2f 2a 20 | 67 65 74 20 74 68 65 20 |.. /* |get the |
|00001900| 64 69 61 6c 6f 67 20 28 | 63 72 65 61 74 65 64 20 |dialog (|created |
|00001910| 69 6e 76 69 73 69 62 6c | 65 29 20 2a 2f 0d 20 20 |invisibl|e) */. |
|00001920| 20 74 68 65 57 69 6e 64 | 6f 77 20 3d 20 28 44 69 | theWind|ow = (Di|
|00001930| 61 6c 6f 67 50 74 72 29 | 47 65 74 4e 65 77 44 69 |alogPtr)|GetNewDi|
|00001940| 61 6c 6f 67 28 4d 59 44 | 49 41 4c 4f 47 2c 30 2c |alog(MYD|IALOG,0,|
|00001950| 28 50 74 72 29 2d 31 29 | 3b 0d 20 20 20 53 65 74 |(Ptr)-1)|;. Set|
|00001960| 50 6f 72 74 28 74 68 65 | 57 69 6e 64 6f 77 29 3b |Port(the|Window);|
|00001970| 0d 20 20 20 0d 20 20 20 | 2f 2a 20 62 75 69 6c 64 |. . |/* build|
|00001980| 20 74 68 65 20 6c 69 73 | 74 20 61 6e 64 20 73 74 | the lis|t and st|
|00001990| 6f 72 65 20 74 68 65 20 | 6c 69 73 74 20 68 61 6e |ore the |list han|
|000019a0| 64 6c 65 20 73 6f 20 74 | 68 65 20 66 69 6c 74 65 |dle so t|he filte|
|000019b0| 72 20 70 72 6f 63 20 63 | 61 6e 20 66 69 6e 64 20 |r proc c|an find |
|000019c0| 69 74 20 2a 2f 0d 20 20 | 20 74 68 65 4c 69 73 74 |it */. | theList|
|000019d0| 20 3d 20 49 6e 69 74 4c | 69 73 74 28 74 68 65 57 | = InitL|ist(theW|
|000019e0| 69 6e 64 6f 77 29 3b 0d | 20 20 20 28 28 57 69 6e |indow);.| ((Win|
|000019f0| 64 6f 77 50 65 65 6b 29 | 74 68 65 57 69 6e 64 6f |dowPeek)|theWindo|
|00001a00| 77 29 2d 3e 72 65 66 43 | 6f 6e 20 3d 20 28 6c 6f |w)->refC|on = (lo|
|00001a10| 6e 67 29 74 68 65 4c 69 | 73 74 3b 0d 20 20 20 0d |ng)theLi|st;. .|
|00001a20| 20 20 20 2f 2a 20 73 65 | 74 20 74 68 65 20 66 72 | /* se|t the fr|
|00001a30| 61 6d 65 20 64 72 61 77 | 20 70 72 6f 63 65 64 75 |ame draw| procedu|
|00001a40| 72 65 20 2a 2f 0d 20 20 | 20 47 65 74 44 49 74 65 |re */. | GetDIte|
|00001a50| 6d 28 74 68 65 57 69 6e | 64 6f 77 2c 55 53 45 52 |m(theWin|dow,USER|
|00001a60| 2c 26 74 79 70 65 2c 26 | 74 68 65 48 61 6e 64 6c |,&type,&|theHandl|
|00001a70| 65 2c 26 42 6f 78 29 3b | 0d 20 20 20 53 65 74 44 |e,&Box);|. SetD|
|00001a80| 49 74 65 6d 28 74 68 65 | 57 69 6e 64 6f 77 2c 55 |Item(the|Window,U|
|00001a90| 53 45 52 2c 20 74 79 70 | 65 2c 44 6f 55 70 44 61 |SER, typ|e,DoUpDa|
|00001aa0| 74 65 2c 26 42 6f 78 29 | 3b 0d 20 20 20 0d 20 20 |te,&Box)|;. . |
|00001ab0| 20 0d 20 20 20 2f 2a 20 | 6f 75 74 6c 69 6e 65 20 | . /* |outline |
|00001ac0| 74 68 65 20 64 69 61 6c | 20 62 75 74 74 6f 6e 20 |the dial| button |
|00001ad0| 2a 2f 0d 20 20 20 47 65 | 74 44 49 74 65 6d 28 74 |*/. Ge|tDItem(t|
|00001ae0| 68 65 57 69 6e 64 6f 77 | 2c 44 49 41 4c 2c 26 74 |heWindow|,DIAL,&t|
|00001af0| 79 70 65 2c 26 74 68 65 | 48 61 6e 64 6c 65 2c 26 |ype,&the|Handle,&|
|00001b00| 42 6f 78 29 3b 0d 20 20 | 20 50 65 6e 53 69 7a 65 |Box);. | PenSize|
|00001b10| 28 33 2c 33 29 3b 0d 20 | 20 20 49 6e 73 65 74 52 |(3,3);. | InsetR|
|00001b20| 65 63 74 28 26 42 6f 78 | 2c 2d 34 2c 2d 34 29 3b |ect(&Box|,-4,-4);|
|00001b30| 0d 20 20 20 46 72 61 6d | 65 52 6f 75 6e 64 52 65 |. Fram|eRoundRe|
|00001b40| 63 74 28 26 42 6f 78 2c | 31 36 2c 31 36 29 3b 0d |ct(&Box,|16,16);.|
|00001b50| 20 20 20 50 65 6e 53 69 | 7a 65 28 31 2c 31 29 3b | PenSi|ze(1,1);|
|00001b60| 0d 20 20 20 0d 20 20 20 | 2f 2a 20 73 65 6c 65 63 |. . |/* selec|
|00001b70| 74 20 74 68 65 20 61 64 | 64 20 65 6e 74 72 79 20 |t the ad|d entry |
|00001b80| 66 69 65 6c 64 73 20 2a | 2f 0d 09 53 65 6c 49 54 |fields *|/..SelIT|
|00001b90| 65 78 74 28 74 68 65 57 | 69 6e 64 6f 77 2c 4e 41 |ext(theW|indow,NA|
|00001ba0| 4d 45 2c 30 2c 33 32 37 | 36 37 29 3b 0d 20 20 20 |ME,0,327|67);. |
|00001bb0| 0d 20 20 20 2f 2a 20 74 | 75 72 6e 20 6f 6e 20 6c |. /* t|urn on l|
|00001bc0| 69 73 74 20 64 72 61 77 | 69 6e 67 20 2a 2f 0d 20 |ist draw|ing */. |
|00001bd0| 20 20 4c 44 6f 44 72 61 | 77 28 31 2c 74 68 65 4c | LDoDra|w(1,theL|
|00001be0| 69 73 74 29 3b 0d 20 20 | 20 0d 20 20 20 2f 2a 20 |ist);. | . /* |
|00001bf0| 73 68 6f 77 20 74 68 65 | 20 64 69 61 6c 6f 67 20 |show the| dialog |
|00001c00| 77 69 6e 64 6f 77 20 20 | 2a 2f 0d 20 20 20 53 68 |window |*/. Sh|
|00001c10| 6f 77 57 69 6e 64 6f 77 | 28 74 68 65 57 69 6e 64 |owWindow|(theWind|
|00001c20| 6f 77 29 3b 0d 20 20 20 | 0d 20 20 20 2f 2a 20 68 |ow);. |. /* h|
|00001c30| 61 6e 67 20 61 72 6f 75 | 6e 64 20 75 6e 74 69 6c |ang arou|nd until|
|00001c40| 20 3c 63 72 3e 20 6f 72 | 20 44 69 61 6c 20 20 6f | <cr> or| Dial o|
|00001c50| 72 20 63 61 6e 63 65 6c | 20 68 69 74 20 2a 2f 0d |r cancel| hit */.|
|00001c60| 20 20 20 64 6f 7b 20 0d | 20 20 20 09 4d 6f 64 61 | do{ .| .Moda|
|00001c70| 6c 44 69 61 6c 6f 67 28 | 6d 79 46 69 6c 74 65 72 |lDialog(|myFilter|
|00001c80| 2c 26 69 74 65 6d 29 3b | 0d 09 73 77 69 74 63 68 |,&item);|..switch|
|00001c90| 20 28 69 74 65 6d 29 7b | 0d 09 20 20 63 61 73 65 | (item){|.. case|
|00001ca0| 20 44 49 41 4c 3a 20 2f | 2a 20 64 69 61 6c 20 74 | DIAL: /|* dial t|
|00001cb0| 68 65 20 6e 75 6d 62 65 | 72 20 69 66 20 74 68 65 |he numbe|r if the|
|00001cc0| 72 65 20 69 73 20 61 20 | 73 65 6c 65 63 74 69 6f |re is a |selectio|
|00001cd0| 6e 20 2a 2f 0d 09 20 20 | 09 09 53 65 74 52 65 63 |n */.. |..SetRec|
|00001ce0| 74 28 26 74 68 65 43 65 | 6c 6c 2c 30 2c 30 2c 30 |t(&theCe|ll,0,0,0|
|00001cf0| 2c 30 29 3b 0d 09 20 20 | 09 09 69 66 28 4c 47 65 |,0);.. |..if(LGe|
|00001d00| 74 53 65 6c 65 63 74 28 | 74 72 75 65 2c 26 74 68 |tSelect(|true,&th|
|00001d10| 65 43 65 6c 6c 2c 74 68 | 65 4c 69 73 74 29 29 7b |eCell,th|eList)){|
|00001d20| 0d 09 09 09 20 2f 2a 20 | 67 65 74 20 74 68 65 20 |.... /* |get the |
|00001d30| 73 65 6c 65 63 74 69 6f | 6e 20 2a 2f 0d 09 09 09 |selectio|n */....|
|00001d40| 20 64 61 74 61 4c 65 6e | 20 3d 20 4d 41 58 43 48 | dataLen| = MAXCH|
|00001d50| 41 52 53 3b 20 2f 2a 20 | 6d 61 78 20 6c 65 6e 67 |ARS; /* |max leng|
|00001d60| 74 68 20 2a 2f 0d 09 09 | 09 20 4c 47 65 74 43 65 |th */...|. LGetCe|
|00001d70| 6c 6c 28 62 75 66 66 65 | 72 2c 26 64 61 74 61 4c |ll(buffe|r,&dataL|
|00001d80| 65 6e 2c 26 74 68 65 43 | 65 6c 6c 2c 74 68 65 4c |en,&theC|ell,theL|
|00001d90| 69 73 74 29 3b 0d 09 09 | 09 20 62 75 66 66 65 72 |ist);...|. buffer|
|00001da0| 5b 64 61 74 61 4c 65 6e | 5d 20 3d 20 30 3b 20 2f |[dataLen|] = 0; /|
|00001db0| 2a 20 6d 61 6b 65 20 69 | 6e 74 6f 20 63 2d 73 74 |* make i|nto c-st|
|00001dc0| 72 69 6e 67 20 2a 2f 0d | 09 09 09 20 6e 75 6d 48 |ring */.|... numH|
|00001dd0| 61 6e 64 6c 65 3d 47 65 | 74 4e 61 6d 65 64 52 65 |andle=Ge|tNamedRe|
|00001de0| 73 6f 75 72 63 65 28 27 | 44 49 41 4c 27 2c 62 75 |source('|DIAL',bu|
|00001df0| 66 66 65 72 29 3b 0d 09 | 09 09 20 48 4c 6f 63 6b |ffer);..|.. HLock|
|00001e00| 28 6e 75 6d 48 61 6e 64 | 6c 65 29 3b 09 2f 2a 20 |(numHand|le);./* |
|00001e10| 6c 6f 63 6b 20 69 74 20 | 2a 2f 0d 09 09 09 20 0d |lock it |*/.... .|
|00001e20| 09 09 09 20 2f 2a 20 75 | 73 65 20 48 61 79 65 73 |... /* u|se Hayes|
|00001e30| 20 41 54 20 63 6f 6d 6d | 61 6e 64 73 20 2a 2f 0d | AT comm|ands */.|
|00001e40| 09 20 09 09 74 77 6f 20 | 3d 20 32 3b 0d 09 20 09 |. ..two |= 2;.. .|
|00001e50| 09 46 53 57 72 69 74 65 | 28 72 65 66 6e 75 6d 2c |.FSWrite|(refnum,|
|00001e60| 26 74 77 6f 2c 22 41 54 | 22 29 3b 20 44 65 6c 61 |&two,"AT|"); Dela|
|00001e70| 79 28 32 30 2c 26 74 6d | 70 6c 6f 6e 67 29 3b 0d |y(20,&tm|plong);.|
|00001e80| 09 20 09 09 74 77 6f 20 | 3d 32 3b 0d 09 20 09 09 |. ..two |=2;.. ..|
|00001e90| 46 53 57 72 69 74 65 28 | 72 65 66 6e 75 6d 2c 26 |FSWrite(|refnum,&|
|00001ea0| 74 77 6f 2c 22 44 54 22 | 29 3b 20 44 65 6c 61 79 |two,"DT"|); Delay|
|00001eb0| 28 32 30 2c 26 74 6d 70 | 6c 6f 6e 67 29 3b 0d 09 |(20,&tmp|long);..|
|00001ec0| 20 09 09 2f 2a 20 61 6e | 64 20 6e 6f 77 20 74 68 | ../* an|d now th|
|00001ed0| 65 20 6e 75 6d 62 65 72 | 20 20 2a 2f 0d 09 09 09 |e number| */....|
|00001ee0| 20 74 6d 70 6c 6f 6e 67 | 20 3d 20 30 3b 20 70 20 | tmplong| = 0; p |
|00001ef0| 3d 20 2a 6e 75 6d 48 61 | 6e 64 6c 65 3b 0d 09 09 |= *numHa|ndle;...|
|00001f00| 09 20 77 68 69 6c 65 28 | 2a 70 2b 2b 29 74 6d 70 |. while(|*p++)tmp|
|00001f10| 6c 6f 6e 67 2b 2b 3b 20 | 20 2f 2a 20 63 6f 6d 70 |long++; | /* comp|
|00001f20| 75 74 65 20 6c 65 6e 67 | 74 68 20 2a 2f 0d 09 09 |ute leng|th */...|
|00001f30| 09 46 53 57 72 69 74 65 | 28 72 65 66 6e 75 6d 2c |.FSWrite|(refnum,|
|00001f40| 26 74 6d 70 6c 6f 6e 67 | 2c 2a 6e 75 6d 48 61 6e |&tmplong|,*numHan|
|00001f50| 64 6c 65 29 3b 0d 09 09 | 09 6f 6e 65 20 3d 20 31 |dle);...|.one = 1|
|00001f60| 3b 0d 09 09 09 46 53 57 | 72 69 74 65 28 72 65 66 |;....FSW|rite(ref|
|00001f70| 6e 75 6d 2c 26 6f 6e 65 | 2c 22 5c 6e 22 29 3b 0d |num,&one|,"\n");.|
|00001f80| 09 09 09 48 55 6e 6c 6f | 63 6b 28 6e 75 6d 48 61 |...HUnlo|ck(numHa|
|00001f90| 6e 64 6c 65 29 3b 0d 09 | 09 09 52 65 6c 65 61 73 |ndle);..|..Releas|
|00001fa0| 65 52 65 73 6f 75 72 63 | 65 28 6e 75 6d 48 61 6e |eResourc|e(numHan|
|00001fb0| 64 6c 65 29 3b 0d 09 09 | 09 20 0d 09 09 09 20 62 |dle);...|. .... b|
|00001fc0| 72 65 61 6b 3b 0d 09 09 | 09 7d 20 65 6c 73 65 20 |reak;...|.} else |
|00001fd0| 7b 20 53 79 73 42 65 65 | 70 28 31 30 29 3b 20 69 |{ SysBee|p(10); i|
|00001fe0| 74 65 6d 20 3d 20 30 3b | 7d 20 2f 2a 20 6e 6f 74 |tem = 0;|} /* not|
|00001ff0| 68 69 6e 67 20 77 61 73 | 20 73 65 6c 65 63 74 65 |hing was| selecte|
|00002000| 64 20 2a 2f 0d 09 09 63 | 61 73 65 20 43 41 4e 43 |d */...c|ase CANC|
|00002010| 45 4c 3a 20 62 72 65 61 | 6b 3b 20 2f 2a 20 6c 65 |EL: brea|k; /* le|
|00002020| 61 76 65 20 74 68 65 20 | 64 69 61 6c 6f 67 20 2a |ave the |dialog *|
|00002030| 2f 0d 09 09 63 61 73 65 | 20 44 45 4c 45 54 45 3a |/...case| DELETE:|
|00002040| 0d 09 20 20 09 09 53 65 | 74 52 65 63 74 28 26 74 |.. ..Se|tRect(&t|
|00002050| 68 65 43 65 6c 6c 2c 30 | 2c 30 2c 30 2c 30 29 3b |heCell,0|,0,0,0);|
|00002060| 0d 09 20 20 09 09 69 66 | 28 4c 47 65 74 53 65 6c |.. ..if|(LGetSel|
|00002070| 65 63 74 28 74 72 75 65 | 2c 26 74 68 65 43 65 6c |ect(true|,&theCel|
|00002080| 6c 2c 74 68 65 4c 69 73 | 74 29 29 7b 0d 09 09 09 |l,theLis|t)){....|
|00002090| 20 2f 2a 20 67 65 74 20 | 74 68 65 20 73 65 6c 65 | /* get |the sele|
|000020a0| 63 74 69 6f 6e 20 2a 2f | 0d 09 09 09 20 64 61 74 |ction */|.... dat|
|000020b0| 61 4c 65 6e 20 3d 20 4d | 41 58 43 48 41 52 53 3b |aLen = M|AXCHARS;|
|000020c0| 20 2f 2a 20 6d 61 78 20 | 6c 65 6e 67 74 68 20 2a | /* max |length *|
|000020d0| 2f 0d 09 09 09 20 4c 47 | 65 74 43 65 6c 6c 28 62 |/.... LG|etCell(b|
|000020e0| 75 66 66 65 72 2c 26 64 | 61 74 61 4c 65 6e 2c 26 |uffer,&d|ataLen,&|
|000020f0| 74 68 65 43 65 6c 6c 2c | 74 68 65 4c 69 73 74 29 |theCell,|theList)|
|00002100| 3b 0d 09 09 09 20 62 75 | 66 66 65 72 5b 64 61 74 |;.... bu|ffer[dat|
|00002110| 61 4c 65 6e 5d 20 3d 20 | 30 3b 20 2f 2a 20 6d 61 |aLen] = |0; /* ma|
|00002120| 6b 65 20 69 6e 74 6f 20 | 63 2d 73 74 72 69 6e 67 |ke into |c-string|
|00002130| 20 2a 2f 0d 09 09 09 20 | 6e 75 6d 48 61 6e 64 6c | */.... |numHandl|
|00002140| 65 3d 47 65 74 4e 61 6d | 65 64 52 65 73 6f 75 72 |e=GetNam|edResour|
|00002150| 63 65 28 27 44 49 41 4c | 27 2c 62 75 66 66 65 72 |ce('DIAL|',buffer|
|00002160| 29 3b 0d 09 09 09 20 52 | 6d 76 65 52 65 73 6f 75 |);.... R|mveResou|
|00002170| 72 63 65 28 6e 75 6d 48 | 61 6e 64 6c 65 29 3b 0d |rce(numH|andle);.|
|00002180| 09 09 09 20 44 69 73 70 | 6f 73 48 61 6e 64 6c 65 |... Disp|osHandle|
|00002190| 28 6e 75 6d 48 61 6e 64 | 6c 65 29 3b 0d 09 09 09 |(numHand|le);....|
|000021a0| 20 2f 2a 20 6e 6f 77 20 | 64 65 6c 65 74 65 20 74 | /* now |delete t|
|000021b0| 68 65 20 63 65 6c 6c 20 | 61 6e 64 20 69 74 73 20 |he cell |and its |
|000021c0| 63 6f 6e 74 65 6e 74 73 | 20 2a 2f 0d 09 09 09 20 |contents| */.... |
|000021d0| 4c 44 65 6c 52 6f 77 28 | 31 2c 74 68 65 43 65 6c |LDelRow(|1,theCel|
|000021e0| 6c 2e 76 2c 74 68 65 4c | 69 73 74 29 3b 0d 09 09 |l.v,theL|ist);...|
|000021f0| 09 20 2f 2a 20 75 70 64 | 61 74 65 20 74 68 65 20 |. /* upd|ate the |
|00002200| 63 75 72 72 65 6e 74 20 | 6e 75 6d 62 65 72 20 66 |current |number f|
|00002210| 69 65 6c 64 20 2a 2f 0d | 09 09 09 20 47 65 74 44 |ield */.|... GetD|
|00002220| 49 74 65 6d 28 74 68 65 | 57 69 6e 64 6f 77 2c 43 |Item(the|Window,C|
|00002230| 4e 55 4d 42 45 52 2c 26 | 74 79 70 65 2c 26 61 68 |NUMBER,&|type,&ah|
|00002240| 61 6e 64 6c 65 2c 26 42 | 6f 78 29 3b 0d 09 09 09 |andle,&B|ox);....|
|00002250| 20 53 65 74 49 54 65 78 | 74 28 61 68 61 6e 64 6c | SetITex|t(ahandl|
|00002260| 65 2c 22 22 29 3b 0d 09 | 09 09 7d 20 65 6c 73 65 |e,"");..|..} else|
|00002270| 20 53 79 73 42 65 65 70 | 28 31 30 29 3b 20 20 2f | SysBeep|(10); /|
|00002280| 2a 20 6e 6f 20 73 65 6c | 65 63 74 69 6f 6e 20 2a |* no sel|ection *|
|00002290| 2f 0d 09 09 20 20 20 20 | 20 62 72 65 61 6b 3b 0d |/... | break;.|
|000022a0| 09 09 63 61 73 65 20 41 | 44 44 3a 0d 09 09 09 64 |..case A|DD:....d|
|000022b0| 6f 20 0d 09 09 09 09 20 | 69 64 20 3d 20 55 6e 69 |o ..... |id = Uni|
|000022c0| 71 75 65 49 44 28 27 44 | 49 41 4c 27 29 3b 0d 09 |queID('D|IAL');..|
|000022d0| 09 09 77 68 69 6c 65 20 | 28 69 64 20 3c 3d 20 31 |..while |(id <= 1|
|000022e0| 32 37 29 3b 20 20 2f 2a | 20 67 65 74 20 61 20 6e |27); /*| get a n|
|000022f0| 65 77 20 69 64 20 2a 2f | 0d 09 09 09 0d 09 09 09 |ew id */|........|
|00002300| 47 65 74 44 49 74 65 6d | 28 74 68 65 57 69 6e 64 |GetDItem|(theWind|
|00002310| 6f 77 2c 4e 41 4d 45 2c | 26 74 79 70 65 2c 26 61 |ow,NAME,|&type,&a|
|00002320| 68 61 6e 64 6c 65 2c 26 | 42 6f 78 29 3b 20 2f 2a |handle,&|Box); /*|
|00002330| 20 67 65 74 20 74 68 65 | 20 6e 61 6d 65 20 2a 2f | get the| name */|
|00002340| 0d 09 09 09 47 65 74 49 | 54 65 78 74 28 61 68 61 |....GetI|Text(aha|
|00002350| 6e 64 6c 65 2c 62 75 66 | 66 65 72 29 3b 0d 09 09 |ndle,buf|fer);...|
|00002360| 09 0d 09 09 09 2f 2a 20 | 69 66 20 6e 61 6d 65 20 |...../* |if name |
|00002370| 69 6e 20 75 73 65 2c 20 | 74 68 65 6e 20 69 67 6e |in use, |then ign|
|00002380| 6f 72 65 20 72 65 71 75 | 65 73 74 20 20 2a 2f 0d |ore requ|est */.|
|00002390| 09 09 09 74 68 65 48 61 | 6e 64 6c 65 20 3d 20 47 |...theHa|ndle = G|
|000023a0| 65 74 4e 61 6d 65 64 52 | 65 73 6f 75 72 63 65 28 |etNamedR|esource(|
|000023b0| 27 44 49 41 4c 27 2c 62 | 75 66 66 65 72 29 3b 0d |'DIAL',b|uffer);.|
|000023c0| 09 09 09 0d 09 09 09 69 | 66 28 74 68 65 48 61 6e |.......i|f(theHan|
|000023d0| 64 6c 65 20 3d 3d 20 6e | 69 6c 29 7b 20 2f 2a 20 |dle == n|il){ /* |
|000023e0| 6e 6f 20 72 65 73 6f 75 | 72 63 65 20 2c 6f 6b 20 |no resou|rce ,ok |
|000023f0| 74 6f 20 61 64 64 20 2a | 2f 0d 09 09 09 0d 09 09 |to add *|/.......|
|00002400| 09 09 47 65 74 44 49 74 | 65 6d 28 74 68 65 57 69 |..GetDIt|em(theWi|
|00002410| 6e 64 6f 77 2c 4e 55 4d | 42 45 52 2c 26 74 79 70 |ndow,NUM|BER,&typ|
|00002420| 65 2c 26 61 68 61 6e 64 | 6c 65 2c 26 42 6f 78 29 |e,&ahand|le,&Box)|
|00002430| 3b 0d 09 09 09 09 47 65 | 74 49 54 65 78 74 28 61 |;.....Ge|tIText(a|
|00002440| 68 61 6e 64 6c 65 2c 6e | 75 6d 62 75 66 66 29 3b |handle,n|umbuff);|
|00002450| 20 2f 2a 20 67 65 74 20 | 74 68 65 20 74 65 78 74 | /* get |the text|
|00002460| 20 2a 2f 0d 09 09 09 09 | 0d 09 09 09 09 74 6d 70 | */.....|.....tmp|
|00002470| 20 3d 20 30 3b 20 70 20 | 3d 20 28 63 68 61 72 20 | = 0; p |= (char |
|00002480| 2a 29 6e 75 6d 62 75 66 | 66 3b 20 2f 2a 20 67 65 |*)numbuf|f; /* ge|
|00002490| 74 20 6c 65 6e 67 74 68 | 20 6f 66 20 6e 75 6d 62 |t length| of numb|
|000024a0| 65 72 20 2a 2f 0d 09 09 | 09 09 77 68 69 6c 65 28 |er */...|..while(|
|000024b0| 2a 70 2b 2b 29 74 6d 70 | 2b 2b 3b 0d 09 09 09 09 |*p++)tmp|++;.....|
|000024c0| 0d 09 09 09 09 74 6d 70 | 2b 2b 3b 20 20 2f 2a 20 |.....tmp|++; /* |
|000024d0| 66 6f 72 20 74 68 65 20 | 6e 75 6c 6c 20 61 74 20 |for the |null at |
|000024e0| 74 68 65 20 65 6e 64 20 | 6f 66 20 74 68 65 20 73 |the end |of the s|
|000024f0| 74 72 69 6e 67 20 2a 2f | 0d 09 09 09 09 0d 09 09 |tring */|........|
|00002500| 09 09 50 74 72 54 6f 48 | 61 6e 64 28 6e 75 6d 62 |..PtrToH|and(numb|
|00002510| 75 66 66 2c 26 61 68 61 | 6e 64 6c 65 2c 28 6c 6f |uff,&aha|ndle,(lo|
|00002520| 6e 67 29 74 6d 70 29 3b | 0d 09 09 09 09 0d 09 09 |ng)tmp);|........|
|00002530| 09 09 41 64 64 52 65 73 | 6f 75 72 63 65 28 61 68 |..AddRes|ource(ah|
|00002540| 61 6e 64 6c 65 2c 27 44 | 49 41 4c 27 2c 69 64 2c |andle,'D|IAL',id,|
|00002550| 62 75 66 66 65 72 29 3b | 0d 09 09 09 09 57 72 69 |buffer);|.....Wri|
|00002560| 74 65 52 65 73 6f 75 72 | 63 65 28 61 68 61 6e 64 |teResour|ce(ahand|
|00002570| 6c 65 29 3b 09 2f 2a 20 | 77 72 69 74 65 20 69 74 |le);./* |write it|
|00002580| 20 2a 2f 0d 09 09 09 09 | 52 65 6c 65 61 73 65 52 | */.....|ReleaseR|
|00002590| 65 73 6f 75 72 63 65 28 | 61 68 61 6e 64 6c 65 29 |esource(|ahandle)|
|000025a0| 20 3b 20 2f 2a 20 66 72 | 65 65 20 69 74 20 2a 2f | ; /* fr|ee it */|
|000025b0| 0d 09 09 09 09 0d 09 09 | 09 09 2f 2a 20 61 64 64 |........|../* add|
|000025c0| 20 74 6f 20 74 68 65 20 | 6c 69 73 74 20 2a 2f 0d | to the |list */.|
|000025d0| 09 09 09 09 74 68 65 43 | 65 6c 6c 2e 76 20 3d 20 |....theC|ell.v = |
|000025e0| 28 2a 2a 74 68 65 4c 69 | 73 74 29 2e 64 61 74 61 |(**theLi|st).data|
|000025f0| 42 6f 75 6e 64 73 2e 62 | 6f 74 74 6f 6d 3b 0d 09 |Bounds.b|ottom;..|
|00002600| 09 09 09 74 68 65 43 65 | 6c 6c 2e 68 20 3d 20 30 |...theCe|ll.h = 0|
|00002610| 3b 0d 09 09 09 09 4c 41 | 64 64 52 6f 77 28 31 2c |;.....LA|ddRow(1,|
|00002620| 74 68 65 43 65 6c 6c 2e | 76 2c 74 68 65 4c 69 73 |theCell.|v,theLis|
|00002630| 74 29 3b 0d 09 09 09 09 | 0d 09 09 09 09 74 6d 70 |t);.....|.....tmp|
|00002640| 20 3d 20 30 3b 20 70 20 | 3d 20 28 63 68 61 72 20 | = 0; p |= (char |
|00002650| 2a 29 62 75 66 66 65 72 | 3b 20 2f 2a 20 67 65 74 |*)buffer|; /* get|
|00002660| 20 6c 65 6e 67 74 68 20 | 6f 66 20 6e 61 6d 65 20 | length |of name |
|00002670| 2a 2f 0d 09 09 09 09 77 | 68 69 6c 65 28 2a 70 2b |*/.....w|hile(*p+|
|00002680| 2b 29 74 6d 70 2b 2b 3b | 0d 09 09 09 09 0d 09 09 |+)tmp++;|........|
|00002690| 09 09 4c 53 65 74 43 65 | 6c 6c 28 62 75 66 66 65 |..LSetCe|ll(buffe|
|000026a0| 72 2c 74 6d 70 2c 26 74 | 68 65 43 65 6c 6c 2c 74 |r,tmp,&t|heCell,t|
|000026b0| 68 65 4c 69 73 74 29 3b | 0d 09 09 09 20 7d 0d 09 |heList);|.... }..|
|000026c0| 09 09 20 69 66 28 74 68 | 65 48 61 6e 64 6c 65 29 |.. if(th|eHandle)|
|000026d0| 53 79 73 42 65 65 70 28 | 31 30 29 3b 20 20 2f 2a |SysBeep(|10); /*|
|000026e0| 20 73 69 67 6e 61 6c 20 | 66 61 69 6c 75 72 65 20 | signal |failure |
|000026f0| 2a 2f 0d 09 09 09 2f 2a | 20 72 65 73 65 74 20 74 |*/..../*| reset t|
|00002700| 68 65 20 66 69 65 6c 64 | 73 20 2a 2f 0d 09 09 09 |he field|s */....|
|00002710| 47 65 74 44 49 74 65 6d | 28 74 68 65 57 69 6e 64 |GetDItem|(theWind|
|00002720| 6f 77 2c 4e 41 4d 45 2c | 26 74 79 70 65 2c 26 61 |ow,NAME,|&type,&a|
|00002730| 68 61 6e 64 6c 65 2c 26 | 42 6f 78 29 3b 20 2f 2a |handle,&|Box); /*|
|00002740| 20 67 65 74 20 74 68 65 | 20 6e 61 6d 65 20 66 69 | get the| name fi|
|00002750| 65 6c 64 20 2a 2f 0d 09 | 09 09 53 65 74 49 54 65 |eld */..|..SetITe|
|00002760| 78 74 28 61 68 61 6e 64 | 6c 65 2c 22 50 75 74 20 |xt(ahand|le,"Put |
|00002770| 4e 61 6d 65 20 48 65 72 | 65 22 29 3b 09 09 09 0d |Name Her|e");....|
|00002780| 09 09 09 53 65 6c 49 54 | 65 78 74 28 74 68 65 57 |...SelIT|ext(theW|
|00002790| 69 6e 64 6f 77 2c 4e 41 | 4d 45 2c 30 2c 33 32 37 |indow,NA|ME,0,327|
|000027a0| 36 37 29 3b 0d 09 09 09 | 2f 2a 20 61 6e 64 20 6e |67);....|/* and n|
|000027b0| 6f 77 20 74 68 65 20 6e | 75 6d 62 65 72 20 66 69 |ow the n|umber fi|
|000027c0| 65 6c 64 20 2a 2f 0d 09 | 09 09 47 65 74 44 49 74 |eld */..|..GetDIt|
|000027d0| 65 6d 28 74 68 65 57 69 | 6e 64 6f 77 2c 4e 55 4d |em(theWi|ndow,NUM|
|000027e0| 42 45 52 2c 26 74 79 70 | 65 2c 26 61 68 61 6e 64 |BER,&typ|e,&ahand|
|000027f0| 6c 65 2c 26 42 6f 78 29 | 3b 20 2f 2a 20 67 65 74 |le,&Box)|; /* get|
|00002800| 20 74 68 65 20 6e 75 6d | 62 65 72 20 66 69 65 6c | the num|ber fiel|
|00002810| 64 20 2a 2f 0d 09 09 09 | 53 65 74 49 54 65 78 74 |d */....|SetIText|
|00002820| 28 61 68 61 6e 64 6c 65 | 2c 22 50 75 74 20 4e 75 |(ahandle|,"Put Nu|
|00002830| 6d 62 65 72 20 48 65 72 | 65 22 29 3b 09 09 09 0d |mber Her|e");....|
|00002840| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 0d 09 09 |...break|;.......|
|00002850| 64 65 66 61 75 6c 74 3a | 20 62 72 65 61 6b 3b 0d |default:| break;.|
|00002860| 09 20 7d 20 2f 2a 20 73 | 77 69 74 63 68 20 2a 2f |. } /* s|witch */|
|00002870| 0d 09 7d 20 09 09 20 0d | 20 20 20 77 68 69 6c 65 |..} .. .| while|
|00002880| 28 28 69 74 65 6d 20 21 | 3d 20 43 41 4e 43 45 4c |((item !|= CANCEL|
|00002890| 29 20 26 26 20 28 69 74 | 65 6d 20 21 3d 20 44 49 |) && (it|em != DI|
|000028a0| 41 4c 29 29 3b 0d 20 20 | 20 0d 20 20 20 2f 2a 20 |AL));. | . /* |
|000028b0| 67 65 74 20 72 69 64 20 | 6f 66 20 64 61 74 61 20 |get rid |of data |
|000028c0| 73 74 72 75 63 74 75 72 | 65 73 20 61 6e 64 20 72 |structur|es and r|
|000028d0| 65 74 75 72 6e 20 74 6f | 20 66 69 6e 64 65 72 20 |eturn to| finder |
|000028e0| 2a 2f 0d 20 20 20 4c 44 | 69 73 70 6f 73 65 28 74 |*/. LD|ispose(t|
|000028f0| 68 65 4c 69 73 74 29 3b | 0d 20 20 20 44 69 73 70 |heList);|. Disp|
|00002900| 6f 73 44 69 61 6c 6f 67 | 28 74 68 65 57 69 6e 64 |osDialog|(theWind|
|00002910| 6f 77 29 3b 0d 20 20 20 | 53 65 74 50 6f 72 74 28 |ow);. |SetPort(|
|00002920| 73 61 76 65 50 6f 72 74 | 29 3b 0d 20 20 20 0d 7d |savePort|);. .}|
|00002930| 0d 2f 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |./******|********|
|00002940| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002950| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002960| 2a 2a 2a 2a 2a 2a 2a 2a | 2a 2a 2a 2a 2a 2a 2a 2a |********|********|
|00002970| 2a 2a 2a 2a 2a 2a 2a 2a | 2f 0d 00 00 00 00 00 00 |********|/.......|
|00002980| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00002990| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000029a0| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|000029b0| 08 64 69 61 6c 65 72 2e | 63 00 02 00 00 00 50 61 |.dialer.|c.....Pa|
|000029c0| 72 74 53 49 54 78 00 00 | 00 00 00 00 00 00 00 01 |rtSITx..|........|
|000029d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000029e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000029f0| 00 00 a9 80 1b 95 00 00 | 00 00 00 00 01 7e ff ff |........|.....~..|
|00002a00| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a10| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a20| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a30| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a40| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a50| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a60| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a70| ff ff ff ff ff ff ff ff | ff ff ff ff ff ff ff ff |........|........|
|00002a80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00002a90| 00 40 00 01 ab 84 01 00 | 15 34 00 00 00 00 00 01 |.@......|.4......|
|00002aa0| ab 88 00 00 00 00 00 06 | 00 04 00 29 00 03 01 53 |........|...)...S|
|00002ab0| 01 fd 00 b1 00 10 01 c8 | 01 e9 9d 74 7b f2 00 00 |........|...t{...|
|00002ac0| 1a 32 00 00 1a e1 00 00 | 00 00 01 00 00 00 01 00 |.2......|........|
|00002ad0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 01 66 9e |...L...L|...2..f.|
|00002ae0| 02 f2 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00002af0| 00 0a 03 ed ff ff 00 00 | 00 00 00 02 68 1c 00 00 |........|....h...|
+--------+-------------------------+-------------------------+--------+--------+