home *** CD-ROM | disk | FTP | other *** search
Unknown | 1992-05-11 | 77.6 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was not able to be converted.
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| WordPerfect help (document/wordPerfectHelp)
| ext
| Unsupported |
1%
| dexvert
| Yamaha e-SEQ Music (music/yamahaESEQ)
| ext
| Unsupported |
1%
| dexvert
| AVG Antivirus vault (other/avgAntivirusVault)
| ext
| Unsupported |
1%
| dexvert
| Axis Game Enhancement Modules (other/axisGameEnhancementModules)
| ext
| Unsupported |
1%
| dexvert
| DeskMate Filer database (other/deskMateFilerDatabase)
| ext
| Unsupported |
1%
| dexvert
| WordPerfect Overlay (other/wordPerfectOverlay)
| ext
| Unsupported |
100%
| file
| data
| default
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 55 4b 01 00 0a 00 10 00 | 01 00 01 00 03 00 00 00 |UK......|........|
|00000010| 30 00 00 00 00 00 00 00 | 00 00 00 00 00 3c e5 ff |0.......|.....<..|
|00000020| ff 00 00 00 00 24 b2 ff | ff 48 f4 ff ff 00 00 00 |.....$..|.H......|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 00 00 00 00 37 00 00 | 00 00 00 00 02 04 00 00 |.....7..|........|
|00000050| ac 03 00 00 33 33 30 00 | 00 00 20 20 da c4 c4 c4 |....330.|.. ....|
|00000060| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00000070| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 bf 0a 0d 20 20 |........|...... |
|00000080| b3 20 31 32 2e 20 43 55 | 53 54 4f 4d 49 5a 49 4e |. 12. CU|STOMIZIN|
|00000090| 47 20 54 48 45 20 53 4f | 46 54 57 41 52 45 20 b3 |G THE SO|FTWARE .|
|000000a0| 0a 0d 20 20 c0 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.. ....|........|
|000000b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000000c0| c4 c4 c4 d9 0a 0a 0d 20 | 20 20 54 68 65 72 65 20 |....... | There |
|000000d0| 61 72 65 20 74 68 72 65 | 65 20 77 61 79 73 20 69 |are thre|e ways i|
|000000e0| 6e 20 77 68 69 63 68 20 | 79 6f 75 20 63 61 6e 20 |n which |you can |
|000000f0| 63 75 73 74 6f 6d 69 7a | 65 20 74 68 65 20 73 6f |customiz|e the so|
|00000100| 66 74 77 61 72 65 20 3a | 0a 0a 0d 20 20 20 20 69 |ftware :|... i|
|00000110| 29 20 20 54 68 65 72 65 | 20 61 72 65 20 61 20 6e |) There| are a n|
|00000120| 75 6d 62 65 72 20 6f 66 | 20 4b 65 79 54 72 65 65 |umber of| KeyTree|
|00000130| 20 63 6f 6d 6d 61 6e 64 | 73 20 77 68 69 63 68 20 | command|s which |
|00000140| 63 61 6c 6c 20 66 6f 72 | 20 69 6e 70 75 74 20 66 |call for| input f|
|00000150| 72 6f 6d 20 74 68 65 0a | 0d 20 20 20 20 20 20 20 |rom the.|. |
|00000160| 20 6b 65 79 62 6f 61 72 | 64 2e 20 54 68 65 79 20 | keyboar|d. They |
|00000170| 61 6c 6c 20 75 73 65 20 | 61 20 63 6f 6d 6d 6f 6e |all use |a common|
|00000180| 20 72 6f 75 74 69 6e 65 | 2c 20 77 68 69 63 68 20 | routine|, which |
|00000190| 63 61 6e 20 72 65 63 6f | 67 6e 69 73 65 20 77 68 |can reco|gnise wh|
|000001a0| 65 6e 20 61 0a 0d 20 20 | 20 20 20 20 20 20 66 75 |en a.. | fu|
|000001b0| 6e 63 74 69 6f 6e 20 6b | 65 79 20 68 61 73 20 62 |nction k|ey has b|
|000001c0| 65 65 6e 20 70 72 65 73 | 73 65 64 2e 20 59 6f 75 |een pres|sed. You|
|000001d0| 20 63 61 6e 20 61 6c 74 | 65 72 20 74 68 65 20 63 | can alt|er the c|
|000001e0| 6f 64 65 20 73 6f 20 74 | 68 61 74 2c 20 77 68 65 |ode so t|hat, whe|
|000001f0| 6e 0a 0d 20 20 20 20 20 | 20 20 20 74 68 69 73 20 |n.. | this |
|00000200| 68 61 70 70 65 6e 73 2c | 20 74 68 65 20 73 6f 66 |happens,| the sof|
|00000210| 74 77 61 72 65 20 73 75 | 73 70 65 6e 64 73 20 69 |tware su|spends i|
|00000220| 74 73 65 6c 66 20 61 6e | 64 20 63 61 6c 6c 73 20 |tself an|d calls |
|00000230| 79 6f 75 72 20 6f 77 6e | 20 72 6f 75 74 69 6e 65 |your own| routine|
|00000240| 2c 0a 0d 20 20 20 20 20 | 20 20 20 70 65 72 68 61 |,.. | perha|
|00000250| 70 73 20 74 6f 20 64 69 | 73 70 6c 61 79 20 61 20 |ps to di|splay a |
|00000260| 68 65 6c 70 20 73 63 72 | 65 65 6e 2e 20 4e 65 61 |help scr|een. Nea|
|00000270| 72 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 74 |r the st|art of t|
|00000280| 68 65 20 4b 45 59 54 52 | 45 45 33 2e 43 0a 0d 20 |he KEYTR|EE3.C.. |
|00000290| 20 20 20 20 20 20 20 79 | 6f 75 20 77 69 6c 6c 20 | y|ou will |
|000002a0| 73 65 65 20 61 20 23 64 | 65 66 69 6e 65 20 5f 5f |see a #d|efine __|
|000002b0| 48 45 4c 50 20 74 68 61 | 74 20 68 61 73 20 62 65 |HELP tha|t has be|
|000002c0| 65 6e 20 63 6f 6d 6d 65 | 6e 74 65 64 20 6f 75 74 |en comme|nted out|
|000002d0| 2e 20 54 6f 20 75 73 65 | 0a 0d 20 20 20 20 20 20 |. To use|.. |
|000002e0| 20 20 74 68 69 73 20 66 | 61 63 69 6c 69 74 79 2c | this f|acility,|
|000002f0| 20 6a 75 73 74 20 69 6e | 73 65 72 74 20 61 20 6c | just in|sert a l|
|00000300| 69 6e 65 20 69 6e 20 4b | 45 59 54 52 45 45 33 2e |ine in K|EYTREE3.|
|00000310| 43 20 6c 69 6b 65 20 3a | 0a 0a 0d 20 20 20 20 20 |C like :|... |
|00000320| 20 20 20 20 20 20 20 20 | 20 23 64 65 66 69 6e 65 | | #define|
|00000330| 20 5f 5f 48 45 4c 50 20 | 68 65 6c 70 5f 73 63 72 | __HELP |help_scr|
|00000340| 65 65 6e 28 29 3b 0a 0a | 0d 20 20 20 20 20 20 20 |een();..|. |
|00000350| 20 77 68 65 72 65 20 68 | 65 6c 70 5f 73 63 72 65 | where h|elp_scre|
|00000360| 65 6e 28 29 20 69 73 20 | 79 6f 75 72 20 6f 77 6e |en() is |your own|
|00000370| 20 72 6f 75 74 69 6e 65 | 2e 20 44 75 72 69 6e 67 | routine|. During|
|00000380| 20 74 68 65 20 63 61 6c | 6c 20 74 6f 20 79 6f 75 | the cal|l to you|
|00000390| 72 0a 0d 20 20 20 20 20 | 20 20 20 72 6f 75 74 69 |r.. | routi|
|000003a0| 6e 65 2c 20 66 75 72 74 | 68 65 72 20 63 61 6c 6c |ne, furt|her call|
|000003b0| 73 20 74 6f 20 69 74 20 | 61 72 65 20 69 6e 68 69 |s to it |are inhi|
|000003c0| 62 69 74 65 64 20 62 79 | 20 74 68 65 20 73 65 74 |bited by| the set|
|000003d0| 74 69 6e 67 20 6f 66 20 | 61 20 67 6c 6f 62 61 6c |ting of |a global|
|000003e0| 0a 0d 20 20 20 20 20 20 | 20 20 76 61 72 69 61 62 |.. | variab|
|000003f0| 6c 65 2c 20 5f 5f 66 75 | 6e 63 74 69 6f 6e 2e 00 |le, __fu|nction..|
|00000400| bb 03 02 47 00 00 00 00 | 00 00 00 62 04 00 00 33 |...G....|...b...3|
|00000410| 33 30 00 00 00 20 20 20 | 69 69 29 20 20 6b 74 47 |30... |ii) ktG|
|00000420| 65 74 4b 65 79 20 61 6e | 64 20 6b 74 47 65 74 53 |etKey an|d ktGetS|
|00000430| 74 72 20 65 63 68 6f 20 | 69 6e 70 75 74 20 74 6f |tr echo |input to|
|00000440| 20 74 68 65 20 73 63 72 | 65 65 6e 2e 20 54 68 65 | the scr|een. The|
|00000450| 72 65 20 61 72 65 20 6f | 6e 6c 79 20 33 0a 0d 20 |re are o|nly 3.. |
|00000460| 20 20 20 20 20 20 20 70 | 6c 61 63 65 73 20 69 6e | p|laces in|
|00000470| 20 74 68 65 20 63 6f 64 | 65 20 74 68 61 74 20 61 | the cod|e that a|
|00000480| 63 74 75 61 6c 6c 79 20 | 64 6f 20 74 68 69 73 2e |ctually |do this.|
|00000490| 20 54 68 65 79 20 61 72 | 65 20 67 72 6f 75 70 65 | They ar|e groupe|
|000004a0| 64 20 74 6f 67 65 74 68 | 65 72 0a 0d 20 20 20 20 |d togeth|er.. |
|000004b0| 20 20 20 20 6e 65 61 72 | 20 74 68 65 20 73 74 61 | near| the sta|
|000004c0| 72 74 20 6f 66 20 4b 45 | 59 54 52 45 45 33 2e 43 |rt of KE|YTREE3.C|
|000004d0| 20 2e 20 54 68 65 69 72 | 20 69 6e 69 74 69 61 6c | . Their| initial|
|000004e0| 20 73 65 74 74 69 6e 67 | 20 69 73 20 61 73 20 74 | setting| is as t|
|000004f0| 68 65 0a 0d 20 20 20 20 | 20 20 20 20 73 74 61 6e |he.. | stan|
|00000500| 64 61 72 64 20 66 75 6e | 63 74 69 6f 6e 73 2c 20 |dard fun|ctions, |
|00000510| 70 75 74 63 68 61 72 28 | 29 20 61 6e 64 20 70 72 |putchar(|) and pr|
|00000520| 69 6e 74 66 28 29 2e 20 | 57 68 69 6c 73 74 20 74 |intf(). |Whilst t|
|00000530| 68 65 73 65 20 66 75 6e | 63 74 69 6f 6e 73 0a 0d |hese fun|ctions..|
|00000540| 20 20 20 20 20 20 20 20 | 61 72 65 20 4f 4b 20 66 | |are OK f|
|00000550| 6f 72 20 70 72 69 6d 69 | 74 69 76 65 20 70 72 6f |or primi|tive pro|
|00000560| 67 72 61 6d 73 2c 20 69 | 66 20 79 6f 75 72 20 63 |grams, i|f your c|
|00000570| 6f 6d 70 69 6c 65 72 20 | 70 72 6f 76 69 64 65 73 |ompiler |provides|
|00000580| 20 69 74 2c 20 79 6f 75 | 0a 0d 20 20 20 20 20 20 | it, you|.. |
|00000590| 20 20 77 6f 75 6c 64 20 | 62 65 20 66 61 72 20 62 | would |be far b|
|000005a0| 65 74 74 65 72 20 6f 66 | 66 20 75 73 69 6e 67 20 |etter of|f using |
|000005b0| 70 75 74 63 68 28 29 20 | 61 6e 64 20 63 70 72 69 |putch() |and cpri|
|000005c0| 6e 74 66 28 29 2e 20 4f | 66 20 63 6f 75 72 73 65 |ntf(). O|f course|
|000005d0| 2c 20 69 66 0a 0d 20 20 | 20 20 20 20 20 20 79 6f |, if.. | yo|
|000005e0| 75 20 61 72 65 20 75 73 | 69 6e 67 20 67 72 61 70 |u are us|ing grap|
|000005f0| 68 69 63 73 2c 20 79 6f | 75 20 77 6f 75 6c 64 20 |hics, yo|u would |
|00000600| 6e 65 65 64 20 74 6f 20 | 72 65 70 6c 61 63 65 20 |need to |replace |
|00000610| 74 68 65 6d 20 77 69 74 | 68 20 6f 75 74 74 65 78 |them wit|h outtex|
|00000620| 74 28 29 2e 0a 0d 20 20 | 20 20 20 20 20 20 49 6e |t()... | In|
|00000630| 20 74 68 69 73 20 63 61 | 73 65 2c 20 79 6f 75 20 | this ca|se, you |
|00000640| 73 68 6f 75 6c 64 20 6e | 6f 74 65 20 74 68 61 74 |should n|ote that|
|00000650| 20 74 68 65 20 5f 5f 62 | 61 63 6b 28 29 20 66 75 | the __b|ack() fu|
|00000660| 6e 63 74 69 6f 6e 20 69 | 73 20 75 73 65 64 20 74 |nction i|s used t|
|00000670| 6f 0a 0d 20 20 20 20 20 | 20 20 20 6d 6f 76 65 20 |o.. | move |
|00000680| 74 68 65 20 63 75 72 73 | 6f 72 20 62 61 63 6b 20 |the curs|or back |
|00000690| 6f 6e 65 20 73 70 61 63 | 65 20 61 6e 64 20 62 6c |one spac|e and bl|
|000006a0| 61 6e 6b 20 6f 75 74 20 | 74 68 65 20 63 68 61 72 |ank out |the char|
|000006b0| 61 63 74 65 72 20 74 68 | 65 72 65 2c 0a 0d 20 20 |acter th|ere,.. |
|000006c0| 20 20 20 20 20 20 77 68 | 65 6e 20 61 20 6c 65 66 | wh|en a lef|
|000006d0| 74 61 72 72 6f 77 20 6f | 72 20 62 61 63 6b 73 70 |tarrow o|r backsp|
|000006e0| 61 63 65 20 69 73 20 65 | 6e 74 65 72 65 64 2e 20 |ace is e|ntered. |
|000006f0| 54 68 69 73 20 6d 61 79 | 20 6e 65 65 64 20 66 75 |This may| need fu|
|00000700| 72 74 68 65 72 0a 0d 20 | 20 20 20 20 20 20 20 63 |rther.. | c|
|00000710| 68 61 6e 67 65 73 2e 0a | 0a 0d 20 20 69 69 69 29 |hanges..|.. iii)|
|00000720| 20 20 6b 74 47 65 74 4b | 65 79 20 64 69 73 70 6c | ktGetK|ey displ|
|00000730| 61 79 73 20 61 20 73 65 | 70 61 72 61 74 6f 72 20 |ays a se|parator |
|00000740| 63 68 61 72 61 63 74 65 | 72 20 62 65 74 77 65 65 |characte|r betwee|
|00000750| 6e 20 64 69 66 66 65 72 | 65 6e 74 20 70 61 72 74 |n differ|ent part|
|00000760| 73 20 6f 66 20 61 0a 0d | 20 20 20 20 20 20 20 20 |s of a..| |
|00000770| 6d 75 6c 74 69 2d 70 61 | 72 74 20 6b 65 79 2c 20 |multi-pa|rt key, |
|00000780| 75 73 69 6e 67 20 74 68 | 65 20 66 75 6e 63 74 69 |using th|e functi|
|00000790| 6f 6e 20 5f 5f 6b 74 73 | 65 70 61 72 61 74 6f 72 |on __kts|eparator|
|000007a0| 28 29 2e 20 49 6e 69 74 | 69 61 6c 6c 79 20 73 65 |(). Init|ially se|
|000007b0| 74 20 61 73 0a 0d 20 20 | 20 20 20 20 20 20 61 20 |t as.. | a |
|000007c0| 62 61 63 6b 73 6c 61 73 | 68 2c 20 79 6f 75 20 63 |backslas|h, you c|
|000007d0| 6f 75 6c 64 20 63 68 61 | 6e 67 65 20 69 74 20 74 |ould cha|nge it t|
|000007e0| 6f 20 61 6e 79 20 6f 74 | 68 65 72 20 63 68 61 72 |o any ot|her char|
|000007f0| 61 63 74 65 72 2c 20 6f | 72 20 67 65 74 20 6d 6f |acter, o|r get mo|
|00000800| 72 65 0a 0d 20 20 20 20 | 20 20 20 20 66 61 6e 63 |re.. | fanc|
|00000810| 79 20 62 79 20 72 65 70 | 6c 61 63 69 6e 67 20 69 |y by rep|lacing i|
|00000820| 74 20 77 69 74 68 20 73 | 6f 6d 65 74 68 69 6e 67 |t with s|omething|
|00000830| 20 6c 69 6b 65 20 3a 0a | 0a 0d 20 20 20 20 20 20 | like :.|.. |
|00000840| 20 20 20 20 20 63 70 72 | 69 6e 74 66 28 22 5c 6e | cpr|intf("\n|
|00000850| 5c 6e 5c 72 4e 6f 77 20 | 65 6e 74 65 72 20 74 68 |\n\rNow |enter th|
|00000860| 65 20 7a 69 70 20 63 6f | 64 65 20 3a 20 22 29 3b |e zip co|de : ");|
|00000870| 00 71 04 00 00 00 00 00 | ef 0b 00 00 36 03 00 00 |.q......|....6...|
|00000880| 33 31 30 00 00 00 20 20 | da c4 c4 c4 c4 c4 c4 c4 |310... |........|
|00000890| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 bf |........|........|
|000008a0| 0a 0d 20 20 b3 20 31 30 | 2e 20 55 54 49 4c 49 54 |.. . 10|. UTILIT|
|000008b0| 59 20 50 52 4f 47 52 41 | 4d 53 20 b3 0a 0d 20 20 |Y PROGRA|MS ... |
|000008c0| c0 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000008d0| c4 c4 c4 c4 c4 c4 c4 d9 | 0a 0a 0d 20 20 20 20 54 |........|... T|
|000008e0| 68 65 20 75 74 69 6c 69 | 74 79 20 70 72 6f 67 72 |he utili|ty progr|
|000008f0| 61 6d 73 20 70 72 6f 76 | 69 64 65 64 20 77 69 74 |ams prov|ided wit|
|00000900| 68 20 74 68 65 20 4b 65 | 79 54 72 65 65 20 55 74 |h the Ke|yTree Ut|
|00000910| 69 6c 69 74 69 65 73 20 | 61 72 65 20 3a 0a 0a 0d |ilities |are :...|
|00000920| 20 20 20 20 43 4f 4e 56 | 32 54 4f 33 2e 45 58 45 | CONV|2TO3.EXE|
|00000930| 20 77 68 69 63 68 20 63 | 6f 6e 76 65 72 74 73 20 | which c|onverts |
|00000940| 65 61 72 6c 69 65 72 20 | 4b 65 79 54 72 65 65 20 |earlier |KeyTree |
|00000950| 66 69 6c 65 73 20 74 6f | 20 76 65 72 73 69 6f 6e |files to| version|
|00000960| 20 33 20 66 6f 72 6d 61 | 74 2e 0a 0d 20 20 20 20 | 3 forma|t... |
|00000970| 49 66 20 79 6f 75 72 20 | 66 69 6c 65 20 75 73 65 |If your |file use|
|00000980| 64 20 76 61 72 69 61 62 | 6c 65 20 6c 65 6e 67 74 |d variab|le lengt|
|00000990| 68 20 6b 65 79 73 2c 20 | 74 68 65 6e 20 74 68 65 |h keys, |then the|
|000009a0| 20 63 6f 6e 76 65 72 73 | 69 6f 6e 20 69 73 20 61 | convers|ion is a|
|000009b0| 75 74 6f 6d 61 74 69 63 | 2e 0a 0d 20 20 20 20 49 |utomatic|... I|
|000009c0| 66 20 69 74 20 75 73 65 | 64 20 66 69 78 65 64 20 |f it use|d fixed |
|000009d0| 6c 65 6e 67 74 68 20 6b | 65 79 73 2c 20 69 74 20 |length k|eys, it |
|000009e0| 6d 61 79 20 62 65 20 62 | 65 63 61 75 73 65 20 74 |may be b|ecause t|
|000009f0| 68 65 20 6b 65 79 20 61 | 63 74 75 61 6c 6c 79 20 |he key a|ctually |
|00000a00| 63 6f 76 65 72 65 64 0a | 0d 20 20 20 20 6d 6f 72 |covered.|. mor|
|00000a10| 65 20 74 68 61 6e 20 6f | 6e 65 20 66 69 65 6c 64 |e than o|ne field|
|00000a20| 2e 20 49 6e 20 74 68 69 | 73 20 63 61 73 65 20 74 |. In thi|s case t|
|00000a30| 68 65 20 70 72 6f 67 72 | 61 6d 20 61 6c 6c 6f 77 |he progr|am allow|
|00000a40| 73 20 79 6f 75 20 74 6f | 20 73 70 65 63 69 66 79 |s you to| specify|
|00000a50| 20 74 68 65 0a 0d 20 20 | 20 20 6b 65 79 20 61 73 | the.. | key as|
|00000a60| 20 61 20 6d 75 6c 74 69 | 2d 70 61 72 74 20 6b 65 | a multi|-part ke|
|00000a70| 79 2e 0a 0a 0d 20 20 20 | 20 43 4c 45 41 4e 55 50 |y.... | CLEANUP|
|00000a80| 2e 45 58 45 20 77 68 69 | 63 68 20 74 69 64 69 65 |.EXE whi|ch tidie|
|00000a90| 73 20 75 70 20 79 6f 75 | 72 20 76 65 72 73 69 6f |s up you|r versio|
|00000aa0| 6e 20 33 20 66 69 6c 65 | 73 2c 20 72 65 6d 6f 76 |n 3 file|s, remov|
|00000ab0| 69 6e 67 20 64 65 61 64 | 20 73 70 61 63 65 2e 0a |ing dead| space..|
|00000ac0| 0d 20 20 20 20 44 75 65 | 20 74 6f 20 74 68 65 20 |. Due| to the |
|00000ad0| 6e 61 74 75 72 65 20 6f | 66 20 74 68 65 20 4b 65 |nature o|f the Ke|
|00000ae0| 79 54 72 65 65 20 73 79 | 73 74 65 6d 2c 20 64 65 |yTree sy|stem, de|
|00000af0| 6c 65 74 65 64 20 72 65 | 63 6f 72 64 73 20 61 72 |leted re|cords ar|
|00000b00| 65 20 6a 75 73 74 20 6d | 61 72 6b 65 64 0a 0d 20 |e just m|arked.. |
|00000b10| 20 20 20 61 73 20 64 65 | 6c 65 74 65 64 2c 20 77 | as de|leted, w|
|00000b20| 68 69 63 68 20 63 61 6e | 20 6c 65 61 64 20 74 6f |hich can| lead to|
|00000b30| 20 64 65 61 64 20 73 70 | 61 63 65 20 69 6e 20 74 | dead sp|ace in t|
|00000b40| 68 65 20 66 69 6c 65 2e | 0a 0a 0d 20 20 20 20 4d |he file.|... M|
|00000b50| 41 4e 55 41 4c 2e 45 58 | 45 20 69 73 20 74 68 69 |ANUAL.EX|E is thi|
|00000b60| 73 20 70 72 6f 67 72 61 | 6d 2e 0a 0a 0d 20 20 20 |s progra|m.... |
|00000b70| 20 53 41 4d 50 4c 45 53 | 2e 45 58 45 20 77 68 69 | SAMPLES|.EXE whi|
|00000b80| 63 68 20 70 72 6f 76 69 | 64 65 73 20 73 6f 6d 65 |ch provi|des some|
|00000b90| 20 65 78 61 6d 70 6c 65 | 73 20 6f 66 20 74 68 65 | example|s of the|
|00000ba0| 20 75 73 65 20 6f 66 20 | 74 68 65 20 73 6f 66 74 | use of |the soft|
|00000bb0| 77 61 72 65 2e 00 45 03 | 30 f0 ff ff ff 00 00 00 |ware..E.|0.......|
|00000bc0| 00 00 00 00 00 8b 2b 01 | 00 73 08 00 00 e8 fd 00 |......+.|.s......|
|00000bd0| 00 47 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.G......|........|
|00000be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 37 00 02 |........|.....7..|
|00000bf0| 73 08 00 00 00 00 00 00 | d2 04 00 00 33 31 30 00 |s.......|....310.|
|00000c00| 00 00 20 20 20 20 4c 4f | 4f 4b 2e 45 58 45 20 77 |.. LO|OK.EXE w|
|00000c10| 68 69 63 68 20 77 61 73 | 20 6f 72 69 67 69 6e 61 |hich was| origina|
|00000c20| 6c 6c 79 20 64 65 76 65 | 6c 6f 70 65 64 20 61 73 |lly deve|loped as|
|00000c30| 20 61 20 64 65 62 75 67 | 67 69 6e 67 20 74 6f 6f | a debug|ging too|
|00000c40| 6c 2c 20 62 75 74 20 63 | 61 6e 20 62 65 0a 0d 20 |l, but c|an be.. |
|00000c50| 20 20 20 75 73 65 64 20 | 61 73 20 61 20 77 61 79 | used |as a way|
|00000c60| 20 6f 66 20 63 68 65 63 | 6b 69 6e 67 20 77 68 65 | of chec|king whe|
|00000c70| 74 68 65 72 20 79 6f 75 | 72 20 6f 77 6e 20 64 61 |ther you|r own da|
|00000c80| 74 61 20 66 69 6c 65 73 | 20 61 72 65 20 62 65 69 |ta files| are bei|
|00000c90| 6e 67 20 73 65 74 20 75 | 70 0a 0d 20 20 20 20 63 |ng set u|p.. c|
|00000ca0| 6f 72 72 65 63 74 6c 79 | 2c 20 61 6e 64 20 61 6c |orrectly|, and al|
|00000cb0| 73 6f 20 64 65 6d 6f 6e | 73 74 72 61 74 65 73 20 |so demon|strates |
|00000cc0| 68 6f 77 20 74 68 65 20 | 69 6e 64 65 78 20 72 65 |how the |index re|
|00000cd0| 63 6f 72 64 20 73 79 73 | 74 65 6d 20 77 6f 72 6b |cord sys|tem work|
|00000ce0| 73 2e 0a 0a 0d 20 20 20 | 20 41 44 44 49 4e 44 45 |s.... | ADDINDE|
|00000cf0| 58 2e 45 58 45 20 74 61 | 6b 65 73 20 61 20 4b 65 |X.EXE ta|kes a Ke|
|00000d00| 79 54 72 65 65 20 66 69 | 6c 65 20 61 6e 64 20 61 |yTree fi|le and a|
|00000d10| 6c 6c 6f 77 73 20 79 6f | 75 20 74 6f 20 61 6c 74 |llows yo|u to alt|
|00000d20| 65 72 20 74 68 65 20 6b | 65 79 73 2e 20 49 74 20 |er the k|eys. It |
|00000d30| 69 73 0a 0d 20 20 20 20 | 79 6f 75 72 20 72 65 73 |is.. |your res|
|00000d40| 70 6f 6e 73 69 62 69 6c | 69 74 79 20 74 6f 20 6d |ponsibil|ity to m|
|00000d50| 61 6b 65 20 73 75 72 65 | 20 74 68 61 74 20 74 68 |ake sure| that th|
|00000d60| 65 20 72 65 63 6f 72 64 | 73 20 6f 6e 20 74 68 65 |e record|s on the|
|00000d70| 20 66 69 6c 65 20 61 6c | 6c 20 68 61 76 65 0a 0d | file al|l have..|
|00000d80| 20 20 20 20 75 6e 69 71 | 75 65 20 6b 65 79 73 20 | uniq|ue keys |
|00000d90| 75 6e 64 65 72 20 74 68 | 65 20 6e 65 77 20 69 6e |under th|e new in|
|00000da0| 64 65 78 69 6e 67 20 73 | 79 73 74 65 6d 2e 20 54 |dexing s|ystem. T|
|00000db0| 68 65 20 70 72 6f 67 72 | 61 6d 20 77 69 6c 6c 20 |he progr|am will |
|00000dc0| 74 65 6c 6c 20 79 6f 75 | 0a 0d 20 20 20 20 61 62 |tell you|.. ab|
|00000dd0| 6f 75 74 20 61 6e 79 20 | 6f 66 66 65 6e 64 69 6e |out any |offendin|
|00000de0| 67 20 72 65 63 6f 72 64 | 73 2e 20 54 68 69 73 20 |g record|s. This |
|00000df0| 69 73 20 71 75 69 74 65 | 20 61 20 75 73 65 66 75 |is quite| a usefu|
|00000e00| 6c 20 70 72 6f 67 72 61 | 6d 20 66 6f 72 20 6d 61 |l progra|m for ma|
|00000e10| 6b 69 6e 67 20 61 0a 0d | 20 20 20 20 74 65 6d 70 |king a..| temp|
|00000e20| 6f 72 61 72 79 20 76 65 | 72 73 69 6f 6e 20 6f 66 |orary ve|rsion of|
|00000e30| 20 61 20 66 69 6c 65 20 | 66 6f 72 20 61 20 73 70 | a file |for a sp|
|00000e40| 65 63 69 66 69 63 20 6f | 6e 65 2d 6f 66 66 20 75 |ecific o|ne-off u|
|00000e50| 73 65 2e 20 49 74 20 69 | 73 20 6e 6f 74 20 61 20 |se. It i|s not a |
|00000e60| 67 6f 6f 64 0a 0d 20 20 | 20 20 69 64 65 61 20 74 |good.. | idea t|
|00000e70| 6f 20 68 61 76 65 20 74 | 6f 6f 20 6d 61 6e 79 20 |o have t|oo many |
|00000e80| 69 6e 64 65 78 65 73 20 | 6f 6e 20 61 20 66 69 6c |indexes |on a fil|
|00000e90| 65 20 28 31 30 20 61 72 | 65 20 61 6c 6c 6f 77 65 |e (10 ar|e allowe|
|00000ea0| 64 29 2c 20 61 73 20 74 | 68 69 73 20 73 6c 6f 77 |d), as t|his slow|
|00000eb0| 73 0a 0d 20 20 20 20 64 | 6f 77 6e 20 74 68 65 20 |s.. d|own the |
|00000ec0| 75 70 64 61 74 69 6e 67 | 20 6f 66 20 74 68 65 20 |updating| of the |
|00000ed0| 66 69 6c 65 2e 20 48 6f | 77 65 76 65 72 2c 20 73 |file. Ho|wever, s|
|00000ee0| 75 70 70 6f 73 65 20 79 | 6f 75 20 68 61 76 65 20 |uppose y|ou have |
|00000ef0| 61 20 66 69 6c 65 20 77 | 68 69 63 68 20 68 61 73 |a file w|hich has|
|00000f00| 0a 0d 20 20 20 20 63 75 | 73 74 6f 6d 65 72 20 6e |.. cu|stomer n|
|00000f10| 75 6d 62 65 72 20 61 73 | 20 69 74 73 20 6f 6e 6c |umber as| its onl|
|00000f20| 79 20 6b 65 79 2c 20 61 | 6e 64 20 79 6f 75 20 77 |y key, a|nd you w|
|00000f30| 61 6e 74 65 64 20 74 6f | 20 66 69 6e 64 20 74 68 |anted to| find th|
|00000f40| 6f 73 65 20 63 75 73 74 | 6f 6d 65 72 73 0a 0d 20 |ose cust|omers.. |
|00000f50| 20 20 20 77 68 6f 20 6c | 69 76 65 20 69 6e 20 61 | who l|ive in a|
|00000f60| 20 63 65 72 74 61 69 6e | 20 74 6f 77 6e 2e 20 59 | certain| town. Y|
|00000f70| 6f 75 20 63 6f 75 6c 64 | 20 72 65 61 64 20 65 76 |ou could| read ev|
|00000f80| 65 72 79 20 72 65 63 6f | 72 64 2c 20 6c 6f 6f 6b |ery reco|rd, look|
|00000f90| 69 6e 67 20 66 6f 72 20 | 74 68 65 0a 0d 20 20 20 |ing for |the.. |
|00000fa0| 20 6f 6e 65 73 20 79 6f | 75 20 77 61 6e 74 2e 20 | ones yo|u want. |
|00000fb0| 49 74 20 6d 61 79 20 62 | 65 20 62 65 74 74 65 72 |It may b|e better|
|00000fc0| 20 74 6f 20 75 73 65 20 | 74 68 65 20 70 72 6f 67 | to use |the prog|
|00000fd0| 72 61 6d 20 74 6f 20 72 | 65 70 6c 61 63 65 20 74 |ram to r|eplace t|
|00000fe0| 68 65 0a 0d 20 20 20 20 | 63 75 73 74 6f 6d 65 72 |he.. |customer|
|00000ff0| 20 6e 6f 2e 20 69 6e 64 | 65 78 20 77 69 74 68 20 | no. ind|ex with |
|00001000| 61 20 6d 75 6c 74 69 2d | 70 61 72 74 20 69 6e 64 |a multi-|part ind|
|00001010| 65 78 20 6f 66 20 74 6f | 77 6e 20 61 6e 64 20 63 |ex of to|wn and c|
|00001020| 75 73 74 6f 6d 65 72 20 | 6e 75 6d 62 65 72 2e 0a |ustomer |number..|
|00001030| 0d 20 20 20 20 54 68 65 | 6e 20 61 20 71 75 69 63 |. The|n a quic|
|00001040| 6b 20 70 72 6f 67 72 61 | 6d 20 75 73 69 6e 67 20 |k progra|m using |
|00001050| 6b 74 52 65 61 64 41 6c | 6c 20 70 72 6f 76 69 64 |ktReadAl|l provid|
|00001060| 65 73 20 79 6f 75 20 77 | 00 00 68 20 74 68 65 20 |es you w|..h the |
|00001070| d2 04 00 00 00 00 0c 0d | 79 6f 75 0a 0d 20 20 20 |........|you.. |
|00001080| 20 77 61 6e 74 20 64 69 | 72 65 63 74 6c 79 2e 0a | want di|rectly..|
|00001090| 0a 0d 20 20 20 20 54 55 | 54 4f 52 2e 45 58 45 20 |.. TU|TOR.EXE |
|000010a0| 73 68 6f 77 73 20 79 6f | 75 20 68 6f 77 20 74 6f |shows yo|u how to|
|000010b0| 20 75 73 65 20 74 68 65 | 20 69 6e 64 69 76 69 64 | use the| individ|
|000010c0| 75 61 6c 20 63 6f 6d 6d | 61 6e 64 73 2e 00 e1 04 |ual comm|ands....|
|000010d0| 00 00 00 00 00 9f 14 00 | 00 c0 03 00 00 30 38 30 |........|.....080|
|000010e0| 00 05 00 df 00 e0 00 e1 | 00 d7 00 d5 00 20 20 da |........|..... .|
|000010f0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00001100| c4 c4 bf 0a 0d 20 20 b3 | 20 37 2e 20 52 45 43 4f |..... .| 7. RECO|
|00001110| 52 44 20 43 48 41 49 4e | 53 20 b3 0a 0d 20 20 c0 |RD CHAIN|S ... .|
|00001120| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00001130| c4 c4 d9 0a 0a 0d 20 20 | 20 52 65 63 6f 72 64 20 |...... | Record |
|00001140| 63 68 61 69 6e 69 6e 67 | 20 69 73 20 61 20 77 61 |chaining| is a wa|
|00001150| 79 20 6f 66 20 6c 69 6e | 6b 69 6e 67 20 74 6f 67 |y of lin|king tog|
|00001160| 65 74 68 65 72 20 61 73 | 73 6f 63 69 61 74 65 64 |ether as|sociated|
|00001170| 20 72 65 63 6f 72 64 73 | 20 77 69 74 68 6f 75 74 | records| without|
|00001180| 0a 0d 20 20 20 68 61 76 | 69 6e 67 20 74 6f 20 69 |.. hav|ing to i|
|00001190| 6e 64 65 78 20 65 61 63 | 68 20 72 65 63 6f 72 64 |ndex eac|h record|
|000011a0| 2e 20 4f 6e 6c 79 20 74 | 68 65 20 62 61 73 65 20 |. Only t|he base |
|000011b0| 72 65 63 6f 72 64 20 69 | 73 20 69 6e 64 65 78 65 |record i|s indexe|
|000011c0| 64 2c 20 61 6e 64 20 61 | 6c 74 68 6f 75 67 68 0a |d, and a|lthough.|
|000011d0| 0d 20 20 20 74 68 65 20 | 72 65 63 6f 72 64 73 20 |. the |records |
|000011e0| 63 61 6e 20 62 65 20 61 | 64 64 65 64 20 69 6e 20 |can be a|dded in |
|000011f0| 61 6e 79 20 73 65 71 75 | 65 6e 63 65 20 61 66 74 |any sequ|ence aft|
|00001200| 65 72 20 74 68 65 20 62 | 61 73 65 20 72 65 63 6f |er the b|ase reco|
|00001210| 72 64 20 61 6e 64 20 6d | 61 79 20 62 65 0a 0d 20 |rd and m|ay be.. |
|00001220| 20 20 70 68 79 73 69 63 | 61 6c 6c 79 20 6c 6f 63 | physic|ally loc|
|00001230| 61 74 65 64 20 61 6e 79 | 77 68 65 72 65 20 69 6e |ated any|where in|
|00001240| 20 74 68 65 20 66 69 6c | 65 2c 20 73 69 6d 70 6c | the fil|e, simpl|
|00001250| 65 20 63 6f 6d 6d 61 6e | 64 73 20 6c 65 61 64 20 |e comman|ds lead |
|00001260| 79 6f 75 20 74 68 72 6f | 75 67 68 0a 0d 20 20 20 |you thro|ugh.. |
|00001270| 74 68 65 20 6c 69 73 74 | 20 73 65 71 75 65 6e 74 |the list| sequent|
|00001280| 69 61 6c 6c 79 2e 0a 0a | 0d 20 20 20 54 6f 20 6d |ially...|. To m|
|00001290| 61 6b 65 20 75 73 65 20 | 6f 66 20 74 68 69 73 20 |ake use |of this |
|000012a0| 66 65 61 74 75 72 65 2c | 20 79 6f 75 20 6e 65 65 |feature,| you nee|
|000012b0| 64 20 74 6f 20 73 70 65 | 63 69 66 79 20 74 68 61 |d to spe|cify tha|
|000012c0| 74 20 63 68 61 69 6e 69 | 6e 67 20 69 73 20 61 6c |t chaini|ng is al|
|000012d0| 6c 6f 77 65 64 0a 0d 20 | 20 20 77 68 65 6e 20 79 |lowed.. | when y|
|000012e0| 6f 75 20 66 69 72 73 74 | 20 63 72 65 61 74 65 20 |ou first| create |
|000012f0| 74 68 65 20 66 69 6c 65 | 20 75 73 69 6e 67 20 6b |the file| using k|
|00001300| 74 43 72 65 61 74 65 2e | 0a 0a 0d 20 20 20 41 20 |tCreate.|... A |
|00001310| 74 79 70 69 63 61 6c 20 | 65 78 61 6d 70 6c 65 20 |typical |example |
|00001320| 6f 66 20 68 6f 77 20 74 | 68 69 73 20 6d 69 67 68 |of how t|his migh|
|00001330| 74 20 62 65 20 75 73 65 | 64 20 69 73 20 61 20 63 |t be use|d is a c|
|00001340| 75 73 74 6f 6d 65 72 20 | 66 69 6c 65 20 77 68 69 |ustomer |file whi|
|00001350| 63 68 20 61 6c 73 6f 0a | 0d 20 20 20 68 6f 6c 64 |ch also.|. hold|
|00001360| 73 20 64 65 74 61 69 6c | 73 20 6f 66 20 65 61 63 |s detail|s of eac|
|00001370| 68 20 74 65 6c 65 70 68 | 6f 6e 65 20 65 6e 71 75 |h teleph|one enqu|
|00001380| 69 72 79 20 62 79 20 74 | 68 65 20 63 75 73 74 6f |iry by t|he custo|
|00001390| 6d 65 72 2e 20 54 68 65 | 20 62 61 73 65 20 72 65 |mer. The| base re|
|000013a0| 63 6f 72 64 0a 0d 20 20 | 20 77 6f 75 6c 64 20 73 |cord.. | would s|
|000013b0| 68 6f 77 20 61 6c 6c 20 | 74 68 65 20 73 74 61 74 |how all |the stat|
|000013c0| 69 63 20 64 65 74 61 69 | 6c 73 20 6f 66 20 74 68 |ic detai|ls of th|
|000013d0| 65 20 63 75 73 74 6f 6d | 65 72 2c 20 61 6e 64 20 |e custom|er, and |
|000013e0| 74 68 65 20 63 68 61 69 | 6e 65 64 20 72 65 63 6f |the chai|ned reco|
|000013f0| 72 64 73 0a 0d 20 20 20 | 77 6f 75 6c 64 20 73 68 |rds.. |would sh|
|00001400| 6f 77 20 64 61 74 65 2c | 20 74 69 6d 65 20 61 6e |ow date,| time an|
|00001410| 64 20 64 65 74 61 69 6c | 73 20 6f 66 20 68 69 73 |d detail|s of his|
|00001420| 20 63 61 6c 6c 2e 20 54 | 68 65 6e 2c 20 77 68 65 | call. T|hen, whe|
|00001430| 6e 20 79 6f 75 72 20 70 | 72 6f 67 72 61 6d 0a 0d |n your p|rogram..|
|00001440| 20 20 20 64 69 73 70 6c | 61 79 73 20 74 68 65 20 | displ|ays the |
|00001450| 63 75 73 74 6f 6d 65 72 | 20 72 65 63 6f 72 64 2c |customer| record,|
|00001460| 20 69 74 20 63 61 6e 20 | 61 6c 73 6f 20 73 68 6f | it can |also sho|
|00001470| 77 20 64 65 74 61 69 6c | 73 20 6f 66 2c 20 73 61 |w detail|s of, sa|
|00001480| 79 2c 20 68 69 73 20 6c | 61 73 74 0a 0d 20 20 20 |y, his l|ast.. |
|00001490| 74 68 72 65 65 20 63 61 | 6c 6c 73 2e 00 cf 03 02 |three ca|lls.....|
|000014a0| d0 10 00 00 00 00 00 00 | 85 02 00 00 30 38 30 00 |........|....080.|
|000014b0| 05 00 df 00 e0 00 e1 00 | d7 00 d5 00 20 20 20 43 |........|.... C|
|000014c0| 68 61 69 6e 65 64 20 72 | 65 63 6f 72 64 73 20 61 |hained r|ecords a|
|000014d0| 72 65 20 61 64 64 65 64 | 20 74 6f 20 74 68 65 20 |re added| to the |
|000014e0| 66 69 6c 65 20 75 73 69 | 6e 67 20 6b 74 41 64 64 |file usi|ng ktAdd|
|000014f0| 43 68 61 69 6e 28 29 2e | 20 54 6f 20 73 65 65 20 |Chain().| To see |
|00001500| 64 65 74 61 69 6c 73 0a | 0d 20 20 20 6f 66 20 74 |details.|. of t|
|00001510| 68 69 73 20 63 6f 6d 6d | 61 6e 64 2c 20 70 72 65 |his comm|and, pre|
|00001520| 73 73 20 3c 30 3e 2e 20 | 54 68 65 20 72 65 63 6f |ss <0>. |The reco|
|00001530| 72 64 20 69 73 20 61 64 | 64 65 64 20 6c 6f 67 69 |rd is ad|ded logi|
|00001540| 63 61 6c 6c 79 20 62 65 | 74 77 65 65 6e 20 74 68 |cally be|tween th|
|00001550| 65 20 6c 61 73 74 0a 0d | 20 20 20 72 65 63 6f 72 |e last..| recor|
|00001560| 64 20 72 65 61 64 20 61 | 6e 64 20 74 68 65 20 6e |d read a|nd the n|
|00001570| 65 78 74 20 72 65 63 6f | 72 64 20 69 6e 20 74 68 |ext reco|rd in th|
|00001580| 65 20 63 68 61 69 6e 2e | 0a 0a 0d 20 20 20 43 68 |e chain.|... Ch|
|00001590| 61 69 6e 65 64 20 72 65 | 63 6f 72 64 73 20 61 72 |ained re|cords ar|
|000015a0| 65 20 72 65 61 64 20 75 | 73 69 6e 67 20 6b 74 4e |e read u|sing ktN|
|000015b0| 65 78 74 43 68 61 69 6e | 28 29 20 20 28 70 72 65 |extChain|() (pre|
|000015c0| 73 73 20 3c 31 3e 29 0a | 0d 20 20 20 20 20 20 20 |ss <1>).|. |
|000015d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000015e0| 20 20 20 20 20 20 20 61 | 6e 64 20 6b 74 50 72 65 | a|nd ktPre|
|000015f0| 76 43 68 61 69 6e 28 29 | 20 20 28 70 72 65 73 73 |vChain()| (press|
|00001600| 20 3c 32 3e 29 0a 0a 0d | 20 20 20 43 68 61 69 6e | <2>)...| Chain|
|00001610| 65 64 20 72 65 63 6f 72 | 64 73 20 61 72 65 20 61 |ed recor|ds are a|
|00001620| 6d 65 6e 64 65 64 20 62 | 79 20 66 69 72 73 74 20 |mended b|y first |
|00001630| 72 65 61 64 69 6e 67 20 | 74 68 65 20 72 65 63 6f |reading |the reco|
|00001640| 72 64 2c 20 61 73 20 61 | 62 6f 76 65 2c 20 61 6e |rd, as a|bove, an|
|00001650| 64 0a 0d 20 20 20 74 68 | 65 6e 20 75 73 69 6e 67 |d.. th|en using|
|00001660| 20 6b 74 52 65 77 72 69 | 74 65 28 29 20 28 70 72 | ktRewri|te() (pr|
|00001670| 65 73 73 20 3c 33 3e 29 | 0a 0d 20 20 20 20 20 20 |ess <3>)|.. |
|00001680| 20 20 20 20 20 20 6f 72 | 20 6b 74 44 65 6c 65 74 | or| ktDelet|
|00001690| 65 28 29 20 28 70 72 65 | 73 73 20 3c 34 3e 29 0a |e() (pre|ss <4>).|
|000016a0| 0a 0d 20 20 20 49 66 20 | 79 6f 75 20 64 65 6c 65 |.. If |you dele|
|000016b0| 74 65 20 61 20 62 61 73 | 65 20 72 65 63 6f 72 64 |te a bas|e record|
|000016c0| 2c 20 74 68 65 6e 20 61 | 6c 6c 20 69 74 73 20 63 |, then a|ll its c|
|000016d0| 68 61 69 6e 65 64 20 72 | 65 63 6f 72 64 73 20 61 |hained r|ecords a|
|000016e0| 72 65 20 61 6c 73 6f 0a | 0d 20 20 20 64 65 6c 65 |re also.|. dele|
|000016f0| 74 65 64 2c 20 62 75 74 | 20 69 6e 64 69 76 69 64 |ted, but| individ|
|00001700| 75 61 6c 20 63 68 61 69 | 6e 65 64 20 72 65 63 6f |ual chai|ned reco|
|00001710| 72 64 73 20 63 61 6e 20 | 62 65 20 64 65 6c 65 74 |rds can |be delet|
|00001720| 65 64 20 6f 6e 20 74 68 | 65 69 72 20 6f 77 6e 2e |ed on th|eir own.|
|00001730| 00 94 02 00 00 00 00 00 | fb 1a 00 00 82 03 00 00 |........|........|
|00001740| 30 37 30 00 08 00 ce 00 | e4 00 e5 00 e6 00 e7 00 |070.....|........|
|00001750| d6 00 d7 00 d5 00 20 20 | da c4 c4 c4 c4 c4 c4 c4 |...... |........|
|00001760| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00001770| c4 bf 0a 0d 20 20 b3 20 | 36 2e 20 50 48 59 53 49 |.... . |6. PHYSI|
|00001780| 43 41 4c 20 50 52 4f 43 | 45 53 53 49 4e 47 20 b3 |CAL PROC|ESSING .|
|00001790| 0a 0d 20 20 c0 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.. ....|........|
|000017a0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 d9 0a 0a |........|........|
|000017b0| 0d 20 20 50 68 79 73 69 | 63 61 6c 20 70 72 6f 63 |. Physi|cal proc|
|000017c0| 65 73 73 69 6e 67 20 69 | 73 20 61 20 77 61 79 20 |essing i|s a way |
|000017d0| 6f 66 20 61 64 64 69 6e | 67 20 72 65 63 6f 72 64 |of addin|g record|
|000017e0| 73 20 74 6f 20 79 6f 75 | 72 20 66 69 6c 65 20 77 |s to you|r file w|
|000017f0| 69 74 68 6f 75 74 20 6b | 65 79 73 2e 0a 0d 20 20 |ithout k|eys... |
|00001800| 49 74 20 69 73 20 75 73 | 65 64 20 65 69 74 68 65 |It is us|ed eithe|
|00001810| 72 20 77 68 65 6e 20 79 | 6f 75 20 6b 6e 6f 77 20 |r when y|ou know |
|00001820| 65 78 61 63 74 6c 79 20 | 77 68 65 72 65 20 74 68 |exactly |where th|
|00001830| 65 20 72 65 63 6f 72 64 | 20 77 69 6c 6c 20 62 65 |e record| will be|
|00001840| 20 69 6e 20 74 68 65 0a | 0d 20 20 66 69 6c 65 20 | in the.|. file |
|00001850| 28 75 73 75 61 6c 6c 79 | 20 74 68 65 20 66 69 72 |(usually| the fir|
|00001860| 73 74 20 70 68 79 73 69 | 63 61 6c 20 72 65 63 6f |st physi|cal reco|
|00001870| 72 64 29 2c 20 6f 72 20 | 79 6f 75 20 64 6f 20 6e |rd), or |you do n|
|00001880| 6f 74 20 63 61 72 65 20 | 61 62 6f 75 74 20 74 68 |ot care |about th|
|00001890| 65 0a 0d 20 20 6f 72 64 | 65 72 20 69 6e 20 77 68 |e.. ord|er in wh|
|000018a0| 69 63 68 20 74 68 65 20 | 72 65 63 6f 72 64 73 20 |ich the |records |
|000018b0| 61 72 65 20 70 72 6f 63 | 65 73 73 65 64 2e 0a 0a |are proc|essed...|
|000018c0| 0d 20 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 2c |. For i|nstance,|
|000018d0| 20 79 6f 75 20 6d 69 67 | 68 74 20 63 68 6f 6f 73 | you mig|ht choos|
|000018e0| 65 20 74 6f 20 68 61 76 | 65 20 74 68 65 20 66 69 |e to hav|e the fi|
|000018f0| 72 73 74 20 72 65 63 6f | 72 64 20 69 6e 20 74 68 |rst reco|rd in th|
|00001900| 65 20 66 69 6c 65 20 63 | 6f 6e 74 61 69 6e 0a 0d |e file c|ontain..|
|00001910| 20 20 64 65 74 61 69 6c | 73 20 75 73 65 64 20 61 | detail|s used a|
|00001920| 74 20 74 68 65 20 73 74 | 61 72 74 20 6f 66 20 61 |t the st|art of a|
|00001930| 20 70 72 6f 67 72 61 6d | 2c 20 73 75 63 68 20 61 | program|, such a|
|00001940| 73 20 64 61 74 65 20 6f | 66 20 6c 61 73 74 20 72 |s date o|f last r|
|00001950| 75 6e 2e 20 4f 72 2c 20 | 79 6f 75 0a 0d 20 20 6d |un. Or, |you.. m|
|00001960| 69 67 68 74 20 77 61 6e | 74 20 74 6f 20 70 72 6f |ight wan|t to pro|
|00001970| 64 75 63 65 20 61 20 74 | 65 6d 70 6f 72 61 72 79 |duce a t|emporary|
|00001980| 20 66 69 6c 65 20 6f 66 | 20 72 65 63 6f 72 64 73 | file of| records|
|00001990| 20 66 6f 72 20 6c 61 74 | 65 72 20 70 72 6f 63 65 | for lat|er proce|
|000019a0| 73 73 69 6e 67 2e 20 49 | 66 0a 0d 20 20 74 68 65 |ssing. I|f.. the|
|000019b0| 20 73 65 71 75 65 6e 63 | 65 20 6f 66 20 74 68 65 | sequenc|e of the|
|000019c0| 20 72 65 63 6f 72 64 73 | 20 69 73 20 69 6d 6d 61 | records| is imma|
|000019d0| 74 65 72 69 61 6c 2c 20 | 70 68 79 73 69 63 61 6c |terial, |physical|
|000019e0| 20 70 72 6f 63 65 73 73 | 69 6e 67 20 69 73 20 6d | process|ing is m|
|000019f0| 75 63 68 0a 0d 20 20 66 | 61 73 74 65 72 2c 20 73 |uch.. f|aster, s|
|00001a00| 69 6e 63 65 20 74 68 65 | 72 65 20 69 73 20 6e 6f |ince the|re is no|
|00001a10| 20 6e 65 65 64 20 74 6f | 20 75 70 64 61 74 65 20 | need to| update |
|00001a20| 69 6e 64 65 78 65 73 2e | 0a 0a 0d 20 20 50 68 79 |indexes.|... Phy|
|00001a30| 73 69 63 61 6c 20 72 65 | 63 6f 72 64 73 20 61 72 |sical re|cords ar|
|00001a40| 65 20 61 64 64 65 64 20 | 74 6f 20 61 20 66 69 6c |e added |to a fil|
|00001a50| 65 20 75 73 69 6e 67 20 | 6b 74 41 64 64 50 68 79 |e using |ktAddPhy|
|00001a60| 73 20 28 70 72 65 73 73 | 20 3c 30 3e 20 74 6f 20 |s (press| <0> to |
|00001a70| 73 65 65 0a 0d 20 20 6d | 6f 72 65 20 64 65 74 61 |see.. m|ore deta|
|00001a80| 69 6c 73 29 2e 20 54 68 | 65 20 72 65 63 6f 72 64 |ils). Th|e record|
|00001a90| 20 69 73 20 61 6c 77 61 | 79 73 20 61 64 64 65 64 | is alwa|ys added|
|00001aa0| 20 61 74 20 74 68 65 20 | 70 68 79 73 69 63 61 6c | at the |physical|
|00001ab0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 66 69 6c 65 | end of |the file|
|00001ac0| 2e 00 91 03 30 f0 ff ff | ff 00 00 00 00 00 00 00 |....0...|........|
|00001ad0| 00 2e c9 00 00 a3 33 00 | 00 5e 30 00 00 35 1f 00 |......3.|.^0..5..|
|00001ae0| 00 1b 23 00 00 b6 25 00 | 00 54 cb 00 00 33 17 00 |..#...%.|.T...3..|
|00001af0| 00 d0 10 00 00 98 1e 01 | 00 37 00 02 33 17 00 00 |........|.7..3...|
|00001b00| 00 00 00 00 2b 04 00 00 | 30 37 30 00 08 00 ce 00 |....+...|070.....|
|00001b10| e4 00 e5 00 e6 00 e7 00 | d6 00 d7 00 d5 00 20 20 |........|...... |
|00001b20| 59 6f 75 20 63 61 6e 20 | 72 65 61 64 20 74 68 65 |You can |read the|
|00001b30| 20 66 69 72 73 74 20 70 | 68 79 73 69 63 61 6c 20 | first p|hysical |
|00001b40| 72 65 63 6f 72 64 20 75 | 73 69 6e 67 20 6b 74 53 |record u|sing ktS|
|00001b50| 74 61 72 74 50 68 79 73 | 20 28 70 72 65 73 73 20 |tartPhys| (press |
|00001b60| 3c 31 3e 29 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |<1>).. | |
|00001b70| 20 20 6f 72 20 74 68 65 | 20 6c 61 73 74 20 20 70 | or the| last p|
|00001b80| 68 79 73 69 63 61 6c 20 | 72 65 63 6f 72 64 20 75 |hysical |record u|
|00001b90| 73 69 6e 67 20 6b 74 45 | 6e 64 50 68 79 73 20 20 |sing ktE|ndPhys |
|00001ba0| 20 28 70 72 65 73 73 20 | 3c 32 3e 29 0a 0d 20 20 | (press |<2>).. |
|00001bb0| 20 20 20 20 20 20 20 20 | 20 20 6f 72 20 74 68 65 | | or the|
|00001bc0| 20 6e 65 78 74 20 20 70 | 68 79 73 69 63 61 6c 20 | next p|hysical |
|00001bd0| 72 65 63 6f 72 64 20 75 | 73 69 6e 67 20 6b 74 4e |record u|sing ktN|
|00001be0| 65 78 74 50 68 79 73 20 | 20 28 70 72 65 73 73 20 |extPhys | (press |
|00001bf0| 3c 33 3e 29 0a 0d 20 20 | 20 20 20 20 20 20 20 6f |<3>).. | o|
|00001c00| 72 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 20 70 |r the pr|evious p|
|00001c10| 68 79 73 69 63 61 6c 20 | 72 65 63 6f 72 64 20 75 |hysical |record u|
|00001c20| 73 69 6e 67 20 6b 74 50 | 72 65 76 50 68 79 73 20 |sing ktP|revPhys |
|00001c30| 20 28 70 72 65 73 73 20 | 3c 34 3e 29 2e 0a 0a 0d | (press |<4>)....|
|00001c40| 20 20 54 68 65 20 72 65 | 63 6f 72 64 20 72 65 61 | The re|cord rea|
|00001c50| 64 20 6d 61 79 20 6f 72 | 20 6d 61 79 20 6e 6f 74 |d may or| may not|
|00001c60| 20 62 65 20 69 6e 64 65 | 78 65 64 2c 20 73 6f 20 | be inde|xed, so |
|00001c70| 74 68 65 20 63 6f 6d 6d | 61 6e 64 73 20 73 68 6f |the comm|ands sho|
|00001c80| 75 6c 64 20 62 65 20 75 | 73 65 64 0a 0d 20 20 77 |uld be u|sed.. w|
|00001c90| 69 74 68 20 63 61 72 65 | 2e 20 54 68 65 20 72 65 |ith care|. The re|
|00001ca0| 74 75 72 6e 20 76 61 6c | 75 65 20 6f 66 20 74 68 |turn val|ue of th|
|00001cb0| 65 20 70 68 79 73 69 63 | 61 6c 20 72 65 61 64 73 |e physic|al reads|
|00001cc0| 20 69 73 20 74 68 65 20 | 6c 65 6e 67 74 68 20 6f | is the |length o|
|00001cd0| 66 20 74 68 65 0a 0d 20 | 20 72 65 63 6f 72 64 20 |f the.. | record |
|00001ce0| 69 6e 20 62 79 74 65 73 | 2c 20 42 55 54 20 69 66 |in bytes|, BUT if|
|00001cf0| 20 74 68 65 20 72 65 74 | 75 72 6e 20 76 61 6c 75 | the ret|urn valu|
|00001d00| 65 20 69 73 20 6e 65 67 | 61 74 69 76 65 2c 20 74 |e is neg|ative, t|
|00001d10| 68 69 73 20 6d 65 61 6e | 73 20 74 68 61 74 20 74 |his mean|s that t|
|00001d20| 68 65 0a 0d 20 20 72 65 | 63 6f 72 64 20 63 6f 6e |he.. re|cord con|
|00001d30| 63 65 72 6e 65 64 20 68 | 61 73 20 62 65 65 6e 20 |cerned h|as been |
|00001d40| 64 65 6c 65 74 65 64 20 | 61 6e 64 20 73 68 6f 75 |deleted |and shou|
|00001d50| 6c 64 20 62 65 20 69 67 | 6e 6f 72 65 64 20 75 6e |ld be ig|nored un|
|00001d60| 6c 65 73 73 20 79 6f 75 | 20 61 72 65 0a 0d 20 20 |less you| are.. |
|00001d70| 72 65 73 74 6f 72 69 6e | 67 20 61 6e 20 61 63 63 |restorin|g an acc|
|00001d80| 69 64 65 6e 74 61 6c 6c | 79 20 64 65 6c 65 74 65 |identall|y delete|
|00001d90| 64 20 72 65 63 6f 72 64 | 20 75 73 69 6e 67 20 6b |d record| using k|
|00001da0| 74 55 6e 64 65 6c 65 74 | 65 20 28 70 72 65 73 73 |tUndelet|e (press|
|00001db0| 20 3c 35 3e 29 2e 0a 0a | 0d 20 20 50 68 79 73 69 | <5>)...|. Physi|
|00001dc0| 63 61 6c 20 72 65 63 6f | 72 64 73 20 61 72 65 20 |cal reco|rds are |
|00001dd0| 61 6d 65 6e 64 65 64 20 | 75 73 69 6e 67 20 6b 74 |amended |using kt|
|00001de0| 52 65 77 72 69 74 65 20 | 28 70 72 65 73 73 20 3c |Rewrite |(press <|
|00001df0| 36 3e 29 20 61 6e 64 20 | 64 65 6c 65 74 65 64 20 |6>) and |deleted |
|00001e00| 75 73 69 6e 67 0a 0d 20 | 20 6b 74 44 65 6c 65 74 |using.. | ktDelet|
|00001e10| 65 20 28 70 72 65 73 73 | 20 3c 37 3e 29 2e 20 49 |e (press| <7>). I|
|00001e20| 66 20 79 6f 75 20 61 6d | 65 6e 64 20 61 20 72 65 |f you am|end a re|
|00001e30| 63 6f 72 64 20 73 6f 20 | 74 68 61 74 20 69 74 20 |cord so |that it |
|00001e40| 69 73 20 6e 6f 77 20 6c | 6f 6e 67 65 72 20 74 68 |is now l|onger th|
|00001e50| 61 6e 0a 0d 20 20 69 74 | 20 77 61 73 2c 20 74 68 |an.. it| was, th|
|00001e60| 65 20 72 65 63 6f 72 64 | 20 69 73 20 70 68 79 73 |e record| is phys|
|00001e70| 69 63 61 6c 6c 79 20 72 | 65 6c 6f 63 61 74 65 64 |ically r|elocated|
|00001e80| 20 61 74 20 74 68 65 20 | 65 6e 64 20 6f 66 20 74 | at the |end of t|
|00001e90| 68 65 20 66 69 6c 65 2e | 20 49 6e 20 74 68 69 73 |he file.| In this|
|00001ea0| 0a 0d 20 20 63 61 73 65 | 2c 20 79 6f 75 20 6e 6f |.. case|, you no|
|00001eb0| 20 6c 6f 6e 67 65 72 20 | 6b 6e 6f 77 20 65 78 61 | longer |know exa|
|00001ec0| 63 74 6c 79 20 77 68 65 | 72 65 20 74 68 65 20 72 |ctly whe|re the r|
|00001ed0| 65 63 6f 72 64 20 69 73 | 2e 20 53 6f 2c 20 69 66 |ecord is|. So, if|
|00001ee0| 20 79 6f 75 20 65 78 70 | 65 63 74 20 74 68 65 0a | you exp|ect the.|
|00001ef0| 0d 20 20 72 65 63 6f 72 | 64 20 74 6f 20 62 65 20 |. recor|d to be |
|00001f00| 61 74 20 74 68 65 20 73 | 74 61 72 74 20 6f 66 20 |at the s|tart of |
|00001f10| 74 68 65 20 66 69 6c 65 | 2c 20 64 6f 20 6e 6f 74 |the file|, do not|
|00001f20| 20 61 6c 74 65 72 20 69 | 74 73 20 6c 65 6e 67 74 | alter i|ts lengt|
|00001f30| 68 2e 00 3a 04 00 00 00 | 00 00 00 00 00 00 d7 03 |h..:....|........|
|00001f40| 00 00 30 33 30 00 04 00 | c9 00 cc 00 ca 00 cb 00 |..030...|........|
|00001f50| 20 20 da c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | ......|........|
|00001f60| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 bf |........|........|
|00001f70| 0a 0d 20 20 b3 20 32 2e | 20 4f 50 45 4e 49 4e 47 |.. . 2.| OPENING|
|00001f80| 20 26 20 43 4c 4f 53 49 | 4e 47 20 46 49 4c 45 53 | & CLOSI|NG FILES|
|00001f90| 20 b3 0a 0d 20 20 c0 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | ... ..|........|
|00001fa0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00001fb0| c4 c4 c4 d9 0a 0a 0d 20 | 20 42 65 66 6f 72 65 20 |....... | Before |
|00001fc0| 79 6f 75 20 63 61 6e 20 | 72 65 61 64 20 66 72 6f |you can |read fro|
|00001fd0| 6d 2c 20 6f 72 20 77 72 | 69 74 65 20 74 6f 2c 20 |m, or wr|ite to, |
|00001fe0| 61 20 4b 65 79 54 72 65 | 65 20 66 69 6c 65 2c 20 |a KeyTre|e file, |
|00001ff0| 79 6f 75 20 6d 75 73 74 | 20 6f 70 65 6e 20 69 74 |you must| open it|
|00002000| 0a 0d 20 20 75 73 69 6e | 67 20 6b 74 4f 70 65 6e |.. usin|g ktOpen|
|00002010| 20 28 70 72 65 73 73 20 | 3c 30 3e 20 74 6f 20 73 | (press |<0> to s|
|00002020| 65 65 20 6d 6f 72 65 20 | 64 65 74 61 69 6c 73 29 |ee more |details)|
|00002030| 2c 20 61 6e 64 20 77 68 | 65 6e 20 79 6f 75 20 68 |, and wh|en you h|
|00002040| 61 76 65 20 66 69 6e 69 | 73 68 65 64 0a 0d 20 20 |ave fini|shed.. |
|00002050| 75 73 69 6e 67 20 74 68 | 65 20 66 69 6c 65 2c 20 |using th|e file, |
|00002060| 79 6f 75 20 73 68 6f 75 | 6c 64 20 63 6c 6f 73 65 |you shou|ld close|
|00002070| 20 69 74 20 75 73 69 6e | 67 20 6b 74 43 6c 6f 73 | it usin|g ktClos|
|00002080| 65 20 28 70 72 65 73 73 | 20 3c 31 3e 29 20 74 6f |e (press| <1>) to|
|00002090| 20 74 69 64 79 20 75 70 | 0a 0d 20 20 6d 65 6d 6f | tidy up|.. memo|
|000020a0| 72 79 20 61 6c 6c 6f 63 | 61 74 69 6f 6e 73 2e 0a |ry alloc|ations..|
|000020b0| 0a 0d 20 20 6b 74 4f 70 | 65 6e 20 72 65 74 75 72 |.. ktOp|en retur|
|000020c0| 6e 73 20 74 68 65 20 66 | 69 6c 65 20 6e 75 6d 62 |ns the f|ile numb|
|000020d0| 65 72 20 77 68 69 63 68 | 20 6d 75 73 74 20 62 65 |er which| must be|
|000020e0| 20 75 73 65 64 20 69 6e | 20 61 6c 6c 20 66 75 72 | used in| all fur|
|000020f0| 74 68 65 72 20 72 65 66 | 65 72 65 6e 63 65 73 0a |ther ref|erences.|
|00002100| 0d 20 20 74 6f 20 74 68 | 69 73 20 66 69 6c 65 2e |. to th|is file.|
|00002110| 20 57 68 65 6e 20 79 6f | 75 20 6f 70 65 6e 20 61 | When yo|u open a|
|00002120| 20 66 69 6c 65 2c 20 79 | 6f 75 20 64 65 63 69 64 | file, y|ou decid|
|00002130| 65 20 77 68 69 63 68 20 | 6b 65 79 20 69 73 20 74 |e which |key is t|
|00002140| 6f 20 62 65 20 74 68 65 | 0a 0d 20 20 61 63 74 69 |o be the|.. acti|
|00002150| 76 65 20 6f 6e 65 20 28 | 4e 42 2e 20 74 68 65 20 |ve one (|NB. the |
|00002160| 6b 65 79 73 20 61 72 65 | 20 6e 75 6d 62 65 72 65 |keys are| numbere|
|00002170| 64 20 66 72 6f 6d 20 30 | 29 2c 20 69 2e 65 2e 20 |d from 0|), i.e. |
|00002180| 74 68 65 20 6b 65 79 20 | 77 68 69 63 68 20 69 73 |the key |which is|
|00002190| 20 75 73 65 64 0a 0d 20 | 20 66 6f 72 20 61 6c 6c | used.. | for all|
|000021a0| 20 27 72 65 61 64 73 27 | 2e 20 57 68 65 6e 20 79 | 'reads'|. When y|
|000021b0| 6f 75 20 61 64 64 20 6b | 65 79 65 64 20 72 65 63 |ou add k|eyed rec|
|000021c0| 6f 72 64 73 2c 20 61 6c | 6c 20 74 68 65 20 69 6e |ords, al|l the in|
|000021d0| 64 65 78 65 73 20 61 72 | 65 20 75 70 64 61 74 65 |dexes ar|e update|
|000021e0| 64 0a 0d 20 20 61 75 74 | 6f 6d 61 74 69 63 61 6c |d.. aut|omatical|
|000021f0| 6c 79 2e 20 49 66 20 79 | 6f 75 20 77 61 6e 74 20 |ly. If y|ou want |
|00002200| 74 6f 20 63 68 61 6e 67 | 65 20 74 68 65 20 61 63 |to chang|e the ac|
|00002210| 74 69 76 65 20 6b 65 79 | 20 64 75 72 69 6e 67 20 |tive key| during |
|00002220| 61 20 70 72 6f 67 72 61 | 6d 2c 20 79 6f 75 0a 0d |a progra|m, you..|
|00002230| 20 20 75 73 65 20 6b 74 | 43 68 61 6e 67 65 49 6e | use kt|ChangeIn|
|00002240| 64 65 78 20 28 70 72 65 | 73 73 20 3c 32 3e 29 2e |dex (pre|ss <2>).|
|00002250| 0a 0a 0d 20 20 6b 74 46 | 6c 75 73 68 20 28 70 72 |... ktF|lush (pr|
|00002260| 65 73 73 20 3c 33 3e 29 | 20 63 6c 6f 73 65 73 20 |ess <3>)| closes |
|00002270| 61 6e 64 20 72 65 6f 70 | 65 6e 73 20 74 68 65 20 |and reop|ens the |
|00002280| 66 69 6c 65 2c 20 65 6e | 73 75 72 69 6e 67 20 74 |file, en|suring t|
|00002290| 68 61 74 20 61 6e 79 20 | 61 6d 65 6e 64 65 64 0a |hat any |amended.|
|000022a0| 0d 20 20 72 65 63 6f 72 | 64 73 20 61 72 65 20 70 |. recor|ds are p|
|000022b0| 68 79 73 69 63 61 6c 6c | 79 20 77 72 69 74 74 65 |hysicall|y writte|
|000022c0| 6e 20 74 6f 20 74 68 65 | 20 66 69 6c 65 2c 20 69 |n to the| file, i|
|000022d0| 6e 20 63 61 73 65 20 79 | 6f 75 72 20 50 43 20 64 |n case y|our PC d|
|000022e0| 65 63 69 64 65 73 20 74 | 6f 0a 0d 20 20 70 6f 77 |ecides t|o.. pow|
|000022f0| 65 72 20 64 6f 77 6e 20 | 77 68 69 6c 65 20 79 6f |er down |while yo|
|00002300| 75 20 61 72 65 20 72 75 | 6e 6e 69 6e 67 20 61 20 |u are ru|nning a |
|00002310| 70 72 6f 67 72 61 6d 2e | 00 e6 03 00 00 00 00 00 |program.|........|
|00002320| 00 00 00 00 8c 02 00 00 | 30 34 30 00 05 00 cd 00 |........|040.....|
|00002330| 46 00 ce 00 50 00 df 00 | 20 20 da c4 c4 c4 c4 c4 |F...P...| ......|
|00002340| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 bf 0a |........|........|
|00002350| 0d 20 20 b3 20 33 2e 20 | 41 44 44 49 4e 47 20 52 |. . 3. |ADDING R|
|00002360| 45 43 4f 52 44 53 20 b3 | 0a 0d 20 20 c0 c4 c4 c4 |ECORDS .|.. ....|
|00002370| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00002380| d9 0a 0a 0d 20 20 54 6f | 20 61 64 64 20 6b 65 79 |.... To| add key|
|00002390| 65 64 20 72 65 63 6f 72 | 64 73 20 74 6f 20 61 20 |ed recor|ds to a |
|000023a0| 4b 65 79 54 72 65 65 20 | 66 69 6c 65 2c 20 79 6f |KeyTree |file, yo|
|000023b0| 75 20 75 73 65 20 6b 74 | 41 64 64 20 28 70 72 65 |u use kt|Add (pre|
|000023c0| 73 73 20 3c 30 3e 20 74 | 6f 20 73 65 65 0a 0d 20 |ss <0> t|o see.. |
|000023d0| 20 6d 6f 72 65 20 64 65 | 74 61 69 6c 73 29 2e 20 | more de|tails). |
|000023e0| 41 6c 6c 20 6f 66 20 74 | 68 65 20 69 6e 64 65 78 |All of t|he index|
|000023f0| 65 73 20 61 72 65 20 61 | 75 74 6f 6d 61 74 69 63 |es are a|utomatic|
|00002400| 61 6c 6c 79 20 75 70 64 | 61 74 65 64 2e 20 54 68 |ally upd|ated. Th|
|00002410| 65 20 6b 65 79 20 66 69 | 65 6c 64 73 0a 0d 20 20 |e key fi|elds.. |
|00002420| 69 6e 20 74 68 65 20 72 | 65 63 6f 72 64 20 6d 75 |in the r|ecord mu|
|00002430| 73 74 20 6e 6f 74 20 61 | 6c 72 65 61 64 79 20 65 |st not a|lready e|
|00002440| 78 69 73 74 20 69 6e 20 | 61 6e 79 20 6f 66 20 74 |xist in |any of t|
|00002450| 68 65 20 69 6e 64 65 78 | 65 73 2c 20 6f 74 68 65 |he index|es, othe|
|00002460| 72 77 69 73 65 20 74 68 | 65 0a 0d 20 20 6b 74 41 |rwise th|e.. ktA|
|00002470| 64 64 20 77 69 6c 6c 20 | 66 61 69 6c 20 61 6e 64 |dd will |fail and|
|00002480| 20 6b 74 45 52 52 4e 4f | 20 77 69 6c 6c 20 63 6f | ktERRNO| will co|
|00002490| 6e 74 61 69 6e 20 34 6e | 2c 20 77 68 65 72 65 20 |ntain 4n|, where |
|000024a0| 6e 20 69 73 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |n is the| number |
|000024b0| 6f 66 20 74 68 65 0a 0d | 20 20 69 6e 64 65 78 20 |of the..| index |
|000024c0| 77 68 69 63 68 20 68 61 | 73 20 74 68 65 20 64 75 |which ha|s the du|
|000024d0| 70 6c 69 63 61 74 65 2e | 0a 0a 0d 20 20 49 66 20 |plicate.|... If |
|000024e0| 79 6f 75 20 61 72 65 20 | 75 73 69 6e 67 20 70 68 |you are |using ph|
|000024f0| 79 73 69 63 61 6c 20 70 | 72 6f 63 65 73 73 69 6e |ysical p|rocessin|
|00002500| 67 20 28 70 72 65 73 73 | 20 3c 31 3e 29 2c 20 79 |g (press| <1>), y|
|00002510| 6f 75 20 61 64 64 20 72 | 65 63 6f 72 64 73 20 75 |ou add r|ecords u|
|00002520| 73 69 6e 67 0a 0d 20 20 | 6b 74 41 64 64 50 68 79 |sing.. |ktAddPhy|
|00002530| 73 20 28 70 72 65 73 73 | 20 3c 32 3e 29 2e 0a 0a |s (press| <2>)...|
|00002540| 0d 20 20 49 66 20 79 6f | 75 20 61 72 65 20 69 6e |. If yo|u are in|
|00002550| 73 65 72 74 69 6e 67 20 | 61 20 72 65 63 6f 72 64 |serting |a record|
|00002560| 20 69 6e 74 6f 20 61 20 | 72 65 63 6f 72 64 20 63 | into a |record c|
|00002570| 68 61 69 6e 20 28 70 72 | 65 73 73 20 3c 33 3e 29 |hain (pr|ess <3>)|
|00002580| 2c 20 79 6f 75 20 61 64 | 64 20 61 0a 0d 20 20 72 |, you ad|d a.. r|
|00002590| 65 63 6f 72 64 20 75 73 | 69 6e 67 20 6b 74 41 64 |ecord us|ing ktAd|
|000025a0| 64 43 68 61 69 6e 20 28 | 70 72 65 73 73 20 3c 34 |dChain (|press <4|
|000025b0| 3e 29 2e 00 9b 02 00 00 | 00 00 00 e7 28 00 00 22 |>)......|....(.."|
|000025c0| 03 00 00 30 35 30 00 0d | 00 cf 00 d0 00 d1 00 e2 |...050..|........|
|000025d0| 00 d3 00 e3 00 d4 00 db | 00 dc 00 dd 00 de 00 46 |........|.......F|
|000025e0| 00 50 00 20 20 da c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.P. ...|........|
|000025f0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 bf 0a 0d 20 20 b3 |........|..... .|
|00002600| 20 34 2e 20 52 45 41 44 | 49 4e 47 20 52 45 43 4f | 4. READ|ING RECO|
|00002610| 52 44 53 20 b3 0a 0d 20 | 20 c0 c4 c4 c4 c4 c4 c4 |RDS ... | .......|
|00002620| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 d9 0a |........|........|
|00002630| 0a 0d 20 20 49 66 20 79 | 6f 75 20 6b 6e 6f 77 20 |.. If y|ou know |
|00002640| 74 68 65 20 6b 65 79 20 | 6f 66 20 74 68 65 20 72 |the key |of the r|
|00002650| 65 63 6f 72 64 20 79 6f | 75 20 77 61 6e 74 20 74 |ecord yo|u want t|
|00002660| 6f 20 72 65 61 64 2c 20 | 79 6f 75 20 75 73 65 20 |o read, |you use |
|00002670| 6b 74 52 65 61 64 20 28 | 70 72 65 73 73 0a 0d 20 |ktRead (|press.. |
|00002680| 20 3c 30 3e 20 74 6f 20 | 73 65 65 20 6d 6f 72 65 | <0> to |see more|
|00002690| 20 64 65 74 61 69 6c 73 | 29 2e 20 54 68 69 73 20 | details|). This |
|000026a0| 63 6f 6d 6d 61 6e 64 20 | 77 69 6c 6c 20 66 61 69 |command |will fai|
|000026b0| 6c 20 69 66 20 74 68 65 | 20 6b 65 79 20 64 6f 65 |l if the| key doe|
|000026c0| 73 20 6e 6f 74 20 65 78 | 69 73 74 0a 0d 20 20 69 |s not ex|ist.. i|
|000026d0| 6e 20 74 68 65 20 61 63 | 74 69 76 65 20 69 6e 64 |n the ac|tive ind|
|000026e0| 65 78 2e 0a 0a 0d 20 20 | 49 66 20 79 6f 75 20 77 |ex.... |If you w|
|000026f0| 61 6e 74 20 74 6f 20 72 | 65 61 64 20 74 68 65 20 |ant to r|ead the |
|00002700| 66 69 72 73 74 20 72 65 | 63 6f 72 64 20 74 68 61 |first re|cord tha|
|00002710| 74 20 73 74 61 72 74 73 | 20 77 69 74 68 20 63 65 |t starts| with ce|
|00002720| 72 74 61 69 6e 20 6b 65 | 79 0a 0d 20 20 63 68 61 |rtain ke|y.. cha|
|00002730| 72 61 63 74 65 72 73 2c | 20 79 6f 75 20 75 73 65 |racters,| you use|
|00002740| 20 6b 74 52 65 61 64 41 | 66 74 65 72 20 28 70 72 | ktReadA|fter (pr|
|00002750| 65 73 73 20 3c 31 3e 20 | 61 6e 64 20 3c 45 6e 74 |ess <1> |and <Ent|
|00002760| 65 72 3e 29 2e 20 54 68 | 69 73 20 63 6f 6d 6d 61 |er>). Th|is comma|
|00002770| 6e 64 20 77 69 6c 6c 0a | 0d 20 20 6f 6e 6c 79 20 |nd will.|. only |
|00002780| 66 61 69 6c 20 69 66 20 | 74 68 65 20 6b 65 79 20 |fail if |the key |
|00002790| 63 68 61 72 61 63 74 65 | 72 73 20 79 6f 75 20 67 |characte|rs you g|
|000027a0| 69 76 65 20 61 72 65 20 | 68 69 67 68 65 72 20 74 |ive are |higher t|
|000027b0| 68 61 6e 20 61 6e 79 20 | 6b 65 79 20 69 6e 20 74 |han any |key in t|
|000027c0| 68 65 0a 0d 20 20 61 63 | 74 69 76 65 20 69 6e 64 |he.. ac|tive ind|
|000027d0| 65 78 2e 0a 0a 0d 20 20 | 49 66 20 79 6f 75 20 77 |ex.... |If you w|
|000027e0| 61 6e 74 20 74 6f 20 72 | 65 61 64 20 61 20 72 65 |ant to r|ead a re|
|000027f0| 63 6f 72 64 20 74 68 61 | 74 20 73 74 61 72 74 73 |cord tha|t starts|
|00002800| 20 77 69 74 68 20 63 65 | 72 74 61 69 6e 20 6b 65 | with ce|rtain ke|
|00002810| 79 20 63 68 61 72 61 63 | 74 65 72 73 2c 20 6f 72 |y charac|ters, or|
|00002820| 0a 0d 20 20 66 61 69 6c | 69 6e 67 20 74 68 61 74 |.. fail|ing that|
|00002830| 2c 20 74 68 65 20 72 65 | 63 6f 72 64 20 77 68 69 |, the re|cord whi|
|00002840| 63 68 20 63 6f 6d 65 73 | 20 62 65 66 6f 72 65 20 |ch comes| before |
|00002850| 74 68 61 74 2c 20 79 6f | 75 20 75 73 65 20 6b 74 |that, yo|u use kt|
|00002860| 52 65 61 64 42 65 66 6f | 72 65 0a 0d 20 20 28 70 |ReadBefo|re.. (p|
|00002870| 72 65 73 73 20 3c 32 3e | 29 2e 20 54 68 69 73 20 |ress <2>|). This |
|00002880| 63 6f 6d 6d 61 6e 64 20 | 77 69 6c 6c 20 6f 6e 6c |command |will onl|
|00002890| 79 20 66 61 69 6c 20 69 | 66 20 74 68 65 20 6b 65 |y fail i|f the ke|
|000028a0| 79 20 63 68 61 72 61 63 | 74 65 72 73 20 79 6f 75 |y charac|ters you|
|000028b0| 20 67 69 76 65 20 61 72 | 65 0a 0d 20 20 6c 6f 77 | give ar|e.. low|
|000028c0| 65 72 20 74 68 61 6e 20 | 61 6e 79 20 6b 65 79 20 |er than |any key |
|000028d0| 69 6e 20 74 68 65 20 61 | 63 74 69 76 65 20 69 6e |in the a|ctive in|
|000028e0| 64 65 78 2e 00 31 03 02 | b6 25 00 00 9e 2d 00 00 |dex..1..|.%...-..|
|000028f0| a8 04 00 00 30 35 30 00 | 0d 00 cf 00 d0 00 d1 00 |....050.|........|
|00002900| e2 00 d3 00 e3 00 d4 00 | db 00 dc 00 dd 00 de 00 |........|........|
|00002910| 46 00 50 00 20 20 49 66 | 20 79 6f 75 20 77 61 6e |F.P. If| you wan|
|00002920| 74 20 74 6f 20 72 65 61 | 64 20 74 68 65 20 72 65 |t to rea|d the re|
|00002930| 63 6f 72 64 20 77 69 74 | 68 20 74 68 65 20 6c 6f |cord wit|h the lo|
|00002940| 77 65 73 74 20 6b 65 79 | 20 69 6e 20 74 68 65 20 |west key| in the |
|00002950| 61 63 74 69 76 65 20 69 | 6e 64 65 78 2c 20 79 6f |active i|ndex, yo|
|00002960| 75 0a 0d 20 20 75 73 65 | 20 6b 74 53 74 61 72 74 |u.. use| ktStart|
|00002970| 20 28 70 72 65 73 73 20 | 3c 33 3e 29 2c 20 61 6e | (press |<3>), an|
|00002980| 64 20 74 6f 20 72 65 61 | 64 20 74 68 65 20 72 65 |d to rea|d the re|
|00002990| 63 6f 72 64 73 20 77 68 | 69 63 68 20 66 6f 6c 6c |cords wh|ich foll|
|000029a0| 6f 77 20 69 6e 20 73 65 | 71 75 65 6e 63 65 2c 0a |ow in se|quence,.|
|000029b0| 0d 20 20 79 6f 75 20 75 | 73 65 20 6b 74 4e 65 78 |. you u|se ktNex|
|000029c0| 74 20 72 65 70 65 61 74 | 65 64 6c 79 20 28 70 72 |t repeat|edly (pr|
|000029d0| 65 73 73 20 3c 34 3e 29 | 2e 20 54 68 69 73 20 63 |ess <4>)|. This c|
|000029e0| 6f 6d 6d 61 6e 64 20 77 | 69 6c 6c 20 66 61 69 6c |ommand w|ill fail|
|000029f0| 20 77 68 65 6e 20 74 68 | 65 72 65 0a 0d 20 20 61 | when th|ere.. a|
|00002a00| 72 65 20 6e 6f 20 6d 6f | 72 65 20 72 65 63 6f 72 |re no mo|re recor|
|00002a10| 64 73 20 77 69 74 68 20 | 6b 65 79 73 20 69 6e 20 |ds with |keys in |
|00002a20| 74 68 65 20 61 63 74 69 | 76 65 20 69 6e 64 65 78 |the acti|ve index|
|00002a30| 2e 0a 0a 0d 20 20 49 66 | 20 79 6f 75 20 77 61 6e |.... If| you wan|
|00002a40| 74 20 74 6f 20 72 65 61 | 64 20 74 68 65 20 72 65 |t to rea|d the re|
|00002a50| 63 6f 72 64 20 77 69 74 | 68 20 74 68 65 20 68 69 |cord wit|h the hi|
|00002a60| 67 68 65 73 74 20 6b 65 | 79 20 69 6e 20 74 68 65 |ghest ke|y in the|
|00002a70| 20 61 63 74 69 76 65 20 | 69 6e 64 65 78 2c 0a 0d | active |index,..|
|00002a80| 20 20 79 6f 75 20 75 73 | 65 20 6b 74 45 6e 64 20 | you us|e ktEnd |
|00002a90| 28 70 72 65 73 73 20 3c | 35 3e 29 2c 20 61 6e 64 |(press <|5>), and|
|00002aa0| 20 74 6f 20 72 65 61 64 | 20 74 68 65 20 72 65 63 | to read| the rec|
|00002ab0| 6f 72 64 73 20 77 68 69 | 63 68 20 70 72 65 63 65 |ords whi|ch prece|
|00002ac0| 64 65 20 69 74 20 69 6e | 0a 0d 20 20 73 65 71 75 |de it in|.. sequ|
|00002ad0| 65 6e 63 65 2c 79 6f 75 | 20 75 73 65 20 6b 74 50 |ence,you| use ktP|
|00002ae0| 72 65 76 20 72 65 70 65 | 61 74 65 64 6c 79 20 28 |rev repe|atedly (|
|00002af0| 70 72 65 73 73 20 3c 36 | 3e 29 2e 20 54 68 69 73 |press <6|>). This|
|00002b00| 20 63 6f 6d 6d 61 6e 64 | 20 77 69 6c 6c 20 66 61 | command| will fa|
|00002b10| 69 6c 0a 0d 20 20 77 68 | 65 6e 20 74 68 65 72 65 |il.. wh|en there|
|00002b20| 61 72 65 20 6e 6f 20 72 | 65 63 6f 72 64 73 20 77 |are no r|ecords w|
|00002b30| 69 74 68 20 6c 6f 77 65 | 72 20 6b 65 79 73 20 69 |ith lowe|r keys i|
|00002b40| 6e 20 74 68 65 20 61 63 | 74 69 76 65 20 69 6e 64 |n the ac|tive ind|
|00002b50| 65 78 2e 0a 0a 0d 20 20 | 54 68 65 72 65 20 69 73 |ex.... |There is|
|00002b60| 20 61 20 73 70 65 63 69 | 61 6c 20 63 6f 6d 6d 61 | a speci|al comma|
|00002b70| 6e 64 20 2d 20 6b 74 47 | 65 74 4b 65 79 20 28 70 |nd - ktG|etKey (p|
|00002b80| 72 65 73 73 20 3c 37 3e | 29 20 2d 20 77 68 69 63 |ress <7>|) - whic|
|00002b90| 68 20 74 61 6b 65 73 20 | 69 6e 70 75 74 20 66 72 |h takes |input fr|
|00002ba0| 6f 6d 0a 0d 20 20 74 68 | 65 20 6b 65 79 62 6f 61 |om.. th|e keyboa|
|00002bb0| 72 64 2c 20 65 63 68 6f | 65 73 20 69 74 20 74 6f |rd, echo|es it to|
|00002bc0| 20 74 68 65 20 73 63 72 | 65 65 6e 20 61 6e 64 20 | the scr|een and |
|00002bd0| 75 73 65 73 20 74 68 65 | 20 69 6e 70 75 74 20 74 |uses the| input t|
|00002be0| 6f 20 61 63 63 65 73 73 | 20 74 68 65 0a 0d 20 20 |o access| the.. |
|00002bf0| 61 63 74 69 76 65 20 69 | 6e 64 65 78 2e 20 54 68 |active i|ndex. Th|
|00002c00| 65 20 63 6f 6d 6d 61 6e | 64 20 72 65 74 75 72 6e |e comman|d return|
|00002c10| 73 20 69 6d 6d 65 64 69 | 61 74 65 6c 79 20 69 66 |s immedi|ately if|
|00002c20| 20 69 74 20 66 69 6e 64 | 73 20 61 20 75 6e 69 71 | it find|s a uniq|
|00002c30| 75 65 20 72 65 63 6f 72 | 64 2c 0a 0d 20 20 6f 72 |ue recor|d,.. or|
|00002c40| 20 69 66 20 69 74 20 66 | 69 6e 64 73 20 74 68 61 | if it f|inds tha|
|00002c50| 74 20 6e 6f 20 72 65 63 | 6f 72 64 73 20 68 61 76 |t no rec|ords hav|
|00002c60| 65 20 74 68 65 20 6b 65 | 79 20 69 6e 70 75 74 20 |e the ke|y input |
|00002c70| 73 6f 20 66 61 72 2e 20 | 49 66 20 74 68 65 20 75 |so far. |If the u|
|00002c80| 73 65 72 20 68 69 74 73 | 0a 0d 20 20 3c 45 6e 74 |ser hits|.. <Ent|
|00002c90| 65 72 3e 20 61 6e 64 20 | 69 74 20 68 61 73 20 6e |er> and |it has n|
|00002ca0| 6f 74 20 66 6f 75 6e 64 | 20 61 20 75 6e 69 71 75 |ot found| a uniqu|
|00002cb0| 65 20 72 65 63 6f 72 64 | 2c 20 69 74 20 72 65 74 |e record|, it ret|
|00002cc0| 75 72 6e 73 20 61 20 6e | 65 67 61 74 69 76 65 20 |urns a n|egative |
|00002cd0| 6e 75 6d 62 65 72 0a 0d | 20 20 69 6e 64 69 63 61 |number..| indica|
|00002ce0| 74 69 6e 67 20 74 68 61 | 74 20 74 68 65 72 65 20 |ting tha|t there |
|00002cf0| 61 72 65 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |are more| than on|
|00002d00| 65 20 72 65 63 6f 72 64 | 20 77 68 6f 73 65 20 6b |e record| whose k|
|00002d10| 65 79 73 20 73 74 61 72 | 74 20 77 69 74 68 20 74 |eys star|t with t|
|00002d20| 68 65 0a 0d 20 20 63 68 | 61 72 61 63 74 65 72 73 |he.. ch|aracters|
|00002d30| 20 69 6e 70 75 74 20 73 | 6f 20 66 61 72 2e 20 49 | input s|o far. I|
|00002d40| 6e 20 74 68 69 73 20 63 | 61 73 65 20 79 6f 75 20 |n this c|ase you |
|00002d50| 63 61 6e 20 75 73 65 20 | 74 68 65 20 63 6f 6d 6d |can use |the comm|
|00002d60| 61 6e 64 73 20 73 68 6f | 77 6e 20 62 65 6c 6f 77 |ands sho|wn below|
|00002d70| 2c 0a 0d 20 20 74 6f 20 | 72 65 61 64 20 65 61 63 |,.. to |read eac|
|00002d80| 68 20 6f 66 20 74 68 65 | 73 65 20 72 65 63 6f 72 |h of the|se recor|
|00002d90| 64 73 20 69 6e 20 74 75 | 72 6e 2e 00 b7 04 02 e7 |ds in tu|rn......|
|00002da0| 28 00 00 00 00 00 00 b1 | 02 00 00 30 35 30 00 0d |(.......|...050..|
|00002db0| 00 cf 00 d0 00 d1 00 e2 | 00 d3 00 e3 00 d4 00 db |........|........|
|00002dc0| 00 dc 00 dd 00 de 00 46 | 00 50 00 20 20 49 66 20 |.......F|.P. If |
|00002dd0| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 72 65 61 64 |you want| to read|
|00002de0| 20 61 6c 6c 20 74 68 6f | 73 65 20 72 65 63 6f 72 | all tho|se recor|
|00002df0| 64 73 20 74 68 61 74 20 | 73 74 61 72 74 20 77 69 |ds that |start wi|
|00002e00| 74 68 20 63 65 72 74 61 | 69 6e 20 6b 65 79 0a 0d |th certa|in key..|
|00002e10| 20 20 63 68 61 72 61 63 | 74 65 72 73 2c 20 61 6e | charac|ters, an|
|00002e20| 64 20 6e 6f 20 6f 74 68 | 65 72 73 2c 20 79 6f 75 |d no oth|ers, you|
|00002e30| 20 75 73 65 20 6b 74 52 | 65 61 64 41 6c 6c 20 28 | use ktR|eadAll (|
|00002e40| 70 72 65 73 73 20 3c 38 | 3e 29 20 74 6f 20 72 65 |press <8|>) to re|
|00002e50| 61 64 20 74 68 65 20 66 | 69 72 73 74 0a 0d 20 20 |ad the f|irst.. |
|00002e60| 73 75 63 68 20 72 65 63 | 6f 72 64 2c 20 61 6e 64 |such rec|ord, and|
|00002e70| 20 74 68 65 20 6f 74 68 | 65 72 20 72 65 63 6f 72 | the oth|er recor|
|00002e80| 64 73 20 61 72 65 20 72 | 65 61 64 20 62 79 20 75 |ds are r|ead by u|
|00002e90| 73 69 6e 67 20 6b 74 4e | 65 78 74 41 6c 6c 20 28 |sing ktN|extAll (|
|00002ea0| 70 72 65 73 73 20 3c 39 | 3e 29 0a 0d 20 20 72 65 |press <9|>).. re|
|00002eb0| 70 65 61 74 65 64 6c 79 | 2e 20 6b 74 52 65 61 64 |peatedly|. ktRead|
|00002ec0| 41 6c 6c 20 77 69 6c 6c | 20 66 61 69 6c 20 69 66 |All will| fail if|
|00002ed0| 20 74 68 65 72 65 20 61 | 72 65 20 6e 6f 20 72 65 | there a|re no re|
|00002ee0| 63 6f 72 64 73 20 77 68 | 6f 73 65 20 6b 65 79 20 |cords wh|ose key |
|00002ef0| 73 74 61 72 74 73 0a 0d | 20 20 77 69 74 68 20 74 |starts..| with t|
|00002f00| 68 65 20 67 69 76 65 6e | 20 63 68 61 72 61 63 74 |he given| charact|
|00002f10| 65 72 73 2c 20 61 6e 64 | 20 6b 74 4e 65 78 74 41 |ers, and| ktNextA|
|00002f20| 6c 6c 20 77 69 6c 6c 20 | 66 61 69 6c 20 77 68 65 |ll will |fail whe|
|00002f30| 6e 20 74 68 65 72 65 20 | 61 72 65 20 6e 6f 20 6d |n there |are no m|
|00002f40| 6f 72 65 0a 0d 20 20 72 | 65 63 6f 72 64 73 20 74 |ore.. r|ecords t|
|00002f50| 6f 20 72 65 61 64 2e 20 | 49 66 2c 20 66 6f 72 20 |o read. |If, for |
|00002f60| 73 6f 6d 65 20 72 65 61 | 73 6f 6e 20 62 65 73 74 |some rea|son best|
|00002f70| 20 6b 6e 6f 77 6e 20 74 | 6f 20 79 6f 75 72 73 65 | known t|o yourse|
|00002f80| 6c 66 2c 20 79 6f 75 20 | 77 61 6e 74 65 64 20 74 |lf, you |wanted t|
|00002f90| 6f 0a 0d 20 20 62 61 63 | 6b 20 75 70 20 69 6e 20 |o.. bac|k up in |
|00002fa0| 79 6f 75 72 20 73 65 72 | 69 65 73 20 6f 66 20 6b |your ser|ies of k|
|00002fb0| 74 4e 65 78 74 41 6c 6c | 27 73 2c 20 79 6f 75 20 |tNextAll|'s, you |
|00002fc0| 75 73 65 20 6b 74 50 72 | 65 76 41 6c 6c 20 28 70 |use ktPr|evAll (p|
|00002fd0| 72 65 73 73 20 3c 31 3e | 20 3c 30 3e 29 2e 0a 0a |ress <1>| <0>)...|
|00002fe0| 0d 20 20 54 6f 20 66 69 | 6e 64 20 6f 75 74 20 61 |. To fi|nd out a|
|00002ff0| 62 6f 75 74 20 72 65 61 | 64 69 6e 67 20 72 65 63 |bout rea|ding rec|
|00003000| 6f 72 64 73 20 70 68 79 | 73 69 63 61 6c 6c 79 2c |ords phy|sically,|
|00003010| 20 70 72 65 73 73 20 3c | 31 3e 20 3c 31 3e 2e 0a | press <|1> <1>..|
|00003020| 0a 0d 20 20 54 6f 20 66 | 69 6e 64 20 6f 75 74 20 |.. To f|ind out |
|00003030| 61 62 6f 75 74 20 72 65 | 61 64 69 6e 67 20 72 65 |about re|ading re|
|00003040| 63 6f 72 64 20 63 68 61 | 69 6e 73 2c 20 70 72 65 |cord cha|ins, pre|
|00003050| 73 73 20 3c 31 3e 20 3c | 32 3e 2e 00 c0 02 00 00 |ss <1> <|2>......|
|00003060| 00 00 00 00 00 00 00 36 | 03 00 00 30 32 30 00 02 |.......6|...020..|
|00003070| 00 c8 00 50 00 20 20 da | c4 c4 c4 c4 c4 c4 c4 c4 |...P. .|........|
|00003080| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 bf 0a 0d 20 20 |........|...... |
|00003090| b3 20 31 2e 20 43 52 45 | 41 54 49 4e 47 20 46 49 |. 1. CRE|ATING FI|
|000030a0| 4c 45 53 20 b3 0a 0d 20 | 20 c0 c4 c4 c4 c4 c4 c4 |LES ... | .......|
|000030b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 d9 0a 0a |........|........|
|000030c0| 0d 20 20 42 65 66 6f 72 | 65 20 79 6f 75 20 63 61 |. Befor|e you ca|
|000030d0| 6e 20 75 73 65 20 61 6e | 79 20 6f 66 20 74 68 65 |n use an|y of the|
|000030e0| 20 6f 74 68 65 72 20 4b | 65 79 54 72 65 65 20 63 | other K|eyTree c|
|000030f0| 6f 6d 6d 61 6e 64 73 2c | 20 79 6f 75 20 6d 75 73 |ommands,| you mus|
|00003100| 74 20 66 69 72 73 74 0a | 0d 20 20 63 72 65 61 74 |t first.|. creat|
|00003110| 65 20 79 6f 75 72 20 66 | 69 6c 65 20 75 73 69 6e |e your f|ile usin|
|00003120| 67 20 6b 74 43 72 65 61 | 74 65 20 28 70 72 65 73 |g ktCrea|te (pres|
|00003130| 73 20 3c 30 3e 20 66 6f | 72 20 66 75 72 74 68 65 |s <0> fo|r furthe|
|00003140| 72 20 64 65 74 61 69 6c | 73 29 2e 20 59 6f 75 20 |r detail|s). You |
|00003150| 6f 6e 6c 79 0a 0d 20 20 | 6e 65 65 64 20 74 6f 20 |only.. |need to |
|00003160| 75 73 65 20 6b 74 43 72 | 65 61 74 65 20 6f 6e 63 |use ktCr|eate onc|
|00003170| 65 20 66 6f 72 20 65 61 | 63 68 20 66 69 6c 65 2c |e for ea|ch file,|
|00003180| 20 62 75 74 20 69 74 20 | 77 6f 6e 27 74 20 68 75 | but it |won't hu|
|00003190| 72 74 20 74 6f 20 6c 65 | 61 76 65 20 69 74 20 69 |rt to le|ave it i|
|000031a0| 6e 0a 0d 20 20 79 6f 75 | 72 20 6d 61 69 6e 20 70 |n.. you|r main p|
|000031b0| 72 6f 67 72 61 6d 20 73 | 69 6e 63 65 20 73 75 62 |rogram s|ince sub|
|000031c0| 73 65 71 75 65 6e 74 20 | 63 61 6c 6c 73 20 74 6f |sequent |calls to|
|000031d0| 20 63 72 65 61 74 65 20 | 74 68 65 20 73 61 6d 65 | create |the same|
|000031e0| 20 6e 61 6d 65 20 68 61 | 76 65 20 6e 6f 0a 0d 20 | name ha|ve no.. |
|000031f0| 20 65 66 66 65 63 74 2e | 0a 0a 0d 20 20 54 68 65 | effect.|... The|
|00003200| 20 71 75 65 73 74 69 6f | 6e 73 20 79 6f 75 20 6e | questio|ns you n|
|00003210| 65 65 64 20 74 6f 20 61 | 73 6b 20 79 6f 75 73 65 |eed to a|sk youse|
|00003220| 6c 66 20 62 65 66 6f 72 | 65 20 63 72 65 61 74 69 |lf befor|e creati|
|00003230| 6e 67 20 61 20 66 69 6c | 65 20 61 72 65 20 3a 0a |ng a fil|e are :.|
|00003240| 0a 0d 20 20 20 20 31 2e | 20 48 6f 77 20 6d 61 6e |.. 1.| How man|
|00003250| 79 20 69 6e 64 65 78 65 | 73 20 64 6f 20 49 20 6e |y indexe|s do I n|
|00003260| 65 65 64 3f 20 59 6f 75 | 20 61 72 65 20 61 6c 6c |eed? You| are all|
|00003270| 6f 77 65 64 20 75 70 20 | 74 6f 20 31 30 2c 20 62 |owed up |to 10, b|
|00003280| 75 74 20 74 68 65 20 6d | 6f 72 65 0a 0d 20 20 20 |ut the m|ore.. |
|00003290| 20 20 20 20 74 68 65 72 | 65 20 61 72 65 2c 20 74 | ther|e are, t|
|000032a0| 68 65 20 73 6c 6f 77 65 | 72 20 77 69 6c 6c 20 62 |he slowe|r will b|
|000032b0| 65 20 79 6f 75 72 20 66 | 69 6c 65 20 75 70 64 61 |e your f|ile upda|
|000032c0| 74 69 6e 67 2e 0a 0a 0d | 20 20 20 20 32 2e 20 48 |ting....| 2. H|
|000032d0| 6f 77 20 6c 6f 6e 67 20 | 69 73 20 65 61 63 68 20 |ow long |is each |
|000032e0| 66 69 65 6c 64 20 69 6e | 20 65 61 63 68 20 6b 65 |field in| each ke|
|000032f0| 79 20 28 6e 6f 74 20 63 | 6f 75 6e 74 69 6e 67 20 |y (not c|ounting |
|00003300| 74 68 65 20 74 65 72 6d | 69 6e 61 74 69 6e 67 20 |the term|inating |
|00003310| 6e 75 6c 6c 29 0a 0d 20 | 20 20 20 20 20 20 61 6e |null).. | an|
|00003320| 64 20 68 6f 77 20 6d 61 | 6e 79 20 62 79 74 65 73 |d how ma|ny bytes|
|00003330| 20 61 72 65 20 74 68 65 | 72 65 20 69 6e 20 74 68 | are the|re in th|
|00003340| 65 20 72 65 63 6f 72 64 | 20 62 65 66 6f 72 65 20 |e record| before |
|00003350| 65 61 63 68 20 66 69 65 | 6c 64 3f 0a 0a 0d 20 20 |each fie|ld?... |
|00003360| 20 20 33 2e 20 44 6f 20 | 49 20 6e 65 65 64 20 72 | 3. Do |I need r|
|00003370| 65 63 6f 72 64 20 63 68 | 61 69 6e 69 6e 67 3f 20 |ecord ch|aining? |
|00003380| 28 70 72 65 73 73 20 3c | 31 3e 20 66 6f 72 20 66 |(press <|1> for f|
|00003390| 75 72 74 68 65 72 20 64 | 65 74 61 69 6c 73 29 2e |urther d|etails).|
|000033a0| 00 45 03 00 00 00 00 00 | 34 38 00 00 82 04 00 00 |.E......|48......|
|000033b0| 30 31 30 00 06 00 50 00 | c8 00 e5 03 db 00 5a 00 |010...P.|......Z.|
|000033c0| e6 03 20 20 da c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.. ....|........|
|000033d0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 bf 0a 0d 20 |........|....... |
|000033e0| 20 b3 20 30 2e 20 54 48 | 45 20 4b 45 59 54 52 45 | . 0. TH|E KEYTRE|
|000033f0| 45 20 53 59 53 54 45 4d | 20 b3 0a 0d 20 20 c0 c4 |E SYSTEM| ... ..|
|00003400| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00003410| c4 c4 c4 c4 c4 c4 d9 0a | 0a 0d 20 20 54 68 65 20 |........|.. The |
|00003420| 4b 65 79 54 72 65 65 20 | 55 74 69 6c 69 74 69 65 |KeyTree |Utilitie|
|00003430| 73 20 69 73 20 61 20 73 | 65 74 20 6f 66 20 6c 69 |s is a s|et of li|
|00003440| 62 72 61 72 79 20 72 6f | 75 74 69 6e 65 73 20 77 |brary ro|utines w|
|00003450| 68 69 63 68 20 79 6f 75 | 20 63 61 6e 20 75 73 65 |hich you| can use|
|00003460| 20 69 6e 0a 0d 20 20 79 | 6f 75 72 20 43 20 70 72 | in.. y|our C pr|
|00003470| 6f 67 72 61 6d 73 20 66 | 6f 72 20 63 72 65 61 74 |ograms f|or creat|
|00003480| 69 6e 67 2c 20 6d 61 69 | 6e 74 61 69 6e 69 6e 67 |ing, mai|ntaining|
|00003490| 20 61 6e 64 20 72 65 61 | 64 69 6e 67 20 72 61 6e | and rea|ding ran|
|000034a0| 64 6f 6d 6c 79 20 61 63 | 63 65 73 73 65 64 0a 0d |domly ac|cessed..|
|000034b0| 20 20 66 69 6c 65 73 20 | 6f 66 20 76 61 72 69 61 | files |of varia|
|000034c0| 62 6c 65 20 6c 65 6e 67 | 74 68 20 72 65 63 6f 72 |ble leng|th recor|
|000034d0| 64 73 2e 20 45 61 63 68 | 20 69 6e 64 65 78 65 64 |ds. Each| indexed|
|000034e0| 20 72 65 63 6f 72 64 20 | 69 6e 20 74 68 65 20 66 | record |in the f|
|000034f0| 69 6c 65 20 68 61 73 20 | 6f 6e 65 0a 0d 20 20 6f |ile has |one.. o|
|00003500| 72 20 6d 6f 72 65 20 27 | 6b 65 79 73 27 2c 20 77 |r more '|keys', w|
|00003510| 68 69 63 68 20 63 6f 6e | 74 61 69 6e 20 6f 6e 65 |hich con|tain one|
|00003520| 20 6f 72 20 6d 6f 72 65 | 20 66 69 65 6c 64 73 20 | or more| fields |
|00003530| 6f 66 20 74 68 65 20 72 | 65 63 6f 72 64 2e 0a 0a |of the r|ecord...|
|00003540| 0d 20 20 54 68 65 20 63 | 6f 6e 74 65 6e 74 73 20 |. The c|ontents |
|00003550| 6f 66 20 74 68 65 20 6b | 65 79 73 20 6d 75 73 74 |of the k|eys must|
|00003560| 20 62 65 20 64 69 66 66 | 65 72 65 6e 74 20 66 6f | be diff|erent fo|
|00003570| 72 20 65 61 63 68 20 72 | 65 63 6f 72 64 20 69 6e |r each r|ecord in|
|00003580| 20 74 68 65 20 66 69 6c | 65 2e 20 54 68 65 0a 0d | the fil|e. The..|
|00003590| 20 20 73 6f 66 74 77 61 | 72 65 20 77 69 6c 6c 20 | softwa|re will |
|000035a0| 6e 6f 74 20 70 65 72 6d | 69 74 20 64 75 70 6c 69 |not perm|it dupli|
|000035b0| 63 61 74 65 20 6b 65 79 | 73 20 74 6f 20 62 65 20 |cate key|s to be |
|000035c0| 63 72 65 61 74 65 64 2e | 20 54 68 69 73 20 64 65 |created.| This de|
|000035d0| 6d 61 6e 64 73 20 74 68 | 61 74 0a 0d 20 20 79 6f |mands th|at.. yo|
|000035e0| 75 20 67 69 76 65 20 73 | 6f 6d 65 20 74 68 6f 75 |u give s|ome thou|
|000035f0| 67 68 74 20 74 6f 20 74 | 68 65 20 64 65 73 69 67 |ght to t|he desig|
|00003600| 6e 20 6f 66 20 79 6f 75 | 72 20 66 69 6c 65 2c 20 |n of you|r file, |
|00003610| 66 6f 72 20 70 65 72 68 | 61 70 73 20 77 68 61 74 |for perh|aps what|
|00003620| 20 79 6f 75 20 75 73 65 | 64 0a 0d 20 20 74 6f 20 | you use|d.. to |
|00003630| 74 68 69 6e 6b 20 77 61 | 73 20 74 68 65 20 61 62 |think wa|s the ab|
|00003640| 73 6f 6c 75 74 65 20 6e | 65 63 65 73 73 69 74 79 |solute n|ecessity|
|00003650| 20 6f 66 20 61 6c 6c 6f | 77 69 6e 67 20 64 75 70 | of allo|wing dup|
|00003660| 6c 69 63 61 74 65 20 72 | 65 63 6f 72 64 73 20 2d |licate r|ecords -|
|00003670| 20 27 54 68 65 72 65 0a | 0d 20 20 61 72 65 20 74 | 'There.|. are t|
|00003680| 77 6f 20 4a 6f 68 6e 20 | 53 6d 69 74 68 27 73 20 |wo John |Smith's |
|00003690| 69 6e 20 6d 79 20 66 69 | 6c 65 27 20 49 20 68 65 |in my fi|le' I he|
|000036a0| 61 72 20 79 6f 75 20 63 | 72 79 2e 20 49 6e 20 73 |ar you c|ry. In s|
|000036b0| 69 74 75 61 74 69 6f 6e | 73 20 6c 69 6b 65 20 74 |ituation|s like t|
|000036c0| 68 69 73 2c 0a 0d 20 20 | 79 6f 75 20 63 6f 75 6c |his,.. |you coul|
|000036d0| 64 20 75 73 65 20 72 65 | 63 6f 72 64 20 63 68 61 |d use re|cord cha|
|000036e0| 69 6e 69 6e 67 20 28 70 | 72 65 73 73 20 3c 30 3e |ining (p|ress <0>|
|000036f0| 20 66 6f 72 20 66 75 72 | 74 68 65 72 20 64 65 74 | for fur|ther det|
|00003700| 61 69 6c 73 29 2e 0a 0a | 0d 20 20 54 68 65 20 6b |ails)...|. The k|
|00003710| 65 79 20 66 69 65 6c 64 | 73 20 73 68 6f 75 6c 64 |ey field|s should|
|00003720| 20 62 65 20 6f 66 20 74 | 79 70 65 20 3c 63 68 61 | be of t|ype <cha|
|00003730| 72 3e 2c 20 62 75 74 20 | 74 68 65 20 72 65 63 6f |r>, but |the reco|
|00003740| 72 64 20 69 74 73 65 6c | 66 20 63 61 6e 20 62 65 |rd itsel|f can be|
|00003750| 20 61 6e 79 0a 0d 20 20 | 6f 6c 64 20 6a 75 6d 62 | any.. |old jumb|
|00003760| 6c 65 20 6f 66 20 3c 69 | 6e 74 3e 27 73 2c 20 6f |le of <i|nt>'s, o|
|00003770| 72 20 77 68 61 74 65 76 | 65 72 20 2d 20 74 68 65 |r whatev|er - the|
|00003780| 20 73 6f 66 74 77 61 72 | 65 20 6a 75 73 74 20 74 | softwar|e just t|
|00003790| 72 65 61 74 73 20 65 61 | 63 68 20 72 65 63 6f 72 |reats ea|ch recor|
|000037a0| 64 0a 0d 20 20 61 73 20 | 61 20 63 6f 6e 74 69 67 |d.. as |a contig|
|000037b0| 75 6f 75 73 20 6e 75 6d | 62 65 72 20 6f 66 20 62 |uous num|ber of b|
|000037c0| 79 74 65 73 20 77 68 6f | 73 65 20 6c 65 6e 67 74 |ytes who|se lengt|
|000037d0| 68 20 69 73 20 73 65 74 | 20 77 68 65 6e 20 79 6f |h is set| when yo|
|000037e0| 75 20 61 64 64 20 6f 72 | 20 75 70 64 61 74 65 0a |u add or| update.|
|000037f0| 0d 20 20 69 74 2e 20 54 | 79 70 69 63 61 6c 6c 79 |. it. T|ypically|
|00003800| 2c 20 79 6f 75 20 77 6f | 75 6c 64 20 75 73 65 20 |, you wo|uld use |
|00003810| 61 20 3c 73 74 72 75 63 | 74 3e 20 74 6f 20 64 65 |a <struc|t> to de|
|00003820| 66 69 6e 65 20 79 6f 75 | 72 20 72 65 63 6f 72 64 |fine you|r record|
|00003830| 2e 00 91 04 02 a3 33 00 | 00 0f 3d 00 00 cc 04 00 |......3.|..=.....|
|00003840| 00 30 31 30 00 06 00 50 | 00 c8 00 e5 03 db 00 5a |.010...P|.......Z|
|00003850| 00 e6 03 20 20 54 68 65 | 20 69 6e 64 65 78 69 6e |... The| indexin|
|00003860| 67 20 73 79 73 74 65 6d | 20 75 73 65 64 20 62 79 |g system| used by|
|00003870| 20 74 68 65 20 4b 65 79 | 54 72 65 65 20 73 79 73 | the Key|Tree sys|
|00003880| 74 65 6d 2c 20 63 6f 6e | 74 61 69 6e 73 20 61 20 |tem, con|tains a |
|00003890| 6e 75 6d 62 65 72 20 6f | 66 20 69 6e 64 65 78 0a |number o|f index.|
|000038a0| 0d 20 20 72 65 63 6f 72 | 64 73 2c 20 65 61 63 68 |. recor|ds, each|
|000038b0| 20 6f 6e 65 20 63 6f 6e | 74 61 69 6e 69 6e 67 20 | one con|taining |
|000038c0| 61 73 20 6d 61 6e 79 20 | 65 6e 74 72 69 65 73 20 |as many |entries |
|000038d0| 61 73 20 74 68 65 72 65 | 20 61 72 65 20 64 69 66 |as there| are dif|
|000038e0| 66 65 72 65 6e 74 20 76 | 61 6c 69 64 0a 0d 20 20 |ferent v|alid.. |
|000038f0| 63 68 61 72 61 63 74 65 | 72 73 20 66 6f 72 20 74 |characte|rs for t|
|00003900| 68 69 73 20 74 79 70 65 | 20 6f 66 20 6b 65 79 20 |his type| of key |
|00003910| 28 66 6f 72 20 64 65 74 | 61 69 6c 73 20 6f 66 20 |(for det|ails of |
|00003920| 74 68 65 20 64 69 66 66 | 65 72 65 6e 74 20 74 79 |the diff|erent ty|
|00003930| 70 65 73 20 6f 66 20 6b | 65 79 2c 0a 0d 20 20 73 |pes of k|ey,.. s|
|00003940| 65 65 20 74 68 65 20 64 | 65 73 63 72 69 70 74 69 |ee the d|escripti|
|00003950| 6f 6e 20 6f 66 20 6b 74 | 43 72 65 61 74 65 20 2d |on of kt|Create -|
|00003960| 20 70 72 65 73 73 20 3c | 31 3e 29 2e 20 54 68 65 | press <|1>). The|
|00003970| 20 65 6e 74 72 69 65 73 | 20 69 6e 20 74 68 65 20 | entries| in the |
|00003980| 66 69 72 73 74 0a 0d 20 | 20 69 6e 64 65 78 20 72 |first.. | index r|
|00003990| 65 63 6f 72 64 20 72 65 | 6c 61 74 65 20 74 6f 20 |ecord re|late to |
|000039a0| 74 68 65 20 66 69 72 73 | 74 20 63 68 61 72 61 63 |the firs|t charac|
|000039b0| 74 65 72 20 6f 66 20 74 | 68 65 20 6b 65 79 2e 20 |ter of t|he key. |
|000039c0| 49 66 20 74 68 65 72 65 | 20 61 72 65 20 6e 6f 0a |If there| are no.|
|000039d0| 0d 20 20 72 65 63 6f 72 | 64 73 20 77 68 6f 73 65 |. recor|ds whose|
|000039e0| 20 6b 65 79 20 62 65 67 | 69 6e 73 20 77 69 74 68 | key beg|ins with|
|000039f0| 20 74 68 69 73 20 63 68 | 61 72 61 63 74 65 72 2c | this ch|aracter,|
|00003a00| 20 74 68 65 20 65 6e 74 | 72 79 20 69 73 20 7a 65 | the ent|ry is ze|
|00003a10| 72 6f 2e 20 49 66 20 74 | 68 65 72 65 0a 0d 20 20 |ro. If t|here.. |
|00003a20| 69 73 20 6f 6e 6c 79 20 | 6f 6e 65 20 72 65 63 6f |is only |one reco|
|00003a30| 72 64 20 77 68 6f 73 65 | 20 6b 65 79 20 62 65 67 |rd whose| key beg|
|00003a40| 69 6e 73 20 77 69 74 68 | 20 74 68 69 73 20 63 68 |ins with| this ch|
|00003a50| 61 72 61 63 74 65 72 2c | 20 74 68 65 20 65 6e 74 |aracter,| the ent|
|00003a60| 72 79 20 70 6f 69 6e 74 | 73 0a 0d 20 20 64 69 72 |ry point|s.. dir|
|00003a70| 65 63 74 6c 79 20 74 6f | 20 74 68 65 20 72 65 63 |ectly to| the rec|
|00003a80| 6f 72 64 20 63 6f 6e 63 | 65 72 6e 65 64 2e 20 49 |ord conc|erned. I|
|00003a90| 66 20 74 68 65 72 65 20 | 61 72 65 20 6d 6f 72 65 |f there |are more|
|00003aa0| 20 72 65 63 6f 72 64 73 | 2c 20 74 68 65 20 65 6e | records|, the en|
|00003ab0| 74 72 79 0a 0d 20 20 70 | 6f 69 6e 74 73 20 74 6f |try.. p|oints to|
|00003ac0| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 6c 65 76 65 | the sec|ond leve|
|00003ad0| 6c 20 69 6e 64 65 78 20 | 72 65 63 6f 72 64 2c 20 |l index |record, |
|00003ae0| 77 68 69 63 68 20 72 65 | 6c 61 74 65 73 20 74 6f |which re|lates to|
|00003af0| 20 74 68 65 20 73 65 63 | 6f 6e 64 0a 0d 20 20 63 | the sec|ond.. c|
|00003b00| 68 61 72 61 63 74 65 72 | 20 6f 66 20 74 68 65 20 |haracter| of the |
|00003b10| 6b 65 79 2e 20 54 68 69 | 73 20 70 72 6f 63 65 73 |key. Thi|s proces|
|00003b20| 73 20 63 6f 6e 74 69 6e | 75 65 73 2c 20 61 64 64 |s contin|ues, add|
|00003b30| 69 6e 67 20 6d 6f 72 65 | 20 6c 65 76 65 6c 73 20 |ing more| levels |
|00003b40| 6f 66 20 69 6e 64 65 78 | 0a 0d 20 20 72 65 63 6f |of index|.. reco|
|00003b50| 72 64 73 20 75 6e 74 69 | 6c 20 75 6e 69 71 75 65 |rds unti|l unique|
|00003b60| 6e 65 73 73 20 69 73 20 | 66 6f 75 6e 64 2e 0a 0a |ness is |found...|
|00003b70| 0d 20 20 59 6f 75 20 6d | 61 79 20 66 69 6e 64 20 |. You m|ay find |
|00003b80| 69 74 20 68 65 6c 70 66 | 75 6c 20 74 6f 20 72 75 |it helpf|ul to ru|
|00003b90| 6e 20 74 68 65 20 75 74 | 69 6c 69 74 79 20 70 72 |n the ut|ility pr|
|00003ba0| 6f 67 72 61 6d 20 4c 4f | 4f 4b 2e 45 58 45 20 2e |ogram LO|OK.EXE .|
|00003bb0| 20 54 72 79 20 74 79 70 | 69 6e 67 0a 0d 20 20 4c | Try typ|ing.. L|
|00003bc0| 4f 4f 4b 20 4d 41 4e 55 | 41 4c 2c 20 77 68 69 63 |OOK MANU|AL, whic|
|00003bd0| 68 20 77 69 6c 6c 20 73 | 68 6f 77 20 79 6f 75 20 |h will s|how you |
|00003be0| 74 68 65 20 4b 65 79 54 | 72 65 65 20 72 65 63 6f |the KeyT|ree reco|
|00003bf0| 72 64 73 20 6f 66 20 74 | 68 69 73 20 6d 61 6e 75 |rds of t|his manu|
|00003c00| 61 6c 20 66 69 6c 65 2e | 0a 0d 20 20 44 6f 6e 27 |al file.|.. Don'|
|00003c10| 74 20 77 6f 72 72 79 20 | 69 66 20 74 68 65 20 72 |t worry |if the r|
|00003c20| 65 63 6f 72 64 73 20 6c | 6f 6f 6b 20 6c 69 6b 65 |ecords l|ook like|
|00003c30| 20 67 6f 62 62 6c 65 64 | 65 67 6f 6f 6b 20 2d 20 | gobbled|egook - |
|00003c40| 74 68 69 73 20 70 72 6f | 67 72 61 6d 20 64 6f 65 |this pro|gram doe|
|00003c50| 73 6e 27 74 0a 0d 20 20 | 64 69 66 66 65 72 65 6e |sn't.. |differen|
|00003c60| 74 69 61 74 65 20 62 65 | 74 77 65 65 6e 20 62 69 |tiate be|tween bi|
|00003c70| 6e 61 72 79 20 66 69 65 | 6c 64 73 20 61 6e 64 20 |nary fie|lds and |
|00003c80| 63 68 61 72 61 63 74 65 | 72 20 66 69 65 6c 64 73 |characte|r fields|
|00003c90| 2c 20 61 6c 6c 20 69 74 | 20 64 6f 65 73 20 69 73 |, all it| does is|
|00003ca0| 0a 0d 20 20 73 68 6f 77 | 20 79 6f 75 20 74 68 65 |.. show| you the|
|00003cb0| 20 73 74 72 75 63 74 75 | 72 65 20 6f 66 20 74 68 | structu|re of th|
|00003cc0| 65 20 66 69 6c 65 20 61 | 6e 64 20 69 74 73 20 69 |e file a|nd its i|
|00003cd0| 6e 64 65 78 20 72 65 63 | 6f 72 64 73 2e 20 49 66 |ndex rec|ords. If|
|00003ce0| 20 79 6f 75 20 77 61 6e | 74 20 74 6f 0a 0d 20 20 | you wan|t to.. |
|00003cf0| 72 75 6e 20 4c 4f 4f 4b | 2e 45 58 45 20 6e 6f 77 |run LOOK|.EXE now|
|00003d00| 2c 20 70 72 65 73 73 20 | 3c 32 3e 2e 00 db 04 02 |, press |<2>.....|
|00003d10| 34 38 00 00 74 40 00 00 | 56 03 00 00 30 31 30 00 |48..t@..|V...010.|
|00003d20| 06 00 50 00 c8 00 e5 03 | db 00 5a 00 e6 03 20 20 |..P.....|..Z... |
|00003d30| 42 65 63 61 75 73 65 20 | 6f 66 20 69 74 73 20 69 |Because |of its i|
|00003d40| 6e 64 65 78 20 73 74 72 | 75 63 74 75 72 65 2c 20 |ndex str|ucture, |
|00003d50| 74 68 65 20 4b 65 79 54 | 72 65 65 20 73 79 73 74 |the KeyT|ree syst|
|00003d60| 65 6d 20 69 73 20 70 61 | 72 74 69 63 75 6c 61 72 |em is pa|rticular|
|00003d70| 6c 79 20 73 75 69 74 65 | 64 0a 0d 20 20 74 6f 20 |ly suite|d.. to |
|00003d80| 74 68 65 20 6f 6e 6c 69 | 6e 65 20 72 65 74 72 69 |the onli|ne retri|
|00003d90| 65 76 61 6c 20 6f 66 20 | 72 65 63 6f 72 64 73 2e |eval of |records.|
|00003da0| 20 54 68 65 72 65 20 69 | 73 20 6f 6e 65 20 63 6f | There i|s one co|
|00003db0| 6d 6d 61 6e 64 20 77 68 | 69 63 68 20 61 63 63 65 |mmand wh|ich acce|
|00003dc0| 70 74 73 0a 0d 20 20 69 | 6e 70 75 74 20 66 72 6f |pts.. i|nput fro|
|00003dd0| 6d 20 74 68 65 20 6b 65 | 79 62 6f 61 72 64 20 61 |m the ke|yboard a|
|00003de0| 6e 64 20 75 73 65 73 20 | 69 74 20 74 6f 20 61 63 |nd uses |it to ac|
|00003df0| 63 65 73 73 20 74 68 65 | 20 6b 65 79 20 73 74 72 |cess the| key str|
|00003e00| 75 63 74 75 72 65 2e 20 | 41 73 20 73 6f 6f 6e 0a |ucture. |As soon.|
|00003e10| 0d 20 20 61 73 20 74 68 | 65 20 6f 70 65 72 61 74 |. as th|e operat|
|00003e20| 6f 72 20 74 79 70 65 73 | 20 69 6e 20 73 75 66 66 |or types| in suff|
|00003e30| 69 63 69 65 6e 74 20 63 | 68 61 72 61 63 74 65 72 |icient c|haracter|
|00003e40| 73 20 74 6f 20 75 6e 69 | 71 75 65 6c 79 20 69 64 |s to uni|quely id|
|00003e50| 65 6e 74 69 66 79 20 74 | 68 65 0a 0d 20 20 72 65 |entify t|he.. re|
|00003e60| 63 6f 72 64 20 28 6f 72 | 20 74 6f 20 64 65 63 69 |cord (or| to deci|
|00003e70| 64 65 20 74 68 61 74 20 | 6e 6f 20 72 65 63 6f 72 |de that |no recor|
|00003e80| 64 20 68 61 73 20 74 68 | 69 73 20 6b 65 79 29 2c |d has th|is key),|
|00003e90| 20 69 74 20 72 65 74 75 | 72 6e 73 20 63 6f 6e 74 | it retu|rns cont|
|00003ea0| 72 6f 6c 20 74 6f 0a 0d | 20 20 79 6f 75 72 20 70 |rol to..| your p|
|00003eb0| 72 6f 67 72 61 6d 2e 20 | 46 6f 72 20 69 6e 73 74 |rogram. |For inst|
|00003ec0| 61 6e 63 65 2c 20 69 66 | 20 79 6f 75 20 6f 6e 6c |ance, if| you onl|
|00003ed0| 79 20 68 61 76 65 20 6f | 6e 65 20 63 75 73 74 6f |y have o|ne custo|
|00003ee0| 6d 65 72 20 77 68 6f 73 | 65 20 6e 61 6d 65 20 62 |mer whos|e name b|
|00003ef0| 65 67 69 6e 73 0a 0d 20 | 20 77 69 74 68 20 5a 2c |egins.. | with Z,|
|00003f00| 20 74 79 70 65 20 3c 5a | 3e 20 61 6e 64 20 79 6f | type <Z|> and yo|
|00003f10| 75 20 68 61 76 65 20 67 | 6f 74 20 68 69 73 20 72 |u have g|ot his r|
|00003f20| 65 63 6f 72 64 2e 20 54 | 68 69 73 20 68 61 73 20 |ecord. T|his has |
|00003f30| 74 68 65 20 65 66 66 65 | 63 74 20 6f 66 20 67 69 |the effe|ct of gi|
|00003f40| 76 69 6e 67 0a 0d 20 20 | 62 6c 69 6e 64 69 6e 67 |ving.. |blinding|
|00003f50| 6c 79 20 66 61 73 74 20 | 72 61 6e 64 6f 6d 20 72 |ly fast |random r|
|00003f60| 65 61 64 73 2c 20 61 6e | 64 20 73 68 6f 77 73 20 |eads, an|d shows |
|00003f70| 74 68 65 20 75 73 65 72 | 20 74 68 65 20 72 65 63 |the user| the rec|
|00003f80| 6f 72 64 20 68 65 20 77 | 61 6e 74 73 20 62 65 66 |ord he w|ants bef|
|00003f90| 6f 72 65 0a 0d 20 20 68 | 65 20 68 61 73 20 66 69 |ore.. h|e has fi|
|00003fa0| 6e 69 73 68 65 64 20 74 | 79 70 69 6e 67 20 74 68 |nished t|yping th|
|00003fb0| 65 20 6b 65 79 2e 20 54 | 72 79 20 64 6f 69 6e 67 |e key. T|ry doing|
|00003fc0| 20 74 68 61 74 20 77 69 | 74 68 20 61 20 62 69 6e | that wi|th a bin|
|00003fd0| 61 72 79 20 74 72 65 65 | 20 73 79 73 74 65 6d 21 |ary tree| system!|
|00003fe0| 0a 0d 20 20 28 66 6f 72 | 20 64 65 74 61 69 6c 73 |.. (for| details|
|00003ff0| 20 6f 66 20 74 68 69 73 | 20 63 6f 6d 6d 61 6e 64 | of this| command|
|00004000| 20 70 72 65 73 73 20 3c | 33 3e 29 2e 0a 0a 0d 20 | press <|3>).... |
|00004010| 20 4d 6f 72 65 6f 76 65 | 72 2c 20 74 68 65 20 75 | Moreove|r, the u|
|00004020| 70 64 61 74 69 6e 67 20 | 6f 66 20 74 68 65 20 69 |pdating |of the i|
|00004030| 6e 64 65 78 20 72 65 63 | 6f 72 64 73 20 69 73 20 |ndex rec|ords is |
|00004040| 63 6f 6d 70 6c 65 74 65 | 6c 79 20 74 72 61 6e 73 |complete|ly trans|
|00004050| 70 61 72 65 6e 74 20 74 | 6f 0a 0d 20 20 79 6f 75 |parent t|o.. you|
|00004060| 2c 20 74 68 65 20 70 72 | 6f 67 72 61 6d 6d 65 72 |, the pr|ogrammer|
|00004070| 2e 00 65 03 02 0f 3d 00 | 00 fb 44 00 00 78 04 00 |..e...=.|..D..x..|
|00004080| 00 30 31 30 00 06 00 50 | 00 c8 00 e5 03 db 00 5a |.010...P|.......Z|
|00004090| 00 e6 03 20 20 da c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |... ...|........|
|000040a0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000040b0| bf 0a 0d 20 20 b3 20 55 | 53 49 4e 47 20 54 48 45 |... . U|SING THE|
|000040c0| 20 4b 45 59 54 52 45 45 | 20 53 59 53 54 45 4d 20 | KEYTREE| SYSTEM |
|000040d0| b3 0a 0d 20 20 c0 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |... ...|........|
|000040e0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000040f0| d9 0a 0a 0d 20 20 54 68 | 65 20 4b 65 79 54 72 65 |.... Th|e KeyTre|
|00004100| 65 20 55 74 69 6c 69 74 | 69 65 73 20 69 73 20 70 |e Utilit|ies is p|
|00004110| 72 6f 76 69 64 65 64 20 | 61 73 20 73 6f 75 72 63 |rovided |as sourc|
|00004120| 65 20 63 6f 64 65 2c 20 | 73 6f 20 74 68 61 74 20 |e code, |so that |
|00004130| 79 6f 75 20 63 61 6e 20 | 65 69 74 68 65 72 0a 0d |you can |either..|
|00004140| 20 20 63 6f 6d 70 69 6c | 65 20 69 74 20 61 73 20 | compil|e it as |
|00004150| 61 20 73 74 61 6e 64 61 | 6c 6f 6e 65 20 2e 4f 42 |a standa|lone .OB|
|00004160| 4a 20 66 69 6c 65 20 61 | 6e 64 20 69 6e 63 6c 75 |J file a|nd inclu|
|00004170| 64 65 20 69 74 20 69 6e | 20 79 6f 75 72 20 4d 41 |de it in| your MA|
|00004180| 4b 45 20 66 69 6c 65 20 | 66 6f 72 0a 0d 20 20 74 |KE file |for.. t|
|00004190| 68 65 20 70 72 6f 67 72 | 61 6d 20 79 6f 75 20 61 |he progr|am you a|
|000041a0| 72 65 20 63 72 65 61 74 | 69 6e 67 2c 20 6f 72 20 |re creat|ing, or |
|000041b0| 79 6f 75 20 63 61 6e 20 | 27 23 69 6e 63 6c 75 64 |you can |'#includ|
|000041c0| 65 27 20 74 68 65 20 66 | 69 6c 65 20 69 6e 20 79 |e' the f|ile in y|
|000041d0| 6f 75 72 0a 0d 20 20 73 | 6f 75 72 63 65 20 66 69 |our.. s|ource fi|
|000041e0| 6c 65 2c 20 69 66 20 79 | 6f 75 72 20 63 6f 6d 70 |le, if y|our comp|
|000041f0| 69 6c 65 72 20 64 6f 65 | 73 6e 27 74 20 70 72 6f |iler doe|sn't pro|
|00004200| 76 69 64 65 20 61 20 6d | 61 6b 65 20 66 61 63 69 |vide a m|ake faci|
|00004210| 6c 69 74 79 2e 20 49 66 | 20 79 6f 75 20 61 72 65 |lity. If| you are|
|00004220| 0a 0d 20 20 75 73 69 6e | 67 20 74 68 65 20 4d 41 |.. usin|g the MA|
|00004230| 4b 45 20 66 61 63 69 6c | 69 74 79 2c 20 74 68 65 |KE facil|ity, the|
|00004240| 6e 20 79 6f 75 20 73 68 | 6f 75 6c 64 20 69 6e 63 |n you sh|ould inc|
|00004250| 6c 75 64 65 20 74 68 65 | 20 68 65 61 64 65 72 20 |lude the| header |
|00004260| 66 69 6c 65 20 4b 54 52 | 45 45 33 2e 48 0a 0d 20 |file KTR|EE3.H.. |
|00004270| 20 69 6e 20 61 6e 79 20 | 73 6f 75 72 63 65 20 6d | in any |source m|
|00004280| 6f 64 75 6c 65 73 20 74 | 68 61 74 20 63 61 6c 6c |odules t|hat call|
|00004290| 20 74 68 65 20 4b 65 79 | 54 72 65 65 20 63 6f 6d | the Key|Tree com|
|000042a0| 6d 61 6e 64 73 2e 0a 0a | 0d 20 20 49 6e 20 67 65 |mands...|. In ge|
|000042b0| 6e 65 72 61 6c 2c 20 69 | 66 20 74 68 65 20 63 6f |neral, i|f the co|
|000042c0| 6d 6d 61 6e 64 20 72 65 | 74 75 72 6e 73 20 7a 65 |mmand re|turns ze|
|000042d0| 72 6f 20 74 68 65 72 65 | 20 68 61 73 20 62 65 65 |ro there| has bee|
|000042e0| 6e 20 73 6f 6d 65 20 6b | 69 6e 64 20 6f 66 0a 0d |n some k|ind of..|
|000042f0| 20 20 75 6e 65 78 70 65 | 63 74 65 64 20 72 65 73 | unexpe|cted res|
|00004300| 75 6c 74 2c 20 61 6e 64 | 20 79 6f 75 20 73 68 6f |ult, and| you sho|
|00004310| 75 6c 64 20 65 78 61 6d | 69 6e 65 20 74 68 65 20 |uld exam|ine the |
|00004320| 67 6c 6f 62 61 6c 20 76 | 61 72 69 61 62 6c 65 20 |global v|ariable |
|00004330| 6b 74 45 52 52 4e 4f 20 | 74 6f 0a 0d 20 20 73 65 |ktERRNO |to.. se|
|00004340| 65 20 77 68 61 74 20 68 | 61 73 20 6f 63 63 75 72 |e what h|as occur|
|00004350| 72 65 64 2e 20 41 20 63 | 6f 6d 6d 61 6e 64 20 77 |red. A c|ommand w|
|00004360| 68 69 63 68 20 72 65 61 | 64 73 20 61 20 72 65 63 |hich rea|ds a rec|
|00004370| 6f 72 64 2c 20 72 65 74 | 75 72 6e 73 20 74 68 65 |ord, ret|urns the|
|00004380| 20 6c 65 6e 67 74 68 0a | 0d 20 20 6f 66 20 74 68 | length.|. of th|
|00004390| 65 20 72 65 63 6f 72 64 | 20 72 65 61 64 2e 20 53 |e record| read. S|
|000043a0| 6f 6d 65 20 6f 66 20 74 | 68 65 20 63 6f 6d 6d 61 |ome of t|he comma|
|000043b0| 6e 64 73 20 63 61 6e 20 | 72 65 74 75 72 6e 20 61 |nds can |return a|
|000043c0| 20 6e 65 67 61 74 69 76 | 65 20 6e 75 6d 62 65 72 | negativ|e number|
|000043d0| 2e 20 54 68 69 73 0a 0d | 20 20 65 69 74 68 65 72 |. This..| either|
|000043e0| 20 6d 65 61 6e 73 20 74 | 68 61 74 20 74 68 65 20 | means t|hat the |
|000043f0| 72 65 63 6f 72 64 20 72 | 65 61 64 20 69 73 20 64 |record r|ead is d|
|00004400| 65 6c 65 74 65 64 20 61 | 6e 64 20 73 68 6f 75 6c |eleted a|nd shoul|
|00004410| 64 20 62 65 20 69 67 6e | 6f 72 65 64 20 28 65 2e |d be ign|ored (e.|
|00004420| 67 2e 0a 0d 20 20 6b 74 | 4e 65 78 74 50 68 79 73 |g... kt|NextPhys|
|00004430| 29 20 6f 72 20 74 68 61 | 74 20 74 68 65 72 65 20 |) or tha|t there |
|00004440| 61 72 65 20 6d 6f 72 65 | 20 74 68 61 6e 20 6f 6e |are more| than on|
|00004450| 65 20 72 65 63 6f 72 64 | 20 77 68 69 63 68 20 73 |e record| which s|
|00004460| 61 74 69 73 66 69 65 73 | 20 74 68 65 0a 0d 20 20 |atisfies| the.. |
|00004470| 63 6f 6e 64 69 74 69 6f | 6e 73 20 73 65 74 20 28 |conditio|ns set (|
|00004480| 65 2e 67 2e 20 6b 74 47 | 65 74 4b 65 79 29 2e 20 |e.g. ktG|etKey). |
|00004490| 57 65 20 73 75 67 67 65 | 73 74 20 79 6f 75 20 66 |We sugge|st you f|
|000044a0| 61 6d 69 6c 69 61 72 69 | 73 65 20 79 6f 75 72 73 |amiliari|se yours|
|000044b0| 65 6c 66 20 77 69 74 68 | 0a 0d 20 20 63 6f 6d 6d |elf with|.. comm|
|000044c0| 61 6e 64 73 2c 20 62 79 | 20 72 65 61 64 69 6e 67 |ands, by| reading|
|000044d0| 20 61 6c 6c 20 6f 66 20 | 74 68 69 73 20 6d 61 6e | all of |this man|
|000044e0| 75 61 6c 2e 20 49 74 20 | 77 6f 6e 27 74 20 74 61 |ual. It |won't ta|
|000044f0| 6b 65 20 6c 6f 6e 67 2e | 00 87 04 02 74 40 00 00 |ke long.|....t@..|
|00004500| 2e 48 00 00 24 03 00 00 | 30 31 30 00 06 00 50 00 |.H..$...|010...P.|
|00004510| c8 00 e5 03 db 00 5a 00 | e6 03 20 20 54 68 65 20 |......Z.|.. The |
|00004520| 4b 65 79 54 72 65 65 20 | 63 6f 6d 6d 61 6e 64 73 |KeyTree |commands|
|00004530| 20 63 61 6e 20 62 65 20 | 6c 6f 6f 73 65 6c 79 20 | can be |loosely |
|00004540| 67 72 6f 75 70 65 64 20 | 61 73 20 66 6f 6c 6c 6f |grouped |as follo|
|00004550| 77 73 0a 0d 20 20 28 70 | 72 65 73 73 20 3c 34 3e |ws.. (p|ress <4>|
|00004560| 20 66 6f 72 20 66 75 72 | 74 68 65 72 20 64 65 74 | for fur|ther det|
|00004570| 61 69 6c 73 20 6f 66 20 | 65 61 63 68 20 6f 66 20 |ails of |each of |
|00004580| 74 68 65 20 63 6f 6d 6d | 61 6e 64 73 29 20 3a 0a |the comm|ands) :.|
|00004590| 0a 0d 20 20 46 69 6c 65 | 20 63 6f 6d 6d 61 6e 64 |.. File| command|
|000045a0| 73 20 20 20 20 20 20 3a | 20 6b 74 43 72 65 61 74 |s :| ktCreat|
|000045b0| 65 2c 20 6b 74 4f 70 65 | 6e 2c 20 6b 74 43 6c 6f |e, ktOpe|n, ktClo|
|000045c0| 73 65 2c 20 6b 74 43 68 | 61 6e 67 65 49 6e 64 65 |se, ktCh|angeInde|
|000045d0| 78 2c 20 6b 74 46 6c 75 | 73 68 2c 0a 0d 20 20 20 |x, ktFlu|sh,.. |
|000045e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000045f0| 20 20 20 20 6b 74 53 69 | 7a 65 2c 20 20 20 6b 74 | ktSi|ze, kt|
|00004600| 52 65 63 6f 72 64 73 2e | 0a 0a 0d 20 20 4c 6f 67 |Records.|... Log|
|00004610| 69 63 61 6c 20 63 6f 6d | 6d 61 6e 64 73 20 20 20 |ical com|mands |
|00004620| 3a 20 6b 74 52 65 61 64 | 2c 20 6b 74 52 65 61 64 |: ktRead|, ktRead|
|00004630| 41 66 74 65 72 2c 20 6b | 74 52 65 61 64 42 65 66 |After, k|tReadBef|
|00004640| 6f 72 65 2c 20 6b 74 4c | 65 6e 67 74 68 2c 20 6b |ore, ktL|ength, k|
|00004650| 74 41 64 64 2c 0a 0d 20 | 20 20 20 20 20 20 20 20 |tAdd,.. | |
|00004660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6b 74 | | kt|
|00004670| 4e 65 78 74 2c 20 6b 74 | 50 72 65 76 2c 20 6b 74 |Next, kt|Prev, kt|
|00004680| 53 74 61 72 74 2c 20 6b | 74 45 6e 64 2c 20 6b 74 |Start, k|tEnd, kt|
|00004690| 47 65 74 4b 65 79 2c 20 | 6b 74 52 65 61 64 41 6c |GetKey, |ktReadAl|
|000046a0| 6c 2c 0a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |l,.. | |
|000046b0| 20 20 20 20 20 20 20 20 | 20 20 20 6b 74 4e 65 78 | | ktNex|
|000046c0| 74 41 6c 6c 2c 20 6b 74 | 50 72 65 76 41 6c 6c 2c |tAll, kt|PrevAll,|
|000046d0| 20 6b 74 4c 6f 63 6b 65 | 64 2e 0a 0a 0d 20 20 50 | ktLocke|d.... P|
|000046e0| 68 79 73 69 63 61 6c 20 | 63 6f 6d 6d 61 6e 64 73 |hysical |commands|
|000046f0| 20 20 3a 20 6b 74 41 64 | 64 50 68 79 73 2c 20 6b | : ktAd|dPhys, k|
|00004700| 74 4e 65 78 74 50 68 79 | 73 2c 20 6b 74 50 72 65 |tNextPhy|s, ktPre|
|00004710| 76 50 68 79 73 2c 20 6b | 74 53 74 61 72 74 50 68 |vPhys, k|tStartPh|
|00004720| 79 73 2c 0a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ys,.. | |
|00004730| 20 20 20 20 20 20 20 20 | 20 20 20 20 6b 74 45 6e | | ktEn|
|00004740| 64 50 68 79 73 2e 0a 0a | 0d 20 20 43 6f 6d 6d 61 |dPhys...|. Comma|
|00004750| 6e 64 73 20 77 68 69 63 | 68 20 61 63 74 20 3a 20 |nds whic|h act : |
|00004760| 6b 74 52 65 77 72 69 74 | 65 2c 20 6b 74 44 65 6c |ktRewrit|e, ktDel|
|00004770| 65 74 65 2c 20 6b 74 55 | 6e 64 65 6c 65 74 65 2c |ete, ktU|ndelete,|
|00004780| 20 6b 74 4c 6f 63 6b 2c | 20 6b 74 55 6e 6c 6f 63 | ktLock,| ktUnloc|
|00004790| 6b 2e 0a 0d 20 20 6f 6e | 20 74 68 65 20 6c 61 73 |k... on| the las|
|000047a0| 74 20 72 65 63 6f 72 64 | 0a 0d 20 20 72 65 61 64 |t record|.. read|
|000047b0| 0a 0a 0d 20 20 52 65 63 | 6f 72 64 20 63 68 61 69 |... Rec|ord chai|
|000047c0| 6e 69 6e 67 20 20 20 20 | 3a 20 6b 74 41 64 64 43 |ning |: ktAddC|
|000047d0| 68 61 69 6e 2c 20 6b 74 | 4e 65 78 74 43 68 61 69 |hain, kt|NextChai|
|000047e0| 6e 2c 20 6b 74 50 72 65 | 76 43 68 61 69 6e 2e 0a |n, ktPre|vChain..|
|000047f0| 0a 0d 20 20 4f 74 68 65 | 72 73 20 20 20 20 20 20 |.. Othe|rs |
|00004800| 20 20 20 20 20 20 20 3a | 20 6b 74 47 65 74 43 68 | :| ktGetCh|
|00004810| 61 72 2c 20 20 6b 74 47 | 65 74 50 72 65 73 73 2c |ar, ktG|etPress,|
|00004820| 20 20 6b 74 47 65 74 53 | 74 72 2e 00 33 03 02 fb | ktGetS|tr..3...|
|00004830| 44 00 00 00 00 00 00 df | 00 00 00 30 31 30 00 06 |D.......|...010..|
|00004840| 00 50 00 c8 00 e5 03 db | 00 5a 00 e6 03 20 20 46 |.P......|.Z... F|
|00004850| 6f 72 20 66 75 72 74 68 | 65 72 20 64 65 74 61 69 |or furth|er detai|
|00004860| 6c 73 20 6f 66 20 68 6f | 77 20 79 6f 75 20 6d 69 |ls of ho|w you mi|
|00004870| 67 68 74 20 75 73 65 20 | 74 68 65 20 4b 65 79 54 |ght use |the KeyT|
|00004880| 72 65 65 20 55 74 69 6c | 69 74 69 65 73 2c 20 77 |ree Util|ities, w|
|00004890| 65 20 73 75 67 67 65 73 | 74 0a 0d 20 20 74 68 61 |e sugges|t.. tha|
|000048a0| 74 20 79 6f 75 20 72 75 | 6e 20 74 68 65 20 70 72 |t you ru|n the pr|
|000048b0| 6f 67 72 61 6d 20 53 41 | 4d 50 4c 45 53 2e 45 58 |ogram SA|MPLES.EX|
|000048c0| 45 2c 20 77 68 69 63 68 | 20 63 6f 6e 74 61 69 6e |E, which| contain|
|000048d0| 73 20 73 6f 6d 65 20 75 | 73 65 66 75 6c 20 65 78 |s some u|seful ex|
|000048e0| 61 6d 70 6c 65 73 2e 0a | 0d 20 20 50 72 65 73 73 |amples..|. Press|
|000048f0| 20 3c 35 3e 20 69 66 20 | 79 6f 75 20 77 61 6e 74 | <5> if |you want|
|00004900| 20 74 6f 20 72 75 6e 20 | 74 68 69 73 20 70 72 6f | to run |this pro|
|00004910| 67 72 61 6d 20 6e 6f 77 | 2e 00 ee 00 00 00 00 00 |gram now|........|
|00004920| 00 00 00 00 00 f2 01 00 | 00 32 30 34 00 00 00 20 |........|.204... |
|00004930| 20 da c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | .......|........|
|00004940| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 bf 0a 0d 20 20 |........|...... |
|00004950| b3 20 69 6e 74 20 20 6b | 74 43 6c 6f 73 65 28 69 |. int k|tClose(i|
|00004960| 6e 74 20 66 69 6c 65 29 | 3b 20 b3 0a 0d 20 20 c0 |nt file)|; ... .|
|00004970| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004980| c4 c4 c4 c4 c4 c4 c4 c4 | c4 d9 0a 0a 0d 20 20 50 |........|..... P|
|00004990| 75 72 70 6f 73 65 20 20 | 20 20 20 20 3a 20 43 6c |urpose | : Cl|
|000049a0| 6f 73 65 73 20 61 20 4b | 65 79 54 72 65 65 20 66 |oses a K|eyTree f|
|000049b0| 69 6c 65 2c 20 61 6e 64 | 20 74 69 64 69 65 73 20 |ile, and| tidies |
|000049c0| 75 70 20 6d 65 6d 6f 72 | 79 20 61 6c 6c 6f 63 61 |up memor|y alloca|
|000049d0| 74 69 6f 6e 73 2e 0a 0a | 0d 20 20 50 61 72 61 6d |tions...|. Param|
|000049e0| 65 74 65 72 20 20 20 20 | 3a 20 3c 66 69 6c 65 3e |eter |: <file>|
|000049f0| 20 69 73 20 74 68 65 20 | 66 69 6c 65 20 6e 75 6d | is the |file num|
|00004a00| 62 65 72 20 72 65 74 75 | 72 6e 65 64 20 62 79 20 |ber retu|rned by |
|00004a10| 6b 74 4f 70 65 6e 2e 0a | 0a 0d 20 20 52 65 74 75 |ktOpen..|.. Retu|
|00004a20| 72 6e 73 20 20 20 20 20 | 20 3a 20 7a 65 72 6f 20 |rns | : zero |
|00004a30| 69 66 20 6e 6f 74 20 73 | 75 63 63 65 73 73 66 75 |if not s|uccessfu|
|00004a40| 6c 2c 20 6e 6f 6e 2d 7a | 65 72 6f 20 69 66 20 73 |l, non-z|ero if s|
|00004a50| 75 63 63 65 73 73 66 75 | 6c 2e 0a 0a 0d 20 20 45 |uccessfu|l.... E|
|00004a60| 72 72 6f 72 20 63 6f 64 | 65 73 20 20 3a 20 39 20 |rror cod|es : 9 |
|00004a70| 2d 20 66 69 6c 65 20 69 | 73 20 6e 6f 74 20 6f 70 |- file i|s not op|
|00004a80| 65 6e 2e 0a 0a 0d 20 20 | 45 78 61 6d 70 6c 65 20 |en.... |Example |
|00004a90| 20 20 20 20 20 3a 20 69 | 6e 74 20 66 64 3b 0a 0d | : i|nt fd;..|
|00004aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ab0| 20 66 64 20 3d 20 6b 74 | 4f 70 65 6e 28 22 66 69 | fd = kt|Open("fi|
|00004ac0| 6c 65 6e 61 6d 65 22 2c | 31 2c 30 29 3b 0a 0d 20 |lename",|1,0);.. |
|00004ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ae0| 20 20 20 2e 0a 0d 20 20 | 20 20 20 20 20 20 20 20 | ... | |
|00004af0| 20 20 20 20 20 20 20 20 | 20 20 2e 0a 0d 20 20 20 | | ... |
|00004b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 6b 74 | | kt|
|00004b10| 43 6c 6f 73 65 28 66 64 | 29 3b 00 01 02 00 00 00 |Close(fd|);......|
|00004b20| 00 00 00 00 00 00 b0 02 | 00 00 32 30 33 00 00 00 |........|..203...|
|00004b30| 20 20 da c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | ......|........|
|00004b40| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 bf 0a 0d 20 |........|....... |
|00004b50| 20 b3 20 69 6e 74 20 20 | 6b 74 46 6c 75 73 68 28 | . int |ktFlush(|
|00004b60| 69 6e 74 20 66 69 6c 65 | 29 3b 20 b3 0a 0d 20 20 |int file|); ... |
|00004b70| c0 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004b80| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 d9 0a 0a 0d 20 20 |........|...... |
|00004b90| 50 75 72 70 6f 73 65 20 | 20 20 20 20 20 3a 20 43 |Purpose | : C|
|00004ba0| 6c 6f 73 65 73 20 61 6e | 64 20 72 65 6f 70 65 6e |loses an|d reopen|
|00004bb0| 73 20 61 20 4b 65 79 54 | 72 65 65 20 66 69 6c 65 |s a KeyT|ree file|
|00004bc0| 20 69 6e 20 6f 72 64 65 | 72 20 74 6f 20 65 6e 73 | in orde|r to ens|
|00004bd0| 75 72 65 0a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ure.. | |
|00004be0| 20 20 20 20 20 20 74 68 | 61 74 20 63 68 61 6e 67 | th|at chang|
|00004bf0| 65 73 20 74 6f 20 74 68 | 65 20 66 69 6c 65 20 61 |es to th|e file a|
|00004c00| 72 65 20 70 68 79 73 69 | 63 61 6c 6c 79 20 77 72 |re physi|cally wr|
|00004c10| 69 74 74 65 6e 20 74 6f | 20 64 69 73 6b 2e 0a 0a |itten to| disk...|
|00004c20| 0d 20 20 50 61 72 61 6d | 65 74 65 72 73 20 20 20 |. Param|eters |
|00004c30| 3a 20 3c 66 69 6c 65 3e | 20 69 73 20 74 68 65 20 |: <file>| is the |
|00004c40| 6e 75 6d 62 65 72 20 72 | 65 74 75 72 6e 65 64 20 |number r|eturned |
|00004c50| 62 79 20 6b 74 4f 70 65 | 6e 2e 0a 0a 0d 20 20 52 |by ktOpe|n.... R|
|00004c60| 65 74 75 72 6e 73 20 20 | 20 20 20 20 3a 20 7a 65 |eturns | : ze|
|00004c70| 72 6f 20 69 66 20 6e 6f | 74 20 73 75 63 63 65 73 |ro if no|t succes|
|00004c80| 73 66 75 6c 2c 20 6e 6f | 6e 2d 7a 65 72 6f 20 69 |sful, no|n-zero i|
|00004c90| 66 20 73 75 63 63 65 73 | 73 66 75 6c 2e 0a 0a 0d |f succes|sful....|
|00004ca0| 20 20 4e 6f 74 65 73 20 | 20 20 20 20 20 20 20 3a | Notes | :|
|00004cb0| 20 54 68 69 73 20 63 6f | 6d 6d 61 6e 64 20 69 73 | This co|mmand is|
|00004cc0| 20 6e 65 63 65 73 73 61 | 72 79 2c 20 73 69 6e 63 | necessa|ry, sinc|
|00004cd0| 65 20 44 4f 53 20 6b 65 | 65 70 73 20 64 61 74 61 |e DOS ke|eps data|
|00004ce0| 20 74 72 61 6e 73 66 65 | 72 73 0a 0d 20 20 20 20 | transfe|rs.. |
|00004cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 6e 20 | | in |
|00004d00| 69 6e 74 65 72 6e 61 6c | 20 62 75 66 66 65 72 73 |internal| buffers|
|00004d10| 2c 20 61 6e 64 20 69 66 | 20 79 6f 75 72 20 6d 61 |, and if| your ma|
|00004d20| 63 68 69 6e 65 20 70 6f | 77 65 72 65 64 20 64 6f |chine po|wered do|
|00004d30| 77 6e 20 69 6e 0a 0d 20 | 20 20 20 20 20 20 20 20 |wn in.. | |
|00004d40| 20 20 20 20 20 20 20 20 | 74 68 65 20 6d 69 64 64 | |the midd|
|00004d50| 6c 65 20 6f 66 20 70 72 | 6f 63 65 73 73 69 6e 67 |le of pr|ocessing|
|00004d60| 2c 20 79 6f 75 20 63 6f | 75 6c 64 20 6c 6f 73 65 |, you co|uld lose|
|00004d70| 20 64 61 74 61 2e 0a 0a | 0d 20 20 45 72 72 6f 72 | data...|. Error|
|00004d80| 20 63 6f 64 65 73 20 20 | 3a 20 39 20 2d 20 66 69 | codes |: 9 - fi|
|00004d90| 6c 65 20 69 73 20 6e 6f | 74 20 6f 70 65 6e 2e 0a |le is no|t open..|
|00004da0| 0a 0d 20 20 45 78 61 6d | 70 6c 65 20 20 20 20 20 |.. Exam|ple |
|00004db0| 20 3a 20 69 6e 74 20 66 | 64 3b 0a 0d 20 20 20 20 | : int f|d;.. |
|00004dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6b 74 46 | | ktF|
|00004dd0| 6c 75 73 68 28 66 64 29 | 3b 00 bf 02 30 f0 ff ff |lush(fd)|;...0...|
|00004de0| ff 00 00 00 00 00 00 00 | 00 ed b1 ff ff 80 a5 ff |........|........|
|00004df0| ff 69 76 ff ff 0f 5d ff | ff 00 00 00 00 00 00 00 |.iv...].|........|
|00004e00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004e10| 00 37 00 30 24 b2 ff ff | 00 00 00 00 00 00 00 00 |.7.0$...|........|
|00004e20| 9c ea 00 00 a4 f6 00 00 | b3 b7 00 00 1d 4b 00 00 |........|.....K..|
|00004e30| 1c 49 00 00 b6 18 01 00 | 4a 4e 00 00 27 d6 00 00 |.I......|JN..'...|
|00004e40| 06 dc 00 00 77 e3 00 00 | 37 00 00 00 00 00 00 93 |....w...|7.......|
|00004e50| 50 00 00 3a 02 00 00 32 | 30 36 00 00 00 20 20 da |P..:...2|06... .|
|00004e60| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004e70| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004e80| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004e90| c4 c4 c4 bf 0a 0d 20 20 | b3 20 69 6e 74 20 20 6b |...... |. int k|
|00004ea0| 74 41 64 64 50 68 79 73 | 28 69 6e 74 20 66 69 6c |tAddPhys|(int fil|
|00004eb0| 65 2c 76 6f 69 64 20 2a | 72 65 63 6f 72 64 2c 69 |e,void *|record,i|
|00004ec0| 6e 74 20 6c 65 6e 67 74 | 68 29 3b 20 b3 0a 0d 20 |nt lengt|h); ... |
|00004ed0| 20 c0 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 | .......|........|
|00004ee0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004ef0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00004f00| c4 c4 c4 c4 c4 d9 0a 0a | 0d 20 20 50 75 72 70 6f |........|. Purpo|
|00004f10| 73 65 20 20 20 20 20 20 | 3a 20 41 64 64 73 20 61 |se |: Adds a|
|00004f20| 6e 20 75 6e 69 6e 64 65 | 78 65 64 20 72 65 63 6f |n uninde|xed reco|
|00004f30| 72 64 20 74 6f 20 61 20 | 4b 65 79 54 72 65 65 20 |rd to a |KeyTree |
|00004f40| 66 69 6c 65 2e 0a 0a 0d | 20 20 50 61 72 61 6d 65 |file....| Parame|
|00004f50| 74 65 72 73 20 20 20 3a | 20 3c 66 69 6c 65 3e 20 |ters :| <file> |
|00004f60| 69 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 72 65 |is the n|umber re|
|00004f70| 74 75 72 6e 65 64 20 62 | 79 20 6b 74 4f 70 65 6e |turned b|y ktOpen|
|00004f80| 2e 0a 0a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|00004f90| 20 20 20 20 20 3c 72 65 | 63 6f 72 64 3e 20 69 73 | <re|cord> is|
|00004fa0| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 | a point|er to th|
|00004fb0| 65 20 72 65 63 6f 72 64 | 20 74 6f 20 62 65 20 61 |e record| to be a|
|00004fc0| 64 64 65 64 2e 20 54 79 | 70 69 63 61 6c 6c 79 0a |dded. Ty|pically.|
|00004fd0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00004fe0| 20 20 74 68 69 73 20 77 | 6f 75 6c 64 20 62 65 20 | this w|ould be |
|00004ff0| 74 68 65 20 61 64 64 72 | 65 73 73 20 6f 66 20 61 |the addr|ess of a|
|00005000| 20 73 74 72 75 63 74 2e | 0a 0a 0d 20 20 20 20 20 | struct.|... |
|00005010| 20 20 20 20 20 20 20 20 | 20 20 20 20 3c 6c 65 6e | | <len|
|00005020| 67 74 68 3e 20 69 73 20 | 74 68 65 20 6c 65 6e 67 |gth> is |the leng|
|00005030| 74 68 20 6f 66 20 74 68 | 65 20 72 65 63 6f 72 64 |th of th|e record|
|00005040| 20 74 6f 20 62 65 20 61 | 64 64 65 64 2e 0a 0a 0d | to be a|dded....|
|00005050| 20 20 52 65 74 75 72 6e | 73 20 20 20 20 20 20 3a | Return|s :|
|00005060| 20 7a 65 72 6f 20 69 66 | 20 6e 6f 74 20 73 75 63 | zero if| not suc|
|00005070| 63 65 73 73 66 75 6c 2c | 20 6e 6f 6e 2d 7a 65 72 |cessful,| non-zer|
|00005080| 6f 20 69 66 20 73 75 63 | 63 65 73 73 66 75 6c 2e |o if suc|cessful.|
|00005090| 00 49 02 02 4a 4e 00 00 | 00 00 00 00 bc 02 00 00 |.I..JN..|........|
|000050a0| 32 30 36 00 00 00 20 20 | 4e 6f 74 65 73 20 20 20 |206... |Notes |
|000050b0| 20 20 20 20 20 3a 20 54 | 68 65 20 72 65 63 6f 72 | : T|he recor|
|000050c0| 64 20 69 73 20 61 64 64 | 65 64 20 61 74 20 74 68 |d is add|ed at th|
|000050d0| 65 20 65 6e 64 20 6f 66 | 20 74 68 65 20 66 69 6c |e end of| the fil|
|000050e0| 65 2e 20 48 6f 77 65 76 | 65 72 2c 20 69 66 0a 0d |e. Howev|er, if..|
|000050f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005100| 20 79 6f 75 20 6c 61 74 | 65 72 20 61 6c 74 65 72 | you lat|er alter|
|00005110| 20 74 68 65 20 72 65 63 | 6f 72 64 20 73 6f 20 74 | the rec|ord so t|
|00005120| 68 61 74 20 69 74 20 69 | 73 20 6c 6f 6e 67 65 72 |hat it i|s longer|
|00005130| 2c 20 69 74 20 77 69 6c | 6c 0a 0d 20 20 20 20 20 |, it wil|l.. |
|00005140| 20 20 20 20 20 20 20 20 | 20 20 20 20 62 65 20 72 | | be r|
|00005150| 65 77 72 69 74 74 65 6e | 20 61 74 20 74 68 65 20 |ewritten| at the |
|00005160| 6e 65 77 20 65 6e 64 20 | 6f 66 20 66 69 6c 65 2e |new end |of file.|
|00005170| 20 53 6f 2c 20 70 68 79 | 73 69 63 61 6c 20 63 6f | So, phy|sical co|
|00005180| 6d 6d 61 6e 64 73 0a 0d | 20 20 20 20 20 20 20 20 |mmands..| |
|00005190| 20 20 20 20 20 20 20 20 | 20 73 68 6f 75 6c 64 20 | | should |
|000051a0| 6f 6e 6c 79 20 62 65 20 | 75 73 65 64 20 77 68 65 |only be |used whe|
|000051b0| 72 65 20 74 68 65 20 73 | 65 71 75 65 6e 63 65 20 |re the s|equence |
|000051c0| 69 73 20 69 6d 6d 61 74 | 65 72 69 61 6c 2c 20 6f |is immat|erial, o|
|000051d0| 72 0a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r.. | |
|000051e0| 20 20 20 20 77 68 65 72 | 65 20 69 74 73 20 70 6f | wher|e its po|
|000051f0| 73 69 74 69 6f 6e 20 63 | 61 6e 20 62 65 20 70 72 |sition c|an be pr|
|00005200| 65 64 69 63 74 65 64 20 | 28 73 75 63 68 20 61 73 |edicted |(such as|
|00005210| 20 61 20 66 69 78 65 64 | 20 6c 65 6e 67 74 68 0a | a fixed| length.|
|00005220| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005230| 20 20 72 65 63 6f 72 64 | 2c 20 72 69 67 68 74 20 | record|, right |
|00005240| 61 74 20 74 68 65 20 62 | 65 67 69 6e 6e 69 6e 67 |at the b|eginning|
|00005250| 20 6f 66 20 61 20 66 69 | 6c 65 29 2e 0a 0a 0d 20 | of a fi|le).... |
|00005260| 20 45 72 72 6f 72 20 63 | 6f 64 65 73 20 20 3a 20 | Error c|odes : |
|00005270| 39 20 20 2d 20 66 69 6c | 65 20 69 73 20 6e 6f 74 |9 - fil|e is not|
|00005280| 20 6f 70 65 6e 2e 20 20 | 20 20 20 20 31 32 20 2d | open. | 12 -|
|00005290| 20 66 69 6c 65 20 6f 70 | 65 6e 20 66 6f 72 20 72 | file op|en for r|
|000052a0| 65 61 64 69 6e 67 20 6f | 6e 6c 79 2e 0a 0d 20 20 |eading o|nly... |
|000052b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 31 | | 1|
|000052c0| 35 20 2d 20 69 6e 76 61 | 6c 69 64 20 72 65 63 6f |5 - inva|lid reco|
|000052d0| 72 64 20 6c 65 6e 67 74 | 68 2e 0a 0a 0d 20 20 45 |rd lengt|h.... E|
|000052e0| 78 61 6d 70 6c 65 20 20 | 20 20 20 20 3a 20 69 6e |xample | : in|
|000052f0| 74 20 66 64 3b 0a 0d 20 | 20 20 20 20 20 20 20 20 |t fd;.. | |
|00005300| 20 20 20 20 20 20 20 20 | 73 74 72 75 63 74 20 7b | |struct {|
|00005310| 20 2e 2e 2e 2e 2e 2e 2e | 2e 20 7d 20 72 65 63 6f | .......|. } reco|
|00005320| 72 64 3b 0a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |rd;.. | |
|00005330| 20 20 20 20 20 20 6b 74 | 41 64 64 50 68 79 73 28 | kt|AddPhys(|
|00005340| 66 64 2c 26 72 65 63 6f | 72 64 2c 73 69 7a 65 6f |fd,&reco|rd,sizeo|
|00005350| 66 28 72 65 63 6f 72 64 | 29 29 3b 00 cb 02 00 00 |f(record|));.....|
|00005360| 00 00 00 de 55 00 00 71 | 02 00 00 32 31 31 00 00 |....U..q|...211..|
|00005370| 00 20 20 da c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |. .....|........|
|00005380| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005390| c4 c4 c4 c4 c4 c4 c4 c4 | c4 bf 0a 0d 20 20 b3 20 |........|.... . |
|000053a0| 69 6e 74 20 20 6b 74 4e | 65 78 74 28 69 6e 74 20 |int ktN|ext(int |
|000053b0| 66 69 6c 65 2c 76 6f 69 | 64 20 2a 72 65 63 6f 72 |file,voi|d *recor|
|000053c0| 64 29 3b 20 b3 0a 0d 20 | 20 c0 c4 c4 c4 c4 c4 c4 |d); ... | .......|
|000053d0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000053e0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 d9 |........|........|
|000053f0| 0a 0a 0d 20 20 50 75 72 | 70 6f 73 65 20 20 20 20 |... Pur|pose |
|00005400| 20 20 3a 20 52 65 61 64 | 73 20 74 68 65 20 72 65 | : Read|s the re|
|00005410| 63 6f 72 64 20 77 69 74 | 68 20 74 68 65 20 6e 65 |cord wit|h the ne|
|00005420| 78 74 20 68 69 67 68 65 | 72 20 6b 65 79 20 69 6e |xt highe|r key in|
|00005430| 20 74 68 65 20 63 75 72 | 72 65 6e 74 0a 0d 20 20 | the cur|rent.. |
|00005440| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00005450| 6e 64 65 78 20 74 68 61 | 6e 20 74 68 65 20 6c 61 |ndex tha|n the la|
|00005460| 73 74 20 72 65 63 6f 72 | 64 20 72 65 61 64 2e 20 |st recor|d read. |
|00005470| 49 66 20 74 68 65 20 6c | 6f 67 69 63 61 6c 20 65 |If the l|ogical e|
|00005480| 6e 64 20 6f 66 20 66 69 | 6c 65 0a 0d 20 20 20 20 |nd of fi|le.. |
|00005490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 69 73 20 | | is |
|000054a0| 72 65 61 63 68 65 64 2c | 20 61 6e 20 65 72 72 6f |reached,| an erro|
|000054b0| 72 20 63 6f 6e 64 69 74 | 69 6f 6e 20 69 73 20 73 |r condit|ion is s|
|000054c0| 65 74 2e 0a 0a 0d 20 20 | 50 61 72 61 6d 65 74 65 |et.... |Paramete|
|000054d0| 72 73 20 20 20 3a 20 3c | 66 69 6c 65 3e 20 69 73 |rs : <|file> is|
|000054e0| 20 74 68 65 20 6e 75 6d | 62 65 72 20 72 65 74 75 | the num|ber retu|
|000054f0| 72 6e 65 64 20 62 79 20 | 6b 74 4f 70 65 6e 2e 0a |rned by |ktOpen..|
|00005500| 0a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00005510| 20 20 20 3c 72 65 63 6f | 72 64 3e 20 69 73 20 61 | <reco|rd> is a|
|00005520| 20 70 6f 69 6e 74 65 72 | 20 74 6f 20 74 68 65 20 | pointer| to the |
|00005530| 6d 65 6d 6f 72 79 20 61 | 72 65 61 20 77 68 65 72 |memory a|rea wher|
|00005540| 65 20 74 68 65 20 72 65 | 63 6f 72 64 0a 0d 20 20 |e the re|cord.. |
|00005550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 77 | | w|
|00005560| 69 6c 6c 20 62 65 20 72 | 65 61 64 2e 0a 0a 0d 20 |ill be r|ead.... |
|00005570| 20 52 65 74 75 72 6e 73 | 20 20 20 20 20 20 3a 20 | Returns| : |
|00005580| 7a 65 72 6f 20 69 66 20 | 6e 6f 74 20 73 75 63 63 |zero if |not succ|
|00005590| 65 73 73 66 75 6c 2c 0a | 0d 20 20 20 20 20 20 20 |essful,.|. |
|000055a0| 20 20 20 20 20 20 20 20 | 20 20 74 68 65 20 6c 65 | | the le|
|000055b0| 6e 67 74 68 20 6f 66 20 | 74 68 65 20 72 65 63 6f |ngth of |the reco|
|000055c0| 72 64 20 69 6e 20 62 79 | 74 65 73 2c 20 69 66 20 |rd in by|tes, if |
|000055d0| 73 75 63 63 65 73 73 66 | 75 6c 2e 00 80 02 02 5e |successf|ul.....^|
|000055e0| 53 00 00 00 00 00 00 12 | 02 00 00 32 31 31 00 00 |S.......|...211..|
|000055f0| 00 20 20 4e 6f 74 65 73 | 20 20 20 20 20 20 20 20 |. Notes| |
|00005600| 3a 20 4e 6f 72 6d 61 6c | 6c 79 20 75 73 65 64 20 |: Normal|ly used |
|00005610| 66 6f 72 20 72 65 61 64 | 69 6e 67 20 61 6c 6c 20 |for read|ing all |
|00005620| 74 68 65 20 72 65 63 6f | 72 64 73 20 69 6e 20 61 |the reco|rds in a|
|00005630| 20 66 69 6c 65 20 69 6e | 20 61 0a 0d 20 20 20 20 | file in| a.. |
|00005640| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6c 6f 67 | | log|
|00005650| 69 63 61 6c 20 73 65 71 | 75 65 6e 63 65 2e 0a 0a |ical seq|uence...|
|00005660| 0d 20 20 45 72 72 6f 72 | 20 63 6f 64 65 73 20 20 |. Error| codes |
|00005670| 3a 20 39 20 20 2d 20 66 | 69 6c 65 20 69 73 20 6e |: 9 - f|ile is n|
|00005680| 6f 74 20 6f 70 65 6e 2e | 20 20 20 20 20 20 20 20 |ot open.| |
|00005690| 20 20 20 20 31 38 20 2d | 20 63 61 6e 27 74 20 72 | 18 -| can't r|
|000056a0| 65 61 64 20 72 65 63 6f | 72 64 2e 0a 0d 20 20 20 |ead reco|rd... |
|000056b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 32 36 | | 26|
|000056c0| 20 2d 20 6c 6f 67 69 63 | 61 6c 20 65 6e 64 20 6f | - logic|al end o|
|000056d0| 66 20 66 69 6c 65 20 72 | 65 61 63 68 65 64 2e 0a |f file r|eached..|
|000056e0| 0a 0d 20 20 45 78 61 6d | 70 6c 65 20 20 20 20 20 |.. Exam|ple |
|000056f0| 20 3a 20 69 6e 74 20 72 | 65 73 2c 66 64 3b 0a 0d | : int r|es,fd;..|
|00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005710| 20 65 78 74 65 72 6e 20 | 69 6e 74 20 6b 74 45 52 | extern |int ktER|
|00005720| 52 4e 4f 3b 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |RNO;.. | |
|00005730| 20 20 20 20 20 20 20 73 | 74 72 75 63 74 20 7b 20 | s|truct { |
|00005740| 2e 2e 2e 2e 2e 2e 2e 2e | 20 7d 20 72 65 63 3b 0a |........| } rec;.|
|00005750| 0a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00005760| 20 20 20 66 6f 72 20 28 | 72 65 73 20 3d 20 6b 74 | for (|res = kt|
|00005770| 53 74 61 72 74 28 66 64 | 2c 26 72 65 63 29 3b 20 |Start(fd|,&rec); |
|00005780| 72 65 73 3b 20 72 65 73 | 20 3d 20 6b 74 4e 65 78 |res; res| = ktNex|
|00005790| 74 28 66 64 2c 26 72 65 | 63 29 29 0a 0d 20 20 20 |t(fd,&re|c)).. |
|000057a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000057b0| 20 20 20 70 72 6f 63 65 | 73 73 5f 72 65 63 6f 72 | proce|ss_recor|
|000057c0| 64 28 29 3b 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |d();.. | |
|000057d0| 20 20 20 20 20 20 20 69 | 66 20 28 6b 74 45 52 52 | i|f (ktERR|
|000057e0| 4e 4f 20 21 3d 20 32 36 | 29 20 61 62 6e 6f 72 6d |NO != 26|) abnorm|
|000057f0| 61 6c 5f 65 6e 64 69 6e | 67 28 29 3b 00 21 02 00 |al_endin|g();.!..|
|00005800| 00 00 00 00 b7 5a 00 00 | 72 02 00 00 32 31 32 00 |.....Z..|r...212.|
|00005810| 00 00 20 20 da c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.. ....|........|
|00005820| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005830| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 bf 0a 0d 20 20 b3 |........|..... .|
|00005840| 20 69 6e 74 20 20 6b 74 | 50 72 65 76 28 69 6e 74 | int kt|Prev(int|
|00005850| 20 66 69 6c 65 2c 76 6f | 69 64 20 2a 72 65 63 6f | file,vo|id *reco|
|00005860| 72 64 29 3b 20 b3 0a 0d | 20 20 c0 c4 c4 c4 c4 c4 |rd); ...| ......|
|00005870| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005880| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005890| d9 0a 0a 0d 20 20 50 75 | 72 70 6f 73 65 20 20 20 |.... Pu|rpose |
|000058a0| 20 20 20 3a 20 52 65 61 | 64 73 20 74 68 65 20 72 | : Rea|ds the r|
|000058b0| 65 63 6f 72 64 20 77 69 | 74 68 20 74 68 65 20 6e |ecord wi|th the n|
|000058c0| 65 78 74 20 6c 6f 77 65 | 72 20 6b 65 79 20 69 6e |ext lowe|r key in|
|000058d0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 0a 0d 20 20 | the cur|rent.. |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|000058f0| 6e 64 65 78 20 74 68 61 | 6e 20 74 68 65 20 6c 61 |ndex tha|n the la|
|00005900| 73 74 20 72 65 63 6f 72 | 64 20 72 65 61 64 2e 20 |st recor|d read. |
|00005910| 49 66 20 74 68 65 20 6c | 6f 67 69 63 61 6c 20 73 |If the l|ogical s|
|00005920| 74 61 72 74 20 6f 66 0a | 0d 20 20 20 20 20 20 20 |tart of.|. |
|00005930| 20 20 20 20 20 20 20 20 | 20 20 66 69 6c 65 20 69 | | file i|
|00005940| 73 20 72 65 61 63 68 65 | 64 2c 20 61 6e 20 65 72 |s reache|d, an er|
|00005950| 72 6f 72 20 63 6f 6e 64 | 69 74 69 6f 6e 20 69 73 |ror cond|ition is|
|00005960| 20 73 65 74 2e 0a 0a 0d | 20 20 50 61 72 61 6d 65 | set....| Parame|
|00005970| 74 65 72 73 20 20 20 3a | 20 3c 66 69 6c 65 3e 20 |ters :| <file> |
|00005980| 69 73 20 74 68 65 20 6e | 75 6d 62 65 72 20 72 65 |is the n|umber re|
|00005990| 74 75 72 6e 65 64 20 62 | 79 20 6b 74 4f 70 65 6e |turned b|y ktOpen|
|000059a0| 2e 0a 0a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|000059b0| 20 20 20 20 20 3c 72 65 | 63 6f 72 64 3e 20 69 73 | <re|cord> is|
|000059c0| 20 61 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 | a point|er to th|
|000059d0| 65 20 6d 65 6d 6f 72 79 | 20 61 72 65 61 20 77 68 |e memory| area wh|
|000059e0| 65 72 65 20 74 68 65 20 | 72 65 63 6f 72 64 0a 0d |ere the |record..|
|000059f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a00| 20 77 69 6c 6c 20 62 65 | 20 72 65 61 64 2e 0a 0a | will be| read...|
|00005a10| 0d 20 20 52 65 74 75 72 | 6e 73 20 20 20 20 20 20 |. Retur|ns |
|00005a20| 3a 20 7a 65 72 6f 20 69 | 66 20 6e 6f 74 20 73 75 |: zero i|f not su|
|00005a30| 63 63 65 73 73 66 75 6c | 2c 0a 0d 20 20 20 20 20 |ccessful|,.. |
|00005a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 68 65 20 | | the |
|00005a50| 6c 65 6e 67 74 68 20 6f | 66 20 74 68 65 20 72 65 |length o|f the re|
|00005a60| 63 6f 72 64 20 69 6e 20 | 62 79 74 65 73 2c 20 69 |cord in |bytes, i|
|00005a70| 66 20 73 75 63 63 65 73 | 73 66 75 6c 2e 00 81 02 |f succes|sful....|
|00005a80| 30 24 b2 ff ff 00 00 00 | 00 00 00 00 00 a3 d0 00 |0$......|........|
|00005a90| 00 5e 53 00 00 ff 57 00 | 00 d8 5c 00 00 31 62 00 |.^S...W.|..\..1b.|
|00005aa0| 00 ea 68 00 00 37 6f 00 | 00 08 75 00 00 e3 79 00 |..h..7o.|..u...y.|
|00005ab0| 00 3e 06 01 00 37 00 02 | ff 57 00 00 00 00 00 00 |.>...7..|.W......|
|00005ac0| 12 02 00 00 32 31 32 00 | 00 00 20 20 4e 6f 74 65 |....212.|.. Note|
|00005ad0| 73 20 20 20 20 20 20 20 | 20 3a 20 4e 6f 72 6d 61 |s | : Norma|
|00005ae0| 6c 6c 79 20 75 73 65 64 | 20 66 6f 72 20 72 65 61 |lly used| for rea|
|00005af0| 64 69 6e 67 20 61 6c 6c | 20 74 68 65 20 72 65 63 |ding all| the rec|
|00005b00| 6f 72 64 73 20 69 6e 20 | 61 20 66 69 6c 65 20 69 |ords in |a file i|
|00005b10| 6e 20 61 0a 0d 20 20 20 | 20 20 20 20 20 20 20 20 |n a.. | |
|00005b20| 20 20 20 20 20 20 6c 6f | 67 69 63 61 6c 20 73 65 | lo|gical se|
|00005b30| 71 75 65 6e 63 65 2e 0a | 0a 0d 20 20 45 72 72 6f |quence..|.. Erro|
|00005b40| 72 20 63 6f 64 65 73 20 | 20 3a 20 39 20 20 2d 20 |r codes | : 9 - |
|00005b50| 66 69 6c 65 20 69 73 20 | 6e 6f 74 20 6f 70 65 6e |file is |not open|
|00005b60| 2e 20 20 20 20 20 20 20 | 20 20 20 20 20 31 38 20 |. | 18 |
|00005b70| 2d 20 63 61 6e 27 74 20 | 72 65 61 64 20 72 65 63 |- can't |read rec|
|00005b80| 6f 72 64 2e 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |ord... | |
|00005b90| 20 20 20 20 20 20 20 32 | 37 20 2d 20 6c 6f 67 69 | 2|7 - logi|
|00005ba0| 63 61 6c 20 73 74 61 72 | 74 20 6f 66 20 66 69 6c |cal star|t of fil|
|00005bb0| 65 20 72 65 61 63 68 65 | 64 2e 0a 0a 0d 20 20 45 |e reache|d.... E|
|00005bc0| 78 61 6d 70 6c 65 20 20 | 20 20 20 20 3a 20 69 6e |xample | : in|
|00005bd0| 74 20 72 65 73 2c 66 64 | 3b 0a 0d 20 20 20 20 20 |t res,fd|;.. |
|00005be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 65 78 74 65 | | exte|
|00005bf0| 72 6e 20 69 6e 74 20 6b | 74 45 52 52 4e 4f 3b 0a |rn int k|tERRNO;.|
|00005c00| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005c10| 20 20 73 74 72 75 63 74 | 20 7b 20 2e 2e 2e 2e 2e | struct| { .....|
|00005c20| 2e 2e 2e 20 7d 20 72 65 | 63 3b 0a 0a 0d 20 20 20 |... } re|c;... |
|00005c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 66 6f | | fo|
|00005c40| 72 20 28 72 65 73 20 3d | 20 6b 74 45 6e 64 28 66 |r (res =| ktEnd(f|
|00005c50| 64 2c 26 72 65 63 29 3b | 20 72 65 73 3b 20 72 65 |d,&rec);| res; re|
|00005c60| 73 20 3d 20 6b 74 50 72 | 65 76 28 66 64 2c 26 72 |s = ktPr|ev(fd,&r|
|00005c70| 65 63 29 29 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |ec)).. | |
|00005c80| 20 20 20 20 20 20 20 20 | 20 20 20 20 70 72 6f 63 | | proc|
|00005c90| 65 73 73 5f 72 65 63 6f | 72 64 28 29 3b 0a 0d 20 |ess_reco|rd();.. |
|00005ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cb0| 69 66 20 28 6b 74 45 52 | 52 4e 4f 20 21 3d 20 32 |if (ktER|RNO != 2|
|00005cc0| 37 29 20 61 62 6e 6f 72 | 6d 61 6c 5f 65 6e 64 69 |7) abnor|mal_endi|
|00005cd0| 6e 67 28 29 3b 00 21 02 | 00 00 00 00 00 22 5f 00 |ng();.!.|....."_.|
|00005ce0| 00 3b 02 00 00 32 31 33 | 00 00 00 20 20 da c4 c4 |.;...213|... ...|
|00005cf0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005d00| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005d10| c4 c4 c4 c4 c4 bf 0a 0d | 20 20 b3 20 69 6e 74 20 |........| . int |
|00005d20| 20 6b 74 44 65 6c 65 74 | 65 28 69 6e 74 20 66 69 | ktDelet|e(int fi|
|00005d30| 6c 65 2c 76 6f 69 64 20 | 2a 72 65 63 6f 72 64 29 |le,void |*record)|
|00005d40| 3b 20 b3 0a 0d 20 20 c0 | c4 c4 c4 c4 c4 c4 c4 c4 |; ... .|........|
|00005d50| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00005d60| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 d9 |........|........|
|00005d70| 0a 0a 0d 20 20 50 75 72 | 70 6f 73 65 20 20 20 20 |... Pur|pose |
|00005d80| 20 20 3a 20 4d 61 72 6b | 73 20 74 68 65 20 6c 61 | : Mark|s the la|
|00005d90| 73 74 20 72 65 63 6f 72 | 64 20 72 65 61 64 20 61 |st recor|d read a|
|00005da0| 73 20 62 65 69 6e 67 20 | 64 65 6c 65 74 65 64 2e |s being |deleted.|
|00005db0| 20 49 66 20 74 68 65 20 | 72 65 63 6f 72 64 0a 0d | If the |record..|
|00005dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005dd0| 20 77 61 73 20 69 6e 64 | 65 78 65 64 2c 20 74 68 | was ind|exed, th|
|00005de0| 65 6e 20 61 6c 6c 20 72 | 65 66 65 72 65 6e 63 65 |en all r|eference|
|00005df0| 73 20 74 6f 20 69 74 20 | 61 72 65 20 72 65 6d 6f |s to it |are remo|
|00005e00| 76 65 64 20 66 72 6f 6d | 20 74 68 65 0a 0d 20 20 |ved from| the.. |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|00005e20| 6e 64 65 78 20 72 65 63 | 6f 72 64 73 2e 0a 0a 0d |ndex rec|ords....|
|00005e30| 20 20 50 61 72 61 6d 65 | 74 65 72 73 20 20 20 3a | Parame|ters :|
|00005e40| 20 3c 66 69 6c 65 3e 20 | 69 73 20 74 68 65 20 6e | <file> |is the n|
|00005e50| 75 6d 62 65 72 20 72 65 | 74 75 72 6e 65 64 20 62 |umber re|turned b|
|00005e60| 79 20 6b 74 4f 70 65 6e | 2e 0a 0a 0d 20 20 20 20 |y ktOpen|.... |
|00005e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 3c 72 65 | | <re|
|00005e80| 63 6f 72 64 3e 20 69 73 | 20 61 20 70 6f 69 6e 74 |cord> is| a point|
|00005e90| 65 72 20 74 6f 20 74 68 | 65 20 6d 65 6d 6f 72 79 |er to th|e memory|
|00005ea0| 20 61 72 65 61 20 77 68 | 65 72 65 20 74 68 65 20 | area wh|ere the |
|00005eb0| 72 65 63 6f 72 64 0a 0d | 20 20 20 20 20 20 20 20 |record..| |
|00005ec0| 20 20 20 20 20 20 20 20 | 20 68 61 73 20 62 65 65 | | has bee|
|00005ed0| 6e 20 72 65 61 64 20 69 | 6e 74 6f 2e 0a 0a 0d 20 |n read i|nto.... |
|00005ee0| 20 52 65 74 75 72 6e 73 | 20 20 20 20 20 20 3a 20 | Returns| : |
|00005ef0| 7a 65 72 6f 20 69 66 20 | 6e 6f 74 20 73 75 63 63 |zero if |not succ|
|00005f00| 65 73 73 66 75 6c 2c 20 | 6e 6f 6e 2d 7a 65 72 6f |essful, |non-zero|
|00005f10| 20 69 66 20 73 75 63 63 | 65 73 73 66 75 6c 2e 00 | if succ|essful..|
|00005f20| 4a 02 02 d8 5c 00 00 00 | 00 00 00 00 03 00 00 32 |J...\...|.......2|
|00005f30| 31 33 00 00 00 20 20 4e | 6f 74 65 73 20 20 20 20 |13... N|otes |
|00005f40| 20 20 20 20 3a 20 59 6f | 75 20 63 61 6e 6e 6f 74 | : Yo|u cannot|
|00005f50| 20 64 65 6c 65 74 65 20 | 61 20 72 65 63 6f 72 64 | delete |a record|
|00005f60| 20 77 68 69 63 68 20 68 | 61 73 20 62 65 65 6e 20 | which h|as been |
|00005f70| 6c 6f 63 6b 65 64 20 75 | 73 69 6e 67 0a 0d 20 20 |locked u|sing.. |
|00005f80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6b | | k|
|00005f90| 74 4c 6f 63 6b 2e 0a 0a | 0d 20 20 20 20 20 20 20 |tLock...|. |
|00005fa0| 20 20 20 20 20 20 20 20 | 20 20 49 66 20 74 68 65 | | If the|
|00005fb0| 20 72 65 63 6f 72 64 20 | 69 73 20 70 61 72 74 20 | record |is part |
|00005fc0| 6f 66 20 61 20 63 68 61 | 69 6e 20 6f 66 20 72 65 |of a cha|in of re|
|00005fd0| 63 6f 72 64 73 2c 20 74 | 68 65 6e 20 74 68 65 20 |cords, t|hen the |
|00005fe0| 63 68 61 69 6e 0a 0d 20 | 20 20 20 20 20 20 20 20 |chain.. | |
|00005ff0| 20 20 20 20 20 20 20 20 | 70 6f 69 6e 74 65 72 73 | |pointers|
|00006000| 20 61 72 65 20 75 70 64 | 61 74 65 64 20 74 6f 20 | are upd|ated to |
|00006010| 62 79 70 61 73 73 20 74 | 68 69 73 20 72 65 63 6f |bypass t|his reco|
|00006020| 72 64 2e 20 49 66 20 74 | 68 65 20 72 65 63 6f 72 |rd. If t|he recor|
|00006030| 64 0a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d.. | |
|00006040| 20 20 20 20 69 73 20 74 | 68 65 20 62 61 73 65 20 | is t|he base |
|00006050| 72 65 63 6f 72 64 20 6f | 66 20 61 20 63 68 61 69 |record o|f a chai|
|00006060| 6e 2c 20 74 68 65 6e 20 | 61 6c 6c 20 74 68 65 20 |n, then |all the |
|00006070| 66 6f 6c 6c 6f 77 69 6e | 67 0a 0d 20 20 20 20 20 |followin|g.. |
|00006080| 20 20 20 20 20 20 20 20 | 20 20 20 20 63 68 61 69 | | chai|
|00006090| 6e 65 64 20 72 65 63 6f | 72 64 73 20 61 72 65 20 |ned reco|rds are |
|000060a0| 6d 61 72 6b 65 64 20 61 | 73 20 64 65 6c 65 74 65 |marked a|s delete|
|000060b0| 64 20 74 6f 6f 2e 0a 0a | 0d 20 20 45 72 72 6f 72 |d too...|. Error|
|000060c0| 20 63 6f 64 65 73 20 20 | 3a 20 39 20 20 2d 20 66 | codes |: 9 - f|
|000060d0| 69 6c 65 20 69 73 20 6e | 6f 74 20 6f 70 65 6e 2e |ile is n|ot open.|
|000060e0| 20 20 20 20 31 32 20 2d | 20 66 69 6c 65 20 6f 70 | 12 -| file op|
|000060f0| 65 6e 20 66 6f 72 20 72 | 65 61 64 69 6e 67 20 6f |en for r|eading o|
|00006100| 6e 6c 79 2e 0a 0d 20 20 | 20 20 20 20 20 20 20 20 |nly... | |
|00006110| 20 20 20 20 20 20 20 32 | 30 20 2d 20 72 65 63 6f | 2|0 - reco|
|00006120| 72 64 20 6e 6f 74 20 79 | 65 74 20 72 65 61 64 2e |rd not y|et read.|
|00006130| 20 32 32 20 2d 20 72 65 | 63 6f 72 64 20 69 73 20 | 22 - re|cord is |
|00006140| 6c 6f 63 6b 65 64 2e 0a | 0d 20 20 20 20 20 20 20 |locked..|. |
|00006150| 20 20 20 20 20 20 20 20 | 20 20 32 38 20 2d 20 72 | | 28 - r|
|00006160| 65 63 6f 72 64 20 69 73 | 20 64 65 6c 65 74 65 64 |ecord is| deleted|
|00006170| 2e 0a 0a 0d 20 20 45 78 | 61 6d 70 6c 65 20 20 20 |.... Ex|ample |
|00006180| 20 20 20 3a 20 69 6e 74 | 20 72 65 73 2c 66 64 3b | : int| res,fd;|
|00006190| 0a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|000061a0| 20 20 20 73 74 72 75 63 | 74 20 7b 20 2e 2e 2e 2e | struc|t { ....|
|000061b0| 2e 2e 2e 2e 20 7d 20 72 | 65 63 3b 0a 0a 0d 20 20 |.... } r|ec;... |
|000061c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|000061d0| 66 20 28 6b 74 52 65 61 | 64 28 66 64 2c 26 72 65 |f (ktRea|d(fd,&re|
|000061e0| 63 2c 22 46 52 45 44 20 | 53 4d 49 54 48 22 29 29 |c,"FRED |SMITH"))|
|000061f0| 0a 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |.. | |
|00006200| 20 20 20 20 20 20 20 20 | 69 66 20 28 21 6b 74 44 | |if (!ktD|
|00006210| 65 6c 65 74 65 28 66 64 | 2c 26 72 65 63 29 29 20 |elete(fd|,&rec)) |
|00006220| 63 61 6e 74 5f 64 65 6c | 65 74 65 28 29 3b 00 0f |cant_del|ete();..|
|00006230| 03 00 00 00 00 00 40 65 | 00 00 00 03 00 00 32 31 |......@e|......21|
|00006240| 34 00 00 00 20 20 da c4 | c4 c4 c4 c4 c4 c4 c4 c4 |4... ..|........|
|00006250| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00006260| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|00006270| bf 0a 0d 20 20 b3 20 69 | 6e 74 20 20 6b 74 55 6e |... . i|nt ktUn|
|00006280| 64 65 6c 65 74 65 28 69 | 6e 74 20 66 69 6c 65 2c |delete(i|nt file,|
|00006290| 76 6f 69 64 20 2a 72 65 | 63 6f 72 64 29 3b 20 b3 |void *re|cord); .|
|000062a0| 0a 0d 20 20 c0 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |.. ....|........|
|000062b0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 c4 c4 |........|........|
|000062c0| c4 c4 c4 c4 c4 c4 c4 c4 | c4 c4 c4 c4 c4 c4 d9 0a |........|........|
|000062d0| 0a 0d 20 20 50 75 72 70 | 6f 73 65 20 20 20 20 20 |.. Purp|ose |
|000062e0| 20 3a 20 4d 61 72 6b 73 | 20 74 68 65 20 6c 61 73 | : Marks| the las|
|000062f0| 74 20 72 65 63 6f 72 64 | 20 72 65 61 64 20 70 68 |t record| read ph|
|00006300| 79 73 69 63 61 6c 6c 79 | 20 61 73 20 62 65 69 6e |ysically| as bein|
|00006310| 67 20 6e 6f 72 6d 61 6c | 2e 20 49 66 20 69 74 0a |g normal|. If it.|
|00006320| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00006330| 20 20 77 61 73 20 69 6e | 64 65 78 65 64 2c 20 74 | was in|dexed, t|
|00006340| 68 65 6e 20 61 6c 6c 20 | 72 65 66 65 72 65 6e 63 |hen all |referenc|
|00006350| 65 73 20 74 6f 20 69 74 | 20 61 72 65 20 61 64 64 |es to it| are add|
|00006360| 65 64 20 62 61 63 6b 20 | 74 6f 20 74 68 65 0a 0d |ed back |to the..|
|00006370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006380| 20 69 6e 64 65 78 20 72 | 65 63 6f 72 64 73 2e 0a | index r|ecords..|
|00006390| 0a 0d 20 20 50 61 72 61 | 6d 65 74 65 72 73 20 20 |.. Para|meters |
|000063a0| 20 3a 20 3c 66 69 6c 65 | 3e 20 69 73 20 74 68 65 | : <file|> is the|
|000063b0| 20 6e 75 6d 62 65 72 20 | 72 65 74 75 72 6e 65 64 | number |returned|
|000063c0| 20 62 79 20 6b 74 4f 70 | 65 6e 2e 0a 0a 0d 20 20 | by ktOp|en.... |
|000063d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3c | | <|
|000063e0| 72 65 63 6f 72 64 3e 20 | 69 73 20 61 20 70 6f 69 |record> |is a poi|
|000063f0| 6e 74 65 72 20 74 6f 20 | 74 68 65 20 6d 65 6d 6f |nter to |the memo|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.