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 / ICAPI.h next >
MacBinary  |  1996-07-15  |  25.5 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: ICAPI.h

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Jul 15 14:40:58 1996, modified Mon Jul 15 14:40:58 1996, creator 'CWIE', type ASCII, 25392 bytes "ICAPI.h" , at 0x63b0 456 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 07 49 43 41 50 49 2e | 68 00 00 00 00 00 00 00 |..ICAPI.|h.......|
|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 63 30 00 | 00 01 c8 ae 10 41 3a ae |.....c0.|.....A:.|
|00000060| 10 41 3a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.A:.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 95 fa 00 00 |........|........|
|00000080| 2f 2a 20 a5 a5 a5 53 74 | 61 72 74 20 48 65 61 64 |/* ...St|art Head|
|00000090| 65 72 a5 a5 a5 20 2a 2f | 0d 0d 2f 2a 20 46 69 6c |er... */|../* Fil|
|000000a0| 65 3a 20 20 20 20 20 20 | 20 20 20 49 43 41 50 49 |e: | ICAPI|
|000000b0| 2e 68 20 28 69 6e 74 66 | 29 0d 20 2a 20 47 65 6e |.h (intf|). * Gen|
|000000c0| 65 72 61 74 65 64 20 62 | 79 3a 20 31 2e 30 64 34 |erated b|y: 1.0d4|
|000000d0| 0d 20 2a 20 46 6f 72 3a | 20 20 20 20 20 20 20 20 |. * For:| |
|000000e0| 20 20 49 43 20 31 2e 33 | 0d 20 2a 20 4f 6e 3a 20 | IC 1.3|. * On: |
|000000f0| 20 20 20 20 20 20 20 20 | 20 20 53 75 6e 64 61 79 | | Sunday|
|00000100| 2c 20 31 34 20 4a 75 6c | 79 20 31 39 39 36 2c 20 |, 14 Jul|y 1996, |
|00000110| 32 30 3a 31 39 3a 35 35 | 0d 20 2a 20 0d 20 2a 20 |20:19:55|. * . * |
|00000120| 54 68 69 73 20 66 69 6c | 65 20 69 73 20 70 61 72 |This fil|e is par|
|00000130| 74 20 6f 66 20 74 68 65 | 20 49 6e 74 65 72 6e 65 |t of the| Interne|
|00000140| 74 20 43 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |t Config|uration |
|00000150| 73 79 73 74 65 6d 20 61 | 6e 64 0d 20 2a 20 69 73 |system a|nd. * is|
|00000160| 20 70 6c 61 63 65 64 20 | 69 6e 20 74 68 65 20 70 | placed |in the p|
|00000170| 75 62 6c 69 63 20 64 6f | 6d 61 69 6e 20 66 6f 72 |ublic do|main for|
|00000180| 20 74 68 65 20 62 65 6e | 65 66 69 74 20 6f 66 20 | the ben|efit of |
|00000190| 61 6c 6c 2e 0d 20 2a 2f | 0d 0d 2f 2a 20 a5 a5 a5 |all.. */|../* ...|
|000001a0| 45 6e 64 20 48 65 61 64 | 65 72 a5 a5 a5 20 2a 2f |End Head|er... */|
|000001b0| 0d 0d 2f 2a 0d 09 49 4d | 50 4f 52 54 41 4e 54 20 |../*..IM|PORTANT |
|000001c0| 4e 4f 54 45 53 20 41 42 | 4f 55 54 20 54 48 45 20 |NOTES AB|OUT THE |
|000001d0| 43 20 43 4f 4e 56 45 52 | 53 49 4f 4e 0d 09 2d 2d |C CONVER|SION..--|
|000001e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000001f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000200| 2d 2d 2d 2d 0d 09 0d 09 | 6f 20 50 61 73 63 61 6c |----....|o Pascal|
|00000210| 20 22 76 61 72 22 20 70 | 61 72 61 6d 65 74 65 72 | "var" p|arameter|
|00000220| 73 20 61 72 65 20 63 6f | 6e 76 65 72 74 65 64 20 |s are co|nverted |
|00000230| 66 72 6f 6d 20 22 76 61 | 72 20 78 20 3a 20 79 22 |from "va|r x : y"|
|00000240| 20 74 6f 20 22 79 20 2a | 78 22 2e 20 20 54 68 69 | to "y *|x". Thi|
|00000250| 73 0d 09 20 20 6d 65 61 | 6e 73 20 74 68 61 74 20 |s.. mea|ns that |
|00000260| 77 68 65 6e 20 79 6f 75 | 20 73 65 65 20 74 68 65 |when you| see the|
|00000270| 20 70 61 72 61 6d 65 74 | 65 72 20 22 79 20 2a 78 | paramet|er "y *x|
|00000280| 22 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 62 65 20 |" you sh|ould be |
|00000290| 61 77 61 72 65 20 74 68 | 61 74 0d 09 09 09 79 6f |aware th|at....yo|
|000002a0| 75 20 2a 63 61 6e 6e 6f | 74 20 70 61 73 73 20 69 |u *canno|t pass i|
|000002b0| 6e 20 6e 69 6c 2a 2e 20 | 20 49 6e 20 66 75 74 75 |n nil*. | In futu|
|000002c0| 72 65 20 74 68 69 73 20 | 72 65 73 74 72 69 63 74 |re this |restrict|
|000002d0| 69 6f 6e 20 6d 61 79 20 | 62 65 20 65 61 73 65 64 |ion may |be eased|
|000002e0| 2c 0d 09 09 09 65 73 70 | 65 63 69 61 6c 6c 79 20 |,....esp|ecially |
|000002f0| 66 6f 72 20 74 68 65 20 | 61 74 74 72 20 70 61 72 |for the |attr par|
|00000300| 61 6d 65 74 65 72 20 74 | 6f 20 49 43 47 65 74 50 |ameter t|o ICGetP|
|00000310| 72 65 66 2e 20 20 50 61 | 72 61 6d 65 74 65 72 73 |ref. Pa|rameters|
|00000320| 20 77 68 65 72 65 20 6e | 69 6c 0d 09 09 09 69 73 | where n|il....is|
|00000330| 20 6c 65 67 61 6c 20 61 | 72 65 20 64 65 63 6c 61 | legal a|re decla|
|00000340| 72 65 64 20 75 73 69 6e | 67 20 74 68 65 20 65 78 |red usin|g the ex|
|00000350| 70 6c 69 63 69 74 20 70 | 6f 69 6e 74 65 72 20 74 |plicit p|ointer t|
|00000360| 79 70 65 2c 20 69 65 20 | 22 79 50 74 72 20 78 22 |ype, ie |"yPtr x"|
|00000370| 2e 0d 0d 09 6f 20 53 74 | 72 69 6e 67 73 20 61 72 |....o St|rings ar|
|00000380| 65 20 2a 50 61 73 63 61 | 6c 2a 20 73 74 72 69 6e |e *Pasca|l* strin|
|00000390| 67 73 2e 20 20 54 68 69 | 73 20 6d 65 61 6e 73 20 |gs. Thi|s means |
|000003a0| 74 68 61 74 20 74 68 65 | 79 20 6d 75 73 74 20 62 |that the|y must b|
|000003b0| 65 20 77 6f 72 64 20 61 | 6c 69 67 6e 65 64 2e 0d |e word a|ligned..|
|000003c0| 09 09 4d 50 57 20 61 6e | 64 20 54 68 69 6e 6b 20 |..MPW an|d Think |
|000003d0| 43 20 64 6f 20 74 68 69 | 73 20 61 75 74 6f 6d 61 |C do thi|s automa|
|000003e0| 74 69 63 61 6c 6c 79 2e | 20 20 54 68 65 20 6c 61 |tically.| The la|
|000003f0| 73 74 20 74 69 6d 65 20 | 49 20 63 68 65 63 6b 2c |st time |I check,|
|00000400| 20 4d 65 74 72 6f 77 65 | 72 6b 73 0d 09 09 43 20 | Metrowe|rks...C |
|00000410| 64 6f 65 73 20 6e 6f 74 | 2e 20 20 49 66 20 69 74 |does not|. If it|
|00000420| 20 73 74 69 6c 6c 20 64 | 6f 65 73 6e 27 74 2c 20 | still d|oesn't, |
|00000430| 74 68 65 6e 20 49 4d 48 | 4f 20 69 74 27 73 20 61 |then IMH|O it's a|
|00000440| 20 62 75 67 20 69 6e 20 | 74 68 65 69 72 20 63 6f | bug in |their co|
|00000450| 6d 70 69 6c 65 72 0d 09 | 09 61 6e 64 20 79 6f 75 |mpiler..|.and you|
|00000460| 20 73 68 6f 75 6c 64 20 | 72 65 70 6f 72 74 20 69 | should |report i|
|00000470| 74 20 74 6f 20 74 68 65 | 6d 2e 0d 0d 09 6f 20 54 |t to the|m....o T|
|00000480| 68 65 20 63 61 6e 6f 6e | 69 63 61 6c 20 49 6e 74 |he canon|ical Int|
|00000490| 65 72 6e 65 74 20 43 6f | 6e 66 69 67 20 69 6e 74 |ernet Co|nfig int|
|000004a0| 65 72 66 61 63 65 20 69 | 73 20 64 65 66 69 6e 65 |erface i|s define|
|000004b0| 64 20 69 6e 20 50 61 73 | 63 61 6c 2e 20 20 54 68 |d in Pas|cal. Th|
|000004c0| 65 73 65 0d 09 09 68 65 | 61 64 65 72 73 20 68 61 |ese...he|aders ha|
|000004d0| 76 65 20 6e 6f 74 20 62 | 65 65 6e 20 74 68 6f 72 |ve not b|een thor|
|000004e0| 6f 75 67 68 6c 79 20 74 | 65 73 74 65 64 2e 20 20 |oughly t|ested. |
|000004f0| 49 66 20 74 68 65 72 65 | 20 69 73 20 61 20 63 6f |If there| is a co|
|00000500| 6e 66 6c 69 63 74 20 62 | 65 74 77 65 65 6e 0d 09 |nflict b|etween..|
|00000510| 09 74 68 65 73 65 20 68 | 65 61 64 65 72 73 20 61 |.these h|eaders a|
|00000520| 6e 64 20 74 68 65 20 50 | 61 73 63 61 6c 20 69 6e |nd the P|ascal in|
|00000530| 74 65 72 66 61 63 65 73 | 2c 20 74 68 65 20 50 61 |terfaces|, the Pa|
|00000540| 73 63 61 6c 20 73 68 6f | 75 6c 64 20 74 61 6b 65 |scal sho|uld take|
|00000550| 20 70 72 65 63 65 64 65 | 6e 63 65 2e 0d 2a 2f 0d | precede|nce..*/.|
|00000560| 0d 2f 2a 20 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |./* ////|////////|
|00000570| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000580| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|00000590| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000005a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000005b0| 2f 2f 2f 2f 2f 20 2a 2f | 0d 0d 23 69 66 6e 64 65 |///// */|..#ifnde|
|000005c0| 66 20 5f 5f 49 43 41 50 | 49 5f 5f 0d 23 64 65 66 |f __ICAP|I__.#def|
|000005d0| 69 6e 65 20 5f 5f 49 43 | 41 50 49 5f 5f 0d 0d 23 |ine __IC|API__..#|
|000005e0| 69 66 6e 64 65 66 20 5f | 5f 54 59 50 45 53 5f 5f |ifndef _|_TYPES__|
|000005f0| 0d 23 69 6e 63 6c 75 64 | 65 20 3c 54 79 70 65 73 |.#includ|e <Types|
|00000600| 2e 68 3e 0d 23 65 6e 64 | 69 66 0d 0d 23 69 66 6e |.h>.#end|if..#ifn|
|00000610| 64 65 66 20 5f 5f 46 49 | 4c 45 53 5f 5f 0d 23 69 |def __FI|LES__.#i|
|00000620| 6e 63 6c 75 64 65 20 3c | 46 69 6c 65 73 2e 68 3e |nclude <|Files.h>|
|00000630| 0d 23 65 6e 64 69 66 0d | 0d 23 69 66 6e 64 65 66 |.#endif.|.#ifndef|
|00000640| 20 5f 5f 49 43 54 59 50 | 45 53 5f 5f 0d 23 69 6e | __ICTYP|ES__.#in|
|00000650| 63 6c 75 64 65 20 22 49 | 43 54 79 70 65 73 2e 68 |clude "I|CTypes.h|
|00000660| 22 0d 23 65 6e 64 69 66 | 0d 0d 23 69 66 6e 64 65 |".#endif|..#ifnde|
|00000670| 66 20 5f 5f 49 43 4b 45 | 59 53 5f 5f 0d 23 69 6e |f __ICKE|YS__.#in|
|00000680| 63 6c 75 64 65 20 22 49 | 43 4b 65 79 73 2e 68 22 |clude "I|CKeys.h"|
|00000690| 0d 23 65 6e 64 69 66 0d | 0d 2f 2a 20 2f 2f 2f 2f |.#endif.|./* ////|
|000006a0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000006b0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000006c0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000006d0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////|
|000006e0| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 20 2a 2f |////////|///// */|
|000006f0| 0d 0d 23 69 66 64 65 66 | 20 5f 5f 63 70 6c 75 73 |..#ifdef| __cplus|
|00000700| 70 6c 75 73 0d 65 78 74 | 65 72 6e 20 22 43 22 20 |plus.ext|ern "C" |
|00000710| 7b 0d 23 65 6e 64 69 66 | 0d 0d 2f 2a 20 a5 a5 a5 |{.#endif|../* ...|
|00000720| 53 74 61 72 74 20 49 43 | 41 50 49 2e 68 a5 a5 a5 |Start IC|API.h...|
|00000730| 20 2a 2f 0d 0d 2f 2a 20 | 2a 2a 2a 2a 2a 20 53 74 | */../* |***** St|
|00000740| 61 72 74 69 6e 67 20 55 | 70 20 61 6e 64 20 53 68 |arting U|p and Sh|
|00000750| 75 74 74 69 6e 67 20 44 | 6f 77 6e 20 2a 2a 2a 2a |utting D|own ****|
|00000760| 2a 20 2a 2f 0d 0d 70 61 | 73 63 61 6c 20 49 43 45 |* */..pa|scal ICE|
|00000770| 72 72 6f 72 20 49 43 53 | 74 61 72 74 28 49 43 49 |rror ICS|tart(ICI|
|00000780| 6e 73 74 61 6e 63 65 20 | 2a 69 6e 73 74 2c 20 4f |nstance |*inst, O|
|00000790| 53 54 79 70 65 20 63 72 | 65 61 74 6f 72 29 3b 0d |SType cr|eator);.|
|000007a0| 20 20 2f 2a 20 43 61 6c | 6c 20 74 68 69 73 20 61 | /* Cal|l this a|
|000007b0| 74 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 20 69 6e |t applic|ation in|
|000007c0| 69 74 69 61 6c 69 73 61 | 74 69 6f 6e 2e 20 53 65 |itialisa|tion. Se|
|000007d0| 74 20 63 72 65 61 74 6f | 72 20 74 6f 20 79 6f 75 |t creato|r to you|
|000007e0| 72 20 61 70 70 6c 69 63 | 61 74 69 6f 6e 0d 20 20 |r applic|ation. |
|000007f0| 20 2a 20 63 72 65 61 74 | 6f 72 20 74 6f 20 61 6c | * creat|or to al|
|00000800| 6c 6f 77 20 66 6f 72 20 | 66 75 74 75 72 65 20 65 |low for |future e|
|00000810| 78 70 61 6e 73 69 6f 6e | 20 6f 66 20 74 68 65 20 |xpansion| of the |
|00000820| 49 43 20 73 79 73 74 65 | 6d 2e 20 52 65 74 75 72 |IC syste|m. Retur|
|00000830| 6e 73 0d 20 20 20 2a 20 | 69 6e 73 74 20 61 73 20 |ns. * |inst as |
|00000840| 61 20 63 6f 6e 6e 65 63 | 74 69 6f 6e 20 74 6f 20 |a connec|tion to |
|00000850| 74 68 65 20 49 43 20 73 | 79 73 74 65 6d 2e 0d 20 |the IC s|ystem.. |
|00000860| 20 20 2a 2f 0d 0d 70 61 | 73 63 61 6c 20 49 43 45 | */..pa|scal ICE|
|00000870| 72 72 6f 72 20 49 43 53 | 74 6f 70 28 49 43 49 6e |rror ICS|top(ICIn|
|00000880| 73 74 61 6e 63 65 20 69 | 6e 73 74 29 3b 0d 20 20 |stance i|nst);. |
|00000890| 2f 2a 20 49 74 20 69 73 | 20 69 6c 6c 65 67 61 6c |/* It is| illegal|
|000008a0| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|000008b0| 75 74 69 6e 65 20 69 6e | 73 69 64 65 20 61 20 49 |utine in|side a I|
|000008c0| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 2e |CBegin/E|nd pair.|
|000008d0| 0d 20 20 20 2a 20 43 61 | 6c 6c 20 74 68 69 73 20 |. * Ca|ll this |
|000008e0| 61 74 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 20 69 |at appli|cation i|
|000008f0| 6e 69 74 69 61 6c 69 73 | 61 74 69 6f 6e 2c 20 61 |nitialis|ation, a|
|00000900| 66 74 65 72 20 77 68 69 | 63 68 20 69 6e 73 74 0d |fter whi|ch inst.|
|00000910| 20 20 20 2a 20 69 73 20 | 6e 6f 20 6c 6f 6e 67 65 | * is |no longe|
|00000920| 72 20 76 61 6c 69 64 20 | 63 6f 6e 6e 65 63 74 69 |r valid |connecti|
|00000930| 6f 6e 20 74 6f 20 49 43 | 2e 0d 20 20 20 2a 2f 0d |on to IC|.. */.|
|00000940| 0d 2f 2a 20 2a 2a 2a 2a | 2a 20 53 70 65 63 69 66 |./* ****|* Specif|
|00000950| 79 69 6e 67 20 61 20 43 | 6f 6e 66 69 67 75 72 61 |ying a C|onfigura|
|00000960| 74 69 6f 6e 20 2a 2a 2a | 2a 2a 20 2a 2f 0d 0d 70 |tion ***|** */..p|
|00000970| 61 73 63 61 6c 20 49 43 | 45 72 72 6f 72 20 49 43 |ascal IC|Error IC|
|00000980| 46 69 6e 64 43 6f 6e 66 | 69 67 46 69 6c 65 28 49 |FindConf|igFile(I|
|00000990| 43 49 6e 73 74 61 6e 63 | 65 20 69 6e 73 74 2c 20 |CInstanc|e inst, |
|000009a0| 73 68 6f 72 74 20 63 6f | 75 6e 74 2c 20 49 43 44 |short co|unt, ICD|
|000009b0| 69 72 53 70 65 63 41 72 | 72 61 79 50 74 72 20 66 |irSpecAr|rayPtr f|
|000009c0| 6f 6c 64 65 72 73 29 3b | 0d 20 20 2f 2a 20 49 74 |olders);|. /* It|
|000009d0| 20 69 73 20 69 6c 6c 65 | 67 61 6c 20 74 6f 20 63 | is ille|gal to c|
|000009e0| 61 6c 6c 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |all this| routine|
|000009f0| 20 69 6e 73 69 64 65 20 | 61 20 49 43 42 65 67 69 | inside |a ICBegi|
|00000a00| 6e 2f 45 6e 64 20 70 61 | 69 72 2e 0d 20 20 20 2a |n/End pa|ir.. *|
|00000a10| 20 43 61 6c 6c 20 74 6f | 20 63 6f 6e 66 69 67 75 | Call to| configu|
|00000a20| 72 65 20 74 68 69 73 20 | 63 6f 6e 6e 65 63 74 69 |re this |connecti|
|00000a30| 6f 6e 20 74 6f 20 49 43 | 2e 0d 20 20 20 2a 20 53 |on to IC|.. * S|
|00000a40| 65 74 20 63 6f 75 6e 74 | 20 61 73 20 74 68 65 20 |et count| as the |
|00000a50| 6e 75 6d 62 65 72 20 6f | 66 20 76 61 6c 69 64 20 |number o|f valid |
|00000a60| 65 6c 65 6d 65 6e 74 73 | 20 69 6e 20 66 6f 6c 64 |elements| in fold|
|00000a70| 65 72 73 2e 0d 20 20 20 | 2a 20 53 65 74 20 66 6f |ers.. |* Set fo|
|00000a80| 6c 64 65 72 73 20 74 6f | 20 61 20 70 6f 69 6e 74 |lders to| a point|
|00000a90| 65 72 20 74 6f 20 74 68 | 65 20 66 6f 6c 64 65 72 |er to th|e folder|
|00000aa0| 73 20 74 6f 20 73 65 61 | 72 63 68 2e 0d 20 20 20 |s to sea|rch.. |
|00000ab0| 2a 20 53 65 74 74 69 6e | 67 20 63 6f 75 6e 74 20 |* Settin|g count |
|00000ac0| 74 6f 20 30 20 61 6e 64 | 20 66 6f 6c 64 65 72 73 |to 0 and| folders|
|00000ad0| 20 74 6f 20 6e 69 6c 20 | 69 73 20 4f 4b 2e 0d 20 | to nil |is OK.. |
|00000ae0| 20 20 2a 20 53 65 61 72 | 63 68 65 73 20 74 68 65 | * Sear|ches the|
|00000af0| 20 73 70 65 63 69 66 69 | 65 64 20 66 6f 6c 64 65 | specifi|ed folde|
|00000b00| 72 73 20 61 6e 64 20 74 | 68 65 6e 20 74 68 65 20 |rs and t|hen the |
|00000b10| 50 72 65 66 65 72 65 6e | 63 65 73 20 66 6f 6c 64 |Preferen|ces fold|
|00000b20| 65 72 0d 20 20 20 2a 20 | 69 6e 20 61 20 75 6e 73 |er. * |in a uns|
|00000b30| 70 65 63 69 66 69 65 64 | 20 6d 61 6e 6e 65 72 2e |pecified| manner.|
|00000b40| 0d 20 20 20 2a 2f 0d 0d | 70 61 73 63 61 6c 20 49 |. */..|pascal I|
|00000b50| 43 45 72 72 6f 72 20 49 | 43 46 69 6e 64 55 73 65 |CError I|CFindUse|
|00000b60| 72 43 6f 6e 66 69 67 46 | 69 6c 65 28 49 43 49 6e |rConfigF|ile(ICIn|
|00000b70| 73 74 61 6e 63 65 20 69 | 6e 73 74 2c 20 49 43 44 |stance i|nst, ICD|
|00000b80| 69 72 53 70 65 63 20 2a | 77 68 65 72 65 29 3b 0d |irSpec *|where);.|
|00000b90| 20 20 2f 2a 20 52 65 71 | 75 69 72 65 73 20 49 43 | /* Req|uires IC|
|00000ba0| 20 31 2e 31 2e 0d 20 20 | 20 2a 20 49 74 20 69 73 | 1.1.. | * It is|
|00000bb0| 20 69 6c 6c 65 67 61 6c | 20 74 6f 20 63 61 6c 6c | illegal| to call|
|00000bc0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 20 69 6e | this ro|utine in|
|00000bd0| 73 69 64 65 20 61 20 49 | 43 42 65 67 69 6e 2f 45 |side a I|CBegin/E|
|00000be0| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 2a 20 53 69 |nd pair.|. * Si|
|00000bf0| 6d 69 6c 61 72 20 74 6f | 20 49 43 46 69 6e 64 43 |milar to| ICFindC|
|00000c00| 6f 6e 66 69 67 46 69 6c | 65 20 65 78 63 65 70 74 |onfigFil|e except|
|00000c10| 20 74 68 61 74 20 69 74 | 20 6f 6e 6c 79 20 73 65 | that it| only se|
|00000c20| 61 72 63 68 65 73 20 74 | 68 65 20 66 6f 6c 64 65 |arches t|he folde|
|00000c30| 72 0d 20 20 20 2a 20 73 | 70 65 63 69 66 69 65 64 |r. * s|pecified|
|00000c40| 20 69 6e 20 77 68 65 72 | 65 2e 20 20 49 66 20 74 | in wher|e. If t|
|00000c50| 68 65 20 69 6e 70 75 74 | 20 70 61 72 61 6d 65 74 |he input| paramet|
|00000c60| 65 72 73 20 61 72 65 20 | 76 61 6c 69 64 20 74 68 |ers are |valid th|
|00000c70| 65 20 72 6f 75 74 69 6e | 65 0d 20 20 20 2a 20 77 |e routin|e. * w|
|00000c80| 69 6c 6c 20 61 6c 77 61 | 79 73 20 73 75 63 63 65 |ill alwa|ys succe|
|00000c90| 73 73 66 75 6c 20 63 6f | 6e 66 69 67 75 72 65 20 |ssful co|nfigure |
|00000ca0| 74 68 65 20 69 6e 73 74 | 61 6e 63 65 2c 20 63 72 |the inst|ance, cr|
|00000cb0| 65 61 74 69 6e 67 20 61 | 6e 0d 20 20 20 2a 20 65 |eating a|n. * e|
|00000cc0| 6d 70 74 79 20 63 6f 6e | 66 69 67 75 72 61 74 69 |mpty con|figurati|
|00000cd0| 6f 6e 20 69 66 20 6e 65 | 63 65 73 73 61 72 79 0d |on if ne|cessary.|
|00000ce0| 20 20 20 2a 20 46 6f 72 | 20 75 73 65 20 77 69 74 | * For| use wit|
|00000cf0| 68 20 64 6f 75 62 6c 65 | 2d 63 6c 69 63 6b 61 62 |h double|-clickab|
|00000d00| 6c 65 20 70 72 65 66 65 | 72 65 6e 63 65 20 66 69 |le prefe|rence fi|
|00000d10| 6c 65 73 2e 0d 20 20 20 | 2a 2f 0d 0d 70 61 73 63 |les.. |*/..pasc|
|00000d20| 61 6c 20 49 43 45 72 72 | 6f 72 20 49 43 47 65 6e |al ICErr|or ICGen|
|00000d30| 65 72 61 6c 46 69 6e 64 | 43 6f 6e 66 69 67 46 69 |eralFind|ConfigFi|
|00000d40| 6c 65 28 49 43 49 6e 73 | 74 61 6e 63 65 20 69 6e |le(ICIns|tance in|
|00000d50| 73 74 2c 20 42 6f 6f 6c | 65 61 6e 20 73 65 61 72 |st, Bool|ean sear|
|00000d60| 63 68 5f 70 72 65 66 73 | 2c 20 42 6f 6f 6c 65 61 |ch_prefs|, Boolea|
|00000d70| 6e 20 63 61 6e 5f 63 72 | 65 61 74 65 2c 20 73 68 |n can_cr|eate, sh|
|00000d80| 6f 72 74 20 63 6f 75 6e | 74 2c 20 49 43 44 69 72 |ort coun|t, ICDir|
|00000d90| 53 70 65 63 41 72 72 61 | 79 50 74 72 20 66 6f 6c |SpecArra|yPtr fol|
|00000da0| 64 65 72 73 29 3b 0d 20 | 20 2f 2a 20 52 65 71 75 |ders);. | /* Requ|
|00000db0| 69 72 65 73 20 49 43 20 | 31 2e 32 2e 0d 20 20 20 |ires IC |1.2.. |
|00000dc0| 2a 20 49 74 20 69 73 20 | 69 6c 6c 65 67 61 6c 20 |* It is |illegal |
|00000dd0| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00000de0| 74 69 6e 65 20 69 6e 73 | 69 64 65 20 61 20 49 43 |tine ins|ide a IC|
|00000df0| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 2e 0d |Begin/En|d pair..|
|00000e00| 20 20 20 2a 20 43 61 6c | 6c 20 74 6f 20 63 6f 6e | * Cal|l to con|
|00000e10| 66 69 67 75 72 65 20 74 | 68 69 73 20 63 6f 6e 6e |figure t|his conn|
|00000e20| 65 63 74 69 6f 6e 20 74 | 6f 20 49 43 2e 0d 20 20 |ection t|o IC.. |
|00000e30| 20 2a 20 54 68 69 73 20 | 72 6f 75 74 69 6e 65 20 | * This |routine |
|00000e40| 61 63 74 73 20 61 73 20 | 61 20 6d 6f 72 65 20 67 |acts as |a more g|
|00000e50| 65 6e 65 72 61 6c 20 72 | 65 70 6c 61 63 65 6d 65 |eneral r|eplaceme|
|00000e60| 6e 74 20 66 6f 72 0d 20 | 20 20 2a 20 49 43 46 69 |nt for. | * ICFi|
|00000e70| 6e 64 43 6f 6e 66 69 67 | 46 69 6c 65 20 61 6e 64 |ndConfig|File and|
|00000e80| 20 49 43 46 69 6e 64 55 | 73 65 72 43 6f 6e 66 69 | ICFindU|serConfi|
|00000e90| 67 46 69 6c 65 2e 0d 20 | 20 20 2a 20 53 65 74 20 |gFile.. | * Set |
|00000ea0| 73 65 61 72 63 68 5f 70 | 72 65 66 73 20 74 6f 20 |search_p|refs to |
|00000eb0| 74 72 75 65 20 69 66 20 | 79 6f 75 20 77 61 6e 74 |true if |you want|
|00000ec0| 20 69 74 20 74 6f 20 73 | 65 61 72 63 68 20 74 68 | it to s|earch th|
|00000ed0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 73 20 66 6f |e prefer|ences fo|
|00000ee0| 6c 64 65 72 2e 0d 20 20 | 20 2a 20 53 65 74 20 63 |lder.. | * Set c|
|00000ef0| 61 6e 5f 63 72 65 61 74 | 65 20 74 6f 20 74 72 75 |an_creat|e to tru|
|00000f00| 65 20 69 66 20 79 6f 75 | 20 77 61 6e 74 20 69 74 |e if you| want it|
|00000f10| 20 74 6f 20 62 65 20 61 | 62 6c 65 20 74 6f 20 63 | to be a|ble to c|
|00000f20| 72 65 61 74 65 20 61 20 | 6e 65 77 20 63 6f 6e 66 |reate a |new conf|
|00000f30| 69 67 2e 0d 20 20 20 2a | 20 53 65 74 20 63 6f 75 |ig.. *| Set cou|
|00000f40| 6e 74 20 61 73 20 74 68 | 65 20 6e 75 6d 62 65 72 |nt as th|e number|
|00000f50| 20 6f 66 20 76 61 6c 69 | 64 20 65 6c 65 6d 65 6e | of vali|d elemen|
|00000f60| 74 73 20 69 6e 20 66 6f | 6c 64 65 72 73 2e 0d 20 |ts in fo|lders.. |
|00000f70| 20 20 2a 20 53 65 74 20 | 66 6f 6c 64 65 72 73 20 | * Set |folders |
|00000f80| 74 6f 20 61 20 70 6f 69 | 6e 74 65 72 20 74 6f 20 |to a poi|nter to |
|00000f90| 74 68 65 20 66 6f 6c 64 | 65 72 73 20 74 6f 20 73 |the fold|ers to s|
|00000fa0| 65 61 72 63 68 2e 0d 20 | 20 20 2a 20 53 65 74 74 |earch.. | * Sett|
|00000fb0| 69 6e 67 20 63 6f 75 6e | 74 20 74 6f 20 30 20 61 |ing coun|t to 0 a|
|00000fc0| 6e 64 20 66 6f 6c 64 65 | 72 73 20 74 6f 20 6e 69 |nd folde|rs to ni|
|00000fd0| 6c 20 69 73 20 4f 4b 2e | 0d 20 20 20 2a 20 53 65 |l is OK.|. * Se|
|00000fe0| 61 72 63 68 65 73 20 74 | 68 65 20 73 70 65 63 69 |arches t|he speci|
|00000ff0| 66 69 65 64 20 66 6f 6c | 64 65 72 73 20 61 6e 64 |fied fol|ders and|
|00001000| 20 74 68 65 6e 20 6f 70 | 74 69 6f 6e 61 6c 6c 79 | then op|tionally|
|00001010| 20 74 68 65 20 50 72 65 | 66 65 72 65 6e 63 65 73 | the Pre|ferences|
|00001020| 20 66 6f 6c 64 65 72 0d | 20 20 20 2a 20 69 6e 20 | folder.| * in |
|00001030| 61 20 75 6e 73 70 65 63 | 69 66 69 65 64 20 6d 61 |a unspec|ified ma|
|00001040| 6e 6e 65 72 2e 0d 20 20 | 20 2a 2f 0d 0d 70 61 73 |nner.. | */..pas|
|00001050| 63 61 6c 20 49 43 45 72 | 72 6f 72 20 49 43 43 68 |cal ICEr|ror ICCh|
|00001060| 6f 6f 73 65 43 6f 6e 66 | 69 67 28 49 43 49 6e 73 |ooseConf|ig(ICIns|
|00001070| 74 61 6e 63 65 20 69 6e | 73 74 29 3b 0d 20 20 2f |tance in|st);. /|
|00001080| 2a 20 52 65 71 75 69 72 | 65 73 20 49 43 20 31 2e |* Requir|es IC 1.|
|00001090| 32 2e 0d 20 20 20 2a 20 | 49 74 20 69 73 20 69 6c |2.. * |It is il|
|000010a0| 6c 65 67 61 6c 20 74 6f | 20 63 61 6c 6c 20 74 68 |legal to| call th|
|000010b0| 69 73 20 72 6f 75 74 69 | 6e 65 20 69 6e 73 69 64 |is routi|ne insid|
|000010c0| 65 20 61 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 |e a ICBe|gin/End |
|000010d0| 70 61 69 72 2e 0d 20 20 | 20 2a 20 52 65 71 75 65 |pair.. | * Reque|
|000010e0| 73 74 73 20 74 68 65 20 | 75 73 65 72 20 74 6f 20 |sts the |user to |
|000010f0| 63 68 6f 6f 73 65 20 61 | 20 63 6f 6e 66 69 67 75 |choose a| configu|
|00001100| 72 61 74 69 6f 6e 2c 20 | 74 79 70 69 63 61 6c 6c |ration, |typicall|
|00001110| 79 20 75 73 69 6e 67 20 | 73 6f 6d 65 0d 20 20 20 |y using |some. |
|00001120| 2a 20 73 6f 72 74 20 6f | 66 20 6d 6f 64 61 6c 20 |* sort o|f modal |
|00001130| 64 69 61 6c 6f 67 2e 20 | 49 66 20 74 68 65 20 75 |dialog. |If the u|
|00001140| 73 65 72 20 63 61 6e 63 | 65 6c 73 20 74 68 65 20 |ser canc|els the |
|00001150| 64 69 61 6c 6f 67 20 74 | 68 65 20 63 6f 6e 66 69 |dialog t|he confi|
|00001160| 67 75 72 61 74 69 6f 6e | 0d 20 20 20 2a 20 73 74 |guration|. * st|
|00001170| 61 74 65 20 77 69 6c 6c | 20 62 65 20 75 6e 61 66 |ate will| be unaf|
|00001180| 66 65 63 74 65 64 2e 0d | 20 20 20 2a 2f 0d 0d 70 |fected..| */..p|
|00001190| 61 73 63 61 6c 20 49 43 | 45 72 72 6f 72 20 49 43 |ascal IC|Error IC|
|000011a0| 43 68 6f 6f 73 65 4e 65 | 77 43 6f 6e 66 69 67 28 |ChooseNe|wConfig(|
|000011b0| 49 43 49 6e 73 74 61 6e | 63 65 20 69 6e 73 74 29 |ICInstan|ce inst)|
|000011c0| 3b 0d 20 20 2f 2a 20 52 | 65 71 75 69 72 65 73 20 |;. /* R|equires |
|000011d0| 49 43 20 31 2e 32 2e 0d | 20 20 20 2a 20 49 74 20 |IC 1.2..| * It |
|000011e0| 69 73 20 69 6c 6c 65 67 | 61 6c 20 74 6f 20 63 61 |is illeg|al to ca|
|000011f0| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 20 |ll this |routine |
|00001200| 69 6e 73 69 64 65 20 61 | 20 49 43 42 65 67 69 6e |inside a| ICBegin|
|00001210| 2f 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 2a 20 |/End pai|r.. * |
|00001220| 52 65 71 75 65 73 74 73 | 20 74 68 65 20 75 73 65 |Requests| the use|
|00001230| 72 20 74 6f 20 63 72 65 | 61 74 65 20 61 20 6e 65 |r to cre|ate a ne|
|00001240| 77 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2c |w config|uration,|
|00001250| 20 74 79 70 69 63 61 6c | 6c 79 20 75 73 69 6e 67 | typical|ly using|
|00001260| 20 73 6f 6d 65 0d 20 20 | 20 2a 20 73 6f 72 74 20 | some. | * sort |
|00001270| 6f 66 20 6d 6f 64 61 6c | 20 64 69 61 6c 6f 67 2e |of modal| dialog.|
|00001280| 20 49 66 20 74 68 65 20 | 75 73 65 72 20 63 61 6e | If the |user can|
|00001290| 63 65 6c 73 20 74 68 65 | 20 64 69 61 6c 6f 67 20 |cels the| dialog |
|000012a0| 74 68 65 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |the conf|iguratio|
|000012b0| 6e 0d 20 20 20 2a 20 73 | 74 61 74 65 20 77 69 6c |n. * s|tate wil|
|000012c0| 6c 20 62 65 20 75 6e 61 | 66 66 65 63 74 65 64 2e |l be una|ffected.|
|000012d0| 0d 20 20 20 2a 2f 0d 0d | 70 61 73 63 61 6c 20 49 |. */..|pascal I|
|000012e0| 43 45 72 72 6f 72 20 49 | 43 47 65 74 43 6f 6e 66 |CError I|CGetConf|
|000012f0| 69 67 4e 61 6d 65 28 49 | 43 49 6e 73 74 61 6e 63 |igName(I|CInstanc|
|00001300| 65 20 69 6e 73 74 2c 20 | 42 6f 6f 6c 65 61 6e 20 |e inst, |Boolean |
|00001310| 6c 6f 6e 67 6e 61 6d 65 | 2c 20 53 74 72 32 35 35 |longname|, Str255|
|00001320| 20 6e 61 6d 65 29 3b 0d | 20 20 2f 2a 20 52 65 71 | name);.| /* Req|
|00001330| 75 69 72 65 73 20 49 43 | 20 31 2e 32 2e 0d 20 20 |uires IC| 1.2.. |
|00001340| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|00001350| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00001360| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00001370| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00001380| 0d 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 61 20 |. * Re|turns a |
|00001390| 73 74 72 69 6e 67 20 74 | 68 61 74 20 64 65 73 63 |string t|hat desc|
|000013a0| 72 69 62 65 73 20 74 68 | 65 20 63 75 72 72 65 6e |ribes th|e curren|
|000013b0| 74 20 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 20 |t config|uration |
|000013c0| 61 74 20 61 20 75 73 65 | 72 0d 20 20 20 2a 20 6c |at a use|r. * l|
|000013d0| 65 76 65 6c 2e 20 53 65 | 74 20 6c 6f 6e 67 6e 61 |evel. Se|t longna|
|000013e0| 6d 65 20 74 6f 20 74 72 | 75 65 20 69 66 20 79 6f |me to tr|ue if yo|
|000013f0| 75 20 77 61 6e 74 20 61 | 20 6c 6f 6e 67 20 6e 61 |u want a| long na|
|00001400| 6d 65 2c 20 75 70 20 74 | 6f 20 32 35 35 0d 20 20 |me, up t|o 255. |
|00001410| 20 2a 20 63 68 61 72 61 | 63 74 65 72 73 2c 20 6f | * chara|cters, o|
|00001420| 72 20 66 61 6c 73 65 20 | 69 66 20 79 6f 75 20 77 |r false |if you w|
|00001430| 61 6e 74 20 61 20 73 68 | 6f 72 74 20 6e 61 6d 65 |ant a sh|ort name|
|00001440| 2c 20 74 79 70 69 63 61 | 6c 6c 79 20 61 62 6f 75 |, typica|lly abou|
|00001450| 74 20 33 32 0d 20 20 20 | 2a 20 63 68 61 72 61 63 |t 32. |* charac|
|00001460| 74 65 72 73 2e 0d 20 20 | 20 2a 20 54 68 65 20 72 |ters.. | * The r|
|00001470| 65 74 75 72 6e 65 64 20 | 73 74 72 69 6e 67 20 69 |eturned |string i|
|00001480| 73 20 66 6f 72 20 75 73 | 65 72 20 64 69 73 70 6c |s for us|er displ|
|00001490| 61 79 20 6f 6e 6c 79 2e | 20 49 66 20 79 6f 75 20 |ay only.| If you |
|000014a0| 72 65 6c 79 20 6f 6e 20 | 74 68 65 0d 20 20 20 2a |rely on |the. *|
|000014b0| 20 65 78 61 63 74 20 66 | 6f 72 6d 61 74 20 6f 66 | exact f|ormat of|
|000014c0| 20 69 74 2c 20 79 6f 75 | 20 77 69 6c 6c 20 63 6f | it, you| will co|
|000014d0| 6e 66 6c 69 63 74 20 77 | 69 74 68 20 61 6e 79 20 |nflict w|ith any |
|000014e0| 66 75 74 75 72 65 20 49 | 43 0d 20 20 20 2a 20 69 |future I|C. * i|
|000014f0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 20 74 68 |mplement|ation th|
|00001500| 61 74 20 64 6f 65 73 6e | 27 74 20 75 73 65 20 65 |at doesn|'t use e|
|00001510| 78 70 6c 69 63 69 74 20 | 70 72 65 66 65 72 65 6e |xplicit |preferen|
|00001520| 63 65 20 66 69 6c 65 73 | 2e 0d 20 20 20 2a 2f 0d |ce files|.. */.|
|00001530| 0d 70 61 73 63 61 6c 20 | 49 43 45 72 72 6f 72 20 |.pascal |ICError |
|00001540| 49 43 47 65 74 43 6f 6e | 66 69 67 52 65 66 65 72 |ICGetCon|figRefer|
|00001550| 65 6e 63 65 28 49 43 49 | 6e 73 74 61 6e 63 65 20 |ence(ICI|nstance |
|00001560| 69 6e 73 74 2c 20 49 43 | 43 6f 6e 66 69 67 52 65 |inst, IC|ConfigRe|
|00001570| 66 48 61 6e 64 6c 65 20 | 72 65 66 29 3b 0d 20 20 |fHandle |ref);. |
|00001580| 2f 2a 20 52 65 71 75 69 | 72 65 73 20 49 43 20 31 |/* Requi|res IC 1|
|00001590| 2e 32 2e 0d 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |.2.. *| You mus|
|000015a0| 74 20 73 70 65 63 69 66 | 79 20 61 20 63 6f 6e 66 |t specif|y a conf|
|000015b0| 69 67 75 72 61 74 69 6f | 6e 20 62 65 66 6f 72 65 |iguratio|n before|
|000015c0| 20 63 61 6c 6c 69 6e 67 | 20 74 68 69 73 20 72 6f | calling| this ro|
|000015d0| 75 74 69 6e 65 2e 0d 20 | 20 20 2a 20 52 65 74 75 |utine.. | * Retu|
|000015e0| 72 6e 73 20 61 20 73 65 | 6c 66 2d 63 6f 6e 74 61 |rns a se|lf-conta|
|000015f0| 69 6e 65 64 20 72 65 66 | 65 72 65 6e 63 65 20 74 |ined ref|erence t|
|00001600| 6f 20 74 68 65 20 69 6e | 73 74 61 6e 63 65 27 73 |o the in|stance's|
|00001610| 20 63 75 72 72 65 6e 74 | 0d 20 20 20 2a 20 63 6f | current|. * co|
|00001620| 6e 66 69 67 75 72 61 74 | 69 6f 6e 2e 0d 20 20 20 |nfigurat|ion.. |
|00001630| 2a 20 72 65 66 20 6d 75 | 73 74 20 62 65 20 61 20 |* ref mu|st be a |
|00001640| 76 61 6c 69 64 20 6e 6f | 6e 2d 6e 69 6c 20 68 61 |valid no|n-nil ha|
|00001650| 6e 64 6c 65 20 61 6e 64 | 20 69 74 20 77 69 6c 6c |ndle and| it will|
|00001660| 20 62 65 20 72 65 73 69 | 7a 65 64 20 74 6f 20 66 | be resi|zed to f|
|00001670| 69 74 20 74 68 65 0d 20 | 20 20 2a 20 72 65 73 75 |it the. | * resu|
|00001680| 6c 74 69 6e 67 20 64 61 | 74 61 2e 0d 20 20 20 2a |lting da|ta.. *|
|00001690| 2f 0d 0d 70 61 73 63 61 | 6c 20 49 43 45 72 72 6f |/..pasca|l ICErro|
|000016a0| 72 20 49 43 53 65 74 43 | 6f 6e 66 69 67 52 65 66 |r ICSetC|onfigRef|
|000016b0| 65 72 65 6e 63 65 28 49 | 43 49 6e 73 74 61 6e 63 |erence(I|CInstanc|
|000016c0| 65 20 69 6e 73 74 2c 20 | 49 43 43 6f 6e 66 69 67 |e inst, |ICConfig|
|000016d0| 52 65 66 48 61 6e 64 6c | 65 20 72 65 66 2c 20 6c |RefHandl|e ref, l|
|000016e0| 6f 6e 67 20 66 6c 61 67 | 73 29 3b 0d 20 20 2f 2a |ong flag|s);. /*|
|000016f0| 20 52 65 71 75 69 72 65 | 73 20 49 43 20 31 2e 32 | Require|s IC 1.2|
|00001700| 2e 0d 20 20 20 2a 20 49 | 74 20 69 73 20 69 6c 6c |.. * I|t is ill|
|00001710| 65 67 61 6c 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |egal to |call thi|
|00001720| 73 20 72 6f 75 74 69 6e | 65 20 69 6e 73 69 64 65 |s routin|e inside|
|00001730| 20 61 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 | a ICBeg|in/End p|
|00001740| 61 69 72 2e 0d 20 20 20 | 2a 20 52 65 63 6f 6e 66 |air.. |* Reconf|
|00001750| 69 67 75 72 65 73 20 74 | 68 65 20 69 6e 73 74 61 |igures t|he insta|
|00001760| 6e 63 65 20 75 73 69 6e | 67 20 61 20 63 6f 6e 66 |nce usin|g a conf|
|00001770| 69 67 75 72 61 74 69 6f | 6e 20 72 65 66 65 72 65 |iguratio|n refere|
|00001780| 6e 63 65 20 74 68 61 74 | 20 77 61 73 0d 20 20 20 |nce that| was. |
|00001790| 2a 20 67 6f 74 20 75 73 | 69 6e 67 20 49 43 47 65 |* got us|ing ICGe|
|000017a0| 74 43 6f 6e 66 69 67 52 | 65 66 65 72 65 6e 63 65 |tConfigR|eference|
|000017b0| 20 72 65 66 65 72 65 6e | 63 65 2e 20 53 65 74 20 | referen|ce. Set |
|000017c0| 74 68 65 0d 20 20 20 2a | 20 69 63 4e 6f 55 73 65 |the. *| icNoUse|
|000017d0| 72 49 6e 74 65 72 61 63 | 74 69 6f 6e 5f 62 69 74 |rInterac|tion_bit|
|000017e0| 20 69 6e 20 66 6c 61 67 | 73 20 69 66 20 79 6f 75 | in flag|s if you|
|000017f0| 20 72 65 71 75 69 72 65 | 20 74 68 61 74 20 74 68 | require| that th|
|00001800| 69 73 20 72 6f 75 74 69 | 6e 65 0d 20 20 20 2a 20 |is routi|ne. * |
|00001810| 6e 6f 74 20 70 72 65 73 | 65 6e 74 20 61 20 6d 6f |not pres|ent a mo|
|00001820| 64 61 6c 20 64 69 61 6c | 6f 67 2e 20 4f 74 68 65 |dal dial|og. Othe|
|00001830| 72 20 66 6c 61 67 20 62 | 69 74 73 20 61 72 65 20 |r flag b|its are |
|00001840| 72 65 73 65 72 76 65 64 | 20 61 6e 64 20 73 68 6f |reserved| and sho|
|00001850| 75 6c 64 0d 20 20 20 2a | 20 62 65 20 73 65 74 20 |uld. *| be set |
|00001860| 74 6f 20 7a 65 72 6f 2e | 0d 20 20 20 2a 20 72 65 |to zero.|. * re|
|00001870| 66 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 6e 69 |f must n|ot be ni|
|00001880| 6c 2e 0d 20 20 20 2a 2f | 0d 0d 70 61 73 63 61 6c |l.. */|..pascal|
|00001890| 20 49 43 45 72 72 6f 72 | 20 49 43 53 70 65 63 69 | ICError| ICSpeci|
|000018a0| 66 79 43 6f 6e 66 69 67 | 46 69 6c 65 28 49 43 49 |fyConfig|File(ICI|
|000018b0| 6e 73 74 61 6e 63 65 20 | 69 6e 73 74 2c 20 46 53 |nstance |inst, FS|
|000018c0| 53 70 65 63 20 2a 63 6f | 6e 66 69 67 29 3b 0d 20 |Spec *co|nfig);. |
|000018d0| 20 2f 2a 20 49 74 20 69 | 73 20 69 6c 6c 65 67 61 | /* It i|s illega|
|000018e0| 6c 20 74 6f 20 63 61 6c | 6c 20 74 68 69 73 20 72 |l to cal|l this r|
|000018f0| 6f 75 74 69 6e 65 20 69 | 6e 73 69 64 65 20 61 20 |outine i|nside a |
|00001900| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00001910| 2e 0d 20 20 20 2a 20 46 | 6f 72 20 75 73 65 20 6f |.. * F|or use o|
|00001920| 6e 6c 79 20 62 79 20 74 | 68 65 20 49 43 20 61 70 |nly by t|he IC ap|
|00001930| 70 6c 69 63 61 74 69 6f | 6e 2e 0d 20 20 20 2a 20 |plicatio|n.. * |
|00001940| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|00001950| 20 72 6f 75 74 69 6e 65 | 20 79 6f 75 72 73 65 6c | routine| yoursel|
|00001960| 66 2c 20 79 6f 75 20 77 | 69 6c 6c 20 63 6f 6e 66 |f, you w|ill conf|
|00001970| 6c 69 63 74 20 77 69 74 | 68 20 61 6e 79 0d 20 20 |lict wit|h any. |
|00001980| 20 2a 20 66 75 74 75 72 | 65 20 49 43 20 69 6d 70 | * futur|e IC imp|
|00001990| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 74 68 61 74 |lementat|ion that|
|000019a0| 20 64 6f 65 73 6e 27 74 | 20 75 73 65 20 65 78 70 | doesn't| use exp|
|000019b0| 6c 69 63 69 74 20 70 72 | 65 66 65 72 65 6e 63 65 |licit pr|eference|
|000019c0| 20 66 69 6c 65 73 2e 0d | 20 20 20 2a 2f 0d 0d 2f | files..| */../|
|000019d0| 2a 20 2a 2a 2a 2a 2a 20 | 47 65 74 74 69 6e 67 20 |* ***** |Getting |
|000019e0| 49 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 2a 2a 2a 2a |Informat|ion ****|
|000019f0| 2a 20 2a 2f 0d 0d 70 61 | 73 63 61 6c 20 49 43 45 |* */..pa|scal ICE|
|00001a00| 72 72 6f 72 20 49 43 47 | 65 74 53 65 65 64 28 49 |rror ICG|etSeed(I|
|00001a10| 43 49 6e 73 74 61 6e 63 | 65 20 69 6e 73 74 2c 20 |CInstanc|e inst, |
|00001a20| 6c 6f 6e 67 20 2a 73 65 | 65 64 29 3b 0d 20 20 2f |long *se|ed);. /|
|00001a30| 2a 20 59 6f 75 20 64 6f | 20 6e 6f 74 20 68 61 76 |* You do| not hav|
|00001a40| 65 20 74 6f 20 73 70 65 | 63 69 66 79 20 61 20 63 |e to spe|cify a c|
|00001a50| 6f 6e 66 69 67 75 72 61 | 74 69 6f 6e 20 62 65 66 |onfigura|tion bef|
|00001a60| 6f 72 65 20 63 61 6c 6c | 69 6e 67 20 74 68 69 73 |ore call|ing this|
|00001a70| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 2a 20 59 | routine|.. * Y|
|00001a80| 6f 75 20 64 6f 20 6e 6f | 74 20 68 61 76 65 20 74 |ou do no|t have t|
|00001a90| 6f 20 62 65 20 69 6e 73 | 69 64 65 20 61 6e 20 49 |o be ins|ide an I|
|00001aa0| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 20 |CBegin/E|nd pair |
|00001ab0| 74 6f 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |to call |this rou|
|00001ac0| 74 69 6e 65 2e 0d 20 20 | 20 2a 20 52 65 74 75 72 |tine.. | * Retur|
|00001ad0| 6e 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 73 |ns the c|urrent s|
|00001ae0| 65 65 64 20 66 6f 72 20 | 74 68 65 20 49 43 20 70 |eed for |the IC p|
|00001af0| 72 65 66 73 20 64 61 74 | 61 62 61 73 65 2e 0d 20 |refs dat|abase.. |
|00001b00| 20 20 2a 20 54 68 69 73 | 20 73 65 65 64 20 63 68 | * This| seed ch|
|00001b10| 61 6e 67 65 73 20 65 61 | 63 68 20 74 69 6d 65 20 |anges ea|ch time |
|00001b20| 61 20 6e 6f 6e 2d 76 6f | 6c 61 74 69 6c 65 20 70 |a non-vo|latile p|
|00001b30| 72 65 66 65 72 65 6e 63 | 65 20 69 73 20 63 68 61 |referenc|e is cha|
|00001b40| 6e 67 65 64 2e 0d 20 20 | 20 2a 20 59 6f 75 20 63 |nged.. | * You c|
|00001b50| 61 6e 20 70 6f 6c 6c 20 | 74 68 69 73 20 74 6f 20 |an poll |this to |
|00001b60| 64 65 74 65 72 6d 69 6e | 65 20 69 66 20 61 6e 79 |determin|e if any|
|00001b70| 20 63 61 63 68 65 64 20 | 70 72 65 66 65 72 65 6e | cached |preferen|
|00001b80| 63 65 73 20 63 68 61 6e | 67 65 2e 0d 20 20 20 2a |ces chan|ge.. *|
|00001b90| 2f 0d 0d 70 61 73 63 61 | 6c 20 49 43 45 72 72 6f |/..pasca|l ICErro|
|00001ba0| 72 20 49 43 47 65 74 50 | 65 72 6d 28 49 43 49 6e |r ICGetP|erm(ICIn|
|00001bb0| 73 74 61 6e 63 65 20 69 | 6e 73 74 2c 20 49 43 50 |stance i|nst, ICP|
|00001bc0| 65 72 6d 20 2a 70 65 72 | 6d 29 3b 0d 20 20 2f 2a |erm *per|m);. /*|
|00001bd0| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00001be0| 20 74 6f 20 73 70 65 63 | 69 66 79 20 61 20 63 6f | to spec|ify a co|
|00001bf0| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00001c00| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00001c10| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 2a 20 52 65 |routine.|. * Re|
|00001c20| 74 75 72 6e 73 20 74 68 | 65 20 61 63 63 65 73 73 |turns th|e access|
|00001c30| 20 70 65 72 6d 69 73 73 | 69 6f 6e 73 20 63 75 72 | permiss|ions cur|
|00001c40| 72 65 6e 74 6c 79 20 61 | 73 73 6f 63 69 61 74 65 |rently a|ssociate|
|00001c50| 64 20 77 69 74 68 20 74 | 68 69 73 20 69 6e 73 74 |d with t|his inst|
|00001c60| 61 6e 63 65 2e 0d 20 20 | 20 2a 20 57 68 69 6c 65 |ance.. | * While|
|00001c70| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 6e 6f | applica|tions no|
|00001c80| 72 6d 61 6c 6c 79 20 6b | 6e 6f 77 20 77 68 61 74 |rmally k|now what|
|00001c90| 20 70 65 72 6d 69 73 73 | 69 6f 6e 73 20 74 68 65 | permiss|ions the|
|00001ca0| 79 20 68 61 76 65 2c 0d | 20 20 20 2a 20 74 68 69 |y have,.| * thi|
|00001cb0| 73 20 72 6f 75 74 69 6e | 65 20 69 73 20 64 65 73 |s routin|e is des|
|00001cc0| 69 67 6e 65 64 20 66 6f | 72 20 75 73 65 20 62 79 |igned fo|r use by|
|00001cd0| 20 6f 76 65 72 72 69 64 | 65 20 63 6f 6d 70 6f 6e | overrid|e compon|
|00001ce0| 65 6e 74 73 2e 0d 20 20 | 20 2a 2f 0d 0d 70 61 73 |ents.. | */..pas|
|00001cf0| 63 61 6c 20 49 43 45 72 | 72 6f 72 20 49 43 44 65 |cal ICEr|ror ICDe|
|00001d00| 66 61 75 6c 74 46 69 6c | 65 4e 61 6d 65 28 49 43 |faultFil|eName(IC|
|00001d10| 49 6e 73 74 61 6e 63 65 | 20 69 6e 73 74 2c 20 53 |Instance| inst, S|
|00001d20| 74 72 36 33 20 6e 61 6d | 65 29 3b 0d 20 20 2f 2a |tr63 nam|e);. /*|
|00001d30| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00001d40| 20 74 6f 20 73 70 65 63 | 69 66 79 20 61 20 63 6f | to spec|ify a co|
|00001d50| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|00001d60| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|00001d70| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 2a 20 59 6f |routine.|. * Yo|
|00001d80| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|00001d90| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00001da0| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00001db0| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00001dc0| 69 6e 65 2e 0d 20 20 20 | 2a 20 52 65 74 75 72 6e |ine.. |* Return|
|00001dd0| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 66 69 |s the de|fault fi|
|00001de0| 6c 65 20 6e 61 6d 65 20 | 66 6f 72 20 49 43 20 70 |le name |for IC p|
|00001df0| 72 65 66 65 72 65 6e 63 | 65 20 66 69 6c 65 73 2e |referenc|e files.|
|00001e00| 0d 20 20 20 2a 20 41 70 | 70 6c 69 63 61 74 69 6f |. * Ap|plicatio|
|00001e10| 6e 73 20 73 68 6f 75 6c | 64 20 6e 65 76 65 72 20 |ns shoul|d never |
|00001e20| 6e 65 65 64 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |need to |call thi|
|00001e30| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 2a 20 |s routin|e.. * |
|00001e40| 49 66 20 79 6f 75 20 72 | 65 6c 79 20 6f 6e 20 69 |If you r|ely on i|
|00001e50| 6e 66 6f 72 6d 61 74 69 | 6f 6e 20 72 65 74 75 72 |nformati|on retur|
|00001e60| 6e 65 64 20 62 79 20 74 | 68 69 73 20 72 6f 75 74 |ned by t|his rout|
|00001e70| 69 6e 65 20 79 6f 75 72 | 73 65 6c 66 2c 0d 20 20 |ine your|self,. |
|00001e80| 20 2a 20 79 6f 75 20 6d | 61 79 20 63 6f 6e 66 6c | * you m|ay confl|
|00001e90| 69 63 74 20 77 69 74 68 | 20 61 6e 79 20 66 75 74 |ict with| any fut|
|00001ea0| 75 72 65 20 49 43 20 69 | 6d 70 6c 65 6d 65 6e 74 |ure IC i|mplement|
|00001eb0| 61 74 69 6f 6e 20 74 68 | 61 74 20 64 6f 65 73 6e |ation th|at doesn|
|00001ec0| 27 74 20 75 73 65 0d 20 | 20 20 2a 20 65 78 70 6c |'t use. | * expl|
|00001ed0| 69 63 69 74 20 70 72 65 | 66 65 72 65 6e 63 65 20 |icit pre|ference |
|00001ee0| 66 69 6c 65 73 2e 0d 20 | 20 20 2a 20 54 68 65 20 |files.. | * The |
|00001ef0| 63 6f 6d 70 6f 6e 65 6e | 74 20 63 61 6c 6c 73 20 |componen|t calls |
|00001f00| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 20 74 6f 20 |this rou|tine to |
|00001f10| 73 65 74 20 75 70 20 74 | 68 65 20 64 65 66 61 75 |set up t|he defau|
|00001f20| 6c 74 20 49 43 20 66 69 | 6c 65 20 6e 61 6d 65 2e |lt IC fi|le name.|
|00001f30| 0d 20 20 20 2a 20 54 68 | 69 73 20 61 6c 6c 6f 77 |. * Th|is allow|
|00001f40| 73 20 74 68 69 73 20 6f | 70 65 72 61 74 69 6f 6e |s this o|peration|
|00001f50| 20 74 6f 20 62 65 20 69 | 6e 74 65 72 63 65 70 74 | to be i|ntercept|
|00001f60| 65 64 20 62 79 20 61 20 | 63 6f 6d 70 6f 6e 65 6e |ed by a |componen|
|00001f70| 74 20 74 68 61 74 20 68 | 61 73 0d 20 20 20 2a 20 |t that h|as. * |
|00001f80| 63 61 70 74 75 72 65 64 | 20 75 73 2e 20 49 74 20 |captured| us. It |
|00001f90| 63 75 72 72 65 6e 74 6c | 79 20 67 65 74 73 20 69 |currentl|y gets i|
|00001fa0| 74 20 66 72 6f 6d 20 74 | 68 65 20 63 6f 6d 70 6f |t from t|he compo|
|00001fb0| 6e 65 6e 74 20 72 65 73 | 6f 75 72 63 65 20 66 69 |nent res|ource fi|
|00001fc0| 6c 65 2e 0d 20 20 20 2a | 20 54 68 65 20 67 6c 75 |le.. *| The glu|
|00001fd0| 65 20 76 65 72 73 69 6f | 6e 20 69 73 20 68 61 72 |e versio|n is har|
|00001fe0| 64 77 69 72 65 64 20 74 | 6f 20 22 49 6e 74 65 72 |dwired t|o "Inter|
|00001ff0| 6e 65 74 20 50 72 65 66 | 65 72 65 6e 63 65 73 22 |net Pref|erences"|
|00002000| 2e 0d 20 20 20 2a 2f 0d | 0d 70 61 73 63 61 6c 20 |.. */.|.pascal |
|00002010| 49 43 45 72 72 6f 72 20 | 49 43 47 65 74 43 6f 6d |ICError |ICGetCom|
|00002020| 70 6f 6e 65 6e 74 49 6e | 73 74 61 6e 63 65 28 49 |ponentIn|stance(I|
|00002030| 43 49 6e 73 74 61 6e 63 | 65 20 69 6e 73 74 2c 20 |CInstanc|e inst, |
|00002040| 50 74 72 20 2a 63 6f 6d | 70 6f 6e 65 6e 74 5f 69 |Ptr *com|ponent_i|
|00002050| 6e 73 74 29 3b 0d 20 20 | 2f 2a 20 52 65 71 75 69 |nst);. |/* Requi|
|00002060| 72 65 73 20 49 43 20 31 | 2e 32 2e 0d 20 20 20 2a |res IC 1|.2.. *|
|00002070| 20 59 6f 75 20 64 6f 20 | 6e 6f 74 20 68 61 76 65 | You do |not have|
|00002080| 20 74 6f 20 73 70 65 63 | 69 66 79 20 61 20 63 6f | to spec|ify a co|
|00002090| 6e 66 69 67 75 72 61 74 | 69 6f 6e 20 62 65 66 6f |nfigurat|ion befo|
|000020a0| 72 65 20 63 61 6c 6c 69 | 6e 67 20 74 68 69 73 20 |re calli|ng this |
|000020b0| 72 6f 75 74 69 6e 65 2e | 0d 20 20 20 2a 20 59 6f |routine.|. * Yo|
|000020c0| 75 20 64 6f 20 6e 6f 74 | 20 68 61 76 65 20 74 6f |u do not| have to|
|000020d0| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|000020e0| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|000020f0| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00002100| 69 6e 65 2e 0d 20 20 20 | 2a 20 52 65 74 75 72 6e |ine.. |* Return|
|00002110| 73 20 6e 6f 45 72 72 20 | 61 6e 64 20 74 68 65 20 |s noErr |and the |
|00002120| 63 6f 6e 6e 65 63 74 69 | 6f 6e 20 74 6f 20 74 68 |connecti|on to th|
|00002130| 65 20 49 43 20 63 6f 6d | 70 6f 6e 65 6e 74 2c 0d |e IC com|ponent,.|
|00002140| 20 20 20 2a 20 69 66 20 | 77 65 27 72 65 20 75 73 | * if |we're us|
|00002150| 69 6e 67 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |ing the |componen|
|00002160| 74 2e 0d 20 20 20 2a 20 | 52 65 74 75 72 6e 73 20 |t.. * |Returns |
|00002170| 62 61 64 43 6f 6d 70 6f | 6e 65 6e 49 6e 73 74 61 |badCompo|nenInsta|
|00002180| 6e 63 65 20 61 6e 64 20 | 6e 69 6c 20 69 66 20 77 |nce and |nil if w|
|00002190| 65 27 72 65 20 6f 70 65 | 72 61 74 69 6e 67 20 77 |e're ope|rating w|
|000021a0| 69 74 68 20 67 6c 75 65 | 2e 0d 20 20 20 2a 20 54 |ith glue|.. * T|
|000021b0| 68 65 20 63 6f 6d 70 6f | 6e 65 6e 74 5f 69 6e 73 |he compo|nent_ins|
|000021c0| 74 20 70 61 72 61 6d 65 | 74 65 72 20 69 73 20 61 |t parame|ter is a|
|000021d0| 20 75 6e 69 76 65 72 73 | 61 6c 20 70 6f 69 6e 74 | univers|al point|
|000021e0| 65 72 20 74 6f 20 61 76 | 6f 69 64 0d 20 20 20 2a |er to av|oid. *|
|000021f0| 20 75 73 20 68 61 76 69 | 6e 67 20 74 6f 20 69 6e | us havi|ng to in|
|00002200| 63 6c 75 64 65 20 43 6f | 6d 70 6f 6e 65 6e 74 2e |clude Co|mponent.|
|00002210| 5b 70 68 5d 20 28 77 68 | 69 63 68 20 69 73 20 6e |[ph] (wh|ich is n|
|00002220| 6f 74 20 61 76 61 69 6c | 61 62 6c 65 20 75 6e 64 |ot avail|able und|
|00002230| 65 72 0d 20 20 20 2a 20 | 73 6f 6d 65 20 64 65 76 |er. * |some dev|
|00002240| 65 6c 6f 70 6d 65 6e 74 | 20 65 6e 76 69 72 6f 6e |elopment| environ|
|00002250| 6d 65 6e 74 73 29 20 69 | 6e 20 6f 72 64 65 72 20 |ments) i|n order |
|00002260| 74 6f 20 75 73 65 20 49 | 43 2e 0d 20 20 20 2a 2f |to use I|C.. */|
|00002270| 0d 0d 2f 2a 20 2a 2a 2a | 2a 2a 20 52 65 61 64 69 |../* ***|** Readi|
|00002280| 6e 67 20 61 6e 64 20 57 | 72 69 74 69 6e 67 20 50 |ng and W|riting P|
|00002290| 72 65 66 65 72 65 6e 63 | 65 73 20 2a 2a 2a 2a 2a |referenc|es *****|
|000022a0| 20 2a 2f 0d 0d 70 61 73 | 63 61 6c 20 49 43 45 72 | */..pas|cal ICEr|
|000022b0| 72 6f 72 20 49 43 42 65 | 67 69 6e 28 49 43 49 6e |ror ICBe|gin(ICIn|
|000022c0| 73 74 61 6e 63 65 20 69 | 6e 73 74 2c 20 49 43 50 |stance i|nst, ICP|
|000022d0| 65 72 6d 20 70 65 72 6d | 29 3b 0d 20 20 2f 2a 20 |erm perm|);. /* |
|000022e0| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|000022f0| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00002300| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00002310| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00002320| 20 2a 20 49 74 20 69 73 | 20 69 6c 6c 65 67 61 6c | * It is| illegal|
|00002330| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00002340| 75 74 69 6e 65 20 69 6e | 73 69 64 65 20 61 20 49 |utine in|side a I|
|00002350| 43 42 65 67 69 6e 2f 45 | 6e 64 20 70 61 69 72 2e |CBegin/E|nd pair.|
|00002360| 0d 20 20 20 2a 20 53 74 | 61 72 74 69 6e 67 20 72 |. * St|arting r|
|00002370| 65 61 64 69 6e 67 20 6f | 72 20 77 72 69 74 69 6e |eading o|r writin|
|00002380| 67 20 6d 75 6c 74 69 70 | 6c 65 20 70 72 65 66 65 |g multip|le prefe|
|00002390| 72 65 6e 63 65 73 2e 0d | 20 20 20 2a 20 41 20 63 |rences..| * A c|
|000023a0| 61 6c 6c 20 74 6f 20 74 | 68 69 73 20 6d 75 73 74 |all to t|his must|
|000023b0| 20 62 65 20 62 61 6c 61 | 6e 63 65 64 20 62 79 20 | be bala|nced by |
|000023c0| 61 20 63 61 6c 6c 20 74 | 6f 20 49 43 45 6e 64 2e |a call t|o ICEnd.|
|000023d0| 0d 20 20 20 2a 20 44 6f | 20 6e 6f 74 20 63 61 6c |. * Do| not cal|
|000023e0| 6c 20 57 61 69 74 4e 65 | 78 74 45 76 65 6e 74 20 |l WaitNe|xtEvent |
|000023f0| 62 65 74 77 65 65 6e 20 | 74 68 65 73 65 20 63 61 |between |these ca|
|00002400| 6c 6c 73 2e 0d 20 20 20 | 2a 20 54 68 65 20 70 65 |lls.. |* The pe|
|00002410| 72 6d 20 73 70 65 63 69 | 66 69 65 73 20 77 68 65 |rm speci|fies whe|
|00002420| 74 68 65 72 20 79 6f 75 | 20 69 6e 74 65 6e 64 20 |ther you| intend |
|00002430| 74 6f 20 72 65 61 64 20 | 6f 72 20 72 65 61 64 2f |to read |or read/|
|00002440| 77 72 69 74 65 2e 0d 20 | 20 20 2a 20 4f 6e 6c 79 |write.. | * Only|
|00002450| 20 6f 6e 65 20 77 72 69 | 74 65 72 20 69 73 20 61 | one wri|ter is a|
|00002460| 6c 6c 6f 77 65 64 20 70 | 65 72 20 69 6e 73 74 61 |llowed p|er insta|
|00002470| 6e 63 65 2e 0d 20 20 20 | 2a 20 4e 6f 74 65 20 74 |nce.. |* Note t|
|00002480| 68 61 74 20 74 68 69 73 | 20 6d 61 79 20 6f 70 65 |hat this| may ope|
|00002490| 6e 20 72 65 73 6f 75 72 | 63 65 20 66 69 6c 65 73 |n resour|ce files|
|000024a0| 20 74 68 61 74 20 61 72 | 65 20 6e 6f 74 20 63 6c | that ar|e not cl|
|000024b0| 6f 73 65 64 0d 20 20 20 | 2a 20 75 6e 74 69 6c 20 |osed. |* until |
|000024c0| 79 6f 75 20 63 61 6c 6c | 20 49 43 45 6e 64 2e 0d |you call| ICEnd..|
|000024d0| 20 20 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 49 43 | */..p|ascal IC|
|000024e0| 45 72 72 6f 72 20 49 43 | 47 65 74 50 72 65 66 28 |Error IC|GetPref(|
|000024f0| 49 43 49 6e 73 74 61 6e | 63 65 20 69 6e 73 74 2c |ICInstan|ce inst,|
|00002500| 20 43 6f 6e 73 74 53 74 | 72 32 35 35 50 61 72 61 | ConstSt|r255Para|
|00002510| 6d 20 6b 65 79 2c 20 49 | 43 41 74 74 72 20 2a 61 |m key, I|CAttr *a|
|00002520| 74 74 72 2c 20 50 74 72 | 20 62 75 66 2c 20 6c 6f |ttr, Ptr| buf, lo|
|00002530| 6e 67 20 2a 73 69 7a 65 | 29 3b 0d 20 20 2f 2a 20 |ng *size|);. /* |
|00002540| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00002550| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00002560| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00002570| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00002580| 20 2a 20 49 66 20 79 6f | 75 20 61 72 65 20 67 65 | * If yo|u are ge|
|00002590| 74 74 69 6e 67 20 6f 72 | 20 73 65 74 74 69 6e 67 |tting or| setting|
|000025a0| 20 6d 75 6c 74 69 70 6c | 65 20 70 72 65 66 65 72 | multipl|e prefer|
|000025b0| 65 6e 63 65 73 2c 20 79 | 6f 75 20 73 68 6f 75 6c |ences, y|ou shoul|
|000025c0| 64 20 70 6c 61 63 65 0d | 20 20 20 2a 20 74 68 65 |d place.| * the|
|000025d0| 73 65 20 63 61 6c 6c 73 | 20 77 69 74 68 69 6e 20 |se calls| within |
|000025e0| 61 6e 20 49 43 42 65 67 | 69 6e 2f 49 43 45 6e 64 |an ICBeg|in/ICEnd|
|000025f0| 20 70 61 69 72 2e 0d 20 | 20 20 2a 20 49 66 20 79 | pair.. | * If y|
|00002600| 6f 75 20 63 61 6c 6c 20 | 74 68 69 73 20 72 6f 75 |ou call |this rou|
|00002610| 74 69 6e 65 20 6f 75 74 | 73 69 64 65 20 6f 66 20 |tine out|side of |
|00002620| 73 75 63 68 20 61 20 70 | 61 69 72 2c 20 69 74 20 |such a p|air, it |
|00002630| 69 6d 70 6c 69 63 69 74 | 6c 79 0d 20 20 20 2a 20 |implicit|ly. * |
|00002640| 63 61 6c 6c 73 20 49 43 | 42 65 67 69 6e 28 69 6e |calls IC|Begin(in|
|00002650| 73 74 2c 20 69 63 52 65 | 61 64 4f 6e 6c 79 50 65 |st, icRe|adOnlyPe|
|00002660| 72 6d 29 2e 0d 20 20 20 | 2a 20 52 65 61 64 73 20 |rm).. |* Reads |
|00002670| 74 68 65 20 70 72 65 66 | 65 72 65 6e 63 65 20 73 |the pref|erence s|
|00002680| 70 65 63 69 66 69 65 64 | 20 62 79 20 6b 65 79 20 |pecified| by key |
|00002690| 66 72 6f 6d 20 74 68 65 | 20 49 43 20 64 61 74 61 |from the| IC data|
|000026a0| 62 61 73 65 20 74 6f 20 | 74 68 65 0d 20 20 20 2a |base to |the. *|
|000026b0| 20 62 75 66 66 65 72 20 | 70 6f 69 6e 74 65 64 20 | buffer |pointed |
|000026c0| 74 6f 20 62 79 20 62 75 | 66 20 61 6e 64 20 73 69 |to by bu|f and si|
|000026d0| 7a 65 2e 0d 20 20 20 2a | 20 6b 65 79 20 6d 75 73 |ze.. *| key mus|
|000026e0| 74 20 6e 6f 74 20 62 65 | 20 74 68 65 20 65 6d 70 |t not be| the emp|
|000026f0| 74 79 20 73 74 72 69 6e | 67 2e 0d 20 20 20 2a 20 |ty strin|g.. * |
|00002700| 49 66 20 62 75 66 20 69 | 73 20 6e 69 6c 20 74 68 |If buf i|s nil th|
|00002710| 65 6e 20 6e 6f 20 64 61 | 74 61 20 69 73 20 72 65 |en no da|ta is re|
|00002720| 74 75 72 6e 65 64 2e 0d | 20 20 20 2a 20 73 69 7a |turned..| * siz|
|00002730| 65 20 6d 75 73 74 20 62 | 65 20 6e 6f 6e 2d 6e 65 |e must b|e non-ne|
|00002740| 67 61 74 69 76 65 2e 0d | 20 20 20 2a 20 61 74 74 |gative..| * att|
|00002750| 72 20 61 6e 64 20 73 69 | 7a 65 20 61 72 65 20 61 |r and si|ze are a|
|00002760| 6c 77 61 79 73 20 73 65 | 74 20 6f 6e 20 72 65 74 |lways se|t on ret|
|00002770| 75 72 6e 2e 20 4f 6e 20 | 65 72 72 6f 72 73 20 28 |urn. On |errors (|
|00002780| 65 78 63 65 70 74 20 69 | 63 54 72 75 6e 63 61 74 |except i|cTruncat|
|00002790| 65 64 45 72 72 29 0d 20 | 20 20 2a 20 61 74 74 72 |edErr). | * attr|
|000027a0| 20 69 73 20 73 65 74 20 | 74 6f 20 49 43 61 74 74 | is set |to ICatt|
|000027b0| 72 5f 6e 6f 5f 63 68 61 | 6e 67 65 20 61 6e 64 20 |r_no_cha|nge and |
|000027c0| 73 69 7a 65 20 69 73 20 | 73 65 74 20 74 6f 20 30 |size is |set to 0|
|000027d0| 2e 0d 20 20 20 2a 20 73 | 69 7a 65 20 69 73 20 74 |.. * s|ize is t|
|000027e0| 68 65 20 61 63 74 75 61 | 6c 20 73 69 7a 65 20 6f |he actua|l size o|
|000027f0| 66 20 74 68 65 20 64 61 | 74 61 2e 0d 20 20 20 2a |f the da|ta.. *|
|00002800| 20 61 74 74 72 20 69 73 | 20 73 65 74 20 74 6f 20 | attr is| set to |
|00002810| 74 68 65 20 61 74 74 72 | 69 62 75 74 65 73 20 61 |the attr|ibutes a|
|00002820| 73 73 6f 63 69 61 74 65 | 64 20 77 69 74 68 20 74 |ssociate|d with t|
|00002830| 68 65 20 70 72 65 66 65 | 72 65 6e 63 65 2e 0d 20 |he prefe|rence.. |
|00002840| 20 20 2a 20 49 66 20 74 | 68 69 73 20 72 6f 75 74 | * If t|his rout|
|00002850| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 69 63 54 72 |ine retu|rns icTr|
|00002860| 75 6e 63 61 74 65 64 45 | 72 72 20 74 68 65 6e 20 |uncatedE|rr then |
|00002870| 74 68 65 20 6f 74 68 65 | 72 20 72 65 74 75 72 6e |the othe|r return|
|00002880| 65 64 0d 20 20 20 2a 20 | 76 61 6c 75 65 73 20 61 |ed. * |values a|
|00002890| 72 65 20 76 61 6c 69 64 | 20 65 78 63 65 70 74 20 |re valid| except |
|000028a0| 74 68 61 74 20 6f 6e 6c | 79 20 74 68 65 20 66 69 |that onl|y the fi|
|000028b0| 72 73 74 20 73 69 7a 65 | 20 62 79 74 65 73 20 68 |rst size| bytes h|
|000028c0| 61 76 65 20 62 65 65 6e | 0d 20 20 20 2a 20 72 65 |ave been|. * re|
|000028d0| 74 75 72 6e 2e 20 73 69 | 7a 65 20 69 73 20 61 64 |turn. si|ze is ad|
|000028e0| 6a 75 73 74 65 64 20 74 | 6f 20 72 65 66 6c 65 63 |justed t|o reflec|
|000028f0| 74 20 74 68 65 20 74 72 | 75 65 20 73 69 7a 65 20 |t the tr|ue size |
|00002900| 6f 66 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |of the p|referenc|
|00002910| 65 2e 0d 20 20 20 2a 20 | 52 65 74 75 72 6e 73 20 |e.. * |Returns |
|00002920| 69 63 50 72 65 66 4e 6f | 74 46 6f 75 6e 64 20 69 |icPrefNo|tFound i|
|00002930| 66 20 74 68 65 72 65 20 | 69 73 20 6e 6f 20 70 72 |f there |is no pr|
|00002940| 65 66 65 72 65 6e 63 65 | 20 66 6f 72 20 74 68 65 |eference| for the|
|00002950| 20 6b 65 79 2e 0d 20 20 | 20 2a 2f 0d 0d 70 61 73 | key.. | */..pas|
|00002960| 63 61 6c 20 49 43 45 72 | 72 6f 72 20 49 43 53 65 |cal ICEr|ror ICSe|
|00002970| 74 50 72 65 66 28 49 43 | 49 6e 73 74 61 6e 63 65 |tPref(IC|Instance|
|00002980| 20 69 6e 73 74 2c 20 43 | 6f 6e 73 74 53 74 72 32 | inst, C|onstStr2|
|00002990| 35 35 50 61 72 61 6d 20 | 6b 65 79 2c 20 49 43 41 |55Param |key, ICA|
|000029a0| 74 74 72 20 61 74 74 72 | 2c 20 50 74 72 20 62 75 |ttr attr|, Ptr bu|
|000029b0| 66 2c 20 6c 6f 6e 67 20 | 73 69 7a 65 29 3b 0d 20 |f, long |size);. |
|000029c0| 20 2f 2a 20 59 6f 75 20 | 6d 75 73 74 20 73 70 65 | /* You |must spe|
|000029d0| 63 69 66 79 20 61 20 63 | 6f 6e 66 69 67 75 72 61 |cify a c|onfigura|
|000029e0| 74 69 6f 6e 20 62 65 66 | 6f 72 65 20 63 61 6c 6c |tion bef|ore call|
|000029f0| 69 6e 67 20 74 68 69 73 | 20 72 6f 75 74 69 6e 65 |ing this| routine|
|00002a00| 2e 0d 20 20 20 2a 20 49 | 66 20 79 6f 75 20 61 72 |.. * I|f you ar|
|00002a10| 65 20 67 65 74 74 69 6e | 67 20 6f 72 20 73 65 74 |e gettin|g or set|
|00002a20| 74 69 6e 67 20 6d 75 6c | 74 69 70 6c 65 20 70 72 |ting mul|tiple pr|
|00002a30| 65 66 65 72 65 6e 63 65 | 73 2c 20 79 6f 75 20 73 |eference|s, you s|
|00002a40| 68 6f 75 6c 64 20 70 6c | 61 63 65 0d 20 20 20 2a |hould pl|ace. *|
|00002a50| 20 74 68 65 73 65 20 63 | 61 6c 6c 73 20 77 69 74 | these c|alls wit|
|00002a60| 68 69 6e 20 61 6e 20 49 | 43 42 65 67 69 6e 2f 49 |hin an I|CBegin/I|
|00002a70| 43 45 6e 64 20 70 61 69 | 72 2e 0d 20 20 20 2a 20 |CEnd pai|r.. * |
|00002a80| 49 66 20 79 6f 75 20 63 | 61 6c 6c 20 74 68 69 73 |If you c|all this|
|00002a90| 20 72 6f 75 74 69 6e 65 | 20 6f 75 74 73 69 64 65 | routine| outside|
|00002aa0| 20 6f 66 20 73 75 63 68 | 20 61 20 70 61 69 72 2c | of such| a pair,|
|00002ab0| 20 69 74 20 69 6d 70 6c | 69 63 69 74 6c 79 0d 20 | it impl|icitly. |
|00002ac0| 20 20 2a 20 63 61 6c 6c | 73 20 49 43 42 65 67 69 | * call|s ICBegi|
|00002ad0| 6e 28 69 6e 73 74 2c 20 | 69 63 52 65 61 64 57 72 |n(inst, |icReadWr|
|00002ae0| 69 74 65 50 65 72 6d 29 | 2e 0d 20 20 20 2a 20 53 |itePerm)|.. * S|
|00002af0| 65 74 73 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |ets the |preferen|
|00002b00| 63 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |ce speci|fied by |
|00002b10| 6b 65 79 20 66 72 6f 6d | 20 74 68 65 20 49 43 20 |key from| the IC |
|00002b20| 64 61 74 61 62 61 73 65 | 20 74 6f 20 74 68 65 0d |database| to the.|
|00002b30| 20 20 20 2a 20 76 61 6c | 75 65 20 70 6f 69 6e 74 | * val|ue point|
|00002b40| 65 64 20 74 6f 20 62 79 | 20 62 75 66 20 61 6e 64 |ed to by| buf and|
|00002b50| 20 73 69 7a 65 2e 0d 20 | 20 20 2a 20 6b 65 79 20 | size.. | * key |
|00002b60| 6d 75 73 74 20 6e 6f 74 | 20 62 65 20 74 68 65 20 |must not| be the |
|00002b70| 65 6d 70 74 79 20 73 74 | 72 69 6e 67 2e 0d 20 20 |empty st|ring.. |
|00002b80| 20 2a 20 73 69 7a 65 20 | 6d 75 73 74 20 62 65 20 | * size |must be |
|00002b90| 6e 6f 6e 2d 6e 65 67 61 | 74 69 76 65 2e 20 0d 20 |non-nega|tive. . |
|00002ba0| 20 20 2a 20 49 66 20 62 | 75 66 20 69 73 20 6e 69 | * If b|uf is ni|
|00002bb0| 6c 20 74 68 65 6e 20 74 | 68 65 20 70 72 65 66 65 |l then t|he prefe|
|00002bc0| 72 65 6e 63 65 20 76 61 | 6c 75 65 20 69 73 20 6e |rence va|lue is n|
|00002bd0| 6f 74 20 73 65 74 20 61 | 6e 64 20 73 69 7a 65 20 |ot set a|nd size |
|00002be0| 69 73 20 69 67 6e 6f 72 | 65 64 2e 0d 20 20 20 2a |is ignor|ed.. *|
|00002bf0| 20 49 66 20 62 75 66 20 | 69 73 20 6e 6f 74 20 6e | If buf |is not n|
|00002c00| 69 6c 20 74 68 65 6e 20 | 74 68 65 20 70 72 65 66 |il then |the pref|
|00002c10| 65 72 65 6e 63 65 20 76 | 61 6c 75 65 20 69 73 20 |erence v|alue is |
|00002c20| 73 65 74 20 74 6f 20 74 | 68 65 20 73 69 7a 65 0d |set to t|he size.|
|00002c30| 20 20 20 2a 20 62 79 74 | 65 73 20 70 6f 69 6e 74 | * byt|es point|
|00002c40| 65 64 20 74 6f 20 62 79 | 20 62 75 66 2e 0d 20 20 |ed to by| buf.. |
|00002c50| 20 2a 20 49 66 20 61 74 | 74 72 20 69 73 20 49 43 | * If at|tr is IC|
|00002c60| 61 74 74 72 5f 6e 6f 5f | 63 68 61 6e 67 65 20 74 |attr_no_|change t|
|00002c70| 68 65 6e 20 74 68 65 20 | 70 72 65 66 65 72 65 6e |hen the |preferen|
|00002c80| 63 65 20 61 74 74 72 69 | 62 75 74 65 73 20 61 72 |ce attri|butes ar|
|00002c90| 65 20 6e 6f 74 20 73 65 | 74 2e 0d 20 20 20 2a 20 |e not se|t.. * |
|00002ca0| 4f 74 68 65 72 77 69 73 | 65 20 74 68 65 20 70 72 |Otherwis|e the pr|
|00002cb0| 65 66 65 72 65 6e 63 65 | 20 61 74 74 72 69 62 75 |eference| attribu|
|00002cc0| 74 65 73 20 61 72 65 20 | 73 65 74 20 74 6f 20 61 |tes are |set to a|
|00002cd0| 74 74 72 2e 0d 20 20 20 | 2a 20 52 65 74 75 72 6e |ttr.. |* Return|
|00002ce0| 73 20 69 63 50 65 72 6d | 45 72 72 20 69 66 20 74 |s icPerm|Err if t|
|00002cf0| 68 65 20 70 72 65 76 69 | 6f 75 73 20 49 43 42 65 |he previ|ous ICBe|
|00002d00| 67 69 6e 20 77 61 73 20 | 70 61 73 73 65 64 20 69 |gin was |passed i|
|00002d10| 63 52 65 61 64 4f 6e 6c | 79 50 65 72 6d 2e 0d 20 |cReadOnl|yPerm.. |
|00002d20| 20 20 2a 20 52 65 74 75 | 72 6e 73 20 69 63 50 65 | * Retu|rns icPe|
|00002d30| 72 6d 45 72 72 20 69 66 | 20 63 75 72 72 65 6e 74 |rmErr if| current|
|00002d40| 20 61 74 74 72 20 69 73 | 20 6c 6f 63 6b 65 64 2c | attr is| locked,|
|00002d50| 20 6e 65 77 20 61 74 74 | 72 20 69 73 20 6c 6f 63 | new att|r is loc|
|00002d60| 6b 65 64 20 61 6e 64 20 | 62 75 66 20 3c 3e 20 6e |ked and |buf <> n|
|00002d70| 69 6c 2e 0d 20 20 20 2a | 2f 0d 0d 70 61 73 63 61 |il.. *|/..pasca|
|00002d80| 6c 20 49 43 45 72 72 6f | 72 20 49 43 46 69 6e 64 |l ICErro|r ICFind|
|00002d90| 50 72 65 66 48 61 6e 64 | 6c 65 28 49 43 49 6e 73 |PrefHand|le(ICIns|
|00002da0| 74 61 6e 63 65 20 69 6e | 73 74 2c 20 43 6f 6e 73 |tance in|st, Cons|
|00002db0| 74 53 74 72 32 35 35 50 | 61 72 61 6d 20 6b 65 79 |tStr255P|aram key|
|00002dc0| 2c 20 49 43 41 74 74 72 | 20 2a 61 74 74 72 2c 20 |, ICAttr| *attr, |
|00002dd0| 48 61 6e 64 6c 65 20 70 | 72 65 66 68 29 3b 0d 20 |Handle p|refh);. |
|00002de0| 20 2f 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | /* Requ|ires IC |
|00002df0| 31 2e 32 2e 0d 20 20 20 | 2a 20 59 6f 75 20 6d 75 |1.2.. |* You mu|
|00002e00| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|00002e10| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00002e20| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00002e30| 6f 75 74 69 6e 65 2e 0d | 20 20 20 2a 20 49 66 20 |outine..| * If |
|00002e40| 79 6f 75 20 61 72 65 20 | 67 65 74 74 69 6e 67 20 |you are |getting |
|00002e50| 6f 72 20 73 65 74 74 69 | 6e 67 20 6d 75 6c 74 69 |or setti|ng multi|
|00002e60| 70 6c 65 20 70 72 65 66 | 65 72 65 6e 63 65 73 2c |ple pref|erences,|
|00002e70| 20 79 6f 75 20 73 68 6f | 75 6c 64 20 70 6c 61 63 | you sho|uld plac|
|00002e80| 65 0d 20 20 20 2a 20 74 | 68 65 73 65 20 63 61 6c |e. * t|hese cal|
|00002e90| 6c 73 20 77 69 74 68 69 | 6e 20 61 6e 20 49 43 42 |ls withi|n an ICB|
|00002ea0| 65 67 69 6e 2f 49 43 45 | 6e 64 20 70 61 69 72 2e |egin/ICE|nd pair.|
|00002eb0| 0d 20 20 20 2a 20 49 66 | 20 79 6f 75 20 63 61 6c |. * If| you cal|
|00002ec0| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 20 6f |l this r|outine o|
|00002ed0| 75 74 73 69 64 65 20 6f | 66 20 73 75 63 68 20 61 |utside o|f such a|
|00002ee0| 20 70 61 69 72 2c 20 69 | 74 20 69 6d 70 6c 69 63 | pair, i|t implic|
|00002ef0| 69 74 6c 79 0d 20 20 20 | 2a 20 63 61 6c 6c 73 20 |itly. |* calls |
|00002f00| 49 43 42 65 67 69 6e 28 | 69 6e 73 74 2c 20 69 63 |ICBegin(|inst, ic|
|00002f10| 52 65 61 64 57 72 69 74 | 65 50 65 72 6d 29 2e 0d |ReadWrit|ePerm)..|
|00002f20| 20 20 20 2a 20 54 68 69 | 73 20 72 6f 75 74 69 6e | * Thi|s routin|
|00002f30| 65 20 65 66 66 65 63 74 | 69 76 65 6c 79 20 72 65 |e effect|ively re|
|00002f40| 70 6c 61 63 65 73 20 49 | 43 47 65 74 50 72 65 66 |places I|CGetPref|
|00002f50| 48 61 6e 64 6c 65 2e 0d | 20 20 20 2a 20 52 65 61 |Handle..| * Rea|
|00002f60| 64 73 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ds the p|referenc|
|00002f70| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|00002f80| 65 79 20 66 72 6f 6d 20 | 74 68 65 20 49 43 20 64 |ey from |the IC d|
|00002f90| 61 74 61 62 61 73 65 20 | 69 6e 74 6f 0d 20 20 20 |atabase |into. |
|00002fa0| 2a 20 61 20 68 61 6e 64 | 6c 65 2c 20 70 72 65 66 |* a hand|le, pref|
|00002fb0| 68 2e 0d 20 20 20 2a 20 | 6b 65 79 20 6d 75 73 74 |h.. * |key must|
|00002fc0| 20 6e 6f 74 20 62 65 20 | 74 68 65 20 65 6d 70 74 | not be |the empt|
|00002fd0| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 2a 20 61 |y string|.. * a|
|00002fe0| 74 74 72 20 69 73 20 73 | 65 74 20 74 6f 20 74 68 |ttr is s|et to th|
|00002ff0| 65 20 61 74 74 72 69 62 | 75 74 65 73 20 61 73 73 |e attrib|utes ass|
|00003000| 6f 63 69 61 74 65 64 20 | 77 69 74 68 20 74 68 65 |ociated |with the|
|00003010| 20 70 72 65 66 65 72 65 | 6e 63 65 2e 0d 20 20 20 | prefere|nce.. |
|00003020| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 65 74 20 70 |* You mu|st set p|
|00003030| 72 65 66 68 20 74 6f 20 | 61 20 6e 6f 6e 2d 6e 69 |refh to |a non-ni|
|00003040| 6c 20 68 61 6e 64 6c 65 | 20 62 65 66 6f 72 65 20 |l handle| before |
|00003050| 63 61 6c 6c 69 6e 67 20 | 74 68 69 73 20 72 6f 75 |calling |this rou|
|00003060| 74 69 6e 65 2e 0d 20 20 | 20 2a 20 49 66 20 74 68 |tine.. | * If th|
|00003070| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 64 6f 65 |e prefer|ence doe|
|00003080| 73 20 6e 6f 74 20 65 78 | 69 73 74 2c 20 69 63 50 |s not ex|ist, icP|
|00003090| 72 65 66 4e 6f 74 46 6f | 75 6e 64 45 72 72 20 69 |refNotFo|undErr i|
|000030a0| 73 20 72 65 74 75 72 6e | 65 64 2e 0d 20 20 20 2a |s return|ed.. *|
|000030b0| 2f 0d 0d 70 61 73 63 61 | 6c 20 49 43 45 72 72 6f |/..pasca|l ICErro|
|000030c0| 72 20 49 43 47 65 74 50 | 72 65 66 48 61 6e 64 6c |r ICGetP|refHandl|
|000030d0| 65 28 49 43 49 6e 73 74 | 61 6e 63 65 20 69 6e 73 |e(ICInst|ance ins|
|000030e0| 74 2c 20 43 6f 6e 73 74 | 53 74 72 32 35 35 50 61 |t, Const|Str255Pa|
|000030f0| 72 61 6d 20 6b 65 79 2c | 20 49 43 41 74 74 72 20 |ram key,| ICAttr |
|00003100| 2a 61 74 74 72 2c 20 48 | 61 6e 64 6c 65 20 2a 70 |*attr, H|andle *p|
|00003110| 72 65 66 68 29 3b 0d 20 | 20 2f 2a 20 52 65 71 75 |refh);. | /* Requ|
|00003120| 69 72 65 73 20 49 43 20 | 31 2e 31 2e 0d 20 20 20 |ires IC |1.1.. |
|00003130| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|00003140| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00003150| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|00003160| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|00003170| 20 20 20 2a 20 49 66 20 | 79 6f 75 20 61 72 65 20 | * If |you are |
|00003180| 67 65 74 74 69 6e 67 20 | 6f 72 20 73 65 74 74 69 |getting |or setti|
|00003190| 6e 67 20 6d 75 6c 74 69 | 70 6c 65 20 70 72 65 66 |ng multi|ple pref|
|000031a0| 65 72 65 6e 63 65 73 2c | 20 79 6f 75 20 73 68 6f |erences,| you sho|
|000031b0| 75 6c 64 20 70 6c 61 63 | 65 0d 20 20 20 2a 20 74 |uld plac|e. * t|
|000031c0| 68 65 73 65 20 63 61 6c | 6c 73 20 77 69 74 68 69 |hese cal|ls withi|
|000031d0| 6e 20 61 6e 20 49 43 42 | 65 67 69 6e 2f 49 43 45 |n an ICB|egin/ICE|
|000031e0| 6e 64 20 70 61 69 72 2e | 0d 20 20 20 2a 20 49 66 |nd pair.|. * If|
|000031f0| 20 79 6f 75 20 63 61 6c | 6c 20 74 68 69 73 20 72 | you cal|l this r|
|00003200| 6f 75 74 69 6e 65 20 6f | 75 74 73 69 64 65 20 6f |outine o|utside o|
|00003210| 66 20 73 75 63 68 20 61 | 20 70 61 69 72 2c 20 69 |f such a| pair, i|
|00003220| 74 20 69 6d 70 6c 69 63 | 69 74 6c 79 0d 20 20 20 |t implic|itly. |
|00003230| 2a 20 63 61 6c 6c 73 20 | 49 43 42 65 67 69 6e 28 |* calls |ICBegin(|
|00003240| 69 6e 73 74 2c 20 69 63 | 52 65 61 64 4f 6e 6c 79 |inst, ic|ReadOnly|
|00003250| 50 65 72 6d 29 2e 0d 20 | 20 20 2a 20 54 68 69 73 |Perm).. | * This|
|00003260| 20 72 6f 75 74 69 6e 65 | 20 69 73 20 6e 6f 77 20 | routine| is now |
|00003270| 6f 62 73 6f 6c 65 74 65 | 2e 20 55 73 65 20 49 43 |obsolete|. Use IC|
|00003280| 46 69 6e 64 50 72 65 66 | 48 61 6e 64 6c 65 20 69 |FindPref|Handle i|
|00003290| 6e 73 74 65 61 64 2e 0d | 20 20 20 2a 20 52 65 61 |nstead..| * Rea|
|000032a0| 64 73 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |ds the p|referenc|
|000032b0| 65 20 73 70 65 63 69 66 | 69 65 64 20 62 79 20 6b |e specif|ied by k|
|000032c0| 65 79 20 66 72 6f 6d 20 | 74 68 65 20 49 43 20 64 |ey from |the IC d|
|000032d0| 61 74 61 62 61 73 65 20 | 69 6e 74 6f 0d 20 20 20 |atabase |into. |
|000032e0| 2a 20 61 20 6e 65 77 6c | 79 20 63 72 65 61 74 65 |* a newl|y create|
|000032f0| 64 20 68 61 6e 64 6c 65 | 2c 20 70 72 65 66 68 2e |d handle|, prefh.|
|00003300| 0d 20 20 20 2a 20 6b 65 | 79 20 6d 75 73 74 20 6e |. * ke|y must n|
|00003310| 6f 74 20 62 65 20 74 68 | 65 20 65 6d 70 74 79 20 |ot be th|e empty |
|00003320| 73 74 72 69 6e 67 2e 0d | 20 20 20 2a 20 61 74 74 |string..| * att|
|00003330| 72 20 69 73 20 73 65 74 | 20 74 6f 20 74 68 65 20 |r is set| to the |
|00003340| 61 74 74 72 69 62 75 74 | 65 73 20 61 73 73 6f 63 |attribut|es assoc|
|00003350| 69 61 74 65 64 20 77 69 | 74 68 20 74 68 65 20 70 |iated wi|th the p|
|00003360| 72 65 66 65 72 65 6e 63 | 65 2e 0d 20 20 20 2a 20 |referenc|e.. * |
|00003370| 54 68 65 20 69 6e 63 6f | 6d 69 6e 67 20 76 61 6c |The inco|ming val|
|00003380| 75 65 20 6f 66 20 70 72 | 65 66 68 20 69 73 20 69 |ue of pr|efh is i|
|00003390| 67 6e 6f 72 65 64 2e 0d | 20 20 20 2a 20 41 20 6e |gnored..| * A n|
|000033a0| 65 77 20 68 61 6e 64 6c | 65 20 69 73 20 63 72 65 |ew handl|e is cre|
|000033b0| 61 74 65 64 20 69 6e 20 | 74 68 65 20 63 75 72 72 |ated in |the curr|
|000033c0| 65 6e 74 20 68 65 61 70 | 20 61 6e 64 20 72 65 74 |ent heap| and ret|
|000033d0| 75 72 6e 65 64 20 69 6e | 20 70 72 65 66 68 2e 0d |urned in| prefh..|
|000033e0| 20 20 20 2a 20 49 66 20 | 74 68 65 20 72 6f 75 74 | * If |the rout|
|000033f0| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 61 6e 20 65 |ine retu|rns an e|
|00003400| 72 72 6f 72 2c 20 70 72 | 65 66 68 20 69 73 20 73 |rror, pr|efh is s|
|00003410| 65 74 20 74 6f 20 6e 69 | 6c 2e 0d 20 20 20 2a 20 |et to ni|l.. * |
|00003420| 49 66 20 74 68 65 20 70 | 72 65 66 65 72 65 6e 63 |If the p|referenc|
|00003430| 65 20 64 6f 65 73 20 6e | 6f 74 20 65 78 69 73 74 |e does n|ot exist|
|00003440| 2c 20 6e 6f 20 65 72 72 | 6f 72 20 69 73 20 72 65 |, no err|or is re|
|00003450| 74 75 72 6e 65 64 20 61 | 6e 64 20 70 72 65 66 68 |turned a|nd prefh|
|00003460| 20 69 73 20 73 65 74 0d | 20 20 20 2a 20 74 6f 20 | is set.| * to |
|00003470| 61 6e 20 65 6d 70 74 79 | 20 68 61 6e 64 6c 65 2e |an empty| handle.|
|00003480| 0d 20 20 20 2a 2f 0d 0d | 70 61 73 63 61 6c 20 49 |. */..|pascal I|
|00003490| 43 45 72 72 6f 72 20 49 | 43 53 65 74 50 72 65 66 |CError I|CSetPref|
|000034a0| 48 61 6e 64 6c 65 28 49 | 43 49 6e 73 74 61 6e 63 |Handle(I|CInstanc|
|000034b0| 65 20 69 6e 73 74 2c 20 | 43 6f 6e 73 74 53 74 72 |e inst, |ConstStr|
|000034c0| 32 35 35 50 61 72 61 6d | 20 6b 65 79 2c 20 49 43 |255Param| key, IC|
|000034d0| 41 74 74 72 20 61 74 74 | 72 2c 20 48 61 6e 64 6c |Attr att|r, Handl|
|000034e0| 65 20 70 72 65 66 68 29 | 3b 0d 20 20 2f 2a 20 52 |e prefh)|;. /* R|
|000034f0| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00003500| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00003510| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00003520| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00003530| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00003540| 65 2e 0d 20 20 20 2a 20 | 49 66 20 79 6f 75 20 61 |e.. * |If you a|
|00003550| 72 65 20 67 65 74 74 69 | 6e 67 20 6f 72 20 73 65 |re getti|ng or se|
|00003560| 74 74 69 6e 67 20 6d 75 | 6c 74 69 70 6c 65 20 70 |tting mu|ltiple p|
|00003570| 72 65 66 65 72 65 6e 63 | 65 73 2c 20 79 6f 75 20 |referenc|es, you |
|00003580| 73 68 6f 75 6c 64 20 70 | 6c 61 63 65 0d 20 20 20 |should p|lace. |
|00003590| 2a 20 74 68 65 73 65 20 | 63 61 6c 6c 73 20 77 69 |* these |calls wi|
|000035a0| 74 68 69 6e 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |thin an |ICBegin/|
|000035b0| 49 43 45 6e 64 20 70 61 | 69 72 2e 0d 20 20 20 2a |ICEnd pa|ir.. *|
|000035c0| 20 49 66 20 79 6f 75 20 | 63 61 6c 6c 20 74 68 69 | If you |call thi|
|000035d0| 73 20 72 6f 75 74 69 6e | 65 20 6f 75 74 73 69 64 |s routin|e outsid|
|000035e0| 65 20 6f 66 20 73 75 63 | 68 20 61 20 70 61 69 72 |e of suc|h a pair|
|000035f0| 2c 20 69 74 20 69 6d 70 | 6c 69 63 69 74 6c 79 0d |, it imp|licitly.|
|00003600| 20 20 20 2a 20 63 61 6c | 6c 73 20 49 43 42 65 67 | * cal|ls ICBeg|
|00003610| 69 6e 28 69 6e 73 74 2c | 20 69 63 52 65 61 64 57 |in(inst,| icReadW|
|00003620| 72 69 74 65 50 65 72 6d | 29 2e 0d 20 20 20 2a 20 |ritePerm|).. * |
|00003630| 53 65 74 73 20 74 68 65 | 20 70 72 65 66 65 72 65 |Sets the| prefere|
|00003640| 6e 63 65 20 73 70 65 63 | 69 66 69 65 64 20 62 79 |nce spec|ified by|
|00003650| 20 6b 65 79 20 66 72 6f | 6d 20 74 68 65 20 49 43 | key fro|m the IC|
|00003660| 20 64 61 74 61 62 61 73 | 65 20 74 6f 20 74 68 65 | databas|e to the|
|00003670| 0d 20 20 20 2a 20 76 61 | 6c 75 65 20 63 6f 6e 74 |. * va|lue cont|
|00003680| 61 69 6e 65 64 20 69 6e | 20 70 72 65 66 68 2e 0d |ained in| prefh..|
|00003690| 20 20 20 2a 20 6b 65 79 | 20 6d 75 73 74 20 6e 6f | * key| must no|
|000036a0| 74 20 62 65 20 74 68 65 | 20 65 6d 70 74 79 20 73 |t be the| empty s|
|000036b0| 74 72 69 6e 67 2e 0d 20 | 20 20 2a 20 49 66 20 70 |tring.. | * If p|
|000036c0| 72 65 66 68 20 69 73 20 | 6e 69 6c 20 74 68 65 6e |refh is |nil then|
|000036d0| 20 74 68 65 20 70 72 65 | 66 65 72 65 6e 63 65 20 | the pre|ference |
|000036e0| 76 61 6c 75 65 20 69 73 | 20 6e 6f 74 20 73 65 74 |value is| not set|
|000036f0| 2e 0d 20 20 20 2a 20 49 | 66 20 62 75 66 20 69 73 |.. * I|f buf is|
|00003700| 20 6e 6f 74 20 6e 69 6c | 20 74 68 65 6e 20 74 68 | not nil| then th|
|00003710| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 76 61 6c |e prefer|ence val|
|00003720| 75 65 20 69 73 20 73 65 | 74 20 74 6f 20 74 68 65 |ue is se|t to the|
|00003730| 20 64 61 74 61 0d 20 20 | 20 2a 20 63 6f 6e 74 61 | data. | * conta|
|00003740| 69 6e 65 64 20 69 6e 20 | 69 74 2e 0d 20 20 20 2a |ined in |it.. *|
|00003750| 20 49 66 20 61 74 74 72 | 20 69 73 20 49 43 61 74 | If attr| is ICat|
|00003760| 74 72 5f 6e 6f 5f 63 68 | 61 6e 67 65 20 74 68 65 |tr_no_ch|ange the|
|00003770| 6e 20 74 68 65 20 70 72 | 65 66 65 72 65 6e 63 65 |n the pr|eference|
|00003780| 20 61 74 74 72 69 62 75 | 74 65 73 20 61 72 65 20 | attribu|tes are |
|00003790| 6e 6f 74 20 73 65 74 2e | 0d 20 20 20 2a 20 4f 74 |not set.|. * Ot|
|000037a0| 68 65 72 77 69 73 65 20 | 74 68 65 20 70 72 65 66 |herwise |the pref|
|000037b0| 65 72 65 6e 63 65 20 61 | 74 74 72 69 62 75 74 65 |erence a|ttribute|
|000037c0| 73 20 61 72 65 20 73 65 | 74 20 74 6f 20 61 74 74 |s are se|t to att|
|000037d0| 72 2e 0d 20 20 20 2a 20 | 52 65 74 75 72 6e 73 20 |r.. * |Returns |
|000037e0| 69 63 50 65 72 6d 45 72 | 72 20 69 66 20 74 68 65 |icPermEr|r if the|
|000037f0| 20 70 72 65 76 69 6f 75 | 73 20 49 43 42 65 67 69 | previou|s ICBegi|
|00003800| 6e 20 77 61 73 20 70 61 | 73 73 65 64 20 69 63 52 |n was pa|ssed icR|
|00003810| 65 61 64 4f 6e 6c 79 50 | 65 72 6d 2e 0d 20 20 20 |eadOnlyP|erm.. |
|00003820| 2a 20 52 65 74 75 72 6e | 73 20 69 63 50 65 72 6d |* Return|s icPerm|
|00003830| 45 72 72 20 69 66 20 63 | 75 72 72 65 6e 74 20 61 |Err if c|urrent a|
|00003840| 74 74 72 20 69 73 20 6c | 6f 63 6b 65 64 2c 20 6e |ttr is l|ocked, n|
|00003850| 65 77 20 61 74 74 72 20 | 69 73 20 6c 6f 63 6b 65 |ew attr |is locke|
|00003860| 64 20 61 6e 64 20 70 72 | 65 66 68 20 3c 3e 20 6e |d and pr|efh <> n|
|00003870| 69 6c 2e 0d 20 20 20 2a | 2f 0d 0d 70 61 73 63 61 |il.. *|/..pasca|
|00003880| 6c 20 49 43 45 72 72 6f | 72 20 49 43 43 6f 75 6e |l ICErro|r ICCoun|
|00003890| 74 50 72 65 66 28 49 43 | 49 6e 73 74 61 6e 63 65 |tPref(IC|Instance|
|000038a0| 20 69 6e 73 74 2c 20 6c | 6f 6e 67 20 2a 63 6f 75 | inst, l|ong *cou|
|000038b0| 6e 74 29 3b 0d 20 20 2f | 2a 20 59 6f 75 20 6d 75 |nt);. /|* You mu|
|000038c0| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|000038d0| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|000038e0| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|000038f0| 6f 75 74 69 6e 65 2e 0d | 20 20 20 2a 20 59 6f 75 |outine..| * You|
|00003900| 20 6d 75 73 74 20 62 65 | 20 69 6e 73 69 64 65 20 | must be| inside |
|00003910| 61 6e 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 |an ICBeg|in/End p|
|00003920| 61 69 72 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |air to c|all this|
|00003930| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 2a 20 43 | routine|.. * C|
|00003940| 6f 75 6e 74 73 20 74 68 | 65 20 74 6f 74 61 6c 20 |ounts th|e total |
|00003950| 6e 75 6d 62 65 72 20 6f | 66 20 70 72 65 66 65 72 |number o|f prefer|
|00003960| 65 6e 63 65 73 2e 0d 20 | 20 20 2a 20 49 66 20 74 |ences.. | * If t|
|00003970| 68 65 20 72 6f 75 74 69 | 6e 65 20 72 65 74 75 72 |he routi|ne retur|
|00003980| 6e 73 20 61 6e 20 65 72 | 72 6f 72 2c 20 63 6f 75 |ns an er|ror, cou|
|00003990| 6e 74 20 69 73 20 73 65 | 74 20 74 6f 20 30 2e 0d |nt is se|t to 0..|
|000039a0| 20 20 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 49 43 | */..p|ascal IC|
|000039b0| 45 72 72 6f 72 20 49 43 | 47 65 74 49 6e 64 50 72 |Error IC|GetIndPr|
|000039c0| 65 66 28 49 43 49 6e 73 | 74 61 6e 63 65 20 69 6e |ef(ICIns|tance in|
|000039d0| 73 74 2c 20 6c 6f 6e 67 | 20 6e 2c 20 53 74 72 32 |st, long| n, Str2|
|000039e0| 35 35 20 6b 65 79 29 3b | 0d 20 20 2f 2a 20 59 6f |55 key);|. /* Yo|
|000039f0| 75 20 6d 75 73 74 20 73 | 70 65 63 69 66 79 20 61 |u must s|pecify a|
|00003a00| 20 63 6f 6e 66 69 67 75 | 72 61 74 69 6f 6e 20 62 | configu|ration b|
|00003a10| 65 66 6f 72 65 20 63 61 | 6c 6c 69 6e 67 20 74 68 |efore ca|lling th|
|00003a20| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 2a |is routi|ne.. *|
|00003a30| 20 59 6f 75 20 6d 75 73 | 74 20 62 65 20 69 6e 73 | You mus|t be ins|
|00003a40| 69 64 65 20 61 6e 20 49 | 43 42 65 67 69 6e 2f 45 |ide an I|CBegin/E|
|00003a50| 6e 64 20 70 61 69 72 20 | 74 6f 20 63 61 6c 6c 20 |nd pair |to call |
|00003a60| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00003a70| 20 2a 20 52 65 74 75 72 | 6e 73 20 74 68 65 20 6b | * Retur|ns the k|
|00003a80| 65 79 20 6f 66 20 74 68 | 65 20 4e 74 68 20 70 72 |ey of th|e Nth pr|
|00003a90| 65 66 65 72 65 6e 63 65 | 2e 0d 20 20 20 2a 20 6e |eference|.. * n|
|00003aa0| 20 6d 75 73 74 20 62 65 | 20 70 6f 73 69 74 69 76 | must be| positiv|
|00003ab0| 65 2e 0d 20 20 20 2a 20 | 52 65 74 75 72 6e 73 20 |e.. * |Returns |
|00003ac0| 69 63 50 72 65 66 4e 6f | 74 46 6f 75 6e 64 45 72 |icPrefNo|tFoundEr|
|00003ad0| 72 20 69 66 20 6e 20 69 | 73 20 67 72 65 61 74 65 |r if n i|s greate|
|00003ae0| 72 20 74 68 61 6e 20 74 | 68 65 20 74 6f 74 61 6c |r than t|he total|
|00003af0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 70 72 65 66 65 | number |of prefe|
|00003b00| 72 65 6e 63 65 73 2e 0d | 20 20 20 2a 20 49 66 20 |rences..| * If |
|00003b10| 74 68 65 20 72 6f 75 74 | 69 6e 65 20 72 65 74 75 |the rout|ine retu|
|00003b20| 72 6e 73 20 61 6e 20 65 | 72 72 6f 72 2c 20 6b 65 |rns an e|rror, ke|
|00003b30| 79 20 69 73 20 75 6e 64 | 65 66 69 6e 65 64 2e 0d |y is und|efined..|
|00003b40| 20 20 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 49 43 | */..p|ascal IC|
|00003b50| 45 72 72 6f 72 20 49 43 | 44 65 6c 65 74 65 50 72 |Error IC|DeletePr|
|00003b60| 65 66 28 49 43 49 6e 73 | 74 61 6e 63 65 20 69 6e |ef(ICIns|tance in|
|00003b70| 73 74 2c 20 43 6f 6e 73 | 74 53 74 72 32 35 35 50 |st, Cons|tStr255P|
|00003b80| 61 72 61 6d 20 6b 65 79 | 29 3b 0d 20 20 2f 2a 20 |aram key|);. /* |
|00003b90| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00003ba0| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00003bb0| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00003bc0| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00003bd0| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 62 65 20 69 | * You m|ust be i|
|00003be0| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|00003bf0| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|00003c00| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00003c10| 20 20 20 2a 20 44 65 6c | 65 74 65 73 20 74 68 65 | * Del|etes the|
|00003c20| 20 70 72 65 66 65 72 65 | 6e 63 65 20 73 70 65 63 | prefere|nce spec|
|00003c30| 69 66 69 65 64 20 62 79 | 20 6b 65 79 2e 0d 20 20 |ified by| key.. |
|00003c40| 20 2a 20 6b 65 79 20 6d | 75 73 74 20 6e 6f 74 20 | * key m|ust not |
|00003c50| 62 65 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 |be the e|mpty str|
|00003c60| 69 6e 67 2e 0d 20 20 20 | 2a 20 52 65 74 75 72 6e |ing.. |* Return|
|00003c70| 73 20 69 63 50 72 65 66 | 4e 6f 74 46 6f 75 6e 64 |s icPref|NotFound|
|00003c80| 20 69 66 20 74 68 65 20 | 70 72 65 66 65 72 65 6e | if the |preferen|
|00003c90| 63 65 20 73 70 65 63 69 | 66 69 65 64 20 62 79 20 |ce speci|fied by |
|00003ca0| 6b 65 79 20 69 73 20 6e | 6f 74 20 70 72 65 73 65 |key is n|ot prese|
|00003cb0| 6e 74 2e 0d 20 20 20 2a | 2f 0d 0d 70 61 73 63 61 |nt.. *|/..pasca|
|00003cc0| 6c 20 49 43 45 72 72 6f | 72 20 49 43 45 6e 64 28 |l ICErro|r ICEnd(|
|00003cd0| 49 43 49 6e 73 74 61 6e | 63 65 20 69 6e 73 74 29 |ICInstan|ce inst)|
|00003ce0| 3b 0d 20 20 2f 2a 20 59 | 6f 75 20 6d 75 73 74 20 |;. /* Y|ou must |
|00003cf0| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00003d00| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00003d10| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00003d20| 69 6e 65 2e 0d 20 20 20 | 2a 20 59 6f 75 20 6d 75 |ine.. |* You mu|
|00003d30| 73 74 20 62 65 20 69 6e | 73 69 64 65 20 61 6e 20 |st be in|side an |
|00003d40| 49 43 42 65 67 69 6e 2f | 45 6e 64 20 70 61 69 72 |ICBegin/|End pair|
|00003d50| 20 74 6f 20 63 61 6c 6c | 20 74 68 69 73 20 72 6f | to call| this ro|
|00003d60| 75 74 69 6e 65 2e 0d 20 | 20 20 2a 20 54 65 72 6d |utine.. | * Term|
|00003d70| 69 6e 61 74 65 73 20 61 | 20 70 72 65 66 65 72 65 |inates a| prefere|
|00003d80| 6e 63 65 20 73 65 73 73 | 69 6f 6e 2c 20 61 73 20 |nce sess|ion, as |
|00003d90| 73 74 61 72 74 65 64 20 | 62 79 20 49 43 42 65 67 |started |by ICBeg|
|00003da0| 69 6e 2e 0d 20 20 20 2a | 20 59 6f 75 20 6d 75 73 |in.. *| You mus|
|00003db0| 74 20 68 61 76 65 20 63 | 61 6c 6c 65 64 20 49 43 |t have c|alled IC|
|00003dc0| 42 65 67 69 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |Begin be|fore cal|
|00003dd0| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00003de0| 65 2e 0d 20 20 20 2a 2f | 0d 0d 2f 2a 20 2a 2a 2a |e.. */|../* ***|
|00003df0| 2a 2a 20 55 73 65 72 20 | 49 6e 74 65 72 66 61 63 |** User |Interfac|
|00003e00| 65 20 53 74 75 66 66 20 | 2a 2a 2a 2a 2a 20 2a 2f |e Stuff |***** */|
|00003e10| 0d 0d 70 61 73 63 61 6c | 20 49 43 45 72 72 6f 72 |..pascal| ICError|
|00003e20| 20 49 43 45 64 69 74 50 | 72 65 66 65 72 65 6e 63 | ICEditP|referenc|
|00003e30| 65 73 28 49 43 49 6e 73 | 74 61 6e 63 65 20 69 6e |es(ICIns|tance in|
|00003e40| 73 74 2c 20 43 6f 6e 73 | 74 53 74 72 32 35 35 50 |st, Cons|tStr255P|
|00003e50| 61 72 61 6d 20 6b 65 79 | 29 3b 0d 20 20 2f 2a 20 |aram key|);. /* |
|00003e60| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 31 2e |Requires| IC 1.1.|
|00003e70| 0d 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 |. * Yo|u must s|
|00003e80| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00003e90| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00003ea0| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00003eb0| 6e 65 2e 0d 20 20 20 2a | 20 59 6f 75 20 64 6f 20 |ne.. *| You do |
|00003ec0| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 62 65 20 69 |not have| to be i|
|00003ed0| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|00003ee0| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|00003ef0| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00003f00| 20 20 20 2a 20 49 6e 73 | 74 72 75 63 74 73 20 49 | * Ins|tructs I|
|00003f10| 43 20 74 6f 20 64 69 73 | 70 6c 61 79 20 74 68 65 |C to dis|play the|
|00003f20| 20 75 73 65 72 20 69 6e | 74 65 72 66 61 63 65 20 | user in|terface |
|00003f30| 61 73 73 6f 63 69 61 74 | 65 64 20 77 69 74 68 20 |associat|ed with |
|00003f40| 65 64 69 74 69 6e 67 0d | 20 20 20 2a 20 70 72 65 |editing.| * pre|
|00003f50| 66 65 72 65 6e 63 65 73 | 20 61 6e 64 20 66 6f 63 |ferences| and foc|
|00003f60| 75 73 69 6e 67 20 6f 6e | 20 74 68 65 20 70 72 65 |using on| the pre|
|00003f70| 66 65 72 65 6e 63 65 20 | 73 70 65 63 69 66 69 65 |ference |specifie|
|00003f80| 64 20 62 79 20 6b 65 79 | 2e 0d 20 20 20 2a 20 49 |d by key|.. * I|
|00003f90| 66 20 6b 65 79 20 69 73 | 20 74 68 65 20 65 6d 70 |f key is| the emp|
|00003fa0| 74 79 20 73 74 72 69 6e | 67 20 74 68 65 6e 20 6e |ty strin|g then n|
|00003fb0| 6f 20 70 72 65 66 65 72 | 65 6e 63 65 20 73 68 6f |o prefer|ence sho|
|00003fc0| 75 6c 64 20 62 65 20 66 | 6f 63 75 73 65 64 20 75 |uld be f|ocused u|
|00003fd0| 70 6f 6e 2e 0d 20 20 20 | 2a 20 59 6f 75 20 6d 75 |pon.. |* You mu|
|00003fe0| 73 74 20 68 61 76 65 20 | 73 70 65 63 69 66 69 65 |st have |specifie|
|00003ff0| 64 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |d a conf|iguratio|
|00004000| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00004010| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00004020| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 6e | * You |do not n|
|00004030| 65 65 64 20 74 6f 20 63 | 61 6c 6c 20 49 43 42 65 |eed to c|all ICBe|
|00004040| 67 69 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |gin 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 2a 20 49 6e | 20 74 68 65 20 63 75 72 |. * In| the cur|
|00004070| 72 65 6e 74 20 69 6d 70 | 6c 65 6d 65 6e 74 61 74 |rent imp|lementat|
|00004080| 69 6f 6e 20 74 68 69 73 | 20 6c 61 75 6e 63 68 65 |ion this| launche|
|00004090| 73 20 74 68 65 20 49 43 | 20 61 70 70 6c 69 63 61 |s the IC| applica|
|000040a0| 74 69 6f 6e 0d 20 20 20 | 2a 20 28 6f 72 20 62 72 |tion. |* (or br|
|000040b0| 69 6e 67 73 20 69 74 20 | 74 6f 20 74 68 65 20 66 |ings it |to the f|
|000040c0| 72 6f 6e 74 29 20 61 6e | 64 20 64 69 73 70 6c 61 |ront) an|d displa|
|000040d0| 79 73 20 74 68 65 20 77 | 69 6e 64 6f 77 20 63 6f |ys the w|indow co|
|000040e0| 6e 74 61 69 6e 69 6e 67 | 0d 20 20 20 2a 20 74 68 |ntaining|. * th|
|000040f0| 65 20 70 72 65 66 65 72 | 65 6e 63 65 20 73 70 65 |e prefer|ence spe|
|00004100| 63 69 66 69 65 64 20 62 | 79 20 6b 65 79 2e 0d 20 |cified b|y key.. |
|00004110| 20 20 2a 20 49 74 20 6d | 61 79 20 68 61 76 65 20 | * It m|ay have |
|00004120| 61 20 72 61 64 69 63 61 | 6c 6c 79 20 64 69 66 66 |a radica|lly diff|
|00004130| 65 72 65 6e 74 20 69 6d | 70 6c 65 6d 65 6e 74 61 |erent im|plementa|
|00004140| 74 69 6f 6e 20 69 6e 20 | 66 75 74 75 72 65 0d 20 |tion in |future. |
|00004150| 20 20 2a 20 49 43 20 73 | 79 73 74 65 6d 73 2e 0d | * IC s|ystems..|
|00004160| 20 20 20 2a 2f 0d 0d 2f | 2a 20 2a 2a 2a 2a 2a 20 | */../|* ***** |
|00004170| 55 52 4c 20 48 61 6e 64 | 6c 69 6e 67 20 2a 2a 2a |URL Hand|ling ***|
|00004180| 2a 2a 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 49 43 |** */..p|ascal IC|
|00004190| 45 72 72 6f 72 20 49 43 | 50 61 72 73 65 55 52 4c |Error IC|ParseURL|
|000041a0| 28 49 43 49 6e 73 74 61 | 6e 63 65 20 69 6e 73 74 |(ICInsta|nce inst|
|000041b0| 2c 20 43 6f 6e 73 74 53 | 74 72 32 35 35 50 61 72 |, ConstS|tr255Par|
|000041c0| 61 6d 20 68 69 6e 74 2c | 20 50 74 72 20 64 61 74 |am hint,| Ptr dat|
|000041d0| 61 2c 20 6c 6f 6e 67 20 | 6c 65 6e 2c 20 6c 6f 6e |a, long |len, lon|
|000041e0| 67 20 2a 73 65 6c 53 74 | 61 72 74 2c 20 6c 6f 6e |g *selSt|art, lon|
|000041f0| 67 20 2a 73 65 6c 45 6e | 64 2c 20 48 61 6e 64 6c |g *selEn|d, Handl|
|00004200| 65 20 75 72 6c 29 3b 0d | 20 20 2f 2a 20 52 65 71 |e url);.| /* Req|
|00004210| 75 69 72 65 73 20 49 43 | 20 31 2e 31 2e 0d 20 20 |uires IC| 1.1.. |
|00004220| 20 2a 20 59 6f 75 20 6d | 75 73 74 20 73 70 65 63 | * You m|ust spec|
|00004230| 69 66 79 20 61 20 63 6f | 6e 66 69 67 75 72 61 74 |ify a co|nfigurat|
|00004240| 69 6f 6e 20 62 65 66 6f | 72 65 20 63 61 6c 6c 69 |ion befo|re calli|
|00004250| 6e 67 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ng this |routine.|
|00004260| 0d 20 20 20 2a 20 59 6f | 75 20 64 6f 20 6e 6f 74 |. * Yo|u do not|
|00004270| 20 68 61 76 65 20 74 6f | 20 62 65 20 69 6e 73 69 | have to| be insi|
|00004280| 64 65 20 61 6e 20 49 43 | 42 65 67 69 6e 2f 45 6e |de an IC|Begin/En|
|00004290| 64 20 70 61 69 72 20 74 | 6f 20 63 61 6c 6c 20 74 |d pair t|o call t|
|000042a0| 68 69 73 20 72 6f 75 74 | 69 6e 65 2e 0d 20 20 20 |his rout|ine.. |
|000042b0| 2a 20 50 61 72 73 65 73 | 20 61 20 55 52 4c 20 6f |* Parses| a URL o|
|000042c0| 75 74 20 6f 66 20 74 68 | 65 20 73 70 65 63 69 66 |ut of th|e specif|
|000042d0| 69 65 64 20 74 65 78 74 | 20 61 6e 64 20 72 65 74 |ied text| and ret|
|000042e0| 75 72 6e 73 20 69 74 20 | 69 6e 20 61 20 63 61 6e |urns it |in a can|
|000042f0| 6f 6e 69 63 61 6c 20 66 | 6f 72 6d 0d 20 20 20 2a |onical f|orm. *|
|00004300| 20 69 6e 20 61 20 68 61 | 6e 64 6c 65 2e 0d 20 20 | in a ha|ndle.. |
|00004310| 20 2a 20 68 69 6e 74 20 | 69 6e 64 69 63 61 74 65 | * hint |indicate|
|00004320| 73 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 73 63 |s the de|fault sc|
|00004330| 68 65 6d 65 20 66 6f 72 | 20 55 52 4c 73 20 6f 66 |heme for| URLs of|
|00004340| 20 74 68 65 20 66 6f 72 | 6d 20 22 6e 61 6d 65 40 | the for|m "name@|
|00004350| 61 64 64 72 65 73 73 22 | 2e 0d 20 20 20 2a 20 49 |address"|.. * I|
|00004360| 66 20 68 69 6e 74 20 69 | 73 20 74 68 65 20 65 6d |f hint i|s the em|
|00004370| 70 74 79 20 73 74 72 69 | 6e 67 20 74 68 65 6e 20 |pty stri|ng then |
|00004380| 55 52 4c 73 20 6f 66 20 | 74 68 61 74 20 66 6f 72 |URLs of |that for|
|00004390| 6d 20 61 72 65 20 6e 6f | 74 20 61 6c 6c 6f 77 65 |m are no|t allowe|
|000043a0| 64 2e 0d 20 20 20 2a 20 | 64 61 74 61 20 70 6f 69 |d.. * |data poi|
|000043b0| 6e 74 73 20 74 6f 20 74 | 68 65 20 73 74 61 72 74 |nts to t|he start|
|000043c0| 20 6f 66 20 74 68 65 20 | 74 65 78 74 2e 20 49 74 | of the |text. It|
|000043d0| 20 6d 75 73 74 20 6e 6f | 74 20 62 65 20 6e 69 6c | must no|t be nil|
|000043e0| 2e 0d 20 20 20 2a 20 6c | 65 6e 20 69 6e 64 69 63 |.. * l|en indic|
|000043f0| 61 74 65 73 20 74 68 65 | 20 6c 65 6e 67 74 68 20 |ates the| length |
|00004400| 6f 66 20 74 68 65 20 74 | 65 78 74 2e 20 49 74 20 |of the t|ext. It |
|00004410| 6d 75 73 74 20 62 65 20 | 6e 6f 6e 2d 6e 65 67 61 |must be |non-nega|
|00004420| 74 69 76 65 2e 0d 20 20 | 20 2a 20 73 65 6c 53 74 |tive.. | * selSt|
|00004430| 61 72 74 20 61 6e 64 20 | 73 65 6c 45 6e 64 20 73 |art and |selEnd s|
|00004440| 68 6f 75 6c 64 20 62 65 | 20 70 61 73 73 65 64 20 |hould be| passed |
|00004450| 69 6e 20 61 73 20 74 68 | 65 20 63 75 72 72 65 6e |in as th|e curren|
|00004460| 74 20 73 65 6c 65 63 74 | 69 6f 6e 20 6f 66 0d 20 |t select|ion of. |
|00004470| 20 20 2a 20 74 68 65 20 | 74 65 78 74 2e 20 54 68 | * the |text. Th|
|00004480| 69 73 20 73 65 6c 65 63 | 74 69 6f 6e 20 69 73 20 |is selec|tion is |
|00004490| 67 69 76 65 6e 20 69 6e | 20 74 68 65 20 73 61 6d |given in| the sam|
|000044a0| 65 20 6d 61 6e 6e 65 72 | 20 61 73 20 54 65 78 74 |e manner| as Text|
|000044b0| 45 64 69 74 2c 0d 20 20 | 20 2a 20 69 65 20 69 66 |Edit,. | * ie if|
|000044c0| 20 73 65 6c 53 74 61 72 | 74 20 3d 20 73 65 6c 45 | selStar|t = selE|
|000044d0| 6e 64 20 74 68 65 6e 20 | 74 68 65 72 65 20 69 73 |nd then |there is|
|000044e0| 20 6e 6f 20 73 65 6c 65 | 63 74 69 6f 6e 20 6f 6e | no sele|ction on|
|000044f0| 6c 79 20 61 6e 20 69 6e | 73 65 72 74 69 6f 6e 0d |ly an in|sertion.|
|00004500| 20 20 20 2a 20 70 6f 69 | 6e 74 2e 20 41 6c 73 6f | * poi|nt. Also|
|00004510| 20 73 65 6c 53 74 61 72 | 74 20 b2 20 73 65 6c 45 | selStar|t . selE|
|00004520| 6e 64 20 61 6e 64 20 30 | 20 b2 20 73 65 6c 53 74 |nd and 0| . selSt|
|00004530| 61 72 74 20 b2 20 6c 65 | 6e 20 61 6e 64 20 30 20 |art . le|n and 0 |
|00004540| b2 20 73 65 6c 45 6e 64 | 20 b2 20 6c 65 6e 2e 0d |. selEnd| . len..|
|00004550| 20 20 20 2a 20 73 65 6c | 53 74 61 72 74 20 61 6e | * sel|Start an|
|00004560| 64 20 73 65 6c 45 6e 64 | 20 61 72 65 20 72 65 74 |d selEnd| are ret|
|00004570| 75 72 6e 65 64 20 61 73 | 20 74 68 65 20 62 6f 75 |urned as| the bou|
|00004580| 6e 64 73 20 6f 66 20 74 | 68 65 20 55 52 4c 2e 20 |nds of t|he URL. |
|00004590| 49 66 20 74 68 65 0d 20 | 20 20 2a 20 72 6f 75 74 |If the. | * rout|
|000045a0| 69 6e 65 20 72 65 74 75 | 72 6e 73 20 61 6e 20 65 |ine retu|rns an e|
|000045b0| 72 72 6f 72 20 74 68 65 | 6e 20 74 68 65 73 65 20 |rror the|n these |
|000045c0| 6e 65 77 20 62 6f 75 6e | 64 61 72 69 65 73 20 6d |new boun|daries m|
|000045d0| 61 79 20 62 65 0d 20 20 | 20 2a 20 69 6e 76 61 6c |ay be. | * inval|
|000045e0| 69 64 20 62 75 74 20 74 | 68 65 79 20 77 69 6c 6c |id but t|hey will|
|000045f0| 20 62 65 20 63 6c 6f 73 | 65 2e 0d 20 20 20 2a 20 | be clos|e.. * |
|00004600| 54 68 65 20 69 6e 63 6f | 6d 69 6e 67 20 75 72 6c |The inco|ming url|
|00004610| 20 68 61 6e 64 6c 65 20 | 6d 75 73 74 20 6e 6f 74 | handle |must not|
|00004620| 20 62 65 20 6e 69 6c 2e | 20 20 54 68 65 20 72 65 | be nil.| The re|
|00004630| 73 75 6c 74 69 6e 67 20 | 55 52 4c 20 69 73 20 6e |sulting |URL is n|
|00004640| 6f 72 6d 61 6c 69 73 65 | 64 0d 20 20 20 2a 20 61 |ormalise|d. * a|
|00004650| 6e 64 20 63 6f 70 69 65 | 64 20 69 6e 74 6f 20 74 |nd copie|d into t|
|00004660| 68 65 20 75 72 6c 20 68 | 61 6e 64 6c 65 2c 20 77 |he url h|andle, w|
|00004670| 68 69 63 68 20 69 73 20 | 72 65 73 69 7a 65 64 20 |hich is |resized |
|00004680| 74 6f 20 66 69 74 2e 0d | 20 20 20 2a 2f 0d 0d 70 |to fit..| */..p|
|00004690| 61 73 63 61 6c 20 49 43 | 45 72 72 6f 72 20 49 43 |ascal IC|Error IC|
|000046a0| 4c 61 75 6e 63 68 55 52 | 4c 28 49 43 49 6e 73 74 |LaunchUR|L(ICInst|
|000046b0| 61 6e 63 65 20 69 6e 73 | 74 2c 20 43 6f 6e 73 74 |ance ins|t, Const|
|000046c0| 53 74 72 32 35 35 50 61 | 72 61 6d 20 68 69 6e 74 |Str255Pa|ram hint|
|000046d0| 2c 20 50 74 72 20 64 61 | 74 61 2c 20 6c 6f 6e 67 |, Ptr da|ta, long|
|000046e0| 20 6c 65 6e 2c 20 6c 6f | 6e 67 20 2a 73 65 6c 53 | len, lo|ng *selS|
|000046f0| 74 61 72 74 2c 20 6c 6f | 6e 67 20 2a 73 65 6c 45 |tart, lo|ng *selE|
|00004700| 6e 64 29 3b 0d 20 20 2f | 2a 20 52 65 71 75 69 72 |nd);. /|* Requir|
|00004710| 65 73 20 49 43 20 31 2e | 31 2e 0d 20 20 20 2a 20 |es IC 1.|1.. * |
|00004720| 59 6f 75 20 6d 75 73 74 | 20 73 70 65 63 69 66 79 |You must| specify|
|00004730| 20 61 20 63 6f 6e 66 69 | 67 75 72 61 74 69 6f 6e | a confi|guration|
|00004740| 20 62 65 66 6f 72 65 20 | 63 61 6c 6c 69 6e 67 20 | before |calling |
|00004750| 74 68 69 73 20 72 6f 75 | 74 69 6e 65 2e 0d 20 20 |this rou|tine.. |
|00004760| 20 2a 20 59 6f 75 20 64 | 6f 20 6e 6f 74 20 68 61 | * You d|o not ha|
|00004770| 76 65 20 74 6f 20 62 65 | 20 69 6e 73 69 64 65 20 |ve to be| inside |
|00004780| 61 6e 20 49 43 42 65 67 | 69 6e 2f 45 6e 64 20 70 |an ICBeg|in/End p|
|00004790| 61 69 72 20 74 6f 20 63 | 61 6c 6c 20 74 68 69 73 |air to c|all this|
|000047a0| 20 72 6f 75 74 69 6e 65 | 2e 0d 20 20 20 2a 20 50 | routine|.. * P|
|000047b0| 61 72 73 65 73 20 61 20 | 55 52 4c 20 6f 75 74 20 |arses a |URL out |
|000047c0| 6f 66 20 74 68 65 20 73 | 70 65 63 69 66 69 65 64 |of the s|pecified|
|000047d0| 20 74 65 78 74 20 61 6e | 64 20 66 65 65 64 73 20 | text an|d feeds |
|000047e0| 69 74 20 6f 66 66 20 74 | 6f 20 74 68 65 0d 20 20 |it off t|o the. |
|000047f0| 20 2a 20 61 70 70 72 6f | 70 72 69 61 74 65 20 68 | * appro|priate h|
|00004800| 65 6c 70 65 72 2e 0d 20 | 20 20 2a 20 68 69 6e 74 |elper.. | * hint|
|00004810| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 65 20 64 | indicat|es the d|
|00004820| 65 66 61 75 6c 74 20 73 | 63 68 65 6d 65 20 66 6f |efault s|cheme fo|
|00004830| 72 20 55 52 4c 73 20 6f | 66 20 74 68 65 20 66 6f |r URLs o|f the fo|
|00004840| 72 6d 20 22 6e 61 6d 65 | 40 61 64 64 72 65 73 73 |rm "name|@address|
|00004850| 22 2e 0d 20 20 20 2a 20 | 49 66 20 68 69 6e 74 20 |".. * |If hint |
|00004860| 69 73 20 74 68 65 20 65 | 6d 70 74 79 20 73 74 72 |is the e|mpty str|
|00004870| 69 6e 67 20 74 68 65 6e | 20 55 52 4c 73 20 6f 66 |ing then| URLs of|
|00004880| 20 74 68 61 74 20 66 6f | 72 6d 20 61 72 65 20 6e | that fo|rm are n|
|00004890| 6f 74 20 61 6c 6c 6f 77 | 65 64 2e 0d 20 20 20 2a |ot allow|ed.. *|
|000048a0| 20 64 61 74 61 20 70 6f | 69 6e 74 73 20 74 6f 20 | data po|ints to |
|000048b0| 74 68 65 20 73 74 61 72 | 74 20 6f 66 20 74 68 65 |the star|t of the|
|000048c0| 20 74 65 78 74 2e 20 49 | 74 20 6d 75 73 74 20 6e | text. I|t must n|
|000048d0| 6f 74 20 62 65 20 6e 69 | 6c 2e 0d 20 20 20 2a 20 |ot be ni|l.. * |
|000048e0| 6c 65 6e 20 69 6e 64 69 | 63 61 74 65 73 20 74 68 |len indi|cates th|
|000048f0| 65 20 6c 65 6e 67 74 68 | 20 6f 66 20 74 68 65 20 |e length| of the |
|00004900| 74 65 78 74 2e 20 49 74 | 20 6d 75 73 74 20 62 65 |text. It| must be|
|00004910| 20 6e 6f 6e 2d 6e 65 67 | 61 74 69 76 65 2e 0d 20 | non-neg|ative.. |
|00004920| 20 20 2a 20 73 65 6c 53 | 74 61 72 74 20 61 6e 64 | * selS|tart and|
|00004930| 20 73 65 6c 45 6e 64 20 | 73 68 6f 75 6c 64 20 62 | selEnd |should b|
|00004940| 65 20 70 61 73 73 65 64 | 20 69 6e 20 61 73 20 74 |e passed| in as t|
|00004950| 68 65 20 63 75 72 72 65 | 6e 74 20 73 65 6c 65 63 |he curre|nt selec|
|00004960| 74 69 6f 6e 20 6f 66 0d | 20 20 20 2a 20 74 68 65 |tion of.| * the|
|00004970| 20 74 65 78 74 2e 20 54 | 68 69 73 20 73 65 6c 65 | text. T|his sele|
|00004980| 63 74 69 6f 6e 20 69 73 | 20 67 69 76 65 6e 20 69 |ction is| given i|
|00004990| 6e 20 74 68 65 20 73 61 | 6d 65 20 6d 61 6e 6e 65 |n the sa|me manne|
|000049a0| 72 20 61 73 20 54 65 78 | 74 45 64 69 74 2c 0d 20 |r as Tex|tEdit,. |
|000049b0| 20 20 2a 20 69 65 20 69 | 66 20 73 65 6c 53 74 61 | * ie i|f selSta|
|000049c0| 72 74 20 3d 20 73 65 6c | 45 6e 64 20 74 68 65 6e |rt = sel|End then|
|000049d0| 20 74 68 65 72 65 20 69 | 73 20 6e 6f 20 73 65 6c | there i|s no sel|
|000049e0| 65 63 74 69 6f 6e 20 6f | 6e 6c 79 20 61 6e 20 69 |ection o|nly an i|
|000049f0| 6e 73 65 72 74 69 6f 6e | 0d 20 20 20 2a 20 70 6f |nsertion|. * po|
|00004a00| 69 6e 74 2e 20 41 6c 73 | 6f 20 73 65 6c 53 74 61 |int. Als|o selSta|
|00004a10| 72 74 20 b2 20 73 65 6c | 45 6e 64 20 61 6e 64 20 |rt . sel|End and |
|00004a20| 30 20 b2 20 73 65 6c 53 | 74 61 72 74 20 b2 20 6c |0 . selS|tart . l|
|00004a30| 65 6e 20 61 6e 64 20 30 | 20 b2 20 73 65 6c 45 6e |en and 0| . selEn|
|00004a40| 64 20 b2 20 6c 65 6e 2e | 0d 20 20 20 2a 20 73 65 |d . len.|. * se|
|00004a50| 6c 53 74 61 72 74 20 61 | 6e 64 20 73 65 6c 45 6e |lStart a|nd selEn|
|00004a60| 64 20 61 72 65 20 72 65 | 74 75 72 6e 65 64 20 61 |d are re|turned a|
|00004a70| 73 20 74 68 65 20 62 6f | 75 6e 64 73 20 6f 66 20 |s the bo|unds of |
|00004a80| 74 68 65 20 55 52 4c 2e | 20 49 66 20 74 68 65 0d |the URL.| If the.|
|00004a90| 20 20 20 2a 20 72 6f 75 | 74 69 6e 65 20 72 65 74 | * rou|tine ret|
|00004aa0| 75 72 6e 73 20 61 6e 20 | 65 72 72 6f 72 20 74 68 |urns an |error th|
|00004ab0| 65 6e 20 74 68 65 73 65 | 20 6e 65 77 20 62 6f 75 |en these| new bou|
|00004ac0| 6e 64 61 72 69 65 73 20 | 6d 61 79 20 62 65 0d 20 |ndaries |may be. |
|00004ad0| 20 20 2a 20 69 6e 76 61 | 6c 69 64 20 62 75 74 20 | * inva|lid but |
|00004ae0| 74 68 65 79 20 77 69 6c | 6c 20 62 65 20 63 6c 6f |they wil|l be clo|
|00004af0| 73 65 2e 0d 20 20 20 2a | 20 54 68 65 20 55 52 4c |se.. *| The URL|
|00004b00| 20 69 73 20 70 61 72 73 | 65 64 20 6f 75 74 20 6f | is pars|ed out o|
|00004b10| 66 20 74 68 65 20 74 65 | 78 74 20 61 6e 64 20 70 |f the te|xt and p|
|00004b20| 61 73 73 65 64 20 6f 66 | 66 20 74 6f 20 74 68 65 |assed of|f to the|
|00004b30| 20 61 70 70 72 6f 70 72 | 69 61 74 65 0d 20 20 20 | appropr|iate. |
|00004b40| 2a 20 68 65 6c 70 65 72 | 20 75 73 69 6e 67 20 74 |* helper| using t|
|00004b50| 68 65 20 47 55 52 4c 20 | 41 70 70 6c 65 45 76 65 |he GURL |AppleEve|
|00004b60| 6e 74 2e 0d 20 20 20 2a | 2f 0d 0d 2f 2a 20 2a 2a |nt.. *|/../* **|
|00004b70| 2a 2a 2a 20 4d 61 70 70 | 69 6e 67 73 20 52 6f 75 |*** Mapp|ings Rou|
|00004b80| 74 69 6e 65 73 20 2a 2a | 2a 2a 2a 0d 20 2a 20 0d |tines **|***. * .|
|00004b90| 20 2a 20 52 6f 75 74 69 | 6e 65 73 20 66 6f 72 20 | * Routi|nes for |
|00004ba0| 69 6e 74 65 72 72 6f 67 | 61 74 69 6e 67 20 6d 61 |interrog|ating ma|
|00004bb0| 70 70 69 6e 67 73 20 64 | 61 74 61 62 61 73 65 2e |ppings d|atabase.|
|00004bc0| 0d 20 2a 20 0d 20 2a 20 | 2d 2d 2d 2d 2d 20 48 69 |. * . * |----- Hi|
|00004bd0| 67 68 20 4c 65 76 65 6c | 20 52 6f 75 74 69 6e 65 |gh Level| Routine|
|00004be0| 73 20 2d 2d 2d 2d 2d 0d | 20 2a 2f 0d 0d 70 61 73 |s -----.| */..pas|
|00004bf0| 63 61 6c 20 49 43 45 72 | 72 6f 72 20 49 43 4d 61 |cal ICEr|ror ICMa|
|00004c00| 70 46 69 6c 65 6e 61 6d | 65 28 49 43 49 6e 73 74 |pFilenam|e(ICInst|
|00004c10| 61 6e 63 65 20 69 6e 73 | 74 2c 20 43 6f 6e 73 74 |ance ins|t, Const|
|00004c20| 53 74 72 32 35 35 50 61 | 72 61 6d 20 66 69 6c 65 |Str255Pa|ram file|
|00004c30| 6e 61 6d 65 2c 20 49 43 | 4d 61 70 45 6e 74 72 79 |name, IC|MapEntry|
|00004c40| 20 2a 65 6e 74 72 79 29 | 3b 0d 20 20 2f 2a 20 52 | *entry)|;. /* R|
|00004c50| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00004c60| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00004c70| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00004c80| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00004c90| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00004ca0| 65 2e 0d 20 20 20 2a 20 | 49 66 20 79 6f 75 20 61 |e.. * |If you a|
|00004cb0| 72 65 20 67 65 74 74 69 | 6e 67 20 6f 72 20 73 65 |re getti|ng or se|
|00004cc0| 74 74 69 6e 67 20 6d 75 | 6c 74 69 70 6c 65 20 70 |tting mu|ltiple p|
|00004cd0| 72 65 66 65 72 65 6e 63 | 65 73 2c 20 79 6f 75 20 |referenc|es, you |
|00004ce0| 73 68 6f 75 6c 64 20 70 | 6c 61 63 65 0d 20 20 20 |should p|lace. |
|00004cf0| 2a 20 74 68 65 73 65 20 | 63 61 6c 6c 73 20 77 69 |* these |calls wi|
|00004d00| 74 68 69 6e 20 61 6e 20 | 49 43 42 65 67 69 6e 2f |thin an |ICBegin/|
|00004d10| 49 43 45 6e 64 20 70 61 | 69 72 2e 0d 20 20 20 2a |ICEnd pa|ir.. *|
|00004d20| 20 49 66 20 79 6f 75 20 | 63 61 6c 6c 20 74 68 69 | If you |call thi|
|00004d30| 73 20 72 6f 75 74 69 6e | 65 20 6f 75 74 73 69 64 |s routin|e outsid|
|00004d40| 65 20 6f 66 20 73 75 63 | 68 20 61 20 70 61 69 72 |e of suc|h a pair|
|00004d50| 2c 20 69 74 20 69 6d 70 | 6c 69 63 69 74 6c 79 0d |, it imp|licitly.|
|00004d60| 20 20 20 2a 20 63 61 6c | 6c 73 20 49 43 42 65 67 | * cal|ls ICBeg|
|00004d70| 69 6e 28 69 6e 73 74 2c | 20 69 63 52 65 61 64 57 |in(inst,| icReadW|
|00004d80| 72 69 74 65 50 65 72 6d | 29 2e 0d 20 20 20 2a 20 |ritePerm|).. * |
|00004d90| 54 61 6b 65 73 20 74 68 | 65 20 6e 61 6d 65 20 6f |Takes th|e name o|
|00004da0| 66 20 61 6e 20 69 6e 63 | 6f 6d 69 6e 67 20 66 69 |f an inc|oming fi|
|00004db0| 6c 65 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |le and r|eturns t|
|00004dc0| 68 65 20 6d 6f 73 74 20 | 61 70 70 72 6f 70 72 69 |he most |appropri|
|00004dd0| 61 74 65 0d 20 20 20 2a | 20 6d 61 70 70 69 6e 67 |ate. *| mapping|
|00004de0| 73 20 64 61 74 61 62 61 | 73 65 20 65 6e 74 72 79 |s databa|se entry|
|00004df0| 2c 20 62 61 73 65 64 20 | 6f 6e 20 69 74 73 20 65 |, based |on its e|
|00004e00| 78 74 65 6e 73 69 6f 6e | 2e 0d 20 20 20 2a 20 66 |xtension|.. * f|
|00004e10| 69 6c 65 6e 61 6d 65 20 | 6d 75 73 74 20 6e 6f 74 |ilename |must not|
|00004e20| 20 62 65 20 74 68 65 20 | 65 6d 70 74 79 20 73 74 | be the |empty st|
|00004e30| 72 69 6e 67 2e 0d 20 20 | 20 2a 20 52 65 74 75 72 |ring.. | * Retur|
|00004e40| 6e 73 20 69 63 50 72 65 | 66 4e 6f 74 46 6f 75 6e |ns icPre|fNotFoun|
|00004e50| 64 45 72 72 20 69 66 20 | 6e 6f 20 73 75 69 74 61 |dErr if |no suita|
|00004e60| 62 6c 65 20 65 6e 74 72 | 79 20 69 73 20 66 6f 75 |ble entr|y is fou|
|00004e70| 6e 64 2e 0d 20 20 20 2a | 2f 0d 0d 70 61 73 63 61 |nd.. *|/..pasca|
|00004e80| 6c 20 49 43 45 72 72 6f | 72 20 49 43 4d 61 70 54 |l ICErro|r ICMapT|
|00004e90| 79 70 65 43 72 65 61 74 | 6f 72 28 49 43 49 6e 73 |ypeCreat|or(ICIns|
|00004ea0| 74 61 6e 63 65 20 69 6e | 73 74 2c 20 4f 53 54 79 |tance in|st, OSTy|
|00004eb0| 70 65 20 66 54 79 70 65 | 2c 20 4f 53 54 79 70 65 |pe fType|, OSType|
|00004ec0| 20 66 43 72 65 61 74 6f | 72 2c 20 43 6f 6e 73 74 | fCreato|r, Const|
|00004ed0| 53 74 72 32 35 35 50 61 | 72 61 6d 20 66 69 6c 65 |Str255Pa|ram file|
|00004ee0| 6e 61 6d 65 2c 20 49 43 | 4d 61 70 45 6e 74 72 79 |name, IC|MapEntry|
|00004ef0| 20 2a 65 6e 74 72 79 29 | 3b 0d 20 20 2f 2a 20 52 | *entry)|;. /* R|
|00004f00| 65 71 75 69 72 65 73 20 | 49 43 20 31 2e 31 2e 0d |equires |IC 1.1..|
|00004f10| 20 20 20 2a 20 59 6f 75 | 20 6d 75 73 74 20 73 70 | * You| must sp|
|00004f20| 65 63 69 66 79 20 61 20 | 63 6f 6e 66 69 67 75 72 |ecify a |configur|
|00004f30| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 63 61 6c |ation be|fore cal|
|00004f40| 6c 69 6e 67 20 74 68 69 | 73 20 72 6f 75 74 69 6e |ling thi|s routin|
|00004f50| 65 2e 0d 20 20 20 2a 20 | 59 6f 75 20 6d 75 73 74 |e.. * |You must|
|00004f60| 20 62 65 20 69 6e 73 69 | 64 65 20 61 6e 20 49 43 | be insi|de an IC|
|00004f70| 42 65 67 69 6e 2f 45 6e | 64 20 70 61 69 72 20 74 |Begin/En|d pair t|
|00004f80| 6f 20 63 61 6c 6c 20 74 | 68 69 73 20 72 6f 75 74 |o call t|his rout|
|00004f90| 69 6e 65 2e 0d 20 20 20 | 2a 20 54 61 6b 65 73 20 |ine.. |* Takes |
|00004fa0| 74 68 65 20 74 79 70 65 | 20 61 6e 64 20 63 72 65 |the type| and cre|
|00004fb0| 61 74 6f 72 20 28 61 6e | 64 20 6f 70 74 69 6f 6e |ator (an|d option|
|00004fc0| 61 6c 6c 79 20 74 68 65 | 20 6e 61 6d 65 29 20 6f |ally the| name) o|
|00004fd0| 66 20 61 6e 20 6f 75 74 | 67 6f 69 6e 67 0d 20 20 |f an out|going. |
|00004fe0| 20 2a 20 66 69 6c 65 20 | 61 6e 64 20 72 65 74 75 | * file |and retu|
|00004ff0| 72 6e 73 20 74 68 65 20 | 6d 6f 73 74 20 61 70 70 |rns the |most app|
|00005000| 72 6f 70 72 69 61 74 65 | 20 6d 61 70 70 69 6e 67 |ropriate| mapping|
|00005010| 73 20 64 61 74 61 62 61 | 73 65 20 65 6e 74 72 79 |s databa|se entry|
|00005020| 2e 0d 20 20 20 2a 20 54 | 68 65 20 66 69 6c 65 6e |.. * T|he filen|
|00005030| 61 6d 65 20 6d 61 79 20 | 62 65 20 65 69 74 68 65 |ame may |be eithe|
|00005040| 72 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |r the na|me of th|
|00005050| 65 20 6f 75 74 67 6f 69 | 6e 67 20 66 69 6c 65 20 |e outgoi|ng file |
|00005060| 6f 72 0d 20 20 20 2a 20 | 74 68 65 20 65 6d 70 74 |or. * |the empt|
|00005070| 79 20 73 74 72 69 6e 67 | 2e 0d 20 20 20 2a 20 52 |y string|.. * R|
|00005080| 65 74 75 72 6e 73 20 69 | 63 50 72 65 66 4e 6f 74 |eturns i|cPrefNot|
|00005090| 46 6f 75 6e 64 45 72 72 | 20 69 66 20 6e 6f 20 73 |FoundErr| if no s|
|000050a0| 75 69 74 61 62 6c 65 20 | 65 6e 74 72 79 20 66 6f |uitable |entry fo|
|000050b0| 75 6e 64 2e 0d 20 20 20 | 2a 2f 0d 0d 2f 2a 20 2d |und.. |*/../* -|
|000050c0| 2d 2d 2d 2d 20 4d 69 64 | 20 4c 65 76 65 6c 20 52 |---- Mid| Level R|
|000050d0| 6f 75 74 69 6e 65 73 20 | 2d 2d 2d 2d 2d 20 2a 2f |outines |----- */|
|000050e0| 0d 0d 70 61 73 63 61 6c | 20 49 43 45 72 72 6f 72 |..pascal| ICError|
|000050f0| 20 49 43 4d 61 70 45 6e | 74 72 69 65 73 46 69 6c | ICMapEn|triesFil|
|00005100| 65 6e 61 6d 65 28 49 43 | 49 6e 73 74 61 6e 63 65 |ename(IC|Instance|
|00005110| 20 69 6e 73 74 2c 20 48 | 61 6e 64 6c 65 20 65 6e | inst, H|andle en|
|00005120| 74 72 69 65 73 2c 20 43 | 6f 6e 73 74 53 74 72 32 |tries, C|onstStr2|
|00005130| 35 35 50 61 72 61 6d 20 | 66 69 6c 65 6e 61 6d 65 |55Param |filename|
|00005140| 2c 20 49 43 4d 61 70 45 | 6e 74 72 79 20 2a 65 6e |, ICMapE|ntry *en|
|00005150| 74 72 79 29 3b 0d 20 20 | 2f 2a 20 52 65 71 75 69 |try);. |/* Requi|
|00005160| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 2a |res IC 1|.1.. *|
|00005170| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00005180| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00005190| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|000051a0| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|000051b0| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | * You |do not h|
|000051c0| 61 76 65 20 74 6f 20 62 | 65 20 69 6e 73 69 64 65 |ave to b|e inside|
|000051d0| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|000051e0| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|000051f0| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 2a 20 |s routin|e.. * |
|00005200| 54 61 6b 65 73 20 74 68 | 65 20 6e 61 6d 65 20 6f |Takes th|e name o|
|00005210| 66 20 61 6e 20 69 6e 63 | 6f 6d 69 6e 67 20 66 69 |f an inc|oming fi|
|00005220| 6c 65 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |le and r|eturns t|
|00005230| 68 65 20 6d 6f 73 74 20 | 61 70 70 72 6f 70 72 69 |he most |appropri|
|00005240| 61 74 65 0d 20 20 20 2a | 20 6d 61 70 70 69 6e 67 |ate. *| mapping|
|00005250| 73 20 64 61 74 61 62 61 | 73 65 20 65 6e 74 72 79 |s databa|se entry|
|00005260| 2c 20 62 61 73 65 64 20 | 6f 6e 20 69 74 73 20 65 |, based |on its e|
|00005270| 78 74 65 6e 73 69 6f 6e | 2e 0d 20 20 20 2a 20 65 |xtension|.. * e|
|00005280| 6e 74 72 69 65 73 20 6d | 75 73 74 20 62 65 20 61 |ntries m|ust be a|
|00005290| 20 68 61 6e 64 6c 65 20 | 74 6f 20 61 20 76 61 6c | handle |to a val|
|000052a0| 69 64 20 49 43 20 6d 61 | 70 70 69 6e 67 73 20 64 |id IC ma|ppings d|
|000052b0| 61 74 61 62 61 73 65 20 | 70 72 65 66 65 72 65 6e |atabase |preferen|
|000052c0| 63 65 2e 0d 20 20 20 2a | 20 66 69 6c 65 6e 61 6d |ce.. *| filenam|
|000052d0| 65 20 6d 75 73 74 20 6e | 6f 74 20 62 65 20 74 68 |e must n|ot be th|
|000052e0| 65 20 65 6d 70 74 79 20 | 73 74 72 69 6e 67 2e 0d |e empty |string..|
|000052f0| 20 20 20 2a 20 52 65 74 | 75 72 6e 73 20 69 63 50 | * Ret|urns icP|
|00005300| 72 65 66 4e 6f 74 46 6f | 75 6e 64 45 72 72 20 69 |refNotFo|undErr i|
|00005310| 66 20 6e 6f 20 73 75 69 | 74 61 62 6c 65 20 65 6e |f no sui|table en|
|00005320| 74 72 79 20 69 73 20 66 | 6f 75 6e 64 2e 0d 20 20 |try is f|ound.. |
|00005330| 20 2a 2f 0d 0d 70 61 73 | 63 61 6c 20 49 43 45 72 | */..pas|cal ICEr|
|00005340| 72 6f 72 20 49 43 4d 61 | 70 45 6e 74 72 69 65 73 |ror ICMa|pEntries|
|00005350| 54 79 70 65 43 72 65 61 | 74 6f 72 28 49 43 49 6e |TypeCrea|tor(ICIn|
|00005360| 73 74 61 6e 63 65 20 69 | 6e 73 74 2c 20 48 61 6e |stance i|nst, Han|
|00005370| 64 6c 65 20 65 6e 74 72 | 69 65 73 2c 20 4f 53 54 |dle entr|ies, OST|
|00005380| 79 70 65 20 66 54 79 70 | 65 2c 20 4f 53 54 79 70 |ype fTyp|e, OSTyp|
|00005390| 65 20 66 43 72 65 61 74 | 6f 72 2c 20 43 6f 6e 73 |e fCreat|or, Cons|
|000053a0| 74 53 74 72 32 35 35 50 | 61 72 61 6d 20 66 69 6c |tStr255P|aram fil|
|000053b0| 65 6e 61 6d 65 2c 20 49 | 43 4d 61 70 45 6e 74 72 |ename, I|CMapEntr|
|000053c0| 79 20 2a 65 6e 74 72 79 | 29 3b 0d 20 20 2f 2a 20 |y *entry|);. /* |
|000053d0| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 31 2e |Requires| IC 1.1.|
|000053e0| 0d 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 |. * Yo|u must s|
|000053f0| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00005400| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00005410| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00005420| 6e 65 2e 0d 20 20 20 2a | 20 59 6f 75 20 64 6f 20 |ne.. *| You do |
|00005430| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 62 65 20 69 |not have| to be i|
|00005440| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|00005450| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|00005460| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00005470| 20 20 20 2a 20 54 61 6b | 65 73 20 74 68 65 20 74 | * Tak|es the t|
|00005480| 79 70 65 20 61 6e 64 20 | 63 72 65 61 74 6f 72 20 |ype and |creator |
|00005490| 28 61 6e 64 20 6f 70 74 | 69 6f 6e 61 6c 6c 79 20 |(and opt|ionally |
|000054a0| 74 68 65 20 6e 61 6d 65 | 29 20 6f 66 20 61 6e 20 |the name|) of an |
|000054b0| 6f 75 74 67 6f 69 6e 67 | 0d 20 20 20 2a 20 66 69 |outgoing|. * fi|
|000054c0| 6c 65 20 61 6e 64 20 72 | 65 74 75 72 6e 73 20 74 |le and r|eturns t|
|000054d0| 68 65 20 6d 6f 73 74 20 | 61 70 70 72 6f 70 72 69 |he most |appropri|
|000054e0| 61 74 65 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 |ate mapp|ings dat|
|000054f0| 61 62 61 73 65 20 65 6e | 74 72 79 2e 0d 20 20 20 |abase en|try.. |
|00005500| 2a 20 65 6e 74 72 69 65 | 73 20 6d 75 73 74 20 62 |* entrie|s must b|
|00005510| 65 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 61 20 |e a hand|le to a |
|00005520| 76 61 6c 69 64 20 49 43 | 20 6d 61 70 70 69 6e 67 |valid IC| mapping|
|00005530| 73 20 64 61 74 61 62 61 | 73 65 20 70 72 65 66 65 |s databa|se prefe|
|00005540| 72 65 6e 63 65 2e 0d 20 | 20 20 2a 20 54 68 65 20 |rence.. | * The |
|00005550| 66 69 6c 65 6e 61 6d 65 | 20 6d 61 79 20 62 65 20 |filename| may be |
|00005560| 65 69 74 68 65 72 20 74 | 68 65 20 6e 61 6d 65 20 |either t|he name |
|00005570| 6f 66 20 74 68 65 20 6f | 75 74 67 6f 69 6e 67 20 |of the o|utgoing |
|00005580| 66 69 6c 65 20 6f 72 0d | 20 20 20 2a 20 74 68 65 |file or.| * the|
|00005590| 20 65 6d 70 74 79 20 73 | 74 72 69 6e 67 2e 0d 20 | empty s|tring.. |
|000055a0| 20 20 2a 20 52 65 74 75 | 72 6e 73 20 69 63 50 72 | * Retu|rns icPr|
|000055b0| 65 66 4e 6f 74 46 6f 75 | 6e 64 45 72 72 20 69 66 |efNotFou|ndErr if|
|000055c0| 20 6e 6f 20 73 75 69 74 | 61 62 6c 65 20 65 6e 74 | no suit|able ent|
|000055d0| 72 79 20 66 6f 75 6e 64 | 2e 0d 20 20 20 2a 2f 0d |ry found|.. */.|
|000055e0| 0d 2f 2a 20 2d 2d 2d 2d | 2d 20 4c 6f 77 20 4c 65 |./* ----|- Low Le|
|000055f0| 76 65 6c 20 52 6f 75 74 | 69 6e 65 73 20 2d 2d 2d |vel Rout|ines ---|
|00005600| 2d 2d 20 2a 2f 0d 0d 70 | 61 73 63 61 6c 20 49 43 |-- */..p|ascal IC|
|00005610| 45 72 72 6f 72 20 49 43 | 43 6f 75 6e 74 4d 61 70 |Error IC|CountMap|
|00005620| 45 6e 74 72 69 65 73 28 | 49 43 49 6e 73 74 61 6e |Entries(|ICInstan|
|00005630| 63 65 20 69 6e 73 74 2c | 20 48 61 6e 64 6c 65 20 |ce inst,| Handle |
|00005640| 65 6e 74 72 69 65 73 2c | 20 6c 6f 6e 67 20 2a 63 |entries,| long *c|
|00005650| 6f 75 6e 74 29 3b 0d 20 | 20 2f 2a 20 52 65 71 75 |ount);. | /* Requ|
|00005660| 69 72 65 73 20 49 43 20 | 31 2e 31 2e 0d 20 20 20 |ires IC |1.1.. |
|00005670| 2a 20 59 6f 75 20 6d 75 | 73 74 20 73 70 65 63 69 |* You mu|st speci|
|00005680| 66 79 20 61 20 63 6f 6e | 66 69 67 75 72 61 74 69 |fy a con|figurati|
|00005690| 6f 6e 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |on befor|e callin|
|000056a0| 67 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |g this r|outine..|
|000056b0| 20 20 20 2a 20 59 6f 75 | 20 64 6f 20 6e 6f 74 20 | * You| do not |
|000056c0| 68 61 76 65 20 74 6f 20 | 62 65 20 69 6e 73 69 64 |have to |be insid|
|000056d0| 65 20 61 6e 20 49 43 42 | 65 67 69 6e 2f 45 6e 64 |e an ICB|egin/End|
|000056e0| 20 70 61 69 72 20 74 6f | 20 63 61 6c 6c 20 74 68 | pair to| call th|
|000056f0| 69 73 20 72 6f 75 74 69 | 6e 65 2e 0d 20 20 20 2a |is routi|ne.. *|
|00005700| 20 43 6f 75 6e 74 73 20 | 74 68 65 20 6e 75 6d 62 | Counts |the numb|
|00005710| 65 72 20 6f 66 20 65 6e | 74 72 69 65 73 20 69 6e |er of en|tries in|
|00005720| 20 74 68 65 20 6d 61 70 | 70 69 6e 67 73 20 64 61 | the map|pings da|
|00005730| 74 61 62 61 73 65 2e 0d | 20 20 20 2a 20 65 6e 74 |tabase..| * ent|
|00005740| 72 69 65 73 20 6d 75 73 | 74 20 62 65 20 61 20 68 |ries mus|t be a h|
|00005750| 61 6e 64 6c 65 20 74 6f | 20 61 20 76 61 6c 69 64 |andle to| a valid|
|00005760| 20 49 43 20 6d 61 70 70 | 69 6e 67 73 20 64 61 74 | IC mapp|ings dat|
|00005770| 61 62 61 73 65 20 70 72 | 65 66 65 72 65 6e 63 65 |abase pr|eference|
|00005780| 2e 0d 20 20 20 2a 20 63 | 6f 75 6e 74 20 69 73 20 |.. * c|ount is |
|00005790| 73 65 74 20 74 6f 20 74 | 68 65 20 6e 75 6d 62 65 |set to t|he numbe|
|000057a0| 72 20 6f 66 20 65 6e 74 | 72 69 65 73 2e 0d 20 20 |r of ent|ries.. |
|000057b0| 20 2a 2f 0d 0d 70 61 73 | 63 61 6c 20 49 43 45 72 | */..pas|cal ICEr|
|000057c0| 72 6f 72 20 49 43 47 65 | 74 49 6e 64 4d 61 70 45 |ror ICGe|tIndMapE|
|000057d0| 6e 74 72 79 28 49 43 49 | 6e 73 74 61 6e 63 65 20 |ntry(ICI|nstance |
|000057e0| 69 6e 73 74 2c 20 48 61 | 6e 64 6c 65 20 65 6e 74 |inst, Ha|ndle ent|
|000057f0| 72 69 65 73 2c 20 6c 6f | 6e 67 20 6e 64 78 2c 20 |ries, lo|ng ndx, |
|00005800| 6c 6f 6e 67 20 2a 70 6f | 73 2c 20 49 43 4d 61 70 |long *po|s, ICMap|
|00005810| 45 6e 74 72 79 20 2a 65 | 6e 74 72 79 29 3b 0d 20 |Entry *e|ntry);. |
|00005820| 20 2f 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | /* Requ|ires IC |
|00005830| 31 2e 31 2e 0d 20 20 20 | 2a 20 59 6f 75 20 6d 75 |1.1.. |* You mu|
|00005840| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|00005850| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00005860| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00005870| 6f 75 74 69 6e 65 2e 0d | 20 20 20 2a 20 59 6f 75 |outine..| * You|
|00005880| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 74 6f 20 | do not |have to |
|00005890| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|000058a0| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|000058b0| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|000058c0| 6e 65 2e 0d 20 20 20 2a | 20 47 65 74 73 20 74 68 |ne.. *| Gets th|
|000058d0| 65 20 6e 64 78 27 74 68 | 20 65 6e 74 72 79 20 69 |e ndx'th| entry i|
|000058e0| 6e 20 74 68 65 20 6d 61 | 70 70 69 6e 67 73 20 64 |n the ma|ppings d|
|000058f0| 61 74 61 62 61 73 65 2e | 0d 20 20 20 2a 20 65 6e |atabase.|. * en|
|00005900| 74 72 69 65 73 20 6d 75 | 73 74 20 62 65 20 61 20 |tries mu|st be a |
|00005910| 68 61 6e 64 6c 65 20 74 | 6f 20 61 20 76 61 6c 69 |handle t|o a vali|
|00005920| 64 20 49 43 20 6d 61 70 | 70 69 6e 67 73 20 64 61 |d IC map|pings da|
|00005930| 74 61 62 61 73 65 20 70 | 72 65 66 65 72 65 6e 63 |tabase p|referenc|
|00005940| 65 2e 0d 20 20 20 2a 20 | 6e 64 78 20 6d 75 73 74 |e.. * |ndx must|
|00005950| 20 62 65 20 69 6e 20 74 | 68 65 20 72 61 6e 67 65 | be in t|he range|
|00005960| 20 66 72 6f 6d 20 31 20 | 74 6f 20 74 68 65 20 6e | from 1 |to the n|
|00005970| 75 6d 62 65 72 20 6f 66 | 20 65 6e 74 72 69 65 73 |umber of| entries|
|00005980| 20 69 6e 20 74 68 65 20 | 64 61 74 61 62 61 73 65 | in the |database|
|00005990| 2e 0d 20 20 20 2a 20 54 | 68 65 20 76 61 6c 75 65 |.. * T|he value|
|000059a0| 20 6f 66 20 70 6f 73 20 | 69 73 20 69 67 6e 6f 72 | of pos |is ignor|
|000059b0| 65 64 20 6f 6e 20 69 6e | 70 75 74 2e 20 70 6f 73 |ed on in|put. pos|
|000059c0| 20 69 73 20 73 65 74 20 | 74 6f 20 74 68 65 20 70 | is set |to the p|
|000059d0| 6f 73 69 74 69 6f 6e 20 | 6f 66 0d 20 20 20 2a 20 |osition |of. * |
|000059e0| 74 68 65 20 6e 64 78 27 | 74 68 20 65 6e 74 72 79 |the ndx'|th entry|
|000059f0| 20 69 6e 20 74 68 65 20 | 64 61 74 61 62 61 73 65 | in the |database|
|00005a00| 20 61 6e 64 20 69 73 20 | 73 75 69 74 61 62 6c 65 | and is |suitable|
|00005a10| 20 66 6f 72 20 70 61 73 | 73 69 6e 67 20 62 61 63 | for pas|sing bac|
|00005a20| 6b 0d 20 20 20 2a 20 69 | 6e 74 6f 20 49 43 53 65 |k. * i|nto ICSe|
|00005a30| 74 4d 61 70 45 6e 74 72 | 79 2e 0d 20 20 20 2a 20 |tMapEntr|y.. * |
|00005a40| 44 6f 65 73 20 6e 6f 74 | 20 72 65 74 75 72 6e 20 |Does not| return |
|00005a50| 61 6e 79 20 75 73 65 72 | 20 64 61 74 61 20 61 73 |any user| data as|
|00005a60| 73 6f 63 69 61 74 65 64 | 20 77 69 74 68 20 74 68 |sociated| with th|
|00005a70| 65 20 65 6e 74 72 79 2e | 0d 20 20 20 2a 2f 0d 0d |e entry.|. */..|
|00005a80| 70 61 73 63 61 6c 20 49 | 43 45 72 72 6f 72 20 49 |pascal I|CError I|
|00005a90| 43 47 65 74 4d 61 70 45 | 6e 74 72 79 28 49 43 49 |CGetMapE|ntry(ICI|
|00005aa0| 6e 73 74 61 6e 63 65 20 | 69 6e 73 74 2c 20 48 61 |nstance |inst, Ha|
|00005ab0| 6e 64 6c 65 20 65 6e 74 | 72 69 65 73 2c 20 6c 6f |ndle ent|ries, lo|
|00005ac0| 6e 67 20 70 6f 73 2c 20 | 49 43 4d 61 70 45 6e 74 |ng pos, |ICMapEnt|
|00005ad0| 72 79 20 2a 65 6e 74 72 | 79 29 3b 0d 20 20 2f 2a |ry *entr|y);. /*|
|00005ae0| 20 52 65 71 75 69 72 65 | 73 20 49 43 20 31 2e 31 | Require|s IC 1.1|
|00005af0| 2e 0d 20 20 20 2a 20 59 | 6f 75 20 6d 75 73 74 20 |.. * Y|ou must |
|00005b00| 73 70 65 63 69 66 79 20 | 61 20 63 6f 6e 66 69 67 |specify |a config|
|00005b10| 75 72 61 74 69 6f 6e 20 | 62 65 66 6f 72 65 20 63 |uration |before c|
|00005b20| 61 6c 6c 69 6e 67 20 74 | 68 69 73 20 72 6f 75 74 |alling t|his rout|
|00005b30| 69 6e 65 2e 0d 20 20 20 | 2a 20 59 6f 75 20 64 6f |ine.. |* You do|
|00005b40| 20 6e 6f 74 20 68 61 76 | 65 20 74 6f 20 62 65 20 | not hav|e to be |
|00005b50| 69 6e 73 69 64 65 20 61 | 6e 20 49 43 42 65 67 69 |inside a|n ICBegi|
|00005b60| 6e 2f 45 6e 64 20 70 61 | 69 72 20 74 6f 20 63 61 |n/End pa|ir to ca|
|00005b70| 6c 6c 20 74 68 69 73 20 | 72 6f 75 74 69 6e 65 2e |ll this |routine.|
|00005b80| 0d 20 20 20 2a 20 52 65 | 74 75 72 6e 73 20 74 68 |. * Re|turns th|
|00005b90| 65 20 65 6e 74 72 79 20 | 6c 6f 63 61 74 65 64 20 |e entry |located |
|00005ba0| 61 74 20 70 6f 73 69 74 | 69 6f 6e 20 70 6f 73 20 |at posit|ion pos |
|00005bb0| 69 6e 20 74 68 65 20 6d | 61 70 70 69 6e 67 73 20 |in the m|appings |
|00005bc0| 64 61 74 61 62 61 73 65 | 2e 0d 20 20 20 2a 20 65 |database|.. * e|
|00005bd0| 6e 74 72 69 65 73 20 6d | 75 73 74 20 62 65 20 61 |ntries m|ust be a|
|00005be0| 20 68 61 6e 64 6c 65 20 | 74 6f 20 61 20 76 61 6c | handle |to a val|
|00005bf0| 69 64 20 49 43 20 6d 61 | 70 70 69 6e 67 73 20 64 |id IC ma|ppings d|
|00005c00| 61 74 61 62 61 73 65 20 | 70 72 65 66 65 72 65 6e |atabase |preferen|
|00005c10| 63 65 2e 0d 20 20 20 2a | 20 70 6f 73 20 73 68 6f |ce.. *| pos sho|
|00005c20| 75 6c 64 20 62 65 20 30 | 20 74 6f 20 67 65 74 20 |uld be 0| to get |
|00005c30| 74 68 65 20 66 69 72 73 | 74 20 65 6e 74 72 79 2e |the firs|t entry.|
|00005c40| 20 54 6f 20 67 65 74 20 | 74 68 65 20 73 75 62 73 | To get |the subs|
|00005c50| 65 71 75 65 6e 74 20 65 | 6e 74 72 69 65 73 2c 20 |equent e|ntries, |
|00005c60| 61 64 64 0d 20 20 20 2a | 20 65 6e 74 72 79 2e 74 |add. *| entry.t|
|00005c70| 6f 74 61 6c 5f 73 69 7a | 65 20 74 6f 20 70 6f 73 |otal_siz|e to pos|
|00005c80| 20 61 6e 64 20 69 74 65 | 72 61 74 65 2e 0d 20 20 | and ite|rate.. |
|00005c90| 20 2a 20 44 6f 65 73 20 | 6e 6f 74 20 72 65 74 75 | * Does |not retu|
|00005ca0| 72 6e 20 61 6e 79 20 75 | 73 65 72 20 64 61 74 61 |rn any u|ser data|
|00005cb0| 20 61 73 73 6f 63 69 61 | 74 65 64 20 77 69 74 68 | associa|ted with|
|00005cc0| 20 74 68 65 20 65 6e 74 | 72 79 2e 0d 20 20 20 2a | the ent|ry.. *|
|00005cd0| 2f 0d 0d 70 61 73 63 61 | 6c 20 49 43 45 72 72 6f |/..pasca|l ICErro|
|00005ce0| 72 20 49 43 53 65 74 4d | 61 70 45 6e 74 72 79 28 |r ICSetM|apEntry(|
|00005cf0| 49 43 49 6e 73 74 61 6e | 63 65 20 69 6e 73 74 2c |ICInstan|ce inst,|
|00005d00| 20 48 61 6e 64 6c 65 20 | 65 6e 74 72 69 65 73 2c | Handle |entries,|
|00005d10| 20 6c 6f 6e 67 20 70 6f | 73 2c 20 49 43 4d 61 70 | long po|s, ICMap|
|00005d20| 45 6e 74 72 79 20 2a 65 | 6e 74 72 79 29 3b 0d 20 |Entry *e|ntry);. |
|00005d30| 20 2f 2a 20 52 65 71 75 | 69 72 65 73 20 49 43 20 | /* Requ|ires IC |
|00005d40| 31 2e 31 2e 0d 20 20 20 | 2a 20 59 6f 75 20 6d 75 |1.1.. |* You mu|
|00005d50| 73 74 20 73 70 65 63 69 | 66 79 20 61 20 63 6f 6e |st speci|fy a con|
|00005d60| 66 69 67 75 72 61 74 69 | 6f 6e 20 62 65 66 6f 72 |figurati|on befor|
|00005d70| 65 20 63 61 6c 6c 69 6e | 67 20 74 68 69 73 20 72 |e callin|g this r|
|00005d80| 6f 75 74 69 6e 65 2e 0d | 20 20 20 2a 20 59 6f 75 |outine..| * You|
|00005d90| 20 64 6f 20 6e 6f 74 20 | 68 61 76 65 20 74 6f 20 | do not |have to |
|00005da0| 62 65 20 69 6e 73 69 64 | 65 20 61 6e 20 49 43 42 |be insid|e an ICB|
|00005db0| 65 67 69 6e 2f 45 6e 64 | 20 70 61 69 72 20 74 6f |egin/End| pair to|
|00005dc0| 20 63 61 6c 6c 20 74 68 | 69 73 20 72 6f 75 74 69 | call th|is routi|
|00005dd0| 6e 65 2e 0d 20 20 20 2a | 20 53 65 74 73 20 74 68 |ne.. *| Sets th|
|00005de0| 65 20 65 6e 74 72 79 20 | 6c 6f 63 61 74 65 64 20 |e entry |located |
|00005df0| 61 74 20 70 6f 73 69 74 | 69 6f 6e 20 70 6f 73 20 |at posit|ion pos |
|00005e00| 69 6e 20 74 68 65 20 6d | 61 70 70 69 6e 67 73 20 |in the m|appings |
|00005e10| 64 61 74 61 62 61 73 65 | 2e 0d 20 20 20 2a 20 65 |database|.. * e|
|00005e20| 6e 74 72 69 65 73 20 6d | 75 73 74 20 62 65 20 61 |ntries m|ust be a|
|00005e30| 20 68 61 6e 64 6c 65 20 | 74 6f 20 61 20 76 61 6c | handle |to a val|
|00005e40| 69 64 20 49 43 20 6d 61 | 70 70 69 6e 67 73 20 64 |id IC ma|ppings d|
|00005e50| 61 74 61 62 61 73 65 20 | 70 72 65 66 65 72 65 6e |atabase |preferen|
|00005e60| 63 65 2e 0d 20 20 20 2a | 20 70 6f 73 20 73 68 6f |ce.. *| pos sho|
|00005e70| 75 6c 64 20 62 65 20 65 | 69 74 68 65 72 20 61 20 |uld be e|ither a |
|00005e80| 76 61 6c 75 65 20 72 65 | 74 75 72 6e 65 64 20 66 |value re|turned f|
|00005e90| 72 6f 6d 20 49 43 47 65 | 74 49 6e 64 4d 61 70 45 |rom ICGe|tIndMapE|
|00005ea0| 6e 74 72 79 20 6f 72 20 | 61 20 76 61 6c 75 65 0d |ntry or |a value.|
|00005eb0| 20 20 20 2a 20 63 61 6c | 63 75 6c 61 74 65 64 20 | * cal|culated |
|00005ec0| 75 73 69 6e 67 20 49 43 | 47 65 74 4d 61 70 45 6e |using IC|GetMapEn|
|00005ed0| 74 72 79 2e 0d 20 20 20 | 2a 20 65 6e 74 72 79 20 |try.. |* entry |
|00005ee0| 69 73 20 61 20 76 61 72 | 20 70 61 72 61 6d 65 74 |is a var| paramet|
|00005ef0| 65 72 20 70 75 72 65 6c | 79 20 66 6f 72 20 73 74 |er purel|y for st|
|00005f00| 61 63 6b 20 73 70 61 63 | 65 20 72 65 61 73 6f 6e |ack spac|e reason|
|00005f10| 73 2e 20 49 74 20 69 73 | 20 6e 6f 74 0d 20 20 20 |s. It is| not. |
|00005f20| 2a 20 6d 6f 64 69 66 69 | 65 64 20 69 6e 20 61 6e |* modifi|ed in an|
|00005f30| 79 20 77 61 79 2e 0d 20 | 20 20 2a 20 41 6e 79 20 |y way.. | * Any |
|00005f40| 75 73 65 72 20 64 61 74 | 61 20 61 73 73 6f 63 69 |user dat|a associ|
|00005f50| 61 74 65 64 20 77 69 74 | 68 20 74 68 65 20 65 6e |ated wit|h the en|
|00005f60| 74 72 79 20 69 73 20 75 | 6e 6d 6f 64 69 66 69 65 |try is u|nmodifie|
|00005f70| 64 2e 0d 20 20 20 2a 2f | 0d 0d 70 61 73 63 61 6c |d.. */|..pascal|
|00005f80| 20 49 43 45 72 72 6f 72 | 20 49 43 44 65 6c 65 74 | ICError| ICDelet|
|00005f90| 65 4d 61 70 45 6e 74 72 | 79 28 49 43 49 6e 73 74 |eMapEntr|y(ICInst|
|00005fa0| 61 6e 63 65 20 69 6e 73 | 74 2c 20 48 61 6e 64 6c |ance ins|t, Handl|
|00005fb0| 65 20 65 6e 74 72 69 65 | 73 2c 20 6c 6f 6e 67 20 |e entrie|s, long |
|00005fc0| 70 6f 73 29 3b 0d 20 20 | 2f 2a 20 52 65 71 75 69 |pos);. |/* Requi|
|00005fd0| 72 65 73 20 49 43 20 31 | 2e 31 2e 0d 20 20 20 2a |res IC 1|.1.. *|
|00005fe0| 20 59 6f 75 20 6d 75 73 | 74 20 73 70 65 63 69 66 | You mus|t specif|
|00005ff0| 79 20 61 20 63 6f 6e 66 | 69 67 75 72 61 74 69 6f |y a conf|iguratio|
|00006000| 6e 20 62 65 66 6f 72 65 | 20 63 61 6c 6c 69 6e 67 |n before| calling|
|00006010| 20 74 68 69 73 20 72 6f | 75 74 69 6e 65 2e 0d 20 | this ro|utine.. |
|00006020| 20 20 2a 20 59 6f 75 20 | 64 6f 20 6e 6f 74 20 68 | * You |do not h|
|00006030| 61 76 65 20 74 6f 20 62 | 65 20 69 6e 73 69 64 65 |ave to b|e inside|
|00006040| 20 61 6e 20 49 43 42 65 | 67 69 6e 2f 45 6e 64 20 | an ICBe|gin/End |
|00006050| 70 61 69 72 20 74 6f 20 | 63 61 6c 6c 20 74 68 69 |pair to |call thi|
|00006060| 73 20 72 6f 75 74 69 6e | 65 2e 0d 20 20 20 2a 20 |s routin|e.. * |
|00006070| 44 65 6c 65 74 65 73 20 | 74 68 65 20 6d 61 70 70 |Deletes |the mapp|
|00006080| 69 6e 67 73 20 64 61 74 | 61 62 61 73 65 20 65 6e |ings dat|abase en|
|00006090| 74 72 79 20 61 74 20 70 | 6f 73 2e 0d 20 20 20 2a |try at p|os.. *|
|000060a0| 20 65 6e 74 72 69 65 73 | 20 6d 75 73 74 20 62 65 | entries| must be|
|000060b0| 20 61 20 68 61 6e 64 6c | 65 20 74 6f 20 61 20 76 | a handl|e to a v|
|000060c0| 61 6c 69 64 20 49 43 20 | 6d 61 70 70 69 6e 67 73 |alid IC |mappings|
|000060d0| 20 64 61 74 61 62 61 73 | 65 20 70 72 65 66 65 72 | databas|e prefer|
|000060e0| 65 6e 63 65 2e 0d 20 20 | 20 2a 20 70 6f 73 20 73 |ence.. | * pos s|
|000060f0| 68 6f 75 6c 64 20 62 65 | 20 65 69 74 68 65 72 20 |hould be| either |
|00006100| 61 20 76 61 6c 75 65 20 | 72 65 74 75 72 6e 65 64 |a value |returned|
|00006110| 20 66 72 6f 6d 20 49 43 | 47 65 74 49 6e 64 4d 61 | from IC|GetIndMa|
|00006120| 70 45 6e 74 72 79 20 6f | 72 20 61 20 76 61 6c 75 |pEntry o|r a valu|
|00006130| 65 0d 20 20 20 2a 20 63 | 61 6c 63 75 6c 61 74 65 |e. * c|alculate|
|00006140| 64 20 75 73 69 6e 67 20 | 49 43 47 65 74 4d 61 70 |d using |ICGetMap|
|00006150| 45 6e 74 72 79 2e 0d 20 | 20 20 2a 20 41 6c 73 6f |Entry.. | * Also|
|00006160| 20 64 65 6c 65 74 65 73 | 20 61 6e 79 20 75 73 65 | deletes| any use|
|00006170| 72 20 64 61 74 61 20 61 | 73 73 6f 63 69 61 74 65 |r data a|ssociate|
|00006180| 64 20 77 69 74 68 20 74 | 68 65 20 65 6e 74 72 79 |d with t|he entry|
|00006190| 2e 0d 20 20 20 2a 2f 0d | 0d 70 61 73 63 61 6c 20 |.. */.|.pascal |
|000061a0| 49 43 45 72 72 6f 72 20 | 49 43 41 64 64 4d 61 70 |ICError |ICAddMap|
|000061b0| 45 6e 74 72 79 28 49 43 | 49 6e 73 74 61 6e 63 65 |Entry(IC|Instance|
|000061c0| 20 69 6e 73 74 2c 20 48 | 61 6e 64 6c 65 20 65 6e | inst, H|andle en|
|000061d0| 74 72 69 65 73 2c 20 49 | 43 4d 61 70 45 6e 74 72 |tries, I|CMapEntr|
|000061e0| 79 20 2a 65 6e 74 72 79 | 29 3b 0d 20 20 2f 2a 20 |y *entry|);. /* |
|000061f0| 52 65 71 75 69 72 65 73 | 20 49 43 20 31 2e 31 2e |Requires| IC 1.1.|
|00006200| 0d 20 20 20 2a 20 59 6f | 75 20 6d 75 73 74 20 73 |. * Yo|u must s|
|00006210| 70 65 63 69 66 79 20 61 | 20 63 6f 6e 66 69 67 75 |pecify a| configu|
|00006220| 72 61 74 69 6f 6e 20 62 | 65 66 6f 72 65 20 63 61 |ration b|efore ca|
|00006230| 6c 6c 69 6e 67 20 74 68 | 69 73 20 72 6f 75 74 69 |lling th|is routi|
|00006240| 6e 65 2e 0d 20 20 20 2a | 20 59 6f 75 20 64 6f 20 |ne.. *| You do |
|00006250| 6e 6f 74 20 68 61 76 65 | 20 74 6f 20 62 65 20 69 |not have| to be i|
|00006260| 6e 73 69 64 65 20 61 6e | 20 49 43 42 65 67 69 6e |nside an| ICBegin|
|00006270| 2f 45 6e 64 20 70 61 69 | 72 20 74 6f 20 63 61 6c |/End pai|r to cal|
|00006280| 6c 20 74 68 69 73 20 72 | 6f 75 74 69 6e 65 2e 0d |l this r|outine..|
|00006290| 20 20 20 2a 20 41 64 64 | 73 20 61 6e 20 65 6e 74 | * Add|s an ent|
|000062a0| 72 79 20 74 6f 20 74 68 | 65 20 6d 61 70 70 69 6e |ry to th|e mappin|
|000062b0| 67 73 20 64 61 74 61 62 | 61 73 65 2e 0d 20 20 20 |gs datab|ase.. |
|000062c0| 2a 20 65 6e 74 72 69 65 | 73 20 6d 75 73 74 20 62 |* entrie|s must b|
|000062d0| 65 20 61 20 68 61 6e 64 | 6c 65 20 74 6f 20 61 20 |e a hand|le to a |
|000062e0| 76 61 6c 69 64 20 49 43 | 20 6d 61 70 70 69 6e 67 |valid IC| mapping|
|000062f0| 73 20 64 61 74 61 62 61 | 73 65 20 70 72 65 66 65 |s databa|se prefe|
|00006300| 72 65 6e 63 65 2e 0d 20 | 20 20 2a 20 54 68 65 20 |rence.. | * The |
|00006310| 65 6e 74 72 79 20 69 73 | 20 61 64 64 65 64 20 74 |entry is| added t|
|00006320| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |o the en|d of the|
|00006330| 20 65 6e 74 72 69 65 73 | 20 64 61 74 61 62 61 73 | entries| databas|
|00006340| 65 2e 0d 20 20 20 2a 20 | 4e 6f 20 75 73 65 72 20 |e.. * |No user |
|00006350| 64 61 74 61 20 69 73 20 | 61 64 64 65 64 2e 0d 20 |data is |added.. |
|00006360| 20 20 2a 2f 0d 0d 0d 2f | 2a 20 a5 a5 a5 45 6e 64 | */.../|* ...End|
|00006370| 20 49 43 41 50 49 2e 68 | a5 a5 a5 20 2a 2f 0d 0d | ICAPI.h|... */..|
|00006380| 23 69 66 64 65 66 20 5f | 5f 63 70 6c 75 73 70 6c |#ifdef _|_cpluspl|
|00006390| 75 73 0d 7d 0d 23 65 6e | 64 69 66 20 5f 5f 63 70 |us.}.#en|dif __cp|
|000063a0| 6c 75 73 70 6c 75 73 0d | 0d 23 65 6e 64 69 66 0d |lusplus.|.#endif.|
|000063b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000063f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.