home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 January / macpower199701.bin / AMUG / Programming_10 / ICPAppSource+ICprogKit / ICProgKit 1.3.sit / ICProgKit1.3 / APIs / ICCAPI.p < prev    next >
MacBinary  |  1996-07-14  |  47.9 KB  |  [TEXT/CWIE]

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: ICCAPI.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Applause Picture (image/applausePicture) ext Unsupported
1% dexvert bsdiff patch (other/bsdiffPatch) ext Unsupported
1% dexvert imgdiff patch (other/imgdiffPatch) ext Unsupported
1% dexvert MATLAB p-code (other/matlabPCode) ext Unsupported
1% dexvert WSUS Patch Storage File (other/wsusPatchStorageFile) ext Unsupported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Sun Jul 14 20:22:26 1996, modified Sun Jul 14 20:22:26 1996, creator 'CWIE', type ASCII, 28308 bytes "ICCAPI.p" , at 0x6f14 20435 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[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 49 43 43 41 50 49 | 2e 70 00 00 00 00 00 00 |..ICCAPI|.p......|
|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 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 6e 94 00 | 00 4f d3 ae 0f 3f c2 ae |.....n..|.O...?..|
|00000060| 0f 3f c2 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.?......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 53 7a 00 00 |........|....Sz..|
|00000080| 75 6e 69 74 20 49 43 43 | 41 50 49 3b 0d 0d 28 2a |unit ICC|API;..(*|
|00000090| 20 a5 a5 a5 53 74 61 72 | 74 20 48 65 61 64 65 72 | ...Star|t Header|
|000000a0| a5 a5 a5 20 2a 29 0d 0d | 28 2a 20 46 69 6c 65 3a |... *)..|(* File:|
|000000b0| 20 20 20 20 20 20 20 20 | 20 49 43 43 41 50 49 2e | | ICCAPI.|
|000000c0| 70 20 28 69 6e 74 66 29 | 0d 20 2a 20 47 65 6e 65 |p (intf)|. * Gene|
|000000d0| 72 61 74 65 64 20 62 79 | 3a 20 31 2e 30 64 34 0d |rated by|: 1.0d4.|
|000000e0| 20 2a 20 46 6f 72 3a 20 | 20 20 20 20 20 20 20 20 | * For: | |
|000000f0| 20 49 43 20 31 2e 33 0d | 20 2a 20 4f 6e 3a 20 20 | IC 1.3.| * On: |
|00000100| 20 20 20 20 20 20 20 20 | 20 53 75 6e 64 61 79 2c | | Sunday,|
|00000110| 20 31 34 20 4a 75 6c 79 | 20 31 39 39 36 2c 20 32 | 14 July| 1996, 2|
|00000120| 30 3a 31 39 3a 35 35 0d | 20 2a 20 0d 20 2a 20 54 |0:19:55.| * . * T|
|00000130| 68 69 73 20 66 69 6c 65 | 20 69 73 20 70 61 72 74 |his file| is part|
|00000140| 20 6f 66 20 74 68 65 20 | 49 6e 74 65 72 6e 65 74 | of the |Internet|
|00000150| 20 43 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 73 | Configu|ration s|
|00000160| 79 73 74 65 6d 20 61 6e | 64 0d 20 2a 20 69 73 20 |ystem an|d. * is |
|00000170| 70 6c 61 63 65 64 20 69 | 6e 20 74 68 65 20 70 75 |placed i|n the pu|
|00000180| 62 6c 69 63 20 64 6f 6d | 61 69 6e 20 66 6f 72 20 |blic dom|ain for |
|00000190| 74 68 65 20 62 65 6e 65 | 66 69 74 20 6f 66 20 61 |the bene|fit of a|
|000001a0| 6c 6c 2e 0d 20 2a 29 0d | 0d 28 2a 20 a5 a5 a5 45 |ll.. *).|.(* ...E|
|000001b0| 6e 64 20 48 65 61 64 65 | 72 a5 a5 a5 20 2a 29 0d |nd Heade|r... *).|
|000001c0| 0d 69 6e 74 65 72 66 61 | 63 65 0d 0d 09 75 73 65 |.interfa|ce...use|
|000001d0| 73 0d 7b 24 69 66 63 20 | 75 6e 64 65 66 69 6e 65 |s.{$ifc |undefine|
|000001e0| 64 20 54 48 49 4e 4b 5f | 50 61 73 63 61 6c 7d 0d |d THINK_|Pascal}.|
|000001f0| 09 09 54 79 70 65 73 2c | 20 46 69 6c 65 73 2c 20 |..Types,| Files, |
|00000200| 51 75 69 63 6b 44 72 61 | 77 2c 20 41 70 70 6c 65 |QuickDra|w, Apple|
|00000210| 54 61 6c 6b 2c 20 41 6c | 69 61 73 65 73 2c 20 0d |Talk, Al|iases, .|
|00000220| 7b 24 65 6e 64 63 7d 0d | 09 09 43 6f 6d 70 6f 6e |{$endc}.|..Compon|
|00000230| 65 6e 74 73 2c 20 49 43 | 54 79 70 65 73 2c 20 49 |ents, IC|Types, I|
|00000240| 43 4b 65 79 73 3b 0d 0d | 09 63 6f 6e 73 74 0d 09 |CKeys;..|.const..|
|00000250| 09 69 6e 74 65 72 6e 65 | 74 43 6f 6e 66 69 67 75 |.interne|tConfigu|
|00000260| 72 61 74 69 6f 6e 43 6f | 6d 70 6f 6e 65 6e 74 54 |rationCo|mponentT|
|00000270| 79 70 65 20 3d 20 27 50 | 52 45 46 27 3b 09 09 09 |ype = 'P|REF';...|
|00000280| 09 28 2a 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |.(* the |componen|
|00000290| 74 20 74 79 70 65 20 2a | 29 0d 09 09 69 6e 74 65 |t type *|)...inte|
|000002a0| 72 6e 65 74 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |rnetConf|iguratio|
|000002b0| 6e 43 6f 6d 70 6f 6e 65 | 6e 74 53 75 62 54 79 70 |nCompone|ntSubTyp|
|000002c0| 65 20 3d 20 27 49 43 41 | 70 27 3b 09 09 09 28 2a |e = 'ICA|p';...(*|
|000002d0| 20 74 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 73 | the com|ponent s|
|000002e0| 75 62 74 79 70 65 20 2a | 29 0d 09 09 69 6e 74 65 |ubtype *|)...inte|
|000002f0| 72 6e 65 74 43 6f 6e 66 | 69 67 75 72 61 74 69 6f |rnetConf|iguratio|
|00000300| 6e 43 6f 6d 70 6f 6e 65 | 6e 74 49 6e 74 65 72 66 |nCompone|ntInterf|
|00000310| 61 63 65 56 65 72 73 69 | 6f 6e 30 20 3d 20 24 30 |aceVersi|on0 = $0|
|00000320| 30 30 30 30 30 30 30 3b | 0d 09 09 69 6e 74 65 72 |0000000;|...inter|
|00000330| 6e 65 74 43 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |netConfi|guration|
|00000340| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 74 65 72 66 61 |Componen|tInterfa|
|00000350| 63 65 56 65 72 73 69 6f | 6e 31 20 3d 20 24 30 30 |ceVersio|n1 = $00|
|00000360| 30 31 30 30 30 30 3b 0d | 09 09 69 6e 74 65 72 6e |010000;.|..intern|
|00000370| 65 74 43 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 43 |etConfig|urationC|
|00000380| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 74 65 72 66 61 63 |omponent|Interfac|
|00000390| 65 56 65 72 73 69 6f 6e | 32 20 3d 20 24 30 30 30 |eVersion|2 = $000|
|000003a0| 32 30 30 30 30 3b 0d 28 | 2a 20 63 75 72 72 65 6e |20000;.(|* curren|
|000003b0| 74 20 76 65 72 73 69 6f | 6e 20 6e 75 6d 62 65 72 |t versio|n number|
|000003c0| 20 69 73 20 76 65 72 73 | 69 6f 6e 20 32 20 2a 29 | is vers|ion 2 *)|
|000003d0| 0d 09 09 69 6e 74 65 72 | 6e 65 74 43 6f 6e 66 69 |...inter|netConfi|
|000003e0| 67 75 72 61 74 69 6f 6e | 43 6f 6d 70 6f 6e 65 6e |guration|Componen|
|000003f0| 74 49 6e 74 65 72 66 61 | 63 65 56 65 72 73 69 6f |tInterfa|ceVersio|
|00000400| 6e 20 3d 20 69 6e 74 65 | 72 6e 65 74 43 6f 6e 66 |n = inte|rnetConf|
|00000410| 69 67 75 72 61 74 69 6f | 6e 43 6f 6d 70 6f 6e 65 |iguratio|nCompone|
|00000420| 6e 74 49 6e 74 65 72 66 | 61 63 65 56 65 72 73 69 |ntInterf|aceVersi|
|00000430| 6f 6e 32 3b 0d 0d 28 2a | 20 a5 a5 a5 53 74 61 72 |on2;..(*| ...Star|
|00000440| 74 20 49 43 43 41 50 49 | 2e 70 a5 a5 a5 20 2a 29 |t ICCAPI|.p... *)|
|00000450| 0d 0d 20 20 28 2a 20 2a | 2a 2a 2a 2a 20 53 74 61 |.. (* *|**** Sta|
|00000460| 72 74 69 6e 67 20 55 70 | 20 61 6e 64 20 53 68 75 |rting Up| and Shu|
|00000470| 74 74 69 6e 67 20 44 6f | 77 6e 20 2a 2a 2a 2a 2a |tting Do|wn *****|
|00000480| 20 2a 29 0d 20 20 0d 20 | 20 66 75 6e 63 74 69 6f | *). . | functio|
|00000490| 6e 20 49 43 43 53 74 61 | 72 74 28 76 61 72 20 69 |n ICCSta|rt(var i|
|000004a0| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|000004b0| 6e 73 74 61 6e 63 65 3b | 20 63 72 65 61 74 6f 72 |nstance;| creator|
|000004c0| 20 3a 20 4f 53 54 79 70 | 65 29 20 3a 20 49 43 45 | : OSTyp|e) : ICE|
|000004d0| 72 72 6f 72 3b 0d 20 20 | 20 20 28 2a 20 43 61 6c |rror;. | (* Cal|
|000004e0| 6c 20 74 68 69 73 20 61 | 74 20 61 70 70 6c 69 63 |l this a|t applic|
|000004f0| 61 74 69 6f 6e 20 69 6e | 69 74 69 61 6c 69 73 61 |ation in|itialisa|
|00000500| 74 69 6f 6e 2e 20 53 65 | 74 20 63 72 65 61 74 6f |tion. Se|t creato|
|00000510| 72 20 74 6f 20 79 6f 75 | 72 20 61 70 70 6c 69 63 |r to you|r applic|
|00000520| 61 74 69 6f 6e 0d 20 20 | 20 20 20 2a 20 63 72 65 |ation. | * cre|
|00000530| 61 74 6f 72 20 74 6f 20 | 61 6c 6c 6f 77 20 66 6f |ator to |allow fo|
|00000540| 72 20 66 75 74 75 72 65 | 20 65 78 70 61 6e 73 69 |r future| expansi|
|00000550| 6f 6e 20 6f 66 20 74 68 | 65 20 49 43 20 73 79 73 |on of th|e IC sys|
|00000560| 74 65 6d 2e 20 52 65 74 | 75 72 6e 73 0d 20 20 20 |tem. Ret|urns. |
|00000570| 20 20 2a 20 69 6e 73 74 | 20 61 73 20 61 20 63 6f | * inst| as a co|
|00000580| 6e 6e 65 63 74 69 6f 6e | 20 74 6f 20 74 68 65 20 |nnection| to the |
|00000590| 49 43 20 73 79 73 74 65 | 6d 2e 0d 20 20 20 20 20 |IC syste|m.. |
|000005a0| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|000005b0| 20 49 43 43 53 74 6f 70 | 28 69 6e 73 74 20 3a 20 | ICCStop|(inst : |
|000005c0| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|000005d0| 65 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |e) : ICE|rror;. |
|000005e0| 20 20 28 2a 20 49 74 20 | 69 73 20 69 6c 6c 65 67 | (* It |is illeg|
|000005f0| 61 6c 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |al to ca|ll this |
|00000600| 72 6f 75 74 69 6e 65 20 | 69 6e 73 69 64 65 20 61 |routine |inside a|
|00000610| 20 49 43 42 65 67 69 6e | 2f 45 6e 64 20 70 61 69 | ICBegin|/End pai|
|00000620| 72 2e 0d 20 20 20 20 20 | 2a 20 43 61 6c 6c 20 74 |r.. |* Call t|
|00000630| 68 69 73 20 61 74 20 61 | 70 70 6c 69 63 61 74 69 |his at a|pplicati|
|00000640| 6f 6e 20 69 6e 69 74 69 | 61 6c 69 73 61 74 69 6f |on initi|alisatio|
|00000650| 6e 2c 20 61 66 74 65 72 | 20 77 68 69 63 68 20 69 |n, after| which i|
|00000660| 6e 73 74 0d 20 20 20 20 | 20 2a 20 69 73 20 6e 6f |nst. | * is no|
|00000670| 20 6c 6f 6e 67 65 72 20 | 76 61 6c 69 64 20 63 6f | longer |valid co|
|00000680| 6e 6e 65 63 74 69 6f 6e | 20 74 6f 20 49 43 2e 0d |nnection| to IC..|
|00000690| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 28 2a 20 | *).| . (* |
|000006a0| 2a 2a 2a 2a 2a 20 53 70 | 65 63 69 66 79 69 6e 67 |***** Sp|ecifying|
|000006b0| 20 61 20 43 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a Confi|guration|
|000006c0| 20 2a 2a 2a 2a 2a 20 2a | 29 0d 20 20 0d 20 20 66 | ***** *|). . f|
|000006d0| 75 6e 63 74 69 6f 6e 20 | 49 43 43 46 69 6e 64 43 |unction |ICCFindC|
|000006e0| 6f 6e 66 69 67 46 69 6c | 65 28 69 6e 73 74 20 3a |onfigFil|e(inst :|
|000006f0| 20 43 6f 6d 70 6f 6e 65 | 6e 74 49 6e 73 74 61 6e | Compone|ntInstan|
|00000700| 63 65 3b 20 63 6f 75 6e | 74 20 3a 20 69 6e 74 65 |ce; coun|t : inte|
|00000710| 67 65 72 3b 20 66 6f 6c | 64 65 72 73 20 3a 20 49 |ger; fol|ders : I|
|00000720| 43 44 69 72 53 70 65 63 | 41 72 72 61 79 50 74 72 |CDirSpec|ArrayPtr|
|00000730| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 7b |) : ICEr|ror;. {|
|00000740| 24 69 66 63 20 6e 6f 74 | 20 47 65 6e 65 72 61 74 |$ifc not| Generat|
|00000750| 69 6e 67 43 46 4d 7d 0d | 20 20 20 20 69 6e 6c 69 |ingCFM}.| inli|
|00000760| 6e 65 20 24 32 46 33 43 | 2c 20 36 2c 20 32 2c 20 |ne $2F3C|, 6, 2, |
|00000770| 24 37 30 30 30 2c 20 24 | 41 38 32 41 3b 0d 20 20 |$7000, $|A82A;. |
|00000780| 7b 24 65 6e 64 63 7d 0d | 20 20 20 20 28 2a 20 49 |{$endc}.| (* I|
|00000790| 74 20 69 73 20 69 6c 6c | 65 67 61 6c 20 74 6f 20 |t is ill|egal to |
|000007a0| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|000007b0| 65 20 69 6e 73 69 64 65 | 20 61 20 49 43 42 65 67 |e inside| a ICBeg|
|000007c0| 69 6e 2f 45 6e 64 20 70 | 61 69 72 2e 0d 20 20 20 |in/End p|air.. |
|000007d0| 20 20 2a 20 43 61 6c 6c | 20 74 6f 20 63 6f 6e 66 | * Call| to conf|
|000007e0| 69 67 75 72 65 20 74 68 | 69 73 20 63 6f 6e 6e 65 |igure th|is conne|
|000007f0| 63 74 69 6f 6e 20 74 6f | 20 49 43 2e 0d 20 20 20 |ction to| IC.. |
|00000800| 20 20 2a 20 53 65 74 20 | 63 6f 75 6e 74 20 61 73 | * Set |count as|
|00000810| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 76 | the num|ber of v|
|00000820| 61 6c 69 64 20 65 6c 65 | 6d 65 6e 74 73 20 69 6e |alid ele|ments in|
|00000830| 20 66 6f 6c 64 65 72 73 | 2e 0d 20 20 20 20 20 2a | folders|.. *|
|00000840| 20 53 65 74 20 66 6f 6c | 64 65 72 73 20 74 6f 20 | Set fol|ders to |
|00000850| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|00000860| 20 66 6f 6c 64 65 72 73 | 20 74 6f 20 73 65 61 72 | folders| to sear|
|00000870| 63 68 2e 0d 20 20 20 20 | 20 2a 20 53 65 74 74 69 |ch.. | * Setti|
|00000880| 6e 67 20 63 6f 75 6e 74 | 20 74 6f 20 30 20 61 6e |ng count| to 0 an|
|00000890| 64 20 66 6f 6c 64 65 72 | 73 20 74 6f 20 6e 69 6c |d folder|s to nil|
|000008a0| 20 69 73 20 4f 4b 2e 0d | 20 20 20 20 20 2a 20 53 | is OK..| * S|
|000008b0| 65 61 72 63 68 65 73 20 | 74 68 65 20 73 70 65 63 |earches |the spec|
|000008c0| 69 66 69 65 64 20 66 6f | 6c 64 65 72 73 20 61 6e |ified fo|lders an|
|000008d0| 64 20 74 68 65 6e 20 74 | 68 65 20 50 72 65 66 65 |d then t|he Prefe|
|000008e0| 72 65 6e 63 65 73 20 66 | 6f 6c 64 65 72 0d 20 20 |rences f|older. |
|000008f0| 20 20 20 2a 20 69 6e 20 | 61 20 75 6e 73 70 65 63 | * in |a unspec|
|00000900| 69 66 69 65 64 20 6d 61 | 6e 6e 65 72 2e 0d 20 20 |ified ma|nner.. |
|00000910| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00000920| 69 6f 6e 20 49 43 43 46 | 69 6e 64 55 73 65 72 43 |ion ICCF|indUserC|
|00000930| 6f 6e 66 69 67 46 69 6c | 65 28 69 6e 73 74 20 3a |onfigFil|e(inst :|
|00000940| 20 43 6f 6d 70 6f 6e 65 | 6e 74 49 6e 73 74 61 6e | Compone|ntInstan|
|00000950| 63 65 3b 20 76 61 72 20 | 77 68 65 72 65 20 3a 20 |ce; var |where : |
|00000960| 49 43 44 69 72 53 70 65 | 63 29 20 3a 20 49 43 45 |ICDirSpe|c) : ICE|
|00000970| 72 72 6f 72 3b 0d 20 20 | 7b 24 69 66 63 20 6e 6f |rror;. |{$ifc no|
|00000980| 74 20 47 65 6e 65 72 61 | 74 69 6e 67 43 46 4d 7d |t Genera|tingCFM}|
|00000990| 0d 20 20 20 20 69 6e 6c | 69 6e 65 20 24 32 46 33 |. inl|ine $2F3|
|000009a0| 43 2c 20 34 2c 20 31 34 | 2c 20 24 37 30 30 30 2c |C, 4, 14|, $7000,|
|000009b0| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|000009c0| 7d 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |}. (*| Require|
|000009d0| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|000009e0| 20 49 74 20 69 73 20 69 | 6c 6c 65 67 61 6c 20 74 | It is i|llegal t|
|000009f0| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00000a00| 69 6e 65 20 69 6e 73 69 | 64 65 20 61 20 49 43 42 |ine insi|de a ICB|
|00000a10| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 2e 0d 20 |egin/End| pair.. |
|00000a20| 20 20 20 20 2a 20 53 69 | 6d 69 6c 61 72 20 74 6f | * Si|milar to|
|00000a30| 20 49 43 46 69 6e 64 43 | 6f 6e 66 69 67 46 69 6c | ICFindC|onfigFil|
|00000a40| 65 20 65 78 63 65 70 74 | 20 74 68 61 74 20 69 74 |e except| that it|
|00000a50| 20 6f 6e 6c 79 20 73 65 | 61 72 63 68 65 73 20 74 | only se|arches t|
|00000a60| 68 65 20 66 6f 6c 64 65 | 72 0d 20 20 20 20 20 2a |he folde|r. *|
|00000a70| 20 73 70 65 63 69 66 69 | 65 64 20 69 6e 20 77 68 | specifi|ed in wh|
|00000a80| 65 72 65 2e 20 20 49 66 | 20 74 68 65 20 69 6e 70 |ere. If| the inp|
|00000a90| 75 74 20 70 61 72 61 6d | 65 74 65 72 73 20 61 72 |ut param|eters ar|
|00000aa0| 65 20 76 61 6c 69 64 20 | 74 68 65 20 72 6f 75 74 |e valid |the rout|
|00000ab0| 69 6e 65 0d 20 20 20 20 | 20 2a 20 77 69 6c 6c 20 |ine. | * will |
|00000ac0| 61 6c 77 61 79 73 20 73 | 75 63 63 65 73 73 66 75 |always s|uccessfu|
|00000ad0| 6c 20 63 6f 6e 66 69 67 | 75 72 65 20 74 68 65 20 |l config|ure the |
|00000ae0| 69 6e 73 74 61 6e 63 65 | 2c 20 63 72 65 61 74 69 |instance|, creati|
|00000af0| 6e 67 20 61 6e 0d 20 20 | 20 20 20 2a 20 65 6d 70 |ng an. | * emp|
|00000b00| 74 79 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e |ty confi|guration|
|00000b10| 20 69 66 20 6e 65 63 65 | 73 73 61 72 79 0d 20 20 | if nece|ssary. |
|00000b20| 20 20 20 2a 20 46 6f 72 | 20 75 73 65 20 77 69 74 | * For| use wit|
|00000b30| 68 20 64 6f 75 62 6c 65 | 2d 63 6c 69 63 6b 61 62 |h double|-clickab|
|00000b40| 6c 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 66 69 |le prefe|rence fi|
|00000b50| 6c 65 73 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d |les.. | *). .|
|00000b60| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 43 47 65 | functi|on ICCGe|
|00000b70| 6e 65 72 61 6c 46 69 6e | 64 43 6f 6e 66 69 67 46 |neralFin|dConfigF|
|00000b80| 69 6c 65 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |ile(inst| : Compo|
|00000b90| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 73 65 |nentInst|ance; se|
|00000ba0| 61 72 63 68 5f 70 72 65 | 66 73 20 3a 20 42 6f 6f |arch_pre|fs : Boo|
|00000bb0| 6c 65 61 6e 3b 20 63 61 | 6e 5f 63 72 65 61 74 65 |lean; ca|n_create|
|00000bc0| 20 3a 20 42 6f 6f 6c 65 | 61 6e 3b 20 63 6f 75 6e | : Boole|an; coun|
|00000bd0| 74 20 3a 20 69 6e 74 65 | 67 65 72 3b 20 66 6f 6c |t : inte|ger; fol|
|00000be0| 64 65 72 73 20 3a 20 49 | 43 44 69 72 53 70 65 63 |ders : I|CDirSpec|
|00000bf0| 41 72 72 61 79 50 74 72 | 29 20 3a 20 49 43 45 72 |ArrayPtr|) : ICEr|
|00000c00| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|00000c10| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|00000c20| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00000c30| 2c 20 31 30 2c 20 33 30 | 2c 20 24 37 30 30 30 2c |, 10, 30|, $7000,|
|00000c40| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|00000c50| 7d 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |}. (*| Require|
|00000c60| 73 20 49 43 20 31 2e 32 | 2e 0d 20 20 20 20 20 2a |s IC 1.2|.. *|
|00000c70| 20 49 74 20 69 73 20 69 | 6c 6c 65 67 61 6c 20 74 | It is i|llegal t|
|00000c80| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00000c90| 69 6e 65 20 69 6e 73 69 | 64 65 20 61 20 49 43 42 |ine insi|de a ICB|
|00000ca0| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 2e 0d 20 |egin/End| pair.. |
|00000cb0| 20 20 20 20 2a 20 43 61 | 6c 6c 20 74 6f 20 63 6f | * Ca|ll to co|
|00000cc0| 6e 66 69 67 75 72 65 20 | 74 68 69 73 20 63 6f 6e |nfigure |this con|
|00000cd0| 6e 65 63 74 69 6f 6e 20 | 74 6f 20 49 43 2e 0d 20 |nection |to IC.. |
|00000ce0| 20 20 20 20 2a 20 54 68 | 69 73 20 72 6f 75 74 69 | * Th|is routi|
|00000cf0| 6e 65 20 61 63 74 73 20 | 61 73 20 61 20 6d 6f 72 |ne acts |as a mor|
|00000d00| 65 20 67 65 6e 65 72 61 | 6c 20 72 65 70 6c 61 63 |e genera|l replac|
|00000d10| 65 6d 65 6e 74 20 66 6f | 72 0d 20 20 20 20 20 2a |ement fo|r. *|
|00000d20| 20 49 43 46 69 6e 64 43 | 6f 6e 66 69 67 46 69 6c | ICFindC|onfigFil|
|00000d30| 65 20 61 6e 64 20 49 43 | 46 69 6e 64 55 73 65 72 |e and IC|FindUser|
|00000d40| 43 6f 6e 66 69 67 46 69 | 6c 65 2e 0d 20 20 20 20 |ConfigFi|le.. |
|00000d50| 20 2a 20 53 65 74 20 73 | 65 61 72 63 68 5f 70 72 | * Set s|earch_pr|
|00000d60| 65 66 73 20 74 6f 20 74 | 72 75 65 20 69 66 20 79 |efs to t|rue if y|
|00000d70| 6f 75 20 77 61 6e 74 20 | 69 74 20 74 6f 20 73 65 |ou want |it to se|
|00000d80| 61 72 63 68 20 74 68 65 | 20 70 72 65 66 65 72 65 |arch the| prefere|
|00000d90| 6e 63 65 73 20 66 6f 6c | 64 65 72 2e 0d 20 20 20 |nces fol|der.. |
|00000da0| 20 20 2a 20 53 65 74 20 | 63 61 6e 5f 63 72 65 61 | * Set |can_crea|
|00000db0| 74 65 20 74 6f 20 74 72 | 75 65 20 69 66 20 79 6f |te to tr|ue if yo|
|00000dc0| 75 20 77 61 6e 74 20 69 | 74 20 74 6f 20 62 65 20 |u want i|t to be |
|00000dd0| 61 62 6c 65 20 74 6f 20 | 63 72 65 61 74 65 20 61 |able to |create a|
|00000de0| 20 6e 65 77 20 63 6f 6e | 66 69 67 2e 0d 20 20 20 | new con|fig.. |
|00000df0| 20 20 2a 20 53 65 74 20 | 63 6f 75 6e 74 20 61 73 | * Set |count as|
|00000e00| 20 74 68 65 20 6e 75 6d | 62 65 72 20 6f 66 20 76 | the num|ber of v|
|00000e10| 61 6c 69 64 20 65 6c 65 | 6d 65 6e 74 73 20 69 6e |alid ele|ments in|
|00000e20| 20 66 6f 6c 64 65 72 73 | 2e 0d 20 20 20 20 20 2a | folders|.. *|
|00000e30| 20 53 65 74 20 66 6f 6c | 64 65 72 73 20 74 6f 20 | Set fol|ders to |
|00000e40| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|00000e50| 20 66 6f 6c 64 65 72 73 | 20 74 6f 20 73 65 61 72 | folders| to sear|
|00000e60| 63 68 2e 0d 20 20 20 20 | 20 2a 20 53 65 74 74 69 |ch.. | * Setti|
|00000e70| 6e 67 20 63 6f 75 6e 74 | 20 74 6f 20 30 20 61 6e |ng count| to 0 an|
|00000e80| 64 20 66 6f 6c 64 65 72 | 73 20 74 6f 20 6e 69 6c |d folder|s to nil|
|00000e90| 20 69 73 20 4f 4b 2e 0d | 20 20 20 20 20 2a 20 53 | is OK..| * S|
|00000ea0| 65 61 72 63 68 65 73 20 | 74 68 65 20 73 70 65 63 |earches |the spec|
|00000eb0| 69 66 69 65 64 20 66 6f | 6c 64 65 72 73 20 61 6e |ified fo|lders an|
|00000ec0| 64 20 74 68 65 6e 20 6f | 70 74 69 6f 6e 61 6c 6c |d then o|ptionall|
|00000ed0| 79 20 74 68 65 20 50 72 | 65 66 65 72 65 6e 63 65 |y the Pr|eference|
|00000ee0| 73 20 66 6f 6c 64 65 72 | 0d 20 20 20 20 20 2a 20 |s folder|. * |
|00000ef0| 69 6e 20 61 20 75 6e 73 | 70 65 63 69 66 69 65 64 |in a uns|pecified|
|00000f00| 20 6d 61 6e 6e 65 72 2e | 0d 20 20 20 20 20 2a 29 | manner.|. *)|
|00000f10| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00000f20| 43 43 43 68 6f 6f 73 65 | 43 6f 6e 66 69 67 28 69 |CCChoose|Config(i|
|00000f30| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|00000f40| 6e 73 74 61 6e 63 65 29 | 20 3a 20 49 43 45 72 72 |nstance)| : ICErr|
|00000f50| 6f 72 3b 0d 20 20 7b 24 | 69 66 63 20 6e 6f 74 20 |or;. {$|ifc not |
|00000f60| 47 65 6e 65 72 61 74 69 | 6e 67 43 46 4d 7d 0d 20 |Generati|ngCFM}. |
|00000f70| 20 20 20 69 6e 6c 69 6e | 65 20 24 32 46 33 43 2c | inlin|e $2F3C,|
|00000f80| 20 30 2c 20 33 33 2c 20 | 24 37 30 30 30 2c 20 24 | 0, 33, |$7000, $|
|00000f90| 41 38 32 41 3b 0d 20 20 | 7b 24 65 6e 64 63 7d 0d |A82A;. |{$endc}.|
|00000fa0| 20 20 20 20 28 2a 20 52 | 65 71 75 69 72 65 73 20 | (* R|equires |
|00000fb0| 49 43 20 31 2e 32 2e 0d | 20 20 20 20 20 2a 20 49 |IC 1.2..| * I|
|00000fc0| 74 20 69 73 20 69 6c 6c | 65 67 61 6c 20 74 6f 20 |t is ill|egal to |
|00000fd0| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00000fe0| 65 20 69 6e 73 69 64 65 | 20 61 20 49 43 42 65 67 |e inside| a ICBeg|
|00000ff0| 69 6e 2f 45 6e 64 20 70 | 61 69 72 2e 0d 20 20 20 |in/End p|air.. |
|00001000| 20 20 2a 20 52 65 71 75 | 65 73 74 73 20 74 68 65 | * Requ|ests the|
|00001010| 20 75 73 65 72 20 74 6f | 20 63 68 6f 6f 73 65 20 | user to| choose |
|00001020| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2c |a config|uration,|
|00001030| 20 74 79 70 69 63 61 6c | 6c 79 20 75 73 69 6e 67 | typical|ly using|
|00001040| 20 73 6f 6d 65 0d 20 20 | 20 20 20 2a 20 73 6f 72 | some. | * sor|
|00001050| 74 20 6f 66 20 6d 6f 64 | 61 6c 20 64 69 61 6c 6f |t of mod|al dialo|
|00001060| 67 2e 20 49 66 20 74 68 | 65 20 75 73 65 72 20 63 |g. If th|e user c|
|00001070| 61 6e 63 65 6c 73 20 74 | 68 65 20 64 69 61 6c 6f |ancels t|he dialo|
|00001080| 67 20 74 68 65 20 63 6f | 6e 66 69 67 75 72 61 74 |g the co|nfigurat|
|00001090| 69 6f 6e 0d 20 20 20 20 | 20 2a 20 73 74 61 74 65 |ion. | * state|
|000010a0| 20 77 69 6c 6c 20 62 65 | 20 75 6e 61 66 66 65 63 | will be| unaffec|
|000010b0| 74 65 64 2e 0d 20 20 20 | 20 20 2a 29 0d 20 20 0d |ted.. | *). .|
|000010c0| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 43 43 68 | functi|on ICCCh|
|000010d0| 6f 6f 73 65 4e 65 77 43 | 6f 6e 66 69 67 28 69 6e |ooseNewC|onfig(in|
|000010e0| 73 74 20 3a 20 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |st : Com|ponentIn|
|000010f0| 73 74 61 6e 63 65 29 20 | 3a 20 49 43 45 72 72 6f |stance) |: ICErro|
|00001100| 72 3b 0d 20 20 7b 24 69 | 66 63 20 6e 6f 74 20 47 |r;. {$i|fc not G|
|00001110| 65 6e 65 72 61 74 69 6e | 67 43 46 4d 7d 0d 20 20 |eneratin|gCFM}. |
|00001120| 20 20 69 6e 6c 69 6e 65 | 20 24 32 46 33 43 2c 20 | inline| $2F3C, |
|00001130| 30 2c 20 33 34 2c 20 24 | 37 30 30 30 2c 20 24 41 |0, 34, $|7000, $A|
|00001140| 38 32 41 3b 0d 20 20 7b | 24 65 6e 64 63 7d 0d 20 |82A;. {|$endc}. |
|00001150| 20 20 20 28 2a 20 52 65 | 71 75 69 72 65 73 20 49 | (* Re|quires I|
|00001160| 43 20 31 2e 32 2e 0d 20 | 20 20 20 20 2a 20 49 74 |C 1.2.. | * It|
|00001170| 20 69 73 20 69 6c 6c 65 | 67 61 6c 20 74 6f 20 63 | is ille|gal to c|
|00001180| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00001190| 20 69 6e 73 69 64 65 20 | 61 20 49 43 42 65 67 69 | inside |a ICBegi|
|000011a0| 6e 2f 45 6e 64 20 70 61 | 69 72 2e 0d 20 20 20 20 |n/End pa|ir.. |
|000011b0| 20 2a 20 52 65 71 75 65 | 73 74 73 20 74 68 65 20 | * Reque|sts the |
|000011c0| 75 73 65 72 20 74 6f 20 | 63 72 65 61 74 65 20 61 |user to |create a|
|000011d0| 20 6e 65 77 20 63 6f 6e | 66 69 67 75 72 61 74 69 | new con|figurati|
|000011e0| 6f 6e 2c 20 74 79 70 69 | 63 61 6c 6c 79 20 75 73 |on, typi|cally us|
|000011f0| 69 6e 67 20 73 6f 6d 65 | 0d 20 20 20 20 20 2a 20 |ing some|. * |
|00001200| 73 6f 72 74 20 6f 66 20 | 6d 6f 64 61 6c 20 64 69 |sort of |modal di|
|00001210| 61 6c 6f 67 2e 20 49 66 | 20 74 68 65 20 75 73 65 |alog. If| the use|
|00001220| 72 20 63 61 6e 63 65 6c | 73 20 74 68 65 20 64 69 |r cancel|s the di|
|00001230| 61 6c 6f 67 20 74 68 65 | 20 63 6f 6e 66 69 67 75 |alog the| configu|
|00001240| 72 61 74 69 6f 6e 0d 20 | 20 20 20 20 2a 20 73 74 |ration. | * st|
|00001250| 61 74 65 20 77 69 6c 6c | 20 62 65 20 75 6e 61 66 |ate will| be unaf|
|00001260| 66 65 63 74 65 64 2e 0d | 20 20 20 20 20 2a 29 0d |fected..| *).|
|00001270| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00001280| 43 47 65 74 43 6f 6e 66 | 69 67 4e 61 6d 65 28 69 |CGetConf|igName(i|
|00001290| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|000012a0| 6e 73 74 61 6e 63 65 3b | 20 6c 6f 6e 67 6e 61 6d |nstance;| longnam|
|000012b0| 65 20 3a 20 42 6f 6f 6c | 65 61 6e 3b 20 76 61 72 |e : Bool|ean; var|
|000012c0| 20 6e 61 6d 65 20 3a 20 | 53 74 72 32 35 35 29 20 | name : |Str255) |
|000012d0| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|000012e0| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|000012f0| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00001300| 20 24 32 46 33 43 2c 20 | 36 2c 20 33 35 2c 20 24 | $2F3C, |6, 35, $|
|00001310| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00001320| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00001330| 71 75 69 72 65 73 20 49 | 43 20 31 2e 32 2e 0d 20 |quires I|C 1.2.. |
|00001340| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00001350| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00001360| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00001370| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00001380| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 52 65 74 75 72 |ne.. | * Retur|
|00001390| 6e 73 20 61 20 73 74 72 | 69 6e 67 20 74 68 61 74 |ns a str|ing that|
|000013a0| 20 64 65 73 63 72 69 62 | 65 73 20 74 68 65 20 63 | describ|es the c|
|000013b0| 75 72 72 65 6e 74 20 63 | 6f 6e 66 69 67 75 72 61 |urrent c|onfigura|
|000013c0| 74 69 6f 6e 20 61 74 20 | 61 20 75 73 65 72 0d 20 |tion at |a user. |
|000013d0| 20 20 20 20 2a 20 6c 65 | 76 65 6c 2e 20 53 65 74 | * le|vel. Set|
|000013e0| 20 6c 6f 6e 67 6e 61 6d | 65 20 74 6f 20 74 72 75 | longnam|e to tru|
|000013f0| 65 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 61 20 |e if you| want a |
|00001400| 6c 6f 6e 67 20 6e 61 6d | 65 2c 20 75 70 20 74 6f |long nam|e, up to|
|00001410| 20 32 35 35 0d 20 20 20 | 20 20 2a 20 63 68 61 72 | 255. | * char|
|00001420| 61 63 74 65 72 73 2c 20 | 6f 72 20 66 61 6c 73 65 |acters, |or false|
|00001430| 20 69 66 20 79 6f 75 20 | 77 61 6e 74 20 61 20 73 | if you |want a s|
|00001440| 68 6f 72 74 20 6e 61 6d | 65 2c 20 74 79 70 69 63 |hort nam|e, typic|
|00001450| 61 6c 6c 79 20 61 62 6f | 75 74 20 33 32 0d 20 20 |ally abo|ut 32. |
|00001460| 20 20 20 2a 20 63 68 61 | 72 61 63 74 65 72 73 2e | * cha|racters.|
|00001470| 0d 20 20 20 20 20 2a 20 | 54 68 65 20 72 65 74 75 |. * |The retu|
|00001480| 72 6e 65 64 20 73 74 72 | 69 6e 67 20 69 73 20 66 |rned str|ing is f|
|00001490| 6f 72 20 75 73 65 72 20 | 64 69 73 70 6c 61 79 20 |or user |display |
|000014a0| 6f 6e 6c 79 2e 20 49 66 | 20 79 6f 75 20 72 65 6c |only. If| you rel|
|000014b0| 79 20 6f 6e 20 74 68 65 | 0d 20 20 20 20 20 2a 20 |y on the|. * |
|000014c0| 65 78 61 63 74 20 66 6f | 72 6d 61 74 20 6f 66 20 |exact fo|rmat of |
|000014d0| 69 74 2c 20 79 6f 75 20 | 77 69 6c 6c 20 63 6f 6e |it, you |will con|
|000014e0| 66 6c 69 63 74 20 77 69 | 74 68 20 61 6e 79 20 66 |flict wi|th any f|
|000014f0| 75 74 75 72 65 20 49 43 | 0d 20 20 20 20 20 2a 20 |uture IC|. * |
|00001500| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 20 74 |implemen|tation t|
|00001510| 68 61 74 20 64 6f 65 73 | 6e 27 74 20 75 73 65 20 |hat does|n't use |
|00001520| 65 78 70 6c 69 63 69 74 | 20 70 72 65 66 65 72 65 |explicit| prefere|
|00001530| 6e 63 65 20 66 69 6c 65 | 73 2e 0d 20 20 20 20 20 |nce file|s.. |
|00001540| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00001550| 20 49 43 43 47 65 74 43 | 6f 6e 66 69 67 52 65 66 | ICCGetC|onfigRef|
|00001560| 65 72 65 6e 63 65 28 69 | 6e 73 74 20 3a 20 43 6f |erence(i|nst : Co|
|00001570| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|00001580| 20 72 65 66 20 3a 20 49 | 43 43 6f 6e 66 69 67 52 | ref : I|CConfigR|
|00001590| 65 66 48 61 6e 64 6c 65 | 29 20 3a 20 49 43 45 72 |efHandle|) : ICEr|
|000015a0| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|000015b0| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|000015c0| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|000015d0| 2c 20 34 2c 20 33 31 2c | 20 24 37 30 30 30 2c 20 |, 4, 31,| $7000, |
|000015e0| 24 41 38 32 41 3b 0d 20 | 20 7b 24 65 6e 64 63 7d |$A82A;. | {$endc}|
|000015f0| 0d 20 20 20 20 28 2a 20 | 52 65 71 75 69 72 65 73 |. (* |Requires|
|00001600| 20 49 43 20 31 2e 32 2e | 0d 20 20 20 20 20 2a 20 | IC 1.2.|. * |
|00001610| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00001620| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00001630| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00001640| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00001650| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 61 20 73 | * Ret|urns a s|
|00001660| 65 6c 66 2d 63 6f 6e 74 | 61 69 6e 65 64 20 72 65 |elf-cont|ained re|
|00001670| 66 65 72 65 6e 63 65 20 | 74 6f 20 74 68 65 20 69 |ference |to the i|
|00001680| 6e 73 74 61 6e 63 65 27 | 73 20 63 75 72 72 65 6e |nstance'|s curren|
|00001690| 74 0d 20 20 20 20 20 2a | 20 63 6f 6e 66 69 67 75 |t. *| configu|
|000016a0| 72 61 74 69 6f 6e 2e 0d | 20 20 20 20 20 2a 20 72 |ration..| * r|
|000016b0| 65 66 20 6d 75 73 74 20 | 62 65 20 61 20 76 61 6c |ef must |be a val|
|000016c0| 69 64 20 6e 6f 6e 2d 6e | 69 6c 20 68 61 6e 64 6c |id non-n|il handl|
|000016d0| 65 20 61 6e 64 20 69 74 | 20 77 69 6c 6c 20 62 65 |e and it| will be|
|000016e0| 20 72 65 73 69 7a 65 64 | 20 74 6f 20 66 69 74 20 | resized| to fit |
|000016f0| 74 68 65 0d 20 20 20 20 | 20 2a 20 72 65 73 75 6c |the. | * resul|
|00001700| 74 69 6e 67 20 64 61 74 | 61 2e 0d 20 20 20 20 20 |ting dat|a.. |
|00001710| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00001720| 20 49 43 43 53 65 74 43 | 6f 6e 66 69 67 52 65 66 | ICCSetC|onfigRef|
|00001730| 65 72 65 6e 63 65 28 69 | 6e 73 74 20 3a 20 43 6f |erence(i|nst : Co|
|00001740| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|00001750| 20 72 65 66 20 3a 20 49 | 43 43 6f 6e 66 69 67 52 | ref : I|CConfigR|
|00001760| 65 66 48 61 6e 64 6c 65 | 3b 20 66 6c 61 67 73 20 |efHandle|; flags |
|00001770| 3a 20 6c 6f 6e 67 69 6e | 74 29 20 3a 20 49 43 45 |: longin|t) : ICE|
|00001780| 72 72 6f 72 3b 0d 20 20 | 7b 24 69 66 63 20 6e 6f |rror;. |{$ifc no|
|00001790| 74 20 47 65 6e 65 72 61 | 74 69 6e 67 43 46 4d 7d |t Genera|tingCFM}|
|000017a0| 0d 20 20 20 20 69 6e 6c | 69 6e 65 20 24 32 46 33 |. inl|ine $2F3|
|000017b0| 43 2c 20 38 2c 20 33 32 | 2c 20 24 37 30 30 30 2c |C, 8, 32|, $7000,|
|000017c0| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|000017d0| 7d 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |}. (*| Require|
|000017e0| 73 20 49 43 20 31 2e 32 | 2e 0d 20 20 20 20 20 2a |s IC 1.2|.. *|
|000017f0| 20 49 74 20 69 73 20 69 | 6c 6c 65 67 61 6c 20 74 | It is i|llegal t|
|00001800| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00001810| 69 6e 65 20 69 6e 73 69 | 64 65 20 61 20 49 43 42 |ine insi|de a ICB|
|00001820| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 2e 0d 20 |egin/End| pair.. |
|00001830| 20 20 20 20 2a 20 52 65 | 63 6f 6e 66 69 67 75 72 | * Re|configur|
|00001840| 65 73 20 74 68 65 20 69 | 6e 73 74 61 6e 63 65 20 |es the i|nstance |
|00001850| 75 73 69 6e 67 20 61 20 | 63 6f 6e 66 69 67 75 72 |using a |configur|
|00001860| 61 74 69 6f 6e 20 72 65 | 66 65 72 65 6e 63 65 20 |ation re|ference |
|00001870| 74 68 61 74 20 77 61 73 | 0d 20 20 20 20 20 2a 20 |that was|. * |
|00001880| 67 6f 74 20 75 73 69 6e | 67 20 49 43 47 65 74 43 |got usin|g ICGetC|
|00001890| 6f 6e 66 69 67 52 65 66 | 65 72 65 6e 63 65 20 72 |onfigRef|erence r|
|000018a0| 65 66 65 72 65 6e 63 65 | 2e 20 53 65 74 20 74 68 |eference|. Set th|
|000018b0| 65 0d 20 20 20 20 20 2a | 20 69 63 4e 6f 55 73 65 |e. *| icNoUse|
|000018c0| 72 49 6e 74 65 72 61 63 | 74 69 6f 6e 5f 62 69 74 |rInterac|tion_bit|
|000018d0| 20 69 6e 20 66 6c 61 67 | 73 20 69 66 20 79 6f 75 | in flag|s if you|
|000018e0| 20 72 65 71 75 69 72 65 | 20 74 68 61 74 20 74 68 | require| that th|
|000018f0| 69 73 20 72 6f 75 74 69 | 6e 65 0d 20 20 20 20 20 |is routi|ne. |
|00001900| 2a 20 6e 6f 74 20 70 72 | 65 73 65 6e 74 20 61 20 |* not pr|esent a |
|00001910| 6d 6f 64 61 6c 20 64 69 | 61 6c 6f 67 2e 20 4f 74 |modal di|alog. Ot|
|00001920| 68 65 72 20 66 6c 61 67 | 20 62 69 74 73 20 61 72 |her flag| bits ar|
|00001930| 65 20 72 65 73 65 72 76 | 65 64 20 61 6e 64 20 73 |e reserv|ed and s|
|00001940| 68 6f 75 6c 64 0d 20 20 | 20 20 20 2a 20 62 65 20 |hould. | * be |
|00001950| 73 65 74 20 74 6f 20 7a | 65 72 6f 2e 0d 20 20 20 |set to z|ero.. |
|00001960| 20 20 2a 20 72 65 66 20 | 6d 75 73 74 20 6e 6f 74 | * ref |must not|
|00001970| 20 62 65 20 6e 69 6c 2e | 0d 20 20 20 20 20 2a 29 | be nil.|. *)|
|00001980| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00001990| 43 43 53 70 65 63 69 66 | 79 43 6f 6e 66 69 67 46 |CCSpecif|yConfigF|
|000019a0| 69 6c 65 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |ile(inst| : Compo|
|000019b0| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 76 61 |nentInst|ance; va|
|000019c0| 72 20 63 6f 6e 66 69 67 | 20 3a 20 46 53 53 70 65 |r config| : FSSpe|
|000019d0| 63 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |c) : ICE|rror;. |
|000019e0| 7b 24 69 66 63 20 6e 6f | 74 20 47 65 6e 65 72 61 |{$ifc no|t Genera|
|000019f0| 74 69 6e 67 43 46 4d 7d | 0d 20 20 20 20 69 6e 6c |tingCFM}|. inl|
|00001a00| 69 6e 65 20 24 32 46 33 | 43 2c 20 34 2c 20 33 2c |ine $2F3|C, 4, 3,|
|00001a10| 20 24 37 30 30 30 2c 20 | 24 41 38 32 41 3b 0d 20 | $7000, |$A82A;. |
|00001a20| 20 7b 24 65 6e 64 63 7d | 0d 20 20 20 20 28 2a 20 | {$endc}|. (* |
|00001a30| 49 74 20 69 73 20 69 6c | 6c 65 67 61 6c 20 74 6f |It is il|legal to|
|00001a40| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00001a50| 6e 65 20 69 6e 73 69 64 | 65 20 61 20 49 43 42 65 |ne insid|e a ICBe|
|00001a60| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 2e 0d 20 20 |gin/End |pair.. |
|00001a70| 20 20 20 2a 20 46 6f 72 | 20 75 73 65 20 6f 6e 6c | * For| use onl|
|00001a80| 79 20 62 79 20 74 68 65 | 20 49 43 20 61 70 70 6c |y by the| IC appl|
|00001a90| 69 63 61 74 69 6f 6e 2e | 0d 20 20 20 20 20 2a 20 |ication.|. * |
|00001aa0| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|00001ab0| 20 72 6f 75 74 69 6e 65 | 20 79 6f 75 72 73 65 6c | routine| yoursel|
|00001ac0| 66 2c 20 79 6f 75 20 77 | 69 6c 6c 20 63 6f 6e 66 |f, you w|ill conf|
|00001ad0| 6c 69 63 74 20 77 69 74 | 68 20 61 6e 79 0d 20 20 |lict wit|h any. |
|00001ae0| 20 20 20 2a 20 66 75 74 | 75 72 65 20 49 43 20 69 | * fut|ure IC i|
|00001af0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 74 68 |mplement|ation th|
|00001b00| 61 74 20 64 6f 65 73 6e | 27 74 20 75 73 65 20 65 |at doesn|'t use e|
|00001b10| 78 70 6c 69 63 69 74 20 | 70 72 65 66 65 72 65 6e |xplicit |preferen|
|00001b20| 63 65 20 66 69 6c 65 73 | 2e 0d 20 20 20 20 20 2a |ce files|.. *|
|00001b30| 29 0d 20 20 0d 20 20 28 | 2a 20 2a 2a 2a 2a 2a 20 |). . (|* ***** |
|00001b40| 47 65 74 74 69 6e 67 20 | 49 6e 66 6f 72 6d 61 74 |Getting |Informat|
|00001b50| 69 6f 6e 20 2a 2a 2a 2a | 2a 20 2a 29 0d 20 20 0d |ion ****|* *). .|
|00001b60| 20 20 66 75 6e 63 74 69 | 6f 6e 20 49 43 43 47 65 | functi|on ICCGe|
|00001b70| 74 53 65 65 64 28 69 6e | 73 74 20 3a 20 43 6f 6d |tSeed(in|st : Com|
|00001b80| 70 6f 6e 65 6e 74 49 6e | 73 74 61 6e 63 65 3b 20 |ponentIn|stance; |
|00001b90| 76 61 72 20 73 65 65 64 | 20 3a 20 6c 6f 6e 67 69 |var seed| : longi|
|00001ba0| 6e 74 29 20 3a 20 49 43 | 45 72 72 6f 72 3b 0d 20 |nt) : IC|Error;. |
|00001bb0| 20 7b 24 69 66 63 20 6e | 6f 74 20 47 65 6e 65 72 | {$ifc n|ot Gener|
|00001bc0| 61 74 69 6e 67 43 46 4d | 7d 0d 20 20 20 20 69 6e |atingCFM|}. in|
|00001bd0| 6c 69 6e 65 20 24 32 46 | 33 43 2c 20 34 2c 20 34 |line $2F|3C, 4, 4|
|00001be0| 2c 20 24 37 30 30 30 2c | 20 24 41 38 32 41 3b 0d |, $7000,| $A82A;.|
|00001bf0| 20 20 7b 24 65 6e 64 63 | 7d 0d 20 20 20 20 28 2a | {$endc|}. (*|
|00001c00| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00001c10| 20 74 6f 20 73 70 65 63 | 69 66 79 20 61 20 63 6f | to spec|ify a co|
|00001c20| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00001c30| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00001c40| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00001c50| 59 6f 75 20 64 6f 20 6e | 6f 74 20 68 61 76 65 20 |You do n|ot have |
|00001c60| 74 6f 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |to be in|side an |
|00001c70| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00001c80| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00001c90| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 52 65 |utine.. | * Re|
|00001ca0| 74 75 72 6e 73 20 74 68 | 65 20 63 75 72 72 65 6e |turns th|e curren|
|00001cb0| 74 20 73 65 65 64 20 66 | 6f 72 20 74 68 65 20 49 |t seed f|or the I|
|00001cc0| 43 20 70 72 65 66 73 20 | 64 61 74 61 62 61 73 65 |C prefs |database|
|00001cd0| 2e 0d 20 20 20 20 20 2a | 20 54 68 69 73 20 73 65 |.. *| This se|
|00001ce0| 65 64 20 63 68 61 6e 67 | 65 73 20 65 61 63 68 20 |ed chang|es each |
|00001cf0| 74 69 6d 65 20 61 20 6e | 6f 6e 2d 76 6f 6c 61 74 |time a n|on-volat|
|00001d00| 69 6c 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 69 |ile pref|erence i|
|00001d10| 73 20 63 68 61 6e 67 65 | 64 2e 0d 20 20 20 20 20 |s change|d.. |
|00001d20| 2a 20 59 6f 75 20 63 61 | 6e 20 70 6f 6c 6c 20 74 |* You ca|n poll t|
|00001d30| 68 69 73 20 74 6f 20 64 | 65 74 65 72 6d 69 6e 65 |his to d|etermine|
|00001d40| 20 69 66 20 61 6e 79 20 | 63 61 63 68 65 64 20 70 | if any |cached p|
|00001d50| 72 65 66 65 72 65 6e 63 | 65 73 20 63 68 61 6e 67 |referenc|es chang|
|00001d60| 65 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |e.. |*). . |
|00001d70| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 47 65 74 50 |function| ICCGetP|
|00001d80| 65 72 6d 28 69 6e 73 74 | 20 3a 20 43 6f 6d 70 6f |erm(inst| : Compo|
|00001d90| 6e 65 6e 74 49 6e 73 74 | 61 6e 63 65 3b 20 76 61 |nentInst|ance; va|
|00001da0| 72 20 70 65 72 6d 20 3a | 20 49 43 50 65 72 6d 29 |r perm :| ICPerm)|
|00001db0| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 7b 24 | : ICErr|or;. {$|
|00001dc0| 69 66 63 20 6e 6f 74 20 | 47 65 6e 65 72 61 74 69 |ifc not |Generati|
|00001dd0| 6e 67 43 46 4d 7d 0d 20 | 20 20 20 69 6e 6c 69 6e |ngCFM}. | inlin|
|00001de0| 65 20 24 32 46 33 43 2c | 20 34 2c 20 31 33 2c 20 |e $2F3C,| 4, 13, |
|00001df0| 24 37 30 30 30 2c 20 24 | 41 38 32 41 3b 0d 20 20 |$7000, $|A82A;. |
|00001e00| 7b 24 65 6e 64 63 7d 0d | 20 20 20 20 28 2a 20 59 |{$endc}.| (* Y|
|00001e10| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00001e20| 6f 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |o specif|y a conf|
|00001e30| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|00001e40| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|00001e50| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 52 65 |utine.. | * Re|
|00001e60| 74 75 72 6e 73 20 74 68 | 65 20 61 63 63 65 73 73 |turns th|e access|
|00001e70| 20 70 65 72 6d 69 73 73 | 69 6f 6e 73 20 63 75 72 | permiss|ions cur|
|00001e80| 72 65 6e 74 6c 79 20 61 | 73 73 6f 63 69 61 74 65 |rently a|ssociate|
|00001e90| 64 20 77 69 74 68 20 74 | 68 69 73 20 69 6e 73 74 |d with t|his inst|
|00001ea0| 61 6e 63 65 2e 0d 20 20 | 20 20 20 2a 20 57 68 69 |ance.. | * Whi|
|00001eb0| 6c 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |le appli|cations |
|00001ec0| 6e 6f 72 6d 61 6c 6c 79 | 20 6b 6e 6f 77 20 77 68 |normally| know wh|
|00001ed0| 61 74 20 70 65 72 6d 69 | 73 73 69 6f 6e 73 20 74 |at permi|ssions t|
|00001ee0| 68 65 79 20 68 61 76 65 | 2c 0d 20 20 20 20 20 2a |hey have|,. *|
|00001ef0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 73 | this ro|utine is|
|00001f00| 20 64 65 73 69 67 6e 65 | 64 20 66 6f 72 20 75 73 | designe|d for us|
|00001f10| 65 20 62 79 20 6f 76 65 | 72 72 69 64 65 20 63 6f |e by ove|rride co|
|00001f20| 6d 70 6f 6e 65 6e 74 73 | 2e 0d 20 20 20 20 20 2a |mponents|.. *|
|00001f30| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|00001f40| 49 43 43 44 65 66 61 75 | 6c 74 46 69 6c 65 4e 61 |ICCDefau|ltFileNa|
|00001f50| 6d 65 28 69 6e 73 74 20 | 3a 20 43 6f 6d 70 6f 6e |me(inst |: Compon|
|00001f60| 65 6e 74 49 6e 73 74 61 | 6e 63 65 3b 20 76 61 72 |entInsta|nce; var|
|00001f70| 20 6e 61 6d 65 20 3a 20 | 53 74 72 36 33 29 20 3a | name : |Str63) :|
|00001f80| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|00001f90| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|00001fa0| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|00001fb0| 24 32 46 33 43 2c 20 34 | 2c 20 31 31 2c 20 24 37 |$2F3C, 4|, 11, $7|
|00001fc0| 30 30 30 2c 20 24 41 38 | 32 41 3b 0d 20 20 7b 24 |000, $A8|2A;. {$|
|00001fd0| 65 6e 64 63 7d 0d 20 20 | 20 20 28 2a 20 59 6f 75 |endc}. | (* You|
|00001fe0| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 74 6f 20 | do not |have to |
|00001ff0| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00002000| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00002010| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00002020| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|00002030| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 62 |do not h|ave to b|
|00002040| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00002050| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00002060| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00002070| 65 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |e.. |* Return|
|00002080| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 66 69 |s the de|fault fi|
|00002090| 6c 65 20 6e 61 6d 65 20 | 66 6f 72 20 49 43 20 70 |le name |for IC p|
|000020a0| 72 65 66 65 72 65 6e 63 | 65 20 66 69 6c 65 73 2e |referenc|e files.|
|000020b0| 0d 20 20 20 20 20 2a 20 | 41 70 70 6c 69 63 61 74 |. * |Applicat|
|000020c0| 69 6f 6e 73 20 73 68 6f | 75 6c 64 20 6e 65 76 65 |ions sho|uld neve|
|000020d0| 72 20 6e 65 65 64 20 74 | 6f 20 63 61 6c 6c 20 74 |r need t|o call t|
|000020e0| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|000020f0| 20 20 2a 20 49 66 20 79 | 6f 75 20 72 65 6c 79 20 | * If y|ou rely |
|00002100| 6f 6e 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 72 |on infor|mation r|
|00002110| 65 74 75 72 6e 65 64 20 | 62 79 20 74 68 69 73 20 |eturned |by this |
|00002120| 72 6f 75 74 69 6e 65 20 | 79 6f 75 72 73 65 6c 66 |routine |yourself|
|00002130| 2c 0d 20 20 20 20 20 2a | 20 79 6f 75 20 6d 61 79 |,. *| you may|
|00002140| 20 63 6f 6e 66 6c 69 63 | 74 20 77 69 74 68 20 61 | conflic|t with a|
|00002150| 6e 79 20 66 75 74 75 72 | 65 20 49 43 20 69 6d 70 |ny futur|e IC imp|
|00002160| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 74 68 61 74 |lementat|ion that|
|00002170| 20 64 6f 65 73 6e 27 74 | 20 75 73 65 0d 20 20 20 | doesn't| use. |
|00002180| 20 20 2a 20 65 78 70 6c | 69 63 69 74 20 70 72 65 | * expl|icit pre|
|00002190| 66 65 72 65 6e 63 65 20 | 66 69 6c 65 73 2e 0d 20 |ference |files.. |
|000021a0| 20 20 20 20 2a 20 54 68 | 65 20 63 6f 6d 70 6f 6e | * Th|e compon|
|000021b0| 65 6e 74 20 63 61 6c 6c | 73 20 74 68 69 73 20 72 |ent call|s this r|
|000021c0| 6f 75 74 69 6e 65 20 74 | 6f 20 73 65 74 20 75 70 |outine t|o set up|
|000021d0| 20 74 68 65 20 64 65 66 | 61 75 6c 74 20 49 43 20 | the def|ault IC |
|000021e0| 66 69 6c 65 20 6e 61 6d | 65 2e 0d 20 20 20 20 20 |file nam|e.. |
|000021f0| 2a 20 54 68 69 73 20 61 | 6c 6c 6f 77 73 20 74 68 |* This a|llows th|
|00002200| 69 73 20 6f 70 65 72 61 | 74 69 6f 6e 20 74 6f 20 |is opera|tion to |
|00002210| 62 65 20 69 6e 74 65 72 | 63 65 70 74 65 64 20 62 |be inter|cepted b|
|00002220| 79 20 61 20 63 6f 6d 70 | 6f 6e 65 6e 74 20 74 68 |y a comp|onent th|
|00002230| 61 74 20 68 61 73 0d 20 | 20 20 20 20 2a 20 63 61 |at has. | * ca|
|00002240| 70 74 75 72 65 64 20 75 | 73 2e 20 49 74 20 63 75 |ptured u|s. It cu|
|00002250| 72 72 65 6e 74 6c 79 20 | 67 65 74 73 20 69 74 20 |rrently |gets it |
|00002260| 66 72 6f 6d 20 74 68 65 | 20 63 6f 6d 70 6f 6e 65 |from the| compone|
|00002270| 6e 74 20 72 65 73 6f 75 | 72 63 65 20 66 69 6c 65 |nt resou|rce file|
|00002280| 2e 0d 20 20 20 20 20 2a | 20 54 68 65 20 67 6c 75 |.. *| The glu|
|00002290| 65 20 76 65 72 73 69 6f | 6e 20 69 73 20 68 61 72 |e versio|n is har|
|000022a0| 64 77 69 72 65 64 20 74 | 6f 20 22 49 6e 74 65 72 |dwired t|o "Inter|
|000022b0| 6e 65 74 20 50 72 65 66 | 65 72 65 6e 63 65 73 22 |net Pref|erences"|
|000022c0| 2e 0d 20 20 20 20 20 2a | 29 0d 20 20 0d 20 20 28 |.. *|). . (|
|000022d0| 2a 20 2a 2a 2a 2a 2a 20 | 52 65 61 64 69 6e 67 20 |* ***** |Reading |
|000022e0| 61 6e 64 20 57 72 69 74 | 69 6e 67 20 50 72 65 66 |and Writ|ing Pref|
|000022f0| 65 72 65 6e 63 65 73 20 | 2a 2a 2a 2a 2a 20 2a 29 |erences |***** *)|
|00002300| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00002310| 43 43 42 65 67 69 6e 28 | 69 6e 73 74 20 3a 20 43 |CCBegin(|inst : C|
|00002320| 6f 6d 70 6f 6e 65 6e 74 | 49 6e 73 74 61 6e 63 65 |omponent|Instance|
|00002330| 3b 20 70 65 72 6d 20 3a | 20 49 43 50 65 72 6d 29 |; perm :| ICPerm)|
|00002340| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 7b 24 | : ICErr|or;. {$|
|00002350| 69 66 63 20 6e 6f 74 20 | 47 65 6e 65 72 61 74 69 |ifc not |Generati|
|00002360| 6e 67 43 46 4d 7d 0d 20 | 20 20 20 69 6e 6c 69 6e |ngCFM}. | inlin|
|00002370| 65 20 24 32 46 33 43 2c | 20 32 2c 20 35 2c 20 24 |e $2F3C,| 2, 5, $|
|00002380| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00002390| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 59 6f |$endc}. | (* Yo|
|000023a0| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|000023b0| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|000023c0| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|000023d0| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|000023e0| 20 2a 20 49 74 20 69 73 | 20 69 6c 6c 65 67 61 6c | * It is| illegal|
|000023f0| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00002400| 75 74 69 6e 65 20 69 6e | 73 69 64 65 20 61 20 49 |utine in|side a I|
|00002410| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 2e |CBegin/E|nd pair.|
|00002420| 0d 20 20 20 20 20 2a 20 | 53 74 61 72 74 69 6e 67 |. * |Starting|
|00002430| 20 72 65 61 64 69 6e 67 | 20 6f 72 20 77 72 69 74 | reading| or writ|
|00002440| 69 6e 67 20 6d 75 6c 74 | 69 70 6c 65 20 70 72 65 |ing mult|iple pre|
|00002450| 66 65 72 65 6e 63 65 73 | 2e 0d 20 20 20 20 20 2a |ferences|.. *|
|00002460| 20 41 20 63 61 6c 6c 20 | 74 6f 20 74 68 69 73 20 | A call |to this |
|00002470| 6d 75 73 74 20 62 65 20 | 62 61 6c 61 6e 63 65 64 |must be |balanced|
|00002480| 20 62 79 20 61 20 63 61 | 6c 6c 20 74 6f 20 49 43 | by a ca|ll to IC|
|00002490| 45 6e 64 2e 0d 20 20 20 | 20 20 2a 20 44 6f 20 6e |End.. | * Do n|
|000024a0| 6f 74 20 63 61 6c 6c 20 | 57 61 69 74 4e 65 78 74 |ot call |WaitNext|
|000024b0| 45 76 65 6e 74 20 62 65 | 74 77 65 65 6e 20 74 68 |Event be|tween th|
|000024c0| 65 73 65 20 63 61 6c 6c | 73 2e 0d 20 20 20 20 20 |ese call|s.. |
|000024d0| 2a 20 54 68 65 20 70 65 | 72 6d 20 73 70 65 63 69 |* The pe|rm speci|
|000024e0| 66 69 65 73 20 77 68 65 | 74 68 65 72 20 79 6f 75 |fies whe|ther you|
|000024f0| 20 69 6e 74 65 6e 64 20 | 74 6f 20 72 65 61 64 20 | intend |to read |
|00002500| 6f 72 20 72 65 61 64 2f | 77 72 69 74 65 2e 0d 20 |or read/|write.. |
|00002510| 20 20 20 20 2a 20 4f 6e | 6c 79 20 6f 6e 65 20 77 | * On|ly one w|
|00002520| 72 69 74 65 72 20 69 73 | 20 61 6c 6c 6f 77 65 64 |riter is| allowed|
|00002530| 20 70 65 72 20 69 6e 73 | 74 61 6e 63 65 2e 0d 20 | per ins|tance.. |
|00002540| 20 20 20 20 2a 20 4e 6f | 74 65 20 74 68 61 74 20 | * No|te that |
|00002550| 74 68 69 73 20 6d 61 79 | 20 6f 70 65 6e 20 72 65 |this may| open re|
|00002560| 73 6f 75 72 63 65 20 66 | 69 6c 65 73 20 74 68 61 |source f|iles tha|
|00002570| 74 20 61 72 65 20 6e 6f | 74 20 63 6c 6f 73 65 64 |t are no|t closed|
|00002580| 0d 20 20 20 20 20 2a 20 | 75 6e 74 69 6c 20 79 6f |. * |until yo|
|00002590| 75 20 63 61 6c 6c 20 49 | 43 45 6e 64 2e 0d 20 20 |u call I|CEnd.. |
|000025a0| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|000025b0| 69 6f 6e 20 49 43 43 47 | 65 74 50 72 65 66 28 69 |ion ICCG|etPref(i|
|000025c0| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|000025d0| 6e 73 74 61 6e 63 65 3b | 20 6b 65 79 20 3a 20 53 |nstance;| key : S|
|000025e0| 74 72 32 35 35 3b 20 76 | 61 72 20 61 74 74 72 20 |tr255; v|ar attr |
|000025f0| 3a 20 49 43 41 74 74 72 | 3b 20 62 75 66 20 3a 20 |: ICAttr|; buf : |
|00002600| 50 74 72 3b 20 76 61 72 | 20 73 69 7a 65 20 3a 20 |Ptr; var| size : |
|00002610| 6c 6f 6e 67 69 6e 74 29 | 20 3a 20 49 43 45 72 72 |longint)| : ICErr|
|00002620| 6f 72 3b 0d 20 20 7b 24 | 69 66 63 20 6e 6f 74 20 |or;. {$|ifc not |
|00002630| 47 65 6e 65 72 61 74 69 | 6e 67 43 46 4d 7d 0d 20 |Generati|ngCFM}. |
|00002640| 20 20 20 69 6e 6c 69 6e | 65 20 24 32 46 33 43 2c | inlin|e $2F3C,|
|00002650| 20 31 36 2c 20 36 2c 20 | 24 37 30 30 30 2c 20 24 | 16, 6, |$7000, $|
|00002660| 41 38 32 41 3b 0d 20 20 | 7b 24 65 6e 64 63 7d 0d |A82A;. |{$endc}.|
|00002670| 20 20 20 20 28 2a 20 59 | 6f 75 20 6d 75 73 74 20 | (* Y|ou must |
|00002680| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00002690| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|000026a0| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|000026b0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 79 |ine.. | * If y|
|000026c0| 6f 75 20 61 72 65 20 67 | 65 74 74 69 6e 67 20 6f |ou are g|etting o|
|000026d0| 72 20 73 65 74 74 69 6e | 67 20 6d 75 6c 74 69 70 |r settin|g multip|
|000026e0| 6c 65 20 70 72 65 66 65 | 72 65 6e 63 65 73 2c 20 |le prefe|rences, |
|000026f0| 79 6f 75 20 73 68 6f 75 | 6c 64 20 70 6c 61 63 65 |you shou|ld place|
|00002700| 0d 20 20 20 20 20 2a 20 | 74 68 65 73 65 20 63 61 |. * |these ca|
|00002710| 6c 6c 73 20 77 69 74 68 | 69 6e 20 61 6e 20 49 43 |lls with|in an IC|
|00002720| 42 65 67 69 6e 2f 49 43 | 45 6e 64 20 70 61 69 72 |Begin/IC|End pair|
|00002730| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 79 6f 75 20 |.. *| If you |
|00002740| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00002750| 65 20 6f 75 74 73 69 64 | 65 20 6f 66 20 73 75 63 |e outsid|e of suc|
|00002760| 68 20 61 20 70 61 69 72 | 2c 20 69 74 20 69 6d 70 |h a pair|, it imp|
|00002770| 6c 69 63 69 74 6c 79 0d | 20 20 20 20 20 2a 20 63 |licitly.| * c|
|00002780| 61 6c 6c 73 20 49 43 42 | 65 67 69 6e 28 69 6e 73 |alls ICB|egin(ins|
|00002790| 74 2c 20 69 63 52 65 61 | 64 4f 6e 6c 79 50 65 72 |t, icRea|dOnlyPer|
|000027a0| 6d 29 2e 0d 20 20 20 20 | 20 2a 20 52 65 61 64 73 |m).. | * Reads|
|000027b0| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|000027c0| 73 70 65 63 69 66 69 65 | 64 20 62 79 20 6b 65 79 |specifie|d by key|
|000027d0| 20 66 72 6f 6d 20 74 68 | 65 20 49 43 20 64 61 74 | from th|e IC dat|
|000027e0| 61 62 61 73 65 20 74 6f | 20 74 68 65 0d 20 20 20 |abase to| the. |
|000027f0| 20 20 2a 20 62 75 66 66 | 65 72 20 70 6f 69 6e 74 | * buff|er point|
|00002800| 65 64 20 74 6f 20 62 79 | 20 62 75 66 20 61 6e 64 |ed to by| buf and|
|00002810| 20 73 69 7a 65 2e 0d 20 | 20 20 20 20 2a 20 6b 65 | size.. | * ke|
|00002820| 79 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 74 68 |y must n|ot be th|
|00002830| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 2e 0d |e empty |string..|
|00002840| 20 20 20 20 20 2a 20 49 | 66 20 62 75 66 20 69 73 | * I|f buf is|
|00002850| 20 6e 69 6c 20 74 68 65 | 6e 20 6e 6f 20 64 61 74 | nil the|n no dat|
|00002860| 61 20 69 73 20 72 65 74 | 75 72 6e 65 64 2e 0d 20 |a is ret|urned.. |
|00002870| 20 20 20 20 2a 20 73 69 | 7a 65 20 6d 75 73 74 20 | * si|ze must |
|00002880| 62 65 20 6e 6f 6e 2d 6e | 65 67 61 74 69 76 65 2e |be non-n|egative.|
|00002890| 0d 20 20 20 20 20 2a 20 | 61 74 74 72 20 61 6e 64 |. * |attr and|
|000028a0| 20 73 69 7a 65 20 61 72 | 65 20 61 6c 77 61 79 73 | size ar|e always|
|000028b0| 20 73 65 74 20 6f 6e 20 | 72 65 74 75 72 6e 2e 20 | set on |return. |
|000028c0| 4f 6e 20 65 72 72 6f 72 | 73 20 28 65 78 63 65 70 |On error|s (excep|
|000028d0| 74 20 69 63 54 72 75 6e | 63 61 74 65 64 45 72 72 |t icTrun|catedErr|
|000028e0| 29 0d 20 20 20 20 20 2a | 20 61 74 74 72 20 69 73 |). *| attr is|
|000028f0| 20 73 65 74 20 74 6f 20 | 49 43 61 74 74 72 5f 6e | set to |ICattr_n|
|00002900| 6f 5f 63 68 61 6e 67 65 | 20 61 6e 64 20 73 69 7a |o_change| and siz|
|00002910| 65 20 69 73 20 73 65 74 | 20 74 6f 20 30 2e 0d 20 |e is set| to 0.. |
|00002920| 20 20 20 20 2a 20 73 69 | 7a 65 20 69 73 20 74 68 | * si|ze is th|
|00002930| 65 20 61 63 74 75 61 6c | 20 73 69 7a 65 20 6f 66 |e actual| size of|
|00002940| 20 74 68 65 20 64 61 74 | 61 2e 0d 20 20 20 20 20 | the dat|a.. |
|00002950| 2a 20 61 74 74 72 20 69 | 73 20 73 65 74 20 74 6f |* attr i|s set to|
|00002960| 20 74 68 65 20 61 74 74 | 72 69 62 75 74 65 73 20 | the att|ributes |
|00002970| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00002980| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 2e 0d |the pref|erence..|
|00002990| 20 20 20 20 20 2a 20 49 | 66 20 74 68 69 73 20 72 | * I|f this r|
|000029a0| 6f 75 74 69 6e 65 20 72 | 65 74 75 72 6e 73 20 69 |outine r|eturns i|
|000029b0| 63 54 72 75 6e 63 61 74 | 65 64 45 72 72 20 74 68 |cTruncat|edErr th|
|000029c0| 65 6e 20 74 68 65 20 6f | 74 68 65 72 20 72 65 74 |en the o|ther ret|
|000029d0| 75 72 6e 65 64 0d 20 20 | 20 20 20 2a 20 76 61 6c |urned. | * val|
|000029e0| 75 65 73 20 61 72 65 20 | 76 61 6c 69 64 20 65 78 |ues are |valid ex|
|000029f0| 63 65 70 74 20 74 68 61 | 74 20 6f 6e 6c 79 20 74 |cept tha|t only t|
|00002a00| 68 65 20 66 69 72 73 74 | 20 73 69 7a 65 20 62 79 |he first| size by|
|00002a10| 74 65 73 20 68 61 76 65 | 20 62 65 65 6e 0d 20 20 |tes have| been. |
|00002a20| 20 20 20 2a 20 72 65 74 | 75 72 6e 2e 20 73 69 7a | * ret|urn. siz|
|00002a30| 65 20 69 73 20 61 64 6a | 75 73 74 65 64 20 74 6f |e is adj|usted to|
|00002a40| 20 72 65 66 6c 65 63 74 | 20 74 68 65 20 74 72 75 | reflect| the tru|
|00002a50| 65 20 73 69 7a 65 20 6f | 66 20 74 68 65 20 70 72 |e size o|f the pr|
|00002a60| 65 66 65 72 65 6e 63 65 | 2e 0d 20 20 20 20 20 2a |eference|.. *|
|00002a70| 20 52 65 74 75 72 6e 73 | 20 69 63 50 72 65 66 4e | Returns| icPrefN|
|00002a80| 6f 74 46 6f 75 6e 64 20 | 69 66 20 74 68 65 72 65 |otFound |if there|
|00002a90| 20 69 73 20 6e 6f 20 70 | 72 65 66 65 72 65 6e 63 | is no p|referenc|
|00002aa0| 65 20 66 6f 72 20 74 68 | 65 20 6b 65 79 2e 0d 20 |e for th|e key.. |
|00002ab0| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00002ac0| 74 69 6f 6e 20 49 43 43 | 53 65 74 50 72 65 66 28 |tion ICC|SetPref(|
|00002ad0| 69 6e 73 74 20 3a 20 43 | 6f 6d 70 6f 6e 65 6e 74 |inst : C|omponent|
|00002ae0| 49 6e 73 74 61 6e 63 65 | 3b 20 6b 65 79 20 3a 20 |Instance|; key : |
|00002af0| 53 74 72 32 35 35 3b 20 | 61 74 74 72 20 3a 20 49 |Str255; |attr : I|
|00002b00| 43 41 74 74 72 3b 20 62 | 75 66 20 3a 20 50 74 72 |CAttr; b|uf : Ptr|
|00002b10| 3b 20 73 69 7a 65 20 3a | 20 6c 6f 6e 67 69 6e 74 |; size :| longint|
|00002b20| 29 20 3a 20 49 43 45 72 | 72 6f 72 3b 0d 20 20 7b |) : ICEr|ror;. {|
|00002b30| 24 69 66 63 20 6e 6f 74 | 20 47 65 6e 65 72 61 74 |$ifc not| Generat|
|00002b40| 69 6e 67 43 46 4d 7d 0d | 20 20 20 20 69 6e 6c 69 |ingCFM}.| inli|
|00002b50| 6e 65 20 24 32 46 33 43 | 2c 20 31 36 2c 20 37 2c |ne $2F3C|, 16, 7,|
|00002b60| 20 24 37 30 30 30 2c 20 | 24 41 38 32 41 3b 0d 20 | $7000, |$A82A;. |
|00002b70| 20 7b 24 65 6e 64 63 7d | 0d 20 20 20 20 28 2a 20 | {$endc}|. (* |
|00002b80| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00002b90| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00002ba0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00002bb0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00002bc0| 20 20 20 2a 20 49 66 20 | 79 6f 75 20 61 72 65 20 | * If |you are |
|00002bd0| 67 65 74 74 69 6e 67 20 | 6f 72 20 73 65 74 74 69 |getting |or setti|
|00002be0| 6e 67 20 6d 75 6c 74 69 | 70 6c 65 20 70 72 65 66 |ng multi|ple pref|
|00002bf0| 65 72 65 6e 63 65 73 2c | 20 79 6f 75 20 73 68 6f |erences,| you sho|
|00002c00| 75 6c 64 20 70 6c 61 63 | 65 0d 20 20 20 20 20 2a |uld plac|e. *|
|00002c10| 20 74 68 65 73 65 20 63 | 61 6c 6c 73 20 77 69 74 | these c|alls wit|
|00002c20| 68 69 6e 20 61 6e 20 49 | 43 42 65 67 69 6e 2f 49 |hin an I|CBegin/I|
|00002c30| 43 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 20 20 |CEnd pai|r.. |
|00002c40| 2a 20 49 66 20 79 6f 75 | 20 63 61 6c 6c 20 74 68 |* If you| call th|
|00002c50| 69 73 20 72 6f 75 74 69 | 6e 65 20 6f 75 74 73 69 |is routi|ne outsi|
|00002c60| 64 65 20 6f 66 20 73 75 | 63 68 20 61 20 70 61 69 |de of su|ch a pai|
|00002c70| 72 2c 20 69 74 20 69 6d | 70 6c 69 63 69 74 6c 79 |r, it im|plicitly|
|00002c80| 0d 20 20 20 20 20 2a 20 | 63 61 6c 6c 73 20 49 43 |. * |calls IC|
|00002c90| 42 65 67 69 6e 28 69 6e | 73 74 2c 20 69 63 52 65 |Begin(in|st, icRe|
|00002ca0| 61 64 57 72 69 74 65 50 | 65 72 6d 29 2e 0d 20 20 |adWriteP|erm).. |
|00002cb0| 20 20 20 2a 20 53 65 74 | 73 20 74 68 65 20 70 72 | * Set|s the pr|
|00002cc0| 65 66 65 72 65 6e 63 65 | 20 73 70 65 63 69 66 69 |eference| specifi|
|00002cd0| 65 64 20 62 79 20 6b 65 | 79 20 66 72 6f 6d 20 74 |ed by ke|y from t|
|00002ce0| 68 65 20 49 43 20 64 61 | 74 61 62 61 73 65 20 74 |he IC da|tabase t|
|00002cf0| 6f 20 74 68 65 0d 20 20 | 20 20 20 2a 20 76 61 6c |o the. | * val|
|00002d00| 75 65 20 70 6f 69 6e 74 | 65 64 20 74 6f 20 62 79 |ue point|ed to by|
|00002d10| 20 62 75 66 20 61 6e 64 | 20 73 69 7a 65 2e 0d 20 | buf and| size.. |
|00002d20| 20 20 20 20 2a 20 6b 65 | 79 20 6d 75 73 74 20 6e | * ke|y must n|
|00002d30| 6f 74 20 62 65 20 74 68 | 65 20 65 6d 70 74 79 20 |ot be th|e empty |
|00002d40| 73 74 72 69 6e 67 2e 0d | 20 20 20 20 20 2a 20 73 |string..| * s|
|00002d50| 69 7a 65 20 6d 75 73 74 | 20 62 65 20 6e 6f 6e 2d |ize must| be non-|
|00002d60| 6e 65 67 61 74 69 76 65 | 2e 20 0d 20 20 20 20 20 |negative|. . |
|00002d70| 2a 20 49 66 20 62 75 66 | 20 69 73 20 6e 69 6c 20 |* If buf| is nil |
|00002d80| 74 68 65 6e 20 74 68 65 | 20 70 72 65 66 65 72 65 |then the| prefere|
|00002d90| 6e 63 65 20 76 61 6c 75 | 65 20 69 73 20 6e 6f 74 |nce valu|e is not|
|00002da0| 20 73 65 74 20 61 6e 64 | 20 73 69 7a 65 20 69 73 | set and| size is|
|00002db0| 20 69 67 6e 6f 72 65 64 | 2e 0d 20 20 20 20 20 2a | ignored|.. *|
|00002dc0| 20 49 66 20 62 75 66 20 | 69 73 20 6e 6f 74 20 6e | If buf |is not n|
|00002dd0| 69 6c 20 74 68 65 6e 20 | 74 68 65 20 70 72 65 66 |il then |the pref|
|00002de0| 65 72 65 6e 63 65 20 76 | 61 6c 75 65 20 69 73 20 |erence v|alue is |
|00002df0| 73 65 74 20 74 6f 20 74 | 68 65 20 73 69 7a 65 0d |set to t|he size.|
|00002e00| 20 20 20 20 20 2a 20 62 | 79 74 65 73 20 70 6f 69 | * b|ytes poi|
|00002e10| 6e 74 65 64 20 74 6f 20 | 62 79 20 62 75 66 2e 0d |nted to |by buf..|
|00002e20| 20 20 20 20 20 2a 20 49 | 66 20 61 74 74 72 20 69 | * I|f attr i|
|00002e30| 73 20 49 43 61 74 74 72 | 5f 6e 6f 5f 63 68 61 6e |s ICattr|_no_chan|
|00002e40| 67 65 20 74 68 65 6e 20 | 74 68 65 20 70 72 65 66 |ge then |the pref|
|00002e50| 65 72 65 6e 63 65 20 61 | 74 74 72 69 62 75 74 65 |erence a|ttribute|
|00002e60| 73 20 61 72 65 20 6e 6f | 74 20 73 65 74 2e 0d 20 |s are no|t set.. |
|00002e70| 20 20 20 20 2a 20 4f 74 | 68 65 72 77 69 73 65 20 | * Ot|herwise |
|00002e80| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 61 |the pref|erence a|
|00002e90| 74 74 72 69 62 75 74 65 | 73 20 61 72 65 20 73 65 |ttribute|s are se|
|00002ea0| 74 20 74 6f 20 61 74 74 | 72 2e 0d 20 20 20 20 20 |t to att|r.. |
|00002eb0| 2a 20 52 65 74 75 72 6e | 73 20 69 63 50 65 72 6d |* Return|s icPerm|
|00002ec0| 45 72 72 20 69 66 20 74 | 68 65 20 70 72 65 76 69 |Err if t|he previ|
|00002ed0| 6f 75 73 20 49 43 42 65 | 67 69 6e 20 77 61 73 20 |ous ICBe|gin was |
|00002ee0| 70 61 73 73 65 64 20 69 | 63 52 65 61 64 4f 6e 6c |passed i|cReadOnl|
|00002ef0| 79 50 65 72 6d 2e 0d 20 | 20 20 20 20 2a 20 52 65 |yPerm.. | * Re|
|00002f00| 74 75 72 6e 73 20 69 63 | 50 65 72 6d 45 72 72 20 |turns ic|PermErr |
|00002f10| 69 66 20 63 75 72 72 65 | 6e 74 20 61 74 74 72 20 |if curre|nt attr |
|00002f20| 69 73 20 6c 6f 63 6b 65 | 64 2c 20 6e 65 77 20 61 |is locke|d, new a|
|00002f30| 74 74 72 20 69 73 20 6c | 6f 63 6b 65 64 20 61 6e |ttr is l|ocked an|
|00002f40| 64 20 62 75 66 20 3c 3e | 20 6e 69 6c 2e 0d 20 20 |d buf <>| nil.. |
|00002f50| 20 20 20 2a 29 0d 20 20 | 0d 20 20 66 75 6e 63 74 | *). |. funct|
|00002f60| 69 6f 6e 20 49 43 43 46 | 69 6e 64 50 72 65 66 48 |ion ICCF|indPrefH|
|00002f70| 61 6e 64 6c 65 28 69 6e | 73 74 20 3a 20 43 6f 6d |andle(in|st : Com|
|00002f80| 70 6f 6e 65 6e 74 49 6e | 73 74 61 6e 63 65 3b 20 |ponentIn|stance; |
|00002f90| 6b 65 79 20 3a 20 53 74 | 72 32 35 35 3b 20 76 61 |key : St|r255; va|
|00002fa0| 72 20 61 74 74 72 20 3a | 20 49 43 41 74 74 72 3b |r attr :| ICAttr;|
|00002fb0| 20 70 72 65 66 68 20 3a | 20 48 61 6e 64 6c 65 29 | prefh :| Handle)|
|00002fc0| 20 3a 20 49 43 45 72 72 | 6f 72 3b 0d 20 20 7b 24 | : ICErr|or;. {$|
|00002fd0| 69 66 63 20 6e 6f 74 20 | 47 65 6e 65 72 61 74 69 |ifc not |Generati|
|00002fe0| 6e 67 43 46 4d 7d 0d 20 | 20 20 20 69 6e 6c 69 6e |ngCFM}. | inlin|
|00002ff0| 65 20 24 32 46 33 43 2c | 20 31 32 2c 20 33 36 2c |e $2F3C,| 12, 36,|
|00003000| 20 24 37 30 30 30 2c 20 | 24 41 38 32 41 3b 0d 20 | $7000, |$A82A;. |
|00003010| 20 7b 24 65 6e 64 63 7d | 0d 20 20 20 20 28 2a 20 | {$endc}|. (* |
|00003020| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 32 2e |Requires| IC 1.2.|
|00003030| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00003040| 20 73 70 65 63 69 66 79 | 20 61 20 63 6f 6e 66 69 | specify| a confi|
|00003050| 67 75 72 61 74 69 6f 6e | 20 62 65 66 6f 72 65 20 |guration| before |
|00003060| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00003070| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 49 66 20 |tine.. | * If |
|00003080| 79 6f 75 20 61 72 65 20 | 67 65 74 74 69 6e 67 20 |you are |getting |
|00003090| 6f 72 20 73 65 74 74 69 | 6e 67 20 6d 75 6c 74 69 |or setti|ng multi|
|000030a0| 70 6c 65 20 70 72 65 66 | 65 72 65 6e 63 65 73 2c |ple pref|erences,|
|000030b0| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 70 6c 61 63 | you sho|uld plac|
|000030c0| 65 0d 20 20 20 20 20 2a | 20 74 68 65 73 65 20 63 |e. *| these c|
|000030d0| 61 6c 6c 73 20 77 69 74 | 68 69 6e 20 61 6e 20 49 |alls wit|hin an I|
|000030e0| 43 42 65 67 69 6e 2f 49 | 43 45 6e 64 20 70 61 69 |CBegin/I|CEnd pai|
|000030f0| 72 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 79 6f 75 |r.. |* If you|
|00003100| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00003110| 6e 65 20 6f 75 74 73 69 | 64 65 20 6f 66 20 73 75 |ne outsi|de of su|
|00003120| 63 68 20 61 20 70 61 69 | 72 2c 20 69 74 20 69 6d |ch a pai|r, it im|
|00003130| 70 6c 69 63 69 74 6c 79 | 0d 20 20 20 20 20 2a 20 |plicitly|. * |
|00003140| 63 61 6c 6c 73 20 49 43 | 42 65 67 69 6e 28 69 6e |calls IC|Begin(in|
|00003150| 73 74 2c 20 69 63 52 65 | 61 64 57 72 69 74 65 50 |st, icRe|adWriteP|
|00003160| 65 72 6d 29 2e 0d 20 20 | 20 20 20 2a 20 54 68 69 |erm).. | * Thi|
|00003170| 73 20 72 6f 75 74 69 6e | 65 20 65 66 66 65 63 74 |s routin|e effect|
|00003180| 69 76 65 6c 79 20 72 65 | 70 6c 61 63 65 73 20 49 |ively re|places I|
|00003190| 43 47 65 74 50 72 65 66 | 48 61 6e 64 6c 65 2e 0d |CGetPref|Handle..|
|000031a0| 20 20 20 20 20 2a 20 52 | 65 61 64 73 20 74 68 65 | * R|eads the|
|000031b0| 20 70 72 65 66 65 72 65 | 6e 63 65 20 73 70 65 63 | prefere|nce spec|
|000031c0| 69 66 69 65 64 20 62 79 | 20 6b 65 79 20 66 72 6f |ified by| key fro|
|000031d0| 6d 20 74 68 65 20 49 43 | 20 64 61 74 61 62 61 73 |m the IC| databas|
|000031e0| 65 20 69 6e 74 6f 0d 20 | 20 20 20 20 2a 20 61 20 |e into. | * a |
|000031f0| 68 61 6e 64 6c 65 2c 20 | 70 72 65 66 68 2e 0d 20 |handle, |prefh.. |
|00003200| 20 20 20 20 2a 20 6b 65 | 79 20 6d 75 73 74 20 6e | * ke|y must n|
|00003210| 6f 74 20 62 65 20 74 68 | 65 20 65 6d 70 74 79 20 |ot be th|e empty |
|00003220| 73 74 72 69 6e 67 2e 0d | 20 20 20 20 20 2a 20 61 |string..| * a|
|00003230| 74 74 72 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ttr is s|et to th|
|00003240| 65 20 61 74 74 72 69 62 | 75 74 65 73 20 61 73 73 |e attrib|utes ass|
|00003250| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |ociated |with the|
|00003260| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00003270| 20 20 2a 20 59 6f 75 20 | 6d 75 73 74 20 73 65 74 | * You |must set|
|00003280| 20 70 72 65 66 68 20 74 | 6f 20 61 20 6e 6f 6e 2d | prefh t|o a non-|
|00003290| 6e 69 6c 20 68 61 6e 64 | 6c 65 20 62 65 66 6f 72 |nil hand|le befor|
|000032a0| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|000032b0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 49 |outine..| * I|
|000032c0| 66 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |f the pr|eference|
|000032d0| 20 64 6f 65 73 20 6e 6f | 74 20 65 78 69 73 74 2c | does no|t exist,|
|000032e0| 20 69 63 50 72 65 66 4e | 6f 74 46 6f 75 6e 64 45 | icPrefN|otFoundE|
|000032f0| 72 72 20 69 73 20 72 65 | 74 75 72 6e 65 64 2e 0d |rr is re|turned..|
|00003300| 20 20 20 20 20 2a 29 0d | 20 20 0d 20 20 66 75 6e | *).| . fun|
|00003310| 63 74 69 6f 6e 20 49 43 | 43 47 65 74 50 72 65 66 |ction IC|CGetPref|
|00003320| 48 61 6e 64 6c 65 28 69 | 6e 73 74 20 3a 20 43 6f |Handle(i|nst : Co|
|00003330| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|00003340| 20 6b 65 79 20 3a 20 53 | 74 72 32 35 35 3b 20 76 | key : S|tr255; v|
|00003350| 61 72 20 61 74 74 72 20 | 3a 20 49 43 41 74 74 72 |ar attr |: ICAttr|
|00003360| 3b 20 76 61 72 20 70 72 | 65 66 68 20 3a 20 48 61 |; var pr|efh : Ha|
|00003370| 6e 64 6c 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ndle) : |ICError;|
|00003380| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|00003390| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|000033a0| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 31 32 |inline $|2F3C, 12|
|000033b0| 2c 20 32 36 2c 20 24 37 | 30 30 30 2c 20 24 41 38 |, 26, $7|000, $A8|
|000033c0| 32 41 3b 0d 20 20 7b 24 | 65 6e 64 63 7d 0d 20 20 |2A;. {$|endc}. |
|000033d0| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|000033e0| 20 31 2e 31 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 | 1.1.. | * You|
|000033f0| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00003400| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00003410| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00003420| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00003430| 2a 20 49 66 20 79 6f 75 | 20 61 72 65 20 67 65 74 |* If you| are get|
|00003440| 74 69 6e 67 20 6f 72 20 | 73 65 74 74 69 6e 67 20 |ting or |setting |
|00003450| 6d 75 6c 74 69 70 6c 65 | 20 70 72 65 66 65 72 65 |multiple| prefere|
|00003460| 6e 63 65 73 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |nces, yo|u should|
|00003470| 20 70 6c 61 63 65 0d 20 | 20 20 20 20 2a 20 74 68 | place. | * th|
|00003480| 65 73 65 20 63 61 6c 6c | 73 20 77 69 74 68 69 6e |ese call|s within|
|00003490| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 49 43 45 6e | an ICBe|gin/ICEn|
|000034a0| 64 20 70 61 69 72 2e 0d | 20 20 20 20 20 2a 20 49 |d pair..| * I|
|000034b0| 66 20 79 6f 75 20 63 61 | 6c 6c 20 74 68 69 73 20 |f you ca|ll this |
|000034c0| 72 6f 75 74 69 6e 65 20 | 6f 75 74 73 69 64 65 20 |routine |outside |
|000034d0| 6f 66 20 73 75 63 68 20 | 61 20 70 61 69 72 2c 20 |of such |a pair, |
|000034e0| 69 74 20 69 6d 70 6c 69 | 63 69 74 6c 79 0d 20 20 |it impli|citly. |
|000034f0| 20 20 20 2a 20 63 61 6c | 6c 73 20 49 43 42 65 67 | * cal|ls ICBeg|
|00003500| 69 6e 28 69 6e 73 74 2c | 20 69 63 52 65 61 64 4f |in(inst,| icReadO|
|00003510| 6e 6c 79 50 65 72 6d 29 | 2e 0d 20 20 20 20 20 2a |nlyPerm)|.. *|
|00003520| 20 54 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 73 | This ro|utine is|
|00003530| 20 6e 6f 77 20 6f 62 73 | 6f 6c 65 74 65 2e 20 55 | now obs|olete. U|
|00003540| 73 65 20 49 43 46 69 6e | 64 50 72 65 66 48 61 6e |se ICFin|dPrefHan|
|00003550| 64 6c 65 20 69 6e 73 74 | 65 61 64 2e 0d 20 20 20 |dle inst|ead.. |
|00003560| 20 20 2a 20 52 65 61 64 | 73 20 74 68 65 20 70 72 | * Read|s the pr|
|00003570| 65 66 65 72 65 6e 63 65 | 20 73 70 65 63 69 66 69 |eference| specifi|
|00003580| 65 64 20 62 79 20 6b 65 | 79 20 66 72 6f 6d 20 74 |ed by ke|y from t|
|00003590| 68 65 20 49 43 20 64 61 | 74 61 62 61 73 65 20 69 |he IC da|tabase i|
|000035a0| 6e 74 6f 0d 20 20 20 20 | 20 2a 20 61 20 6e 65 77 |nto. | * a new|
|000035b0| 6c 79 20 63 72 65 61 74 | 65 64 20 68 61 6e 64 6c |ly creat|ed handl|
|000035c0| 65 2c 20 70 72 65 66 68 | 2e 0d 20 20 20 20 20 2a |e, prefh|.. *|
|000035d0| 20 6b 65 79 20 6d 75 73 | 74 20 6e 6f 74 20 62 65 | key mus|t not be|
|000035e0| 20 74 68 65 20 65 6d 70 | 74 79 20 73 74 72 69 6e | the emp|ty strin|
|000035f0| 67 2e 0d 20 20 20 20 20 | 2a 20 61 74 74 72 20 69 |g.. |* attr i|
|00003600| 73 20 73 65 74 20 74 6f | 20 74 68 65 20 61 74 74 |s set to| the att|
|00003610| 72 69 62 75 74 65 73 20 | 61 73 73 6f 63 69 61 74 |ributes |associat|
|00003620| 65 64 20 77 69 74 68 20 | 74 68 65 20 70 72 65 66 |ed with |the pref|
|00003630| 65 72 65 6e 63 65 2e 0d | 20 20 20 20 20 2a 20 54 |erence..| * T|
|00003640| 68 65 20 69 6e 63 6f 6d | 69 6e 67 20 76 61 6c 75 |he incom|ing valu|
|00003650| 65 20 6f 66 20 70 72 65 | 66 68 20 69 73 20 69 67 |e of pre|fh is ig|
|00003660| 6e 6f 72 65 64 2e 0d 20 | 20 20 20 20 2a 20 41 20 |nored.. | * A |
|00003670| 6e 65 77 20 68 61 6e 64 | 6c 65 20 69 73 20 63 72 |new hand|le is cr|
|00003680| 65 61 74 65 64 20 69 6e | 20 74 68 65 20 63 75 72 |eated in| the cur|
|00003690| 72 65 6e 74 20 68 65 61 | 70 20 61 6e 64 20 72 65 |rent hea|p and re|
|000036a0| 74 75 72 6e 65 64 20 69 | 6e 20 70 72 65 66 68 2e |turned i|n prefh.|
|000036b0| 0d 20 20 20 20 20 2a 20 | 49 66 20 74 68 65 20 72 |. * |If the r|
|000036c0| 6f 75 74 69 6e 65 20 72 | 65 74 75 72 6e 73 20 61 |outine r|eturns a|
|000036d0| 6e 20 65 72 72 6f 72 2c | 20 70 72 65 66 68 20 69 |n error,| prefh i|
|000036e0| 73 20 73 65 74 20 74 6f | 20 6e 69 6c 2e 0d 20 20 |s set to| nil.. |
|000036f0| 20 20 20 2a 20 49 66 20 | 74 68 65 20 70 72 65 66 | * If |the pref|
|00003700| 65 72 65 6e 63 65 20 64 | 6f 65 73 20 6e 6f 74 20 |erence d|oes not |
|00003710| 65 78 69 73 74 2c 20 6e | 6f 20 65 72 72 6f 72 20 |exist, n|o error |
|00003720| 69 73 20 72 65 74 75 72 | 6e 65 64 20 61 6e 64 20 |is retur|ned and |
|00003730| 70 72 65 66 68 20 69 73 | 20 73 65 74 0d 20 20 20 |prefh is| set. |
|00003740| 20 20 2a 20 74 6f 20 61 | 6e 20 65 6d 70 74 79 20 | * to a|n empty |
|00003750| 68 61 6e 64 6c 65 2e 0d | 20 20 20 20 20 2a 29 0d |handle..| *).|
|00003760| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00003770| 43 53 65 74 50 72 65 66 | 48 61 6e 64 6c 65 28 69 |CSetPref|Handle(i|
|00003780| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|00003790| 6e 73 74 61 6e 63 65 3b | 20 6b 65 79 20 3a 20 53 |nstance;| key : S|
|000037a0| 74 72 32 35 35 3b 20 61 | 74 74 72 20 3a 20 49 43 |tr255; a|ttr : IC|
|000037b0| 41 74 74 72 3b 20 70 72 | 65 66 68 20 3a 20 48 61 |Attr; pr|efh : Ha|
|000037c0| 6e 64 6c 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ndle) : |ICError;|
|000037d0| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|000037e0| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|000037f0| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 31 32 |inline $|2F3C, 12|
|00003800| 2c 20 32 37 2c 20 24 37 | 30 30 30 2c 20 24 41 38 |, 27, $7|000, $A8|
|00003810| 32 41 3b 0d 20 20 7b 24 | 65 6e 64 63 7d 0d 20 20 |2A;. {$|endc}. |
|00003820| 20 20 28 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | (* Req|uires IC|
|00003830| 20 31 2e 31 2e 0d 20 20 | 20 20 20 2a 20 59 6f 75 | 1.1.. | * You|
|00003840| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00003850| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00003860| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00003870| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00003880| 2a 20 49 66 20 79 6f 75 | 20 61 72 65 20 67 65 74 |* If you| are get|
|00003890| 74 69 6e 67 20 6f 72 20 | 73 65 74 74 69 6e 67 20 |ting or |setting |
|000038a0| 6d 75 6c 74 69 70 6c 65 | 20 70 72 65 66 65 72 65 |multiple| prefere|
|000038b0| 6e 63 65 73 2c 20 79 6f | 75 20 73 68 6f 75 6c 64 |nces, yo|u should|
|000038c0| 20 70 6c 61 63 65 0d 20 | 20 20 20 20 2a 20 74 68 | place. | * th|
|000038d0| 65 73 65 20 63 61 6c 6c | 73 20 77 69 74 68 69 6e |ese call|s within|
|000038e0| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 49 43 45 6e | an ICBe|gin/ICEn|
|000038f0| 64 20 70 61 69 72 2e 0d | 20 20 20 20 20 2a 20 49 |d pair..| * I|
|00003900| 66 20 79 6f 75 20 63 61 | 6c 6c 20 74 68 69 73 20 |f you ca|ll this |
|00003910| 72 6f 75 74 69 6e 65 20 | 6f 75 74 73 69 64 65 20 |routine |outside |
|00003920| 6f 66 20 73 75 63 68 20 | 61 20 70 61 69 72 2c 20 |of such |a pair, |
|00003930| 69 74 20 69 6d 70 6c 69 | 63 69 74 6c 79 0d 20 20 |it impli|citly. |
|00003940| 20 20 20 2a 20 63 61 6c | 6c 73 20 49 43 42 65 67 | * cal|ls ICBeg|
|00003950| 69 6e 28 69 6e 73 74 2c | 20 69 63 52 65 61 64 57 |in(inst,| icReadW|
|00003960| 72 69 74 65 50 65 72 6d | 29 2e 0d 20 20 20 20 20 |ritePerm|).. |
|00003970| 2a 20 53 65 74 73 20 74 | 68 65 20 70 72 65 66 65 |* Sets t|he prefe|
|00003980| 72 65 6e 63 65 20 73 70 | 65 63 69 66 69 65 64 20 |rence sp|ecified |
|00003990| 62 79 20 6b 65 79 20 66 | 72 6f 6d 20 74 68 65 20 |by key f|rom the |
|000039a0| 49 43 20 64 61 74 61 62 | 61 73 65 20 74 6f 20 74 |IC datab|ase to t|
|000039b0| 68 65 0d 20 20 20 20 20 | 2a 20 76 61 6c 75 65 20 |he. |* value |
|000039c0| 63 6f 6e 74 61 69 6e 65 | 64 20 69 6e 20 70 72 65 |containe|d in pre|
|000039d0| 66 68 2e 0d 20 20 20 20 | 20 2a 20 6b 65 79 20 6d |fh.. | * key m|
|000039e0| 75 73 74 20 6e 6f 74 20 | 62 65 20 74 68 65 20 65 |ust not |be the e|
|000039f0| 6d 70 74 79 20 73 74 72 | 69 6e 67 2e 0d 20 20 20 |mpty str|ing.. |
|00003a00| 20 20 2a 20 49 66 20 70 | 72 65 66 68 20 69 73 20 | * If p|refh is |
|00003a10| 6e 69 6c 20 74 68 65 6e | 20 74 68 65 20 70 72 65 |nil then| the pre|
|00003a20| 66 65 72 65 6e 63 65 20 | 76 61 6c 75 65 20 69 73 |ference |value is|
|00003a30| 20 6e 6f 74 20 73 65 74 | 2e 0d 20 20 20 20 20 2a | not set|.. *|
|00003a40| 20 49 66 20 62 75 66 20 | 69 73 20 6e 6f 74 20 6e | If buf |is not n|
|00003a50| 69 6c 20 74 68 65 6e 20 | 74 68 65 20 70 72 65 66 |il then |the pref|
|00003a60| 65 72 65 6e 63 65 20 76 | 61 6c 75 65 20 69 73 20 |erence v|alue is |
|00003a70| 73 65 74 20 74 6f 20 74 | 68 65 20 64 61 74 61 0d |set to t|he data.|
|00003a80| 20 20 20 20 20 2a 20 63 | 6f 6e 74 61 69 6e 65 64 | * c|ontained|
|00003a90| 20 69 6e 20 69 74 2e 0d | 20 20 20 20 20 2a 20 49 | in it..| * I|
|00003aa0| 66 20 61 74 74 72 20 69 | 73 20 49 43 61 74 74 72 |f attr i|s ICattr|
|00003ab0| 5f 6e 6f 5f 63 68 61 6e | 67 65 20 74 68 65 6e 20 |_no_chan|ge then |
|00003ac0| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 61 |the pref|erence a|
|00003ad0| 74 74 72 69 62 75 74 65 | 73 20 61 72 65 20 6e 6f |ttribute|s are no|
|00003ae0| 74 20 73 65 74 2e 0d 20 | 20 20 20 20 2a 20 4f 74 |t set.. | * Ot|
|00003af0| 68 65 72 77 69 73 65 20 | 74 68 65 20 70 72 65 66 |herwise |the pref|
|00003b00| 65 72 65 6e 63 65 20 61 | 74 74 72 69 62 75 74 65 |erence a|ttribute|
|00003b10| 73 20 61 72 65 20 73 65 | 74 20 74 6f 20 61 74 74 |s are se|t to att|
|00003b20| 72 2e 0d 20 20 20 20 20 | 2a 20 52 65 74 75 72 6e |r.. |* Return|
|00003b30| 73 20 69 63 50 65 72 6d | 45 72 72 20 69 66 20 74 |s icPerm|Err if t|
|00003b40| 68 65 20 70 72 65 76 69 | 6f 75 73 20 49 43 42 65 |he previ|ous ICBe|
|00003b50| 67 69 6e 20 77 61 73 20 | 70 61 73 73 65 64 20 69 |gin was |passed i|
|00003b60| 63 52 65 61 64 4f 6e 6c | 79 50 65 72 6d 2e 0d 20 |cReadOnl|yPerm.. |
|00003b70| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|00003b80| 50 65 72 6d 45 72 72 20 | 69 66 20 63 75 72 72 65 |PermErr |if curre|
|00003b90| 6e 74 20 61 74 74 72 20 | 69 73 20 6c 6f 63 6b 65 |nt attr |is locke|
|00003ba0| 64 2c 20 6e 65 77 20 61 | 74 74 72 20 69 73 20 6c |d, new a|ttr is l|
|00003bb0| 6f 63 6b 65 64 20 61 6e | 64 20 70 72 65 66 68 20 |ocked an|d prefh |
|00003bc0| 3c 3e 20 6e 69 6c 2e 0d | 20 20 20 20 20 2a 29 0d |<> nil..| *).|
|00003bd0| 20 20 0d 20 20 66 75 6e | 63 74 69 6f 6e 20 49 43 | . fun|ction IC|
|00003be0| 43 43 6f 75 6e 74 50 72 | 65 66 28 69 6e 73 74 20 |CCountPr|ef(inst |
|00003bf0| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |: Compon|entInsta|
|00003c00| 6e 63 65 3b 20 76 61 72 | 20 63 6f 75 6e 74 20 3a |nce; var| count :|
|00003c10| 20 6c 6f 6e 67 69 6e 74 | 29 20 3a 20 49 43 45 72 | longint|) : ICEr|
|00003c20| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|00003c30| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|00003c40| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00003c50| 2c 20 34 2c 20 38 2c 20 | 24 37 30 30 30 2c 20 24 |, 4, 8, |$7000, $|
|00003c60| 41 38 32 41 3b 0d 20 20 | 7b 24 65 6e 64 63 7d 0d |A82A;. |{$endc}.|
|00003c70| 20 20 20 20 28 2a 20 59 | 6f 75 20 6d 75 73 74 20 | (* Y|ou must |
|00003c80| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00003c90| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00003ca0| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00003cb0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|00003cc0| 6d 75 73 74 20 62 65 20 | 69 6e 73 69 64 65 20 61 |must be |inside a|
|00003cd0| 6e 20 49 43 42 65 67 69 | 6e 2f 45 6e 64 20 70 61 |n ICBegi|n/End pa|
|00003ce0| 69 72 20 74 6f 20 63 61 | 6c 6c 20 74 68 69 73 20 |ir to ca|ll this |
|00003cf0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|00003d00| 43 6f 75 6e 74 73 20 74 | 68 65 20 74 6f 74 61 6c |Counts t|he total|
|00003d10| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 72 65 66 65 | number |of prefe|
|00003d20| 72 65 6e 63 65 73 2e 0d | 20 20 20 20 20 2a 20 49 |rences..| * I|
|00003d30| 66 20 74 68 65 20 72 6f | 75 74 69 6e 65 20 72 65 |f the ro|utine re|
|00003d40| 74 75 72 6e 73 20 61 6e | 20 65 72 72 6f 72 2c 20 |turns an| error, |
|00003d50| 63 6f 75 6e 74 20 69 73 | 20 73 65 74 20 74 6f 20 |count is| set to |
|00003d60| 30 2e 0d 20 20 20 20 20 | 2a 29 0d 20 20 0d 20 20 |0.. |*). . |
|00003d70| 66 75 6e 63 74 69 6f 6e | 20 49 43 43 47 65 74 49 |function| ICCGetI|
|00003d80| 6e 64 50 72 65 66 28 69 | 6e 73 74 20 3a 20 43 6f |ndPref(i|nst : Co|
|00003d90| 6d 70 6f 6e 65 6e 74 49 | 6e 73 74 61 6e 63 65 3b |mponentI|nstance;|
|00003da0| 20 6e 20 3a 20 6c 6f 6e | 67 69 6e 74 3b 20 76 61 | n : lon|gint; va|
|00003db0| 72 20 6b 65 79 20 3a 20 | 53 74 72 32 35 35 29 20 |r key : |Str255) |
|00003dc0| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|00003dd0| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|00003de0| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00003df0| 20 24 32 46 33 43 2c 20 | 38 2c 20 39 2c 20 24 37 | $2F3C, |8, 9, $7|
|00003e00| 30 30 30 2c 20 24 41 38 | 32 41 3b 0d 20 20 7b 24 |000, $A8|2A;. {$|
|00003e10| 65 6e 64 63 7d 0d 20 20 | 20 20 28 2a 20 59 6f 75 |endc}. | (* You|
|00003e20| 20 6d 75 73 74 20 73 70 | 65 63 69 66 79 20 61 20 | must sp|ecify a |
|00003e30| 63 6f 6e 66 69 67 75 72 | 61 74 69 6f 6e 20 62 65 |configur|ation be|
|00003e40| 66 6f 72 65 20 63 61 6c | 6c 69 6e 67 20 74 68 69 |fore cal|ling thi|
|00003e50| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00003e60| 2a 20 59 6f 75 20 6d 75 | 73 74 20 62 65 20 69 6e |* You mu|st be in|
|00003e70| 73 69 64 65 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |side an |ICBegin/|
|00003e80| 45 6e 64 20 70 61 69 72 | 20 74 6f 20 63 61 6c 6c |End pair| to call|
|00003e90| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00003ea0| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 74 68 | * Re|turns th|
|00003eb0| 65 20 6b 65 79 20 6f 66 | 20 74 68 65 20 4e 74 68 |e key of| the Nth|
|00003ec0| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00003ed0| 20 20 2a 20 6e 20 6d 75 | 73 74 20 62 65 20 70 6f | * n mu|st be po|
|00003ee0| 73 69 74 69 76 65 2e 0d | 20 20 20 20 20 2a 20 52 |sitive..| * R|
|00003ef0| 65 74 75 72 6e 73 20 69 | 63 50 72 65 66 4e 6f 74 |eturns i|cPrefNot|
|00003f00| 46 6f 75 6e 64 45 72 72 | 20 69 66 20 6e 20 69 73 |FoundErr| if n is|
|00003f10| 20 67 72 65 61 74 65 72 | 20 74 68 61 6e 20 74 68 | greater| than th|
|00003f20| 65 20 74 6f 74 61 6c 20 | 6e 75 6d 62 65 72 20 6f |e total |number o|
|00003f30| 66 20 70 72 65 66 65 72 | 65 6e 63 65 73 2e 0d 20 |f prefer|ences.. |
|00003f40| 20 20 20 20 2a 20 49 66 | 20 74 68 65 20 72 6f 75 | * If| the rou|
|00003f50| 74 69 6e 65 20 72 65 74 | 75 72 6e 73 20 61 6e 20 |tine ret|urns an |
|00003f60| 65 72 72 6f 72 2c 20 6b | 65 79 20 69 73 20 75 6e |error, k|ey is un|
|00003f70| 64 65 66 69 6e 65 64 2e | 0d 20 20 20 20 20 2a 29 |defined.|. *)|
|00003f80| 0d 20 20 0d 20 20 66 75 | 6e 63 74 69 6f 6e 20 49 |. . fu|nction I|
|00003f90| 43 43 44 65 6c 65 74 65 | 50 72 65 66 28 69 6e 73 |CCDelete|Pref(ins|
|00003fa0| 74 20 3a 20 43 6f 6d 70 | 6f 6e 65 6e 74 49 6e 73 |t : Comp|onentIns|
|00003fb0| 74 61 6e 63 65 3b 20 6b | 65 79 20 3a 20 53 74 72 |tance; k|ey : Str|
|00003fc0| 32 35 35 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |255) : I|CError;.|
|00003fd0| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|00003fe0| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|00003ff0| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 34 2c 20 |nline $2|F3C, 4, |
|00004000| 31 32 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 |12, $700|0, $A82A|
|00004010| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|00004020| 28 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 |(* You m|ust spec|
|00004030| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00004040| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00004050| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00004060| 0d 20 20 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |. * |You must|
|00004070| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00004080| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00004090| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|000040a0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 44 65 6c 65 |ine.. | * Dele|
|000040b0| 74 65 73 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |tes the |preferen|
|000040c0| 63 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |ce speci|fied by |
|000040d0| 6b 65 79 2e 0d 20 20 20 | 20 20 2a 20 6b 65 79 20 |key.. | * key |
|000040e0| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 74 68 65 20 |must not| be the |
|000040f0| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 2e 0d 20 20 |empty st|ring.. |
|00004100| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 69 63 50 | * Ret|urns icP|
|00004110| 72 65 66 4e 6f 74 46 6f | 75 6e 64 20 69 66 20 74 |refNotFo|und if t|
|00004120| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 73 70 |he prefe|rence sp|
|00004130| 65 63 69 66 69 65 64 20 | 62 79 20 6b 65 79 20 69 |ecified |by key i|
|00004140| 73 20 6e 6f 74 20 70 72 | 65 73 65 6e 74 2e 0d 20 |s not pr|esent.. |
|00004150| 20 20 20 20 2a 29 0d 20 | 20 0d 20 20 66 75 6e 63 | *). | . func|
|00004160| 74 69 6f 6e 20 49 43 43 | 45 6e 64 28 69 6e 73 74 |tion ICC|End(inst|
|00004170| 20 3a 20 43 6f 6d 70 6f | 6e 65 6e 74 49 6e 73 74 | : Compo|nentInst|
|00004180| 61 6e 63 65 29 20 3a 20 | 49 43 45 72 72 6f 72 3b |ance) : |ICError;|
|00004190| 0d 20 20 7b 24 69 66 63 | 20 6e 6f 74 20 47 65 6e |. {$ifc| not Gen|
|000041a0| 65 72 61 74 69 6e 67 43 | 46 4d 7d 0d 20 20 20 20 |eratingC|FM}. |
|000041b0| 69 6e 6c 69 6e 65 20 24 | 32 46 33 43 2c 20 30 2c |inline $|2F3C, 0,|
|000041c0| 20 31 30 2c 20 24 37 30 | 30 30 2c 20 24 41 38 32 | 10, $70|00, $A82|
|000041d0| 41 3b 0d 20 20 7b 24 65 | 6e 64 63 7d 0d 20 20 20 |A;. {$e|ndc}. |
|000041e0| 20 28 2a 20 59 6f 75 20 | 6d 75 73 74 20 73 70 65 | (* You |must spe|
|000041f0| 63 69 66 79 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |cify a c|onfigura|
|00004200| 74 69 6f 6e 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |tion bef|ore call|
|00004210| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|00004220| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.. *| You mus|
|00004230| 74 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |t be ins|ide an I|
|00004240| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00004250| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00004260| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 54 65 72 |tine.. | * Ter|
|00004270| 6d 69 6e 61 74 65 73 20 | 61 20 70 72 65 66 65 72 |minates |a prefer|
|00004280| 65 6e 63 65 20 73 65 73 | 73 69 6f 6e 2c 20 61 73 |ence ses|sion, as|
|00004290| 20 73 74 61 72 74 65 64 | 20 62 79 20 49 43 42 65 | started| by ICBe|
|000042a0| 67 69 6e 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |gin.. | * You |
|000042b0| 6d 75 73 74 20 68 61 76 | 65 20 63 61 6c 6c 65 64 |must hav|e called|
|000042c0| 20 49 43 42 65 67 69 6e | 20 62 65 66 6f 72 65 20 | ICBegin| before |
|000042d0| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|000042e0| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 29 0d 20 20 |tine.. | *). |
|000042f0| 0d 20 20 28 2a 20 2a 2a | 2a 2a 2a 20 55 73 65 72 |. (* **|*** User|
|00004300| 20 49 6e 74 65 72 66 61 | 63 65 20 53 74 75 66 66 | Interfa|ce Stuff|
|00004310| 20 2a 2a 2a 2a 2a 20 2a | 29 0d 20 20 0d 20 20 66 | ***** *|). . f|
|00004320| 75 6e 63 74 69 6f 6e 20 | 49 43 43 45 64 69 74 50 |unction |ICCEditP|
|00004330| 72 65 66 65 72 65 6e 63 | 65 73 28 69 6e 73 74 20 |referenc|es(inst |
|00004340| 3a 20 43 6f 6d 70 6f 6e | 65 6e 74 49 6e 73 74 61 |: Compon|entInsta|
|00004350| 6e 63 65 3b 20 6b 65 79 | 20 3a 20 53 74 72 32 35 |nce; key| : Str25|
|00004360| 35 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |5) : ICE|rror;. |
|00004370| 7b 24 69 66 63 20 6e 6f | 74 20 47 65 6e 65 72 61 |{$ifc no|t Genera|
|00004380| 74 69 6e 67 43 46 4d 7d | 0d 20 20 20 20 69 6e 6c |tingCFM}|. inl|
|00004390| 69 6e 65 20 24 32 46 33 | 43 2c 20 34 2c 20 31 35 |ine $2F3|C, 4, 15|
|000043a0| 2c 20 24 37 30 30 30 2c | 20 24 41 38 32 41 3b 0d |, $7000,| $A82A;.|
|000043b0| 20 20 7b 24 65 6e 64 63 | 7d 0d 20 20 20 20 28 2a | {$endc|}. (*|
|000043c0| 20 52 65 71 75 69 72 65 | 73 20 49 43 20 31 2e 31 | Require|s IC 1.1|
|000043d0| 2e 0d 20 20 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.. *| You mus|
|000043e0| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|000043f0| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|00004400| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|00004410| 75 74 69 6e 65 2e 0d 20 | 20 20 20 20 2a 20 59 6f |utine.. | * Yo|
|00004420| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|00004430| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00004440| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00004450| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00004460| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 49 6e 73 74 |ine.. | * Inst|
|00004470| 72 75 63 74 73 20 49 43 | 20 74 6f 20 64 69 73 70 |ructs IC| to disp|
|00004480| 6c 61 79 20 74 68 65 20 | 75 73 65 72 20 69 6e 74 |lay the |user int|
|00004490| 65 72 66 61 63 65 20 61 | 73 73 6f 63 69 61 74 65 |erface a|ssociate|
|000044a0| 64 20 77 69 74 68 20 65 | 64 69 74 69 6e 67 0d 20 |d with e|diting. |
|000044b0| 20 20 20 20 2a 20 70 72 | 65 66 65 72 65 6e 63 65 | * pr|eference|
|000044c0| 73 20 61 6e 64 20 66 6f | 63 75 73 69 6e 67 20 6f |s and fo|cusing o|
|000044d0| 6e 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |n the pr|eference|
|000044e0| 20 73 70 65 63 69 66 69 | 65 64 20 62 79 20 6b 65 | specifi|ed by ke|
|000044f0| 79 2e 0d 20 20 20 20 20 | 2a 20 49 66 20 6b 65 79 |y.. |* If key|
|00004500| 20 69 73 20 74 68 65 20 | 65 6d 70 74 79 20 73 74 | is the |empty st|
|00004510| 72 69 6e 67 20 74 68 65 | 6e 20 6e 6f 20 70 72 65 |ring the|n no pre|
|00004520| 66 65 72 65 6e 63 65 20 | 73 68 6f 75 6c 64 20 62 |ference |should b|
|00004530| 65 20 66 6f 63 75 73 65 | 64 20 75 70 6f 6e 2e 0d |e focuse|d upon..|
|00004540| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00004550| 68 61 76 65 20 73 70 65 | 63 69 66 69 65 64 20 61 |have spe|cified a|
|00004560| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00004570| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00004580| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 20 |is routi|ne.. |
|00004590| 20 2a 20 59 6f 75 20 64 | 6f 20 6e 6f 74 20 6e 65 | * You d|o not ne|
|000045a0| 65 64 20 74 6f 20 63 61 | 6c 6c 20 49 43 42 65 67 |ed to ca|ll ICBeg|
|000045b0| 69 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |in befor|e callin|
|000045c0| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|000045d0| 20 20 20 20 20 2a 20 49 | 6e 20 74 68 65 20 63 75 | * I|n the cu|
|000045e0| 72 72 65 6e 74 20 69 6d | 70 6c 65 6d 65 6e 74 61 |rrent im|plementa|
|000045f0| 74 69 6f 6e 20 74 68 69 | 73 20 6c 61 75 6e 63 68 |tion thi|s launch|
|00004600| 65 73 20 74 68 65 20 49 | 43 20 61 70 70 6c 69 63 |es the I|C applic|
|00004610| 61 74 69 6f 6e 0d 20 20 | 20 20 20 2a 20 28 6f 72 |ation. | * (or|
|00004620| 20 62 72 69 6e 67 73 20 | 69 74 20 74 6f 20 74 68 | brings |it to th|
|00004630| 65 20 66 72 6f 6e 74 29 | 20 61 6e 64 20 64 69 73 |e front)| and dis|
|00004640| 70 6c 61 79 73 20 74 68 | 65 20 77 69 6e 64 6f 77 |plays th|e window|
|00004650| 20 63 6f 6e 74 61 69 6e | 69 6e 67 0d 20 20 20 20 | contain|ing. |
|00004660| 20 2a 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 | * the p|referenc|
|00004670| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|00004680| 65 79 2e 0d 20 20 20 20 | 20 2a 20 49 74 20 6d 61 |ey.. | * It ma|
|00004690| 79 20 68 61 76 65 20 61 | 20 72 61 64 69 63 61 6c |y have a| radical|
|000046a0| 6c 79 20 64 69 66 66 65 | 72 65 6e 74 20 69 6d 70 |ly diffe|rent imp|
|000046b0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 69 6e 20 66 |lementat|ion in f|
|000046c0| 75 74 75 72 65 0d 20 20 | 20 20 20 2a 20 49 43 20 |uture. | * IC |
|000046d0| 73 79 73 74 65 6d 73 2e | 0d 20 20 20 20 20 2a 29 |systems.|. *)|
|000046e0| 0d 20 20 0d 20 20 28 2a | 20 2a 2a 2a 2a 2a 20 55 |. . (*| ***** U|
|000046f0| 52 4c 20 48 61 6e 64 6c | 69 6e 67 20 2a 2a 2a 2a |RL Handl|ing ****|
|00004700| 2a 20 2a 29 0d 20 20 0d | 20 20 66 75 6e 63 74 69 |* *). .| functi|
|00004710| 6f 6e 20 49 43 43 50 61 | 72 73 65 55 52 4c 28 69 |on ICCPa|rseURL(i|
|00004720| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|00004730| 6e 73 74 61 6e 63 65 3b | 20 68 69 6e 74 20 3a 20 |nstance;| hint : |
|00004740| 53 74 72 32 35 35 3b 20 | 64 61 74 61 20 3a 20 50 |Str255; |data : P|
|00004750| 74 72 3b 20 6c 65 6e 20 | 3a 20 6c 6f 6e 67 69 6e |tr; len |: longin|
|00004760| 74 3b 20 76 61 72 20 73 | 65 6c 53 74 61 72 74 20 |t; var s|elStart |
|00004770| 3a 20 6c 6f 6e 67 69 6e | 74 3b 20 76 61 72 20 73 |: longin|t; var s|
|00004780| 65 6c 45 6e 64 20 3a 20 | 6c 6f 6e 67 69 6e 74 3b |elEnd : |longint;|
|00004790| 20 75 72 6c 20 3a 20 48 | 61 6e 64 6c 65 29 20 3a | url : H|andle) :|
|000047a0| 20 49 43 45 72 72 6f 72 | 3b 0d 20 20 7b 24 69 66 | ICError|;. {$if|
|000047b0| 63 20 6e 6f 74 20 47 65 | 6e 65 72 61 74 69 6e 67 |c not Ge|nerating|
|000047c0| 43 46 4d 7d 0d 20 20 20 | 20 69 6e 6c 69 6e 65 20 |CFM}. | inline |
|000047d0| 24 32 46 33 43 2c 20 32 | 34 2c 20 31 36 2c 20 24 |$2F3C, 2|4, 16, $|
|000047e0| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|000047f0| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00004800| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|00004810| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00004820| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00004830| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00004840| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00004850| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 64 |ne.. | * You d|
|00004860| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|00004870| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|00004880| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|00004890| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|000048a0| 2e 0d 20 20 20 20 20 2a | 20 50 61 72 73 65 73 20 |.. *| Parses |
|000048b0| 61 20 55 52 4c 20 6f 75 | 74 20 6f 66 20 74 68 65 |a URL ou|t of the|
|000048c0| 20 73 70 65 63 69 66 69 | 65 64 20 74 65 78 74 20 | specifi|ed text |
|000048d0| 61 6e 64 20 72 65 74 75 | 72 6e 73 20 69 74 20 69 |and retu|rns it i|
|000048e0| 6e 20 61 20 63 61 6e 6f | 6e 69 63 61 6c 20 66 6f |n a cano|nical fo|
|000048f0| 72 6d 0d 20 20 20 20 20 | 2a 20 69 6e 20 61 20 68 |rm. |* in a h|
|00004900| 61 6e 64 6c 65 2e 0d 20 | 20 20 20 20 2a 20 68 69 |andle.. | * hi|
|00004910| 6e 74 20 69 6e 64 69 63 | 61 74 65 73 20 74 68 65 |nt indic|ates the|
|00004920| 20 64 65 66 61 75 6c 74 | 20 73 63 68 65 6d 65 20 | default| scheme |
|00004930| 66 6f 72 20 55 52 4c 73 | 20 6f 66 20 74 68 65 20 |for URLs| of the |
|00004940| 66 6f 72 6d 20 22 6e 61 | 6d 65 40 61 64 64 72 65 |form "na|me@addre|
|00004950| 73 73 22 2e 0d 20 20 20 | 20 20 2a 20 49 66 20 68 |ss".. | * If h|
|00004960| 69 6e 74 20 69 73 20 74 | 68 65 20 65 6d 70 74 79 |int is t|he empty|
|00004970| 20 73 74 72 69 6e 67 20 | 74 68 65 6e 20 55 52 4c | string |then URL|
|00004980| 73 20 6f 66 20 74 68 61 | 74 20 66 6f 72 6d 20 61 |s of tha|t form a|
|00004990| 72 65 20 6e 6f 74 20 61 | 6c 6c 6f 77 65 64 2e 0d |re not a|llowed..|
|000049a0| 20 20 20 20 20 2a 20 64 | 61 74 61 20 70 6f 69 6e | * d|ata poin|
|000049b0| 74 73 20 74 6f 20 74 68 | 65 20 73 74 61 72 74 20 |ts to th|e start |
|000049c0| 6f 66 20 74 68 65 20 74 | 65 78 74 2e 20 49 74 20 |of the t|ext. It |
|000049d0| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 6e 69 6c 2e |must not| be nil.|
|000049e0| 0d 20 20 20 20 20 2a 20 | 6c 65 6e 20 69 6e 64 69 |. * |len indi|
|000049f0| 63 61 74 65 73 20 74 68 | 65 20 6c 65 6e 67 74 68 |cates th|e length|
|00004a00| 20 6f 66 20 74 68 65 20 | 74 65 78 74 2e 20 49 74 | of the |text. It|
|00004a10| 20 6d 75 73 74 20 62 65 | 20 6e 6f 6e 2d 6e 65 67 | must be| non-neg|
|00004a20| 61 74 69 76 65 2e 0d 20 | 20 20 20 20 2a 20 73 65 |ative.. | * se|
|00004a30| 6c 53 74 61 72 74 20 61 | 6e 64 20 73 65 6c 45 6e |lStart a|nd selEn|
|00004a40| 64 20 73 68 6f 75 6c 64 | 20 62 65 20 70 61 73 73 |d should| be pass|
|00004a50| 65 64 20 69 6e 20 61 73 | 20 74 68 65 20 63 75 72 |ed in as| the cur|
|00004a60| 72 65 6e 74 20 73 65 6c | 65 63 74 69 6f 6e 20 6f |rent sel|ection o|
|00004a70| 66 0d 20 20 20 20 20 2a | 20 74 68 65 20 74 65 78 |f. *| the tex|
|00004a80| 74 2e 20 54 68 69 73 20 | 73 65 6c 65 63 74 69 6f |t. This |selectio|
|00004a90| 6e 20 69 73 20 67 69 76 | 65 6e 20 69 6e 20 74 68 |n is giv|en in th|
|00004aa0| 65 20 73 61 6d 65 20 6d | 61 6e 6e 65 72 20 61 73 |e same m|anner as|
|00004ab0| 20 54 65 78 74 45 64 69 | 74 2c 0d 20 20 20 20 20 | TextEdi|t,. |
|00004ac0| 2a 20 69 65 20 69 66 20 | 73 65 6c 53 74 61 72 74 |* ie if |selStart|
|00004ad0| 20 3d 20 73 65 6c 45 6e | 64 20 74 68 65 6e 20 74 | = selEn|d then t|
|00004ae0| 68 65 72 65 20 69 73 20 | 6e 6f 20 73 65 6c 65 63 |here is |no selec|
|00004af0| 74 69 6f 6e 20 6f 6e 6c | 79 20 61 6e 20 69 6e 73 |tion onl|y an ins|
|00004b00| 65 72 74 69 6f 6e 0d 20 | 20 20 20 20 2a 20 70 6f |ertion. | * po|
|00004b10| 69 6e 74 2e 20 41 6c 73 | 6f 20 73 65 6c 53 74 61 |int. Als|o selSta|
|00004b20| 72 74 20 b2 20 73 65 6c | 45 6e 64 20 61 6e 64 20 |rt . sel|End and |
|00004b30| 30 20 b2 20 73 65 6c 53 | 74 61 72 74 20 b2 20 6c |0 . selS|tart . l|
|00004b40| 65 6e 20 61 6e 64 20 30 | 20 b2 20 73 65 6c 45 6e |en and 0| . selEn|
|00004b50| 64 20 b2 20 6c 65 6e 2e | 0d 20 20 20 20 20 2a 20 |d . len.|. * |
|00004b60| 73 65 6c 53 74 61 72 74 | 20 61 6e 64 20 73 65 6c |selStart| and sel|
|00004b70| 45 6e 64 20 61 72 65 20 | 72 65 74 75 72 6e 65 64 |End are |returned|
|00004b80| 20 61 73 20 74 68 65 20 | 62 6f 75 6e 64 73 20 6f | as the |bounds o|
|00004b90| 66 20 74 68 65 20 55 52 | 4c 2e 20 49 66 20 74 68 |f the UR|L. If th|
|00004ba0| 65 0d 20 20 20 20 20 2a | 20 72 6f 75 74 69 6e 65 |e. *| routine|
|00004bb0| 20 72 65 74 75 72 6e 73 | 20 61 6e 20 65 72 72 6f | returns| an erro|
|00004bc0| 72 20 74 68 65 6e 20 74 | 68 65 73 65 20 6e 65 77 |r then t|hese new|
|00004bd0| 20 62 6f 75 6e 64 61 72 | 69 65 73 20 6d 61 79 20 | boundar|ies may |
|00004be0| 62 65 0d 20 20 20 20 20 | 2a 20 69 6e 76 61 6c 69 |be. |* invali|
|00004bf0| 64 20 62 75 74 20 74 68 | 65 79 20 77 69 6c 6c 20 |d but th|ey will |
|00004c00| 62 65 20 63 6c 6f 73 65 | 2e 0d 20 20 20 20 20 2a |be close|.. *|
|00004c10| 20 54 68 65 20 69 6e 63 | 6f 6d 69 6e 67 20 75 72 | The inc|oming ur|
|00004c20| 6c 20 68 61 6e 64 6c 65 | 20 6d 75 73 74 20 6e 6f |l handle| must no|
|00004c30| 74 20 62 65 20 6e 69 6c | 2e 20 20 54 68 65 20 72 |t be nil|. The r|
|00004c40| 65 73 75 6c 74 69 6e 67 | 20 55 52 4c 20 69 73 20 |esulting| URL is |
|00004c50| 6e 6f 72 6d 61 6c 69 73 | 65 64 0d 20 20 20 20 20 |normalis|ed. |
|00004c60| 2a 20 61 6e 64 20 63 6f | 70 69 65 64 20 69 6e 74 |* and co|pied int|
|00004c70| 6f 20 74 68 65 20 75 72 | 6c 20 68 61 6e 64 6c 65 |o the ur|l handle|
|00004c80| 2c 20 77 68 69 63 68 20 | 69 73 20 72 65 73 69 7a |, which |is resiz|
|00004c90| 65 64 20 74 6f 20 66 69 | 74 2e 0d 20 20 20 20 20 |ed to fi|t.. |
|00004ca0| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|00004cb0| 20 49 43 43 4c 61 75 6e | 63 68 55 52 4c 28 69 6e | ICCLaun|chURL(in|
|00004cc0| 73 74 20 3a 20 43 6f 6d | 70 6f 6e 65 6e 74 49 6e |st : Com|ponentIn|
|00004cd0| 73 74 61 6e 63 65 3b 20 | 68 69 6e 74 20 3a 20 53 |stance; |hint : S|
|00004ce0| 74 72 32 35 35 3b 20 64 | 61 74 61 20 3a 20 50 74 |tr255; d|ata : Pt|
|00004cf0| 72 3b 20 6c 65 6e 20 3a | 20 6c 6f 6e 67 69 6e 74 |r; len :| longint|
|00004d00| 3b 20 76 61 72 20 73 65 | 6c 53 74 61 72 74 20 3a |; var se|lStart :|
|00004d10| 20 6c 6f 6e 67 69 6e 74 | 3b 20 76 61 72 20 73 65 | longint|; var se|
|00004d20| 6c 45 6e 64 20 3a 20 6c | 6f 6e 67 69 6e 74 29 20 |lEnd : l|ongint) |
|00004d30| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|00004d40| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|00004d50| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00004d60| 20 24 32 46 33 43 2c 20 | 32 30 2c 20 31 37 2c 20 | $2F3C, |20, 17, |
|00004d70| 24 37 30 30 30 2c 20 24 | 41 38 32 41 3b 0d 20 20 |$7000, $|A82A;. |
|00004d80| 7b 24 65 6e 64 63 7d 0d | 20 20 20 20 28 2a 20 52 |{$endc}.| (* R|
|00004d90| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00004da0| 20 20 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 | * Y|ou must |
|00004db0| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00004dc0| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00004dd0| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00004de0| 69 6e 65 2e 0d 20 20 20 | 20 20 2a 20 59 6f 75 20 |ine.. | * You |
|00004df0| 64 6f 20 6e 6f 74 20 68 | 61 76 65 20 74 6f 20 62 |do not h|ave to b|
|00004e00| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00004e10| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00004e20| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00004e30| 65 2e 0d 20 20 20 20 20 | 2a 20 50 61 72 73 65 73 |e.. |* Parses|
|00004e40| 20 61 20 55 52 4c 20 6f | 75 74 20 6f 66 20 74 68 | a URL o|ut of th|
|00004e50| 65 20 73 70 65 63 69 66 | 69 65 64 20 74 65 78 74 |e specif|ied text|
|00004e60| 20 61 6e 64 20 66 65 65 | 64 73 20 69 74 20 6f 66 | and fee|ds it of|
|00004e70| 66 20 74 6f 20 74 68 65 | 0d 20 20 20 20 20 2a 20 |f to the|. * |
|00004e80| 61 70 70 72 6f 70 72 69 | 61 74 65 20 68 65 6c 70 |appropri|ate help|
|00004e90| 65 72 2e 0d 20 20 20 20 | 20 2a 20 68 69 6e 74 20 |er.. | * hint |
|00004ea0| 69 6e 64 69 63 61 74 65 | 73 20 74 68 65 20 64 65 |indicate|s the de|
|00004eb0| 66 61 75 6c 74 20 73 63 | 68 65 6d 65 20 66 6f 72 |fault sc|heme for|
|00004ec0| 20 55 52 4c 73 20 6f 66 | 20 74 68 65 20 66 6f 72 | URLs of| the for|
|00004ed0| 6d 20 22 6e 61 6d 65 40 | 61 64 64 72 65 73 73 22 |m "name@|address"|
|00004ee0| 2e 0d 20 20 20 20 20 2a | 20 49 66 20 68 69 6e 74 |.. *| If hint|
|00004ef0| 20 69 73 20 74 68 65 20 | 65 6d 70 74 79 20 73 74 | is the |empty st|
|00004f00| 72 69 6e 67 20 74 68 65 | 6e 20 55 52 4c 73 20 6f |ring the|n URLs o|
|00004f10| 66 20 74 68 61 74 20 66 | 6f 72 6d 20 61 72 65 20 |f that f|orm are |
|00004f20| 6e 6f 74 20 61 6c 6c 6f | 77 65 64 2e 0d 20 20 20 |not allo|wed.. |
|00004f30| 20 20 2a 20 64 61 74 61 | 20 70 6f 69 6e 74 73 20 | * data| points |
|00004f40| 74 6f 20 74 68 65 20 73 | 74 61 72 74 20 6f 66 20 |to the s|tart of |
|00004f50| 74 68 65 20 74 65 78 74 | 2e 20 49 74 20 6d 75 73 |the text|. It mus|
|00004f60| 74 20 6e 6f 74 20 62 65 | 20 6e 69 6c 2e 0d 20 20 |t not be| nil.. |
|00004f70| 20 20 20 2a 20 6c 65 6e | 20 69 6e 64 69 63 61 74 | * len| indicat|
|00004f80| 65 73 20 74 68 65 20 6c | 65 6e 67 74 68 20 6f 66 |es the l|ength of|
|00004f90| 20 74 68 65 20 74 65 78 | 74 2e 20 49 74 20 6d 75 | the tex|t. It mu|
|00004fa0| 73 74 20 62 65 20 6e 6f | 6e 2d 6e 65 67 61 74 69 |st be no|n-negati|
|00004fb0| 76 65 2e 0d 20 20 20 20 | 20 2a 20 73 65 6c 53 74 |ve.. | * selSt|
|00004fc0| 61 72 74 20 61 6e 64 20 | 73 65 6c 45 6e 64 20 73 |art and |selEnd s|
|00004fd0| 68 6f 75 6c 64 20 62 65 | 20 70 61 73 73 65 64 20 |hould be| passed |
|00004fe0| 69 6e 20 61 73 20 74 68 | 65 20 63 75 72 72 65 6e |in as th|e curren|
|00004ff0| 74 20 73 65 6c 65 63 74 | 69 6f 6e 20 6f 66 0d 20 |t select|ion of. |
|00005000| 20 20 20 20 2a 20 74 68 | 65 20 74 65 78 74 2e 20 | * th|e text. |
|00005010| 54 68 69 73 20 73 65 6c | 65 63 74 69 6f 6e 20 69 |This sel|ection i|
|00005020| 73 20 67 69 76 65 6e 20 | 69 6e 20 74 68 65 20 73 |s given |in the s|
|00005030| 61 6d 65 20 6d 61 6e 6e | 65 72 20 61 73 20 54 65 |ame mann|er as Te|
|00005040| 78 74 45 64 69 74 2c 0d | 20 20 20 20 20 2a 20 69 |xtEdit,.| * i|
|00005050| 65 20 69 66 20 73 65 6c | 53 74 61 72 74 20 3d 20 |e if sel|Start = |
|00005060| 73 65 6c 45 6e 64 20 74 | 68 65 6e 20 74 68 65 72 |selEnd t|hen ther|
|00005070| 65 20 69 73 20 6e 6f 20 | 73 65 6c 65 63 74 69 6f |e is no |selectio|
|00005080| 6e 20 6f 6e 6c 79 20 61 | 6e 20 69 6e 73 65 72 74 |n only a|n insert|
|00005090| 69 6f 6e 0d 20 20 20 20 | 20 2a 20 70 6f 69 6e 74 |ion. | * point|
|000050a0| 2e 20 41 6c 73 6f 20 73 | 65 6c 53 74 61 72 74 20 |. Also s|elStart |
|000050b0| b2 20 73 65 6c 45 6e 64 | 20 61 6e 64 20 30 20 b2 |. selEnd| and 0 .|
|000050c0| 20 73 65 6c 53 74 61 72 | 74 20 b2 20 6c 65 6e 20 | selStar|t . len |
|000050d0| 61 6e 64 20 30 20 b2 20 | 73 65 6c 45 6e 64 20 b2 |and 0 . |selEnd .|
|000050e0| 20 6c 65 6e 2e 0d 20 20 | 20 20 20 2a 20 73 65 6c | len.. | * sel|
|000050f0| 53 74 61 72 74 20 61 6e | 64 20 73 65 6c 45 6e 64 |Start an|d selEnd|
|00005100| 20 61 72 65 20 72 65 74 | 75 72 6e 65 64 20 61 73 | are ret|urned as|
|00005110| 20 74 68 65 20 62 6f 75 | 6e 64 73 20 6f 66 20 74 | the bou|nds of t|
|00005120| 68 65 20 55 52 4c 2e 20 | 49 66 20 74 68 65 0d 20 |he URL. |If the. |
|00005130| 20 20 20 20 2a 20 72 6f | 75 74 69 6e 65 20 72 65 | * ro|utine re|
|00005140| 74 75 72 6e 73 20 61 6e | 20 65 72 72 6f 72 20 74 |turns an| error t|
|00005150| 68 65 6e 20 74 68 65 73 | 65 20 6e 65 77 20 62 6f |hen thes|e new bo|
|00005160| 75 6e 64 61 72 69 65 73 | 20 6d 61 79 20 62 65 0d |undaries| may be.|
|00005170| 20 20 20 20 20 2a 20 69 | 6e 76 61 6c 69 64 20 62 | * i|nvalid b|
|00005180| 75 74 20 74 68 65 79 20 | 77 69 6c 6c 20 62 65 20 |ut they |will be |
|00005190| 63 6c 6f 73 65 2e 0d 20 | 20 20 20 20 2a 20 54 68 |close.. | * Th|
|000051a0| 65 20 55 52 4c 20 69 73 | 20 70 61 72 73 65 64 20 |e URL is| parsed |
|000051b0| 6f 75 74 20 6f 66 20 74 | 68 65 20 74 65 78 74 20 |out of t|he text |
|000051c0| 61 6e 64 20 70 61 73 73 | 65 64 20 6f 66 66 20 74 |and pass|ed off t|
|000051d0| 6f 20 74 68 65 20 61 70 | 70 72 6f 70 72 69 61 74 |o the ap|propriat|
|000051e0| 65 0d 20 20 20 20 20 2a | 20 68 65 6c 70 65 72 20 |e. *| helper |
|000051f0| 75 73 69 6e 67 20 74 68 | 65 20 47 55 52 4c 20 41 |using th|e GURL A|
|00005200| 70 70 6c 65 45 76 65 6e | 74 2e 0d 20 20 20 20 20 |ppleEven|t.. |
|00005210| 2a 29 0d 20 20 0d 20 20 | 28 2a 20 2a 2a 2a 2a 2a |*). . |(* *****|
|00005220| 20 4d 61 70 70 69 6e 67 | 73 20 52 6f 75 74 69 6e | Mapping|s Routin|
|00005230| 65 73 20 2a 2a 2a 2a 2a | 0d 20 20 20 2a 20 0d 20 |es *****|. * . |
|00005240| 20 20 2a 20 52 6f 75 74 | 69 6e 65 73 20 66 6f 72 | * Rout|ines for|
|00005250| 20 69 6e 74 65 72 72 6f | 67 61 74 69 6e 67 20 6d | interro|gating m|
|00005260| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|00005270| 2e 0d 20 20 20 2a 20 0d | 20 20 20 2a 20 2d 2d 2d |.. * .| * ---|
|00005280| 2d 2d 20 48 69 67 68 20 | 4c 65 76 65 6c 20 52 6f |-- High |Level Ro|
|00005290| 75 74 69 6e 65 73 20 2d | 2d 2d 2d 2d 0d 20 20 20 |utines -|----. |
|000052a0| 2a 29 0d 20 20 0d 20 20 | 66 75 6e 63 74 69 6f 6e |*). . |function|
|000052b0| 20 49 43 43 4d 61 70 46 | 69 6c 65 6e 61 6d 65 28 | ICCMapF|ilename(|
|000052c0| 69 6e 73 74 20 3a 20 43 | 6f 6d 70 6f 6e 65 6e 74 |inst : C|omponent|
|000052d0| 49 6e 73 74 61 6e 63 65 | 3b 20 66 69 6c 65 6e 61 |Instance|; filena|
|000052e0| 6d 65 20 3a 20 53 74 72 | 32 35 35 3b 20 76 61 72 |me : Str|255; var|
|000052f0| 20 65 6e 74 72 79 20 3a | 20 49 43 4d 61 70 45 6e | entry :| ICMapEn|
|00005300| 74 72 79 29 20 3a 20 49 | 43 45 72 72 6f 72 3b 0d |try) : I|CError;.|
|00005310| 20 20 7b 24 69 66 63 20 | 6e 6f 74 20 47 65 6e 65 | {$ifc |not Gene|
|00005320| 72 61 74 69 6e 67 43 46 | 4d 7d 0d 20 20 20 20 69 |ratingCF|M}. i|
|00005330| 6e 6c 69 6e 65 20 24 32 | 46 33 43 2c 20 38 2c 20 |nline $2|F3C, 8, |
|00005340| 32 34 2c 20 24 37 30 30 | 30 2c 20 24 41 38 32 41 |24, $700|0, $A82A|
|00005350| 3b 0d 20 20 7b 24 65 6e | 64 63 7d 0d 20 20 20 20 |;. {$en|dc}. |
|00005360| 28 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |(* Requi|res IC 1|
|00005370| 2e 31 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 6d |.1.. | * You m|
|00005380| 75 73 74 20 73 70 65 63 | 69 66 79 20 61 20 63 6f |ust spec|ify a co|
|00005390| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|000053a0| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|000053b0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 20 20 2a 20 |routine.|. * |
|000053c0| 49 66 20 79 6f 75 20 61 | 72 65 20 67 65 74 74 69 |If you a|re getti|
|000053d0| 6e 67 20 6f 72 20 73 65 | 74 74 69 6e 67 20 6d 75 |ng or se|tting mu|
|000053e0| 6c 74 69 70 6c 65 20 70 | 72 65 66 65 72 65 6e 63 |ltiple p|referenc|
|000053f0| 65 73 2c 20 79 6f 75 20 | 73 68 6f 75 6c 64 20 70 |es, you |should p|
|00005400| 6c 61 63 65 0d 20 20 20 | 20 20 2a 20 74 68 65 73 |lace. | * thes|
|00005410| 65 20 63 61 6c 6c 73 20 | 77 69 74 68 69 6e 20 61 |e calls |within a|
|00005420| 6e 20 49 43 42 65 67 69 | 6e 2f 49 43 45 6e 64 20 |n ICBegi|n/ICEnd |
|00005430| 70 61 69 72 2e 0d 20 20 | 20 20 20 2a 20 49 66 20 |pair.. | * If |
|00005440| 79 6f 75 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f |you call| this ro|
|00005450| 75 74 69 6e 65 20 6f 75 | 74 73 69 64 65 20 6f 66 |utine ou|tside of|
|00005460| 20 73 75 63 68 20 61 20 | 70 61 69 72 2c 20 69 74 | such a |pair, it|
|00005470| 20 69 6d 70 6c 69 63 69 | 74 6c 79 0d 20 20 20 20 | implici|tly. |
|00005480| 20 2a 20 63 61 6c 6c 73 | 20 49 43 42 65 67 69 6e | * calls| ICBegin|
|00005490| 28 69 6e 73 74 2c 20 69 | 63 52 65 61 64 57 72 69 |(inst, i|cReadWri|
|000054a0| 74 65 50 65 72 6d 29 2e | 0d 20 20 20 20 20 2a 20 |tePerm).|. * |
|000054b0| 54 61 6b 65 73 20 74 68 | 65 20 6e 61 6d 65 20 6f |Takes th|e name o|
|000054c0| 66 20 61 6e 20 69 6e 63 | 6f 6d 69 6e 67 20 66 69 |f an inc|oming fi|
|000054d0| 6c 65 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |le and r|eturns t|
|000054e0| 68 65 20 6d 6f 73 74 20 | 61 70 70 72 6f 70 72 69 |he most |appropri|
|000054f0| 61 74 65 0d 20 20 20 20 | 20 2a 20 6d 61 70 70 69 |ate. | * mappi|
|00005500| 6e 67 73 20 64 61 74 61 | 62 61 73 65 20 65 6e 74 |ngs data|base ent|
|00005510| 72 79 2c 20 62 61 73 65 | 64 20 6f 6e 20 69 74 73 |ry, base|d on its|
|00005520| 20 65 78 74 65 6e 73 69 | 6f 6e 2e 0d 20 20 20 20 | extensi|on.. |
|00005530| 20 2a 20 66 69 6c 65 6e | 61 6d 65 20 6d 75 73 74 | * filen|ame must|
|00005540| 20 6e 6f 74 20 62 65 20 | 74 68 65 20 65 6d 70 74 | not be |the empt|
|00005550| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 20 20 2a |y string|.. *|
|00005560| 20 52 65 74 75 72 6e 73 | 20 69 63 50 72 65 66 4e | Returns| icPrefN|
|00005570| 6f 74 46 6f 75 6e 64 45 | 72 72 20 69 66 20 6e 6f |otFoundE|rr if no|
|00005580| 20 73 75 69 74 61 62 6c | 65 20 65 6e 74 72 79 20 | suitabl|e entry |
|00005590| 69 73 20 66 6f 75 6e 64 | 2e 0d 20 20 20 20 20 2a |is found|.. *|
|000055a0| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|000055b0| 49 43 43 4d 61 70 54 79 | 70 65 43 72 65 61 74 6f |ICCMapTy|peCreato|
|000055c0| 72 28 69 6e 73 74 20 3a | 20 43 6f 6d 70 6f 6e 65 |r(inst :| Compone|
|000055d0| 6e 74 49 6e 73 74 61 6e | 63 65 3b 20 66 54 79 70 |ntInstan|ce; fTyp|
|000055e0| 65 20 3a 20 4f 53 54 79 | 70 65 3b 20 66 43 72 65 |e : OSTy|pe; fCre|
|000055f0| 61 74 6f 72 20 3a 20 4f | 53 54 79 70 65 3b 20 66 |ator : O|SType; f|
|00005600| 69 6c 65 6e 61 6d 65 20 | 3a 20 53 74 72 32 35 35 |ilename |: Str255|
|00005610| 3b 20 76 61 72 20 65 6e | 74 72 79 20 3a 20 49 43 |; var en|try : IC|
|00005620| 4d 61 70 45 6e 74 72 79 | 29 20 3a 20 49 43 45 72 |MapEntry|) : ICEr|
|00005630| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|00005640| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|00005650| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00005660| 2c 20 31 36 2c 20 32 35 | 2c 20 24 37 30 30 30 2c |, 16, 25|, $7000,|
|00005670| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|00005680| 7d 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |}. (*| Require|
|00005690| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|000056a0| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|000056b0| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|000056c0| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|000056d0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|000056e0| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 62 | * Yo|u must b|
|000056f0| 65 20 69 6e 73 69 64 65 | 20 61 6e 20 49 43 42 65 |e inside| an ICBe|
|00005700| 67 69 6e 2f 45 6e 64 20 | 70 61 69 72 20 74 6f 20 |gin/End |pair to |
|00005710| 63 61 6c 6c 20 74 68 69 | 73 20 72 6f 75 74 69 6e |call thi|s routin|
|00005720| 65 2e 0d 20 20 20 20 20 | 2a 20 54 61 6b 65 73 20 |e.. |* Takes |
|00005730| 74 68 65 20 74 79 70 65 | 20 61 6e 64 20 63 72 65 |the type| and cre|
|00005740| 61 74 6f 72 20 28 61 6e | 64 20 6f 70 74 69 6f 6e |ator (an|d option|
|00005750| 61 6c 6c 79 20 74 68 65 | 20 6e 61 6d 65 29 20 6f |ally the| name) o|
|00005760| 66 20 61 6e 20 6f 75 74 | 67 6f 69 6e 67 0d 20 20 |f an out|going. |
|00005770| 20 20 20 2a 20 66 69 6c | 65 20 61 6e 64 20 72 65 | * fil|e and re|
|00005780| 74 75 72 6e 73 20 74 68 | 65 20 6d 6f 73 74 20 61 |turns th|e most a|
|00005790| 70 70 72 6f 70 72 69 61 | 74 65 20 6d 61 70 70 69 |ppropria|te mappi|
|000057a0| 6e 67 73 20 64 61 74 61 | 62 61 73 65 20 65 6e 74 |ngs data|base ent|
|000057b0| 72 79 2e 0d 20 20 20 20 | 20 2a 20 54 68 65 20 66 |ry.. | * The f|
|000057c0| 69 6c 65 6e 61 6d 65 20 | 6d 61 79 20 62 65 20 65 |ilename |may be e|
|000057d0| 69 74 68 65 72 20 74 68 | 65 20 6e 61 6d 65 20 6f |ither th|e name o|
|000057e0| 66 20 74 68 65 20 6f 75 | 74 67 6f 69 6e 67 20 66 |f the ou|tgoing f|
|000057f0| 69 6c 65 20 6f 72 0d 20 | 20 20 20 20 2a 20 74 68 |ile or. | * th|
|00005800| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 2e 0d |e empty |string..|
|00005810| 20 20 20 20 20 2a 20 52 | 65 74 75 72 6e 73 20 69 | * R|eturns i|
|00005820| 63 50 72 65 66 4e 6f 74 | 46 6f 75 6e 64 45 72 72 |cPrefNot|FoundErr|
|00005830| 20 69 66 20 6e 6f 20 73 | 75 69 74 61 62 6c 65 20 | if no s|uitable |
|00005840| 65 6e 74 72 79 20 66 6f | 75 6e 64 2e 0d 20 20 20 |entry fo|und.. |
|00005850| 20 20 2a 29 0d 20 20 0d | 20 20 28 2a 20 2d 2d 2d | *). .| (* ---|
|00005860| 2d 2d 20 4d 69 64 20 4c | 65 76 65 6c 20 52 6f 75 |-- Mid L|evel Rou|
|00005870| 74 69 6e 65 73 20 2d 2d | 2d 2d 2d 20 2a 29 0d 20 |tines --|--- *). |
|00005880| 20 0d 20 20 66 75 6e 63 | 74 69 6f 6e 20 49 43 43 | . func|tion ICC|
|00005890| 4d 61 70 45 6e 74 72 69 | 65 73 46 69 6c 65 6e 61 |MapEntri|esFilena|
|000058a0| 6d 65 28 69 6e 73 74 20 | 3a 20 43 6f 6d 70 6f 6e |me(inst |: Compon|
|000058b0| 65 6e 74 49 6e 73 74 61 | 6e 63 65 3b 20 65 6e 74 |entInsta|nce; ent|
|000058c0| 72 69 65 73 20 3a 20 48 | 61 6e 64 6c 65 3b 20 66 |ries : H|andle; f|
|000058d0| 69 6c 65 6e 61 6d 65 20 | 3a 20 53 74 72 32 35 35 |ilename |: Str255|
|000058e0| 3b 20 76 61 72 20 65 6e | 74 72 79 20 3a 20 49 43 |; var en|try : IC|
|000058f0| 4d 61 70 45 6e 74 72 79 | 29 20 3a 20 49 43 45 72 |MapEntry|) : ICEr|
|00005900| 72 6f 72 3b 0d 20 20 7b | 24 69 66 63 20 6e 6f 74 |ror;. {|$ifc not|
|00005910| 20 47 65 6e 65 72 61 74 | 69 6e 67 43 46 4d 7d 0d | Generat|ingCFM}.|
|00005920| 20 20 20 20 69 6e 6c 69 | 6e 65 20 24 32 46 33 43 | inli|ne $2F3C|
|00005930| 2c 20 31 32 2c 20 32 38 | 2c 20 24 37 30 30 30 2c |, 12, 28|, $7000,|
|00005940| 20 24 41 38 32 41 3b 0d | 20 20 7b 24 65 6e 64 63 | $A82A;.| {$endc|
|00005950| 7d 0d 20 20 20 20 28 2a | 20 52 65 71 75 69 72 65 |}. (*| Require|
|00005960| 73 20 49 43 20 31 2e 31 | 2e 0d 20 20 20 20 20 2a |s IC 1.1|.. *|
|00005970| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00005980| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00005990| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|000059a0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|000059b0| 20 20 20 20 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 | * Yo|u do not|
|000059c0| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 73 69 | have to| be insi|
|000059d0| 64 65 20 61 6e 20 49 43 | 42 65 67 69 6e 2f 45 6e |de an IC|Begin/En|
|000059e0| 64 20 70 61 69 72 20 74 | 6f 20 63 61 6c 6c 20 74 |d pair t|o call t|
|000059f0| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|00005a00| 20 20 2a 20 54 61 6b 65 | 73 20 74 68 65 20 6e 61 | * Take|s the na|
|00005a10| 6d 65 20 6f 66 20 61 6e | 20 69 6e 63 6f 6d 69 6e |me of an| incomin|
|00005a20| 67 20 66 69 6c 65 20 61 | 6e 64 20 72 65 74 75 72 |g file a|nd retur|
|00005a30| 6e 73 20 74 68 65 20 6d | 6f 73 74 20 61 70 70 72 |ns the m|ost appr|
|00005a40| 6f 70 72 69 61 74 65 0d | 20 20 20 20 20 2a 20 6d |opriate.| * m|
|00005a50| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|00005a60| 20 65 6e 74 72 79 2c 20 | 62 61 73 65 64 20 6f 6e | entry, |based on|
|00005a70| 20 69 74 73 20 65 78 74 | 65 6e 73 69 6f 6e 2e 0d | its ext|ension..|
|00005a80| 20 20 20 20 20 2a 20 65 | 6e 74 72 69 65 73 20 6d | * e|ntries m|
|00005a90| 75 73 74 20 62 65 20 61 | 20 68 61 6e 64 6c 65 20 |ust be a| handle |
|00005aa0| 74 6f 20 61 20 76 61 6c | 69 64 20 49 43 20 6d 61 |to a val|id IC ma|
|00005ab0| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 20 |ppings d|atabase |
|00005ac0| 70 72 65 66 65 72 65 6e | 63 65 2e 0d 20 20 20 20 |preferen|ce.. |
|00005ad0| 20 2a 20 66 69 6c 65 6e | 61 6d 65 20 6d 75 73 74 | * filen|ame must|
|00005ae0| 20 6e 6f 74 20 62 65 20 | 74 68 65 20 65 6d 70 74 | not be |the empt|
|00005af0| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 20 20 2a |y string|.. *|
|00005b00| 20 52 65 74 75 72 6e 73 | 20 69 63 50 72 65 66 4e | Returns| icPrefN|
|00005b10| 6f 74 46 6f 75 6e 64 45 | 72 72 20 69 66 20 6e 6f |otFoundE|rr if no|
|00005b20| 20 73 75 69 74 61 62 6c | 65 20 65 6e 74 72 79 20 | suitabl|e entry |
|00005b30| 69 73 20 66 6f 75 6e 64 | 2e 0d 20 20 20 20 20 2a |is found|.. *|
|00005b40| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|00005b50| 49 43 43 4d 61 70 45 6e | 74 72 69 65 73 54 79 70 |ICCMapEn|triesTyp|
|00005b60| 65 43 72 65 61 74 6f 72 | 28 69 6e 73 74 20 3a 20 |eCreator|(inst : |
|00005b70| 43 6f 6d 70 6f 6e 65 6e | 74 49 6e 73 74 61 6e 63 |Componen|tInstanc|
|00005b80| 65 3b 20 65 6e 74 72 69 | 65 73 20 3a 20 48 61 6e |e; entri|es : Han|
|00005b90| 64 6c 65 3b 20 66 54 79 | 70 65 20 3a 20 4f 53 54 |dle; fTy|pe : OST|
|00005ba0| 79 70 65 3b 20 66 43 72 | 65 61 74 6f 72 20 3a 20 |ype; fCr|eator : |
|00005bb0| 4f 53 54 79 70 65 3b 20 | 66 69 6c 65 6e 61 6d 65 |OSType; |filename|
|00005bc0| 20 3a 20 53 74 72 32 35 | 35 3b 20 76 61 72 20 65 | : Str25|5; var e|
|00005bd0| 6e 74 72 79 20 3a 20 49 | 43 4d 61 70 45 6e 74 72 |ntry : I|CMapEntr|
|00005be0| 79 29 20 3a 20 49 43 45 | 72 72 6f 72 3b 0d 20 20 |y) : ICE|rror;. |
|00005bf0| 7b 24 69 66 63 20 6e 6f | 74 20 47 65 6e 65 72 61 |{$ifc no|t Genera|
|00005c00| 74 69 6e 67 43 46 4d 7d | 0d 20 20 20 20 69 6e 6c |tingCFM}|. inl|
|00005c10| 69 6e 65 20 24 32 46 33 | 43 2c 20 32 30 2c 20 32 |ine $2F3|C, 20, 2|
|00005c20| 39 2c 20 24 37 30 30 30 | 2c 20 24 41 38 32 41 3b |9, $7000|, $A82A;|
|00005c30| 0d 20 20 7b 24 65 6e 64 | 63 7d 0d 20 20 20 20 28 |. {$end|c}. (|
|00005c40| 2a 20 52 65 71 75 69 72 | 65 73 20 49 43 20 31 2e |* Requir|es IC 1.|
|00005c50| 31 2e 0d 20 20 20 20 20 | 2a 20 59 6f 75 20 6d 75 |1.. |* You mu|
|00005c60| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|00005c70| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00005c80| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00005c90| 6f 75 74 69 6e 65 2e 0d | 20 20 20 20 20 2a 20 59 |outine..| * Y|
|00005ca0| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00005cb0| 6f 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |o be ins|ide an I|
|00005cc0| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00005cd0| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00005ce0| 74 69 6e 65 2e 0d 20 20 | 20 20 20 2a 20 54 61 6b |tine.. | * Tak|
|00005cf0| 65 73 20 74 68 65 20 74 | 79 70 65 20 61 6e 64 20 |es the t|ype and |
|00005d00| 63 72 65 61 74 6f 72 20 | 28 61 6e 64 20 6f 70 74 |creator |(and opt|
|00005d10| 69 6f 6e 61 6c 6c 79 20 | 74 68 65 20 6e 61 6d 65 |ionally |the name|
|00005d20| 29 20 6f 66 20 61 6e 20 | 6f 75 74 67 6f 69 6e 67 |) of an |outgoing|
|00005d30| 0d 20 20 20 20 20 2a 20 | 66 69 6c 65 20 61 6e 64 |. * |file and|
|00005d40| 20 72 65 74 75 72 6e 73 | 20 74 68 65 20 6d 6f 73 | returns| the mos|
|00005d50| 74 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 6d 61 |t approp|riate ma|
|00005d60| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 20 |ppings d|atabase |
|00005d70| 65 6e 74 72 79 2e 0d 20 | 20 20 20 20 2a 20 65 6e |entry.. | * en|
|00005d80| 74 72 69 65 73 20 6d 75 | 73 74 20 62 65 20 61 20 |tries mu|st be a |
|00005d90| 68 61 6e 64 6c 65 20 74 | 6f 20 61 20 76 61 6c 69 |handle t|o a vali|
|00005da0| 64 20 49 43 20 6d 61 70 | 70 69 6e 67 73 20 64 61 |d IC map|pings da|
|00005db0| 74 61 62 61 73 65 20 70 | 72 65 66 65 72 65 6e 63 |tabase p|referenc|
|00005dc0| 65 2e 0d 20 20 20 20 20 | 2a 20 54 68 65 20 66 69 |e.. |* The fi|
|00005dd0| 6c 65 6e 61 6d 65 20 6d | 61 79 20 62 65 20 65 69 |lename m|ay be ei|
|00005de0| 74 68 65 72 20 74 68 65 | 20 6e 61 6d 65 20 6f 66 |ther the| name of|
|00005df0| 20 74 68 65 20 6f 75 74 | 67 6f 69 6e 67 20 66 69 | the out|going fi|
|00005e00| 6c 65 20 6f 72 0d 20 20 | 20 20 20 2a 20 74 68 65 |le or. | * the|
|00005e10| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 0d 20 | empty s|tring.. |
|00005e20| 20 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 69 63 | * Re|turns ic|
|00005e30| 50 72 65 66 4e 6f 74 46 | 6f 75 6e 64 45 72 72 20 |PrefNotF|oundErr |
|00005e40| 69 66 20 6e 6f 20 73 75 | 69 74 61 62 6c 65 20 65 |if no su|itable e|
|00005e50| 6e 74 72 79 20 66 6f 75 | 6e 64 2e 0d 20 20 20 20 |ntry fou|nd.. |
|00005e60| 20 2a 29 0d 20 20 0d 20 | 20 28 2a 20 2d 2d 2d 2d | *). . | (* ----|
|00005e70| 2d 20 4c 6f 77 20 4c 65 | 76 65 6c 20 52 6f 75 74 |- Low Le|vel Rout|
|00005e80| 69 6e 65 73 20 2d 2d 2d | 2d 2d 20 2a 29 0d 20 20 |ines ---|-- *). |
|00005e90| 0d 20 20 66 75 6e 63 74 | 69 6f 6e 20 49 43 43 43 |. funct|ion ICCC|
|00005ea0| 6f 75 6e 74 4d 61 70 45 | 6e 74 72 69 65 73 28 69 |ountMapE|ntries(i|
|00005eb0| 6e 73 74 20 3a 20 43 6f | 6d 70 6f 6e 65 6e 74 49 |nst : Co|mponentI|
|00005ec0| 6e 73 74 61 6e 63 65 3b | 20 65 6e 74 72 69 65 73 |nstance;| entries|
|00005ed0| 20 3a 20 48 61 6e 64 6c | 65 3b 20 76 61 72 20 63 | : Handl|e; var c|
|00005ee0| 6f 75 6e 74 20 3a 20 6c | 6f 6e 67 69 6e 74 29 20 |ount : l|ongint) |
|00005ef0| 3a 20 49 43 45 72 72 6f | 72 3b 0d 20 20 7b 24 69 |: ICErro|r;. {$i|
|00005f00| 66 63 20 6e 6f 74 20 47 | 65 6e 65 72 61 74 69 6e |fc not G|eneratin|
|00005f10| 67 43 46 4d 7d 0d 20 20 | 20 20 69 6e 6c 69 6e 65 |gCFM}. | inline|
|00005f20| 20 24 32 46 33 43 2c 20 | 38 2c 20 31 38 2c 20 24 | $2F3C, |8, 18, $|
|00005f30| 37 30 30 30 2c 20 24 41 | 38 32 41 3b 0d 20 20 7b |7000, $A|82A;. {|
|00005f40| 24 65 6e 64 63 7d 0d 20 | 20 20 20 28 2a 20 52 65 |$endc}. | (* Re|
|00005f50| 71 75 69 72 65 73 20 49 | 43 20 31 2e 31 2e 0d 20 |quires I|C 1.1.. |
|00005f60| 20 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 | * Yo|u must s|
|00005f70| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00005f80| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00005f90| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00005fa0| 6e 65 2e 0d 20 20 20 20 | 20 2a 20 59 6f 75 20 64 |ne.. | * You d|
|00005fb0| 6f 20 6e 6f 74 20 68 61 | 76 65 20 74 6f 20 62 65 |o not ha|ve to be|
|00005fc0| 20 69 6e 73 69 64 65 20 | 61 6e 20 49 43 42 65 67 | inside |an ICBeg|
|00005fd0| 69 6e 2f 45 6e 64 20 70 | 61 69 72 20 74 6f 20 63 |in/End p|air to c|
|00005fe0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|00005ff0| 2e 0d 20 20 20 20 20 2a | 20 43 6f 75 6e 74 73 20 |.. *| Counts |
|00006000| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 65 6e |the numb|er of en|
|00006010| 74 72 69 65 73 20 69 6e | 20 74 68 65 20 6d 61 70 |tries in| the map|
|00006020| 70 69 6e 67 73 20 64 61 | 74 61 62 61 73 65 2e 0d |pings da|tabase..|
|00006030| 20 20 20 20 20 2a 20 65 | 6e 74 72 69 65 73 20 6d | * e|ntries m|
|00006040| 75 73 74 20 62 65 20 61 | 20 68 61 6e 64 6c 65 20 |ust be a| handle |
|00006050| 74 6f 20 61 20 76 61 6c | 69 64 20 49 43 20 6d 61 |to a val|id IC ma|
|00006060| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 20 |ppings d|atabase |
|00006070| 70 72 65 66 65 72 65 6e | 63 65 2e 0d 20 20 20 20 |preferen|ce.. |
|00006080| 20 2a 20 63 6f 75 6e 74 | 20 69 73 20 73 65 74 20 | * count| is set |
|00006090| 74 6f 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |to the n|umber of|
|000060a0| 20 65 6e 74 72 69 65 73 | 2e 0d 20 20 20 20 20 2a | entries|.. *|
|000060b0| 29 0d 20 20 0d 20 20 66 | 75 6e 63 74 69 6f 6e 20 |). . f|unction |
|000060c0| 49 43 43 47 65 74 49 6e | 64 4d 61 70 45 6e 74 72 |ICCGetIn|dMapEntr|
|000060d0| 79 28 69 6e 73 74 20 3a | 20 43 6f 6d 70 6f 6e 65 |y(inst :| Compone|
|000060e0| 6e 74 49 6e 73 74 61 6e | 63 65 3b 20 65 6e 74 72 |ntInstan|ce; entr|
|000060f0| 69 65 73 20 3a 20 48 61 | 6e 64 6c 65 3b 20 6e 64 |ies : Ha|ndle; nd|
|00006100| 78 20 3a 20 6c 6f 6e 67 | 69 6e 74 3b 20 76 61 72 |x : long|int; var|
|00006110| 20 70 6f 73 20 3a 20 6c | 6f 6e 67 69 6e 74 3b 20 | pos : l|ongint; |
|00006120| 76 61 72 20 65 6e 74 72 | 79 20 3a 20 49 43 4d 61 |var entr|y : ICMa|
|00006130| 70 45 6e 74 72 79 29 20 | 3a 20 49 43 45 72 72 6f |pEntry) |: ICErro|
|00006140| 72 3b 0d 20 20 7b 24 69 | 66 63 20 6e 6f 74 20 47 |r;. {$i|fc not G|
|00006150| 65 6e 65 72 61 74 69 6e | 67 43 46 4d 7d 0d 20 20 |eneratin|gCFM}. |
|00006160| 20 20 69 6e 6c 69 6e 65 | 20 24 32 46 33 43 2c 20 | inline| $2F3C, |
|00006170| 31 36 2c 20 31 39 2c 20 | 24 37 30 30 30 2c 20 24 |16, 19, |$7000, $|
|00006180| 41 38 32 41 3b 0d 20 20 | 7b 24 65 6e 64 63 7d 0d |A82A;. |{$endc}.|
|00006190| 20 20 20 20 28 2a 20 52 | 65 71 75 69 72 65 73 20 | (* R|equires |
|000061a0| 49 43 20 31 2e 31 2e 0d | 20 20 20 20 20 2a 20 59 |IC 1.1..| * Y|
|000061b0| 6f 75 20 6d 75 73 74 20 | 73 70 65 63 69 66 79 20 |ou must |specify |
|000061c0| 61 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |a config|uration |
|000061d0| 62 65 66 6f 72 65 20 63 | 61 6c 6c 69 6e 67 20 74 |before c|alling t|
|000061e0| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|000061f0| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | * You |do not h|
|00006200| 61 76 65 20 74 6f 20 62 | 65 20 69 6e 73 69 64 65 |ave to b|e inside|
|00006210| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|00006220| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|00006230| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 20 20 |s routin|e.. |
|00006240| 2a 20 47 65 74 73 20 74 | 68 65 20 6e 64 78 27 74 |* Gets t|he ndx't|
|00006250| 68 20 65 6e 74 72 79 20 | 69 6e 20 74 68 65 20 6d |h entry |in the m|
|00006260| 61 70 70 69 6e 67 73 20 | 64 61 74 61 62 61 73 65 |appings |database|
|00006270| 2e 0d 20 20 20 20 20 2a | 20 65 6e 74 72 69 65 73 |.. *| entries|
|00006280| 20 6d 75 73 74 20 62 65 | 20 61 20 68 61 6e 64 6c | must be| a handl|
|00006290| 65 20 74 6f 20 61 20 76 | 61 6c 69 64 20 49 43 20 |e to a v|alid IC |
|000062a0| 6d 61 70 70 69 6e 67 73 | 20 64 61 74 61 62 61 73 |mappings| databas|
|000062b0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 2e 0d 20 20 |e prefer|ence.. |
|000062c0| 20 20 20 2a 20 6e 64 78 | 20 6d 75 73 74 20 62 65 | * ndx| must be|
|000062d0| 20 69 6e 20 74 68 65 20 | 72 61 6e 67 65 20 66 72 | in the |range fr|
|000062e0| 6f 6d 20 31 20 74 6f 20 | 74 68 65 20 6e 75 6d 62 |om 1 to |the numb|
|000062f0| 65 72 20 6f 66 20 65 6e | 74 72 69 65 73 20 69 6e |er of en|tries in|
|00006300| 20 74 68 65 20 64 61 74 | 61 62 61 73 65 2e 0d 20 | the dat|abase.. |
|00006310| 20 20 20 20 2a 20 54 68 | 65 20 76 61 6c 75 65 20 | * Th|e value |
|00006320| 6f 66 20 70 6f 73 20 69 | 73 20 69 67 6e 6f 72 65 |of pos i|s ignore|
|00006330| 64 20 6f 6e 20 69 6e 70 | 75 74 2e 20 70 6f 73 20 |d on inp|ut. pos |
|00006340| 69 73 20 73 65 74 20 74 | 6f 20 74 68 65 20 70 6f |is set t|o the po|
|00006350| 73 69 74 69 6f 6e 20 6f | 66 0d 20 20 20 20 20 2a |sition o|f. *|
|00006360| 20 74 68 65 20 6e 64 78 | 27 74 68 20 65 6e 74 72 | the ndx|'th entr|
|00006370| 79 20 69 6e 20 74 68 65 | 20 64 61 74 61 62 61 73 |y in the| databas|
|00006380| 65 20 61 6e 64 20 69 73 | 20 73 75 69 74 61 62 6c |e and is| suitabl|
|00006390| 65 20 66 6f 72 20 70 61 | 73 73 69 6e 67 20 62 61 |e for pa|ssing ba|
|000063a0| 63 6b 0d 20 20 20 20 20 | 2a 20 69 6e 74 6f 20 49 |ck. |* into I|
|000063b0| 43 53 65 74 4d 61 70 45 | 6e 74 72 79 2e 0d 20 20 |CSetMapE|ntry.. |
|000063c0| 20 20 20 2a 20 44 6f 65 | 73 20 6e 6f 74 20 72 65 | * Doe|s not re|
|000063d0| 74 75 72 6e 20 61 6e 79 | 20 75 73 65 72 20 64 61 |turn any| user da|
|000063e0| 74 61 20 61 73 73 6f 63 | 69 61 74 65 64 20 77 69 |ta assoc|iated wi|
|000063f0| 74 68 20 74 68 65 20 65 | 6e 74 72 79 2e 0d 20 20 |th the e|ntry.. |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.