DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: d

⟦9cd041ca9⟧

    Length: 4966 (0x1366)
    Names: »dbm.3x«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./bsd/usr/man/cat3/dbm.3x« 
        └─⟦this⟧ »./usr/man/cat3/dbm.3x« 

Default Hex Dump

0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f   ┆   _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆
0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74   ┆ u_ a_ l           Library Funct┆
0x0040…0060 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 62 6d 28 33 78 29 0a 0a 0a 0a   ┆ions                 dbm(3x)    ┆
0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20   ┆N N N NA A A AM M M ME E E E    ┆
0x0080…00a0 20 20 64 62 6d 69 6e 69 74 2c 20 66 65 74 63 68 2c 20 73 74 6f 72 65 2c 20 64 65 6c 65 74 65 2c   ┆  dbminit, fetch, store, delete,┆
0x00a0…00c0 20 66 69 72 73 74 6b 65 79 2c 20 6e 65 78 74 6b 65 79 20 2d 20 64 61 74 61 20 62 61 73 65 0a 20   ┆ firstkey, nextkey - data base  ┆
0x00c0…00e0 20 20 20 20 73 75 62 72 6f 75 74 69 6e 65 73 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e   ┆    subroutines  S S S SY Y Y YN┆
0x00e0…0100 08 4e 08 4e 08 4e 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20 20   ┆ N N NT T T TA A A AX X X X     ┆
0x0100…0120 20 74 08 74 08 74 08 74 79 08 79 08 79 08 79 70 08 70 08 70 08 70 65 08 65 08 65 08 65 64 08 64   ┆ t t t ty y y yp p p pe e e ed d┆
0x0120…0140 08 64 08 64 65 08 65 08 65 08 65 66 08 66 08 66 08 66 20 73 08 73 08 73 08 73 74 08 74 08 74 08   ┆ d de e e ef f f f s s s st t t ┆
0x0140…0160 74 72 08 72 08 72 08 72 75 08 75 08 75 08 75 63 08 63 08 63 08 63 74 08 74 08 74 08 74 20 7b 08   ┆tr r r ru u u uc c c ct t t t { ┆
0x0160…0180 7b 08 7b 08 7b 0a 20 20 20 20 20 20 20 20 20 20 63 08 63 08 63 08 63 68 08 68 08 68 08 68 61 08   ┆{ { {           c c c ch h h ha ┆
0x0180…01a0 61 08 61 08 61 72 08 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 70 08 70 08 70   ┆a a ar r r r * * * *d d d dp p p┆
0x01a0…01c0 08 70 74 08 74 08 74 08 74 72 08 72 08 72 08 72 3b 08 3b 08 3b 08 3b 0a 20 20 20 20 20 20 20 20   ┆ pt t t tr r r r; ; ; ;         ┆
0x01c0…01e0 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 64 08 64 08 64 08 64 73   ┆  i i i in n n nt t t t d d d ds┆
0x01e0…0200 08 73 08 73 08 73 69 08 69 08 69 08 69 7a 08 7a 08 7a 08 7a 65 08 65 08 65 08 65 3b 08 3b 08 3b   ┆ s s si i i iz z z ze e e e; ; ;┆
0x0200…0220 08 3b 0a 20 20 20 20 20 7d 08 7d 08 7d 08 7d 20 64 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08   ┆ ;      } } } } d d d da a a at ┆
0x0220…0240 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08 6d 08 6d 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20   ┆t t tu u u um m m m; ; ; ;      ┆
0x0240…0260 20 64 08 64 08 64 08 64 62 08 62 08 62 08 62 6d 08 6d 08 6d 08 6d 69 08 69 08 69 08 69 6e 08 6e   ┆ d d d db b b bm m m mi i i in n┆
0x0260…0280 08 6e 08 6e 69 08 69 08 69 08 69 74 08 74 08 74 08 74 28 08 28 08 28 08 28 66 08 66 08 66 08 66   ┆ n ni i i it t t t( ( ( (f f f f┆
0x0280…02a0 69 08 69 08 69 08 69 6c 08 6c 08 6c 08 6c 65 08 65 08 65 08 65 29 08 29 08 29 08 29 0a 20 20 20   ┆i i i il l l le e e e) ) ) )    ┆
0x02a0…02c0 20 20 63 08 63 08 63 08 63 68 08 68 08 68 08 68 61 08 61 08 61 08 61 72 08 72 08 72 08 72 20 2a   ┆  c c c ch h h ha a a ar r r r *┆
0x02c0…02e0 08 2a 08 2a 08 2a 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6c 08 6c 08 6c 08 6c 65 08 65 08 65   ┆ * * *f f f fi i i il l l le e e┆
0x02e0…0300 08 65 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 64 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08   ┆ e; ; ; ;       d d d da a a at ┆
0x0300…0320 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08 6d 08 6d 20 66 08 66 08 66 08 66 65 08 65 08 65   ┆t t tu u u um m m m f f f fe e e┆
0x0320…0340 08 65 74 08 74 08 74 08 74 63 08 63 08 63 08 63 68 08 68 08 68 08 68 28 08 28 08 28 08 28 6b 08   ┆ et t t tc c c ch h h h( ( ( (k ┆
0x0340…0360 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79 08 79 29 08 29 08 29 08 29 0a 20 20 20 20 20   ┆k k ke e e ey y y y) ) ) )      ┆
0x0360…0380 64 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08   ┆d d d da a a at t t tu u u um m ┆
0x0380…03a0 6d 08 6d 20 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79 08 79 3b 08 3b 08 3b 08 3b   ┆m m k k k ke e e ey y y y; ; ; ;┆
0x03a0…03c0 0a 0a 20 20 20 20 20 73 08 73 08 73 08 73 74 08 74 08 74 08 74 6f 08 6f 08 6f 08 6f 72 08 72 08   ┆       s s s st t t to o o or r ┆
0x03c0…03e0 72 08 72 65 08 65 08 65 08 65 28 08 28 08 28 08 28 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79   ┆r re e e e( ( ( (k k k ke e e ey┆
0x03e0…0400 08 79 08 79 08 79 2c 08 2c 08 2c 08 2c 20 63 08 63 08 63 08 63 6f 08 6f 08 6f 08 6f 6e 08 6e 08   ┆ y y y, , , , c c c co o o on n ┆
0x0400…0420 6e 08 6e 74 08 74 08 74 08 74 65 08 65 08 65 08 65 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 29   ┆n nt t t te e e en n n nt t t t)┆
0x0420…0440 08 29 08 29 08 29 0a 20 20 20 20 20 64 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08 74 08 74 08   ┆ ) ) )      d d d da a a at t t ┆
0x0440…0460 74 75 08 75 08 75 08 75 6d 08 6d 08 6d 08 6d 20 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08   ┆tu u u um m m m k k k ke e e ey ┆
0x0460…0480 79 08 79 08 79 2c 08 2c 08 2c 08 2c 20 63 08 63 08 63 08 63 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e   ┆y y y, , , , c c c co o o on n n┆
0x0480…04a0 08 6e 74 08 74 08 74 08 74 65 08 65 08 65 08 65 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 3b 08   ┆ nt t t te e e en n n nt t t t; ┆
0x04a0…04c0 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 64 08 64 08 64 08 64 65 08 65 08 65 08 65 6c 08 6c 08 6c 08   ┆; ; ;       d d d de e e el l l ┆
0x04c0…04e0 6c 65 08 65 08 65 08 65 74 08 74 08 74 08 74 65 08 65 08 65 08 65 28 08 28 08 28 08 28 6b 08 6b   ┆le e e et t t te e e e( ( ( (k k┆
0x04e0…0500 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79 08 79 29 08 29 08 29 08 29 0a 20 20 20 20 20 64   ┆ k ke e e ey y y y) ) ) )      d┆
0x0500…0520 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08 6d   ┆ d d da a a at t t tu u u um m m┆
0x0520…0540 08 6d 20 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79 08 79 3b 08 3b 08 3b 08 3b 0a   ┆ m k k k ke e e ey y y y; ; ; ; ┆
0x0540…0560 0a 20 20 20 20 20 64 08 64 08 64 08 64 61 08 61 08 61 08 61 74 08 74 08 74 08 74 75 08 75 08 75   ┆      d d d da a a at t t tu u u┆
0x0560…0580 08 75 6d 08 6d 08 6d 08 6d 20 66 08 66 08 66 08 66 69 08 69 08 69 08 69 72 08 72 08 72 08 72 73   ┆ um m m m f f f fi i i ir r r rs┆
0x0580…05a0 08 73 08 73 08 73 74 08 74 08 74 08 74 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79   ┆ s s st t t tk k k ke e e ey y y┆
0x05a0…05c0 08 79 28 08 28 08 28 08 28 29 08 29 08 29 08 29 0a 0a 20 20 20 20 20 64 08 64 08 64 08 64 61 08   ┆ y( ( ( () ) ) )       d d d da ┆
0x05c0…05e0 61 08 61 08 61 74 08 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08 6d 08 6d 20 6e 08 6e 08 6e   ┆a a at t t tu u u um m m m n n n┆
0x05e0…0600 08 6e 65 08 65 08 65 08 65 78 08 78 08 78 08 78 74 08 74 08 74 08 74 6b 08 6b 08 6b 08 6b 65 08   ┆ ne e e ex x x xt t t tk k k ke ┆
0x0600…0620 65 08 65 08 65 79 08 79 08 79 08 79 28 08 28 08 28 08 28 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08   ┆e e ey y y y( ( ( (k k k ke e e ┆
0x0620…0640 65 79 08 79 08 79 08 79 29 08 29 08 29 08 29 0a 20 20 20 20 20 64 08 64 08 64 08 64 61 08 61 08   ┆ey y y y) ) ) )      d d d da a ┆
0x0640…0660 61 08 61 74 08 74 08 74 08 74 75 08 75 08 75 08 75 6d 08 6d 08 6d 08 6d 20 6b 08 6b 08 6b 08 6b   ┆a at t t tu u u um m m m k k k k┆
0x0660…0680 65 08 65 08 65 08 65 79 08 79 08 79 08 79 3b 08 3b 08 3b 08 3b 0a 0a 44 08 44 08 44 08 44 45 08   ┆e e e ey y y y; ; ; ;  D D D DE ┆
0x0680…06a0 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08   ┆E E ES S S SC C C CR R R RI I I ┆
0x06a0…06c0 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e   ┆IP P P PT T T TI I I IO O O ON N┆
0x06c0…06e0 08 4e 08 4e 0a 20 20 20 20 20 54 68 65 73 65 20 66 75 6e 63 74 69 6f 6e 73 20 6d 61 69 6e 74 61   ┆ N N      These functions mainta┆
0x06e0…0700 69 6e 20 6b 65 79 2f 63 6f 6e 74 65 6e 74 20 70 61 69 72 73 20 69 6e 20 61 20 64 61 74 61 20 62   ┆in key/content pairs in a data b┆
0x0700…0720 61 73 65 2e 0a 20 20 20 20 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 73 20 77 69 6c 6c 20 68 61 6e   ┆ase.      The functions will han┆
0x0720…0740 64 6c 65 20 76 65 72 79 20 6c 61 72 67 65 20 28 61 20 62 69 6c 6c 69 6f 6e 20 62 6c 6f 63 6b 73   ┆dle very large (a billion blocks┆
0x0740…0760 29 0a 20 20 20 20 20 64 61 74 61 62 61 73 65 73 20 61 6e 64 20 77 69 6c 6c 20 61 63 63 65 73 73   ┆)      databases and will access┆
0x0760…0780 20 61 20 6b 65 79 65 64 20 69 74 65 6d 20 69 6e 20 6f 6e 65 20 6f 72 20 74 77 6f 20 66 69 6c 65   ┆ a keyed item in one or two file┆
0x0780…07a0 0a 20 20 20 20 20 73 79 73 74 65 6d 20 61 63 63 65 73 73 65 73 2e 20 20 54 68 65 20 66 75 6e 63   ┆      system accesses.  The func┆
0x07a0…07c0 74 69 6f 6e 73 20 61 72 65 20 6f 62 74 61 69 6e 65 64 20 77 69 74 68 20 74 68 65 20 6c 6f 61 64   ┆tions are obtained with the load┆
0x07c0…07e0 65 72 0a 20 20 20 20 20 6f 70 74 69 6f 6e 20 2d 08 2d 08 2d 08 2d 6c 08 6c 08 6c 08 6c 64 08 64   ┆er      option - - - -l l l ld d┆
0x07e0…0800 08 64 08 64 62 08 62 08 62 08 62 6d 08 6d 08 6d 08 6d 2e 0a 0a 20 20 20 20 20 5f 08 4b 5f 08 65   ┆ d db b b bm m m m.       _ K_ e┆
0x0800…0820 5f 08 79 73 20 61 6e 64 20 5f 08 63 5f 08 6f 5f 08 6e 5f 08 74 5f 08 65 5f 08 6e 5f 08 74 73 20   ┆_ ys and _ c_ o_ n_ t_ e_ n_ ts ┆
0x0820…0840 61 72 65 20 64 65 73 63 72 69 62 65 64 20 62 79 20 74 68 65 20 5f 08 64 5f 08 61 5f 08 74 5f 08   ┆are described by the _ d_ a_ t_ ┆
0x0840…0860 75 5f 08 6d 20 74 79 70 65 64 65 66 2e 20 20 41 0a 20 20 20 20 20 5f 08 64 5f 08 61 5f 08 74 5f   ┆u_ m typedef.  A      _ d_ a_ t_┆
0x0860…0880 08 75 5f 08 6d 20 73 70 65 63 69 66 69 65 73 20 61 20 73 74 72 69 6e 67 20 6f 66 20 5f 08 64 5f   ┆ u_ m specifies a string of _ d_┆
0x0880…08a0 08 73 5f 08 69 5f 08 7a 5f 08 65 20 62 79 74 65 73 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20   ┆ s_ i_ z_ e bytes pointed to by ┆
0x08a0…08c0 5f 08 64 5f 08 70 5f 08 74 5f 08 72 2e 0a 20 20 20 20 20 41 72 62 69 74 72 61 72 79 20 62 69 6e   ┆_ d_ p_ t_ r.      Arbitrary bin┆
0x08c0…08e0 61 72 79 20 64 61 74 61 2c 20 61 73 20 77 65 6c 6c 20 61 73 20 6e 6f 72 6d 61 6c 20 41 53 43 49   ┆ary data, as well as normal ASCI┆
0x08e0…0900 49 20 73 74 72 69 6e 67 73 2c 20 61 72 65 0a 20 20 20 20 20 61 6c 6c 6f 77 65 64 2e 20 20 54 68   ┆I strings, are      allowed.  Th┆
0x0900…0920 65 20 64 61 74 61 20 62 61 73 65 20 69 73 20 73 74 6f 72 65 64 20 69 6e 20 74 77 6f 20 66 69 6c   ┆e data base is stored in two fil┆
0x0920…0940 65 73 2e 20 20 4f 6e 65 20 66 69 6c 65 20 69 73 0a 20 20 20 20 20 61 20 64 69 72 65 63 74 6f 72   ┆es.  One file is      a director┆
0x0940…0960 79 20 63 6f 6e 74 61 69 6e 69 6e 67 20 61 20 62 69 74 20 6d 61 70 20 61 6e 64 20 68 61 73 20 60   ┆y containing a bit map and has `┆
0x0960…0980 2e 64 69 72 27 20 61 73 20 69 74 73 20 73 75 66 2d 0a 20 20 20 20 20 66 69 78 2e 20 20 54 68 65   ┆.dir' as its suf-      fix.  The┆
0x0980…09a0 20 73 65 63 6f 6e 64 20 66 69 6c 65 20 63 6f 6e 74 61 69 6e 73 20 61 6c 6c 20 64 61 74 61 20 61   ┆ second file contains all data a┆
0x09a0…09c0 6e 64 20 68 61 73 20 60 2e 70 61 67 27 20 61 73 0a 20 20 20 20 20 69 74 73 20 73 75 66 66 69 78   ┆nd has `.pag' as      its suffix┆
0x09c0…09e0 2e 0a 0a 20 20 20 20 20 42 65 66 6f 72 65 20 61 20 64 61 74 61 62 61 73 65 20 63 61 6e 20 62 65   ┆.       Before a database can be┆
0x09e0…0a00 20 61 63 63 65 73 73 65 64 2c 20 69 74 20 6d 75 73 74 20 62 65 20 6f 70 65 6e 65 64 20 62 79 0a   ┆ accessed, it must be opened by ┆
0x0a00…0a20 20 20 20 20 20 5f 08 64 5f 08 62 5f 08 6d 5f 08 69 5f 08 6e 5f 08 69 5f 08 74 2e 20 41 74 20 74   ┆     _ d_ b_ m_ i_ n_ i_ t. At t┆
0x0a20…0a40 68 65 20 74 69 6d 65 20 6f 66 20 74 68 69 73 20 63 61 6c 6c 2c 20 74 68 65 20 66 69 6c 65 73 20   ┆he time of this call, the files ┆
0x0a40…0a60 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 2e 08 2e 08 2e 08 2e 64 08 64 08 64 08 64 69 08 69 08 69 08   ┆_ f_ i_ l_ e. . . .d d d di i i ┆
0x0a60…0a80 69 72 08 72 08 72 08 72 20 61 6e 64 0a 20 20 20 20 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 2e 08   ┆ir r r r and      _ f_ i_ l_ e. ┆
0x0a80…0aa0 2e 08 2e 08 2e 70 08 70 08 70 08 70 61 08 61 08 61 08 61 67 08 67 08 67 08 67 20 6d 75 73 74 20   ┆. . .p p p pa a a ag g g g must ┆
0x0aa0…0ac0 65 78 69 73 74 2e 20 20 28 41 6e 20 65 6d 70 74 79 20 64 61 74 61 62 61 73 65 20 69 73 20 63 72   ┆exist.  (An empty database is cr┆
0x0ac0…0ae0 65 61 74 65 64 20 62 79 0a 20 20 20 20 20 63 72 65 61 74 69 6e 67 20 7a 65 72 6f 2d 6c 65 6e 67   ┆eated by      creating zero-leng┆
0x0ae0…0b00 74 68 20 60 2e 64 69 72 27 20 61 6e 64 20 60 2e 70 61 67 27 20 66 69 6c 65 73 2e 29 0a 0a 20 20   ┆th `.dir' and `.pag' files.)    ┆
0x0b00…0b20 20 20 20 4f 6e 63 65 20 6f 70 65 6e 2c 20 74 68 65 20 64 61 74 61 20 73 74 6f 72 65 64 20 75 6e   ┆   Once open, the data stored un┆
0x0b20…0b40 64 65 72 20 61 20 6b 65 79 20 69 73 20 61 63 63 65 73 73 65 64 20 62 79 20 5f 08 66 5f 08 65 5f   ┆der a key is accessed by _ f_ e_┆
0x0b40…0b60 08 74 5f 08 63 5f 08 68 0a 20 20 20 20 20 61 6e 64 20 64 61 74 61 20 69 73 20 70 6c 61 63 65 64   ┆ t_ c_ h      and data is placed┆
0x0b60…0b80 20 75 6e 64 65 72 20 61 20 6b 65 79 20 62 79 20 5f 08 73 5f 08 74 5f 08 6f 5f 08 72 5f 08 65 2e   ┆ under a key by _ s_ t_ o_ r_ e.┆
0x0b80…0ba0 20 20 41 20 6b 65 79 20 28 61 6e 64 20 69 74 73 0a 20 20 20 20 20 61 73 73 6f 63 69 61 74 65 64   ┆  A key (and its      associated┆
0x0ba0…0bc0 20 63 6f 6e 74 65 6e 74 73 29 20 69 73 20 64 65 6c 65 74 65 64 20 62 79 20 5f 08 64 5f 08 65 5f   ┆ contents) is deleted by _ d_ e_┆
0x0bc0…0be0 08 6c 5f 08 65 5f 08 74 5f 08 65 2e 20 20 41 20 6c 69 6e 65 61 72 20 70 61 73 73 0a 20 20 20 20   ┆ l_ e_ t_ e.  A linear pass     ┆
0x0be0…0c00 20 74 68 72 6f 75 67 68 20 61 6c 6c 20 6b 65 79 73 20 69 6e 20 61 20 64 61 74 61 62 61 73 65 20   ┆ through all keys in a database ┆
0x0c00…0c20 6d 61 79 20 62 65 20 6d 61 64 65 2c 20 69 6e 20 61 6e 0a 20 20 20 20 20 28 61 70 70 61 72 65 6e   ┆may be made, in an      (apparen┆
0x0c20…0c40 74 6c 79 29 20 72 61 6e 64 6f 6d 20 6f 72 64 65 72 2c 20 62 79 20 75 73 65 20 6f 66 20 5f 08 66   ┆tly) random order, by use of _ f┆
0x0c40…0c60 5f 08 69 5f 08 72 5f 08 73 5f 08 74 5f 08 6b 5f 08 65 5f 08 79 20 61 6e 64 20 5f 08 6e 5f 08 65   ┆_ i_ r_ s_ t_ k_ e_ y and _ n_ e┆
0x0c60…0c80 5f 08 78 5f 08 74 5f 08 6b 5f 08 65 5f 08 79 2e 0a 20 20 20 20 20 5f 08 66 5f 08 69 5f 08 72 5f   ┆_ x_ t_ k_ e_ y.      _ f_ i_ r_┆
0x0c80…0ca0 08 73 5f 08 74 5f 08 6b 5f 08 65 5f 08 79 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 74 68 65 20 66   ┆ s_ t_ k_ e_ y will return the f┆
0x0ca0…0cc0 69 72 73 74 20 6b 65 79 20 69 6e 20 74 68 65 20 64 61 74 61 62 61 73 65 2e 20 20 57 69 74 68 0a   ┆irst key in the database.  With ┆
0x0cc0…0ce0 20 20 20 20 20 61 6e 79 20 6b 65 79 20 5f 08 6e 5f 08 65 5f 08 78 5f 08 74 5f 08 6b 5f 08 65 5f   ┆     any key _ n_ e_ x_ t_ k_ e_┆
0x0ce0…0d00 08 79 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 74 68 65 20 6e 65 78 74 20 6b 65 79 20 69 6e 20 74   ┆ y will return the next key in t┆
0x0d00…0d20 68 65 20 64 61 74 61 62 61 73 65 2e 0a 20 20 20 20 20 54 68 69 73 20 63 6f 64 65 20 77 69 6c 6c   ┆he database.      This code will┆
0x0d20…0d40 20 74 72 61 76 65 72 73 65 20 74 68 65 20 64 61 74 61 20 62 61 73 65 3a 0a 0a 20 20 20 20 20 20   ┆ traverse the data base:        ┆
0x0d40…0d60 20 20 20 20 66 08 66 08 66 08 66 6f 08 6f 08 6f 08 6f 72 08 72 08 72 08 72 20 28 6b 65 79 20 3d   ┆    f f f fo o o or r r r (key =┆
0x0d60…0d80 20 66 69 72 73 74 6b 65 79 28 29 3b 20 6b 65 79 2e 64 70 74 72 20 21 3d 20 4e 55 4c 4c 3b 20 6b   ┆ firstkey(); key.dptr != NULL; k┆
0x0d80…0da0 65 79 20 3d 0a 20 20 20 20 20 20 20 20 20 20 6e 65 78 74 6b 65 79 28 6b 65 79 29 29 0a 0a 0a 0a   ┆ey =           nextkey(key))    ┆
0x0da0…0dc0 0a 0a 0a 0a 44 08 44 08 44 08 44 49 08 49 08 49 08 49 41 08 41 08 41 08 41 47 08 47 08 47 08 47   ┆    D D D DI I I IA A A AG G G G┆
0x0dc0…0de0 4e 08 4e 08 4e 08 4e 4f 08 4f 08 4f 08 4f 53 08 53 08 53 08 53 54 08 54 08 54 08 54 49 08 49 08   ┆N N N NO O O OS S S ST T T TI I ┆
0x0de0…0e00 49 08 49 43 08 43 08 43 08 43 53 08 53 08 53 08 53 0a 20 20 20 20 20 41 6c 6c 20 66 75 6e 63 74   ┆I IC C C CS S S S      All funct┆
0x0e00…0e20 69 6f 6e 73 20 74 68 61 74 20 72 65 74 75 72 6e 20 61 6e 20 5f 08 69 5f 08 6e 5f 08 74 20 69 6e   ┆ions that return an _ i_ n_ t in┆
0x0e20…0e40 64 69 63 61 74 65 20 65 72 72 6f 72 73 20 77 69 74 68 20 6e 65 67 61 2d 0a 20 20 20 20 20 74 69   ┆dicate errors with nega-      ti┆
0x0e40…0e60 76 65 20 76 61 6c 75 65 73 2e 20 20 41 20 7a 65 72 6f 20 72 65 74 75 72 6e 20 69 6e 64 69 63 61   ┆ve values.  A zero return indica┆
0x0e60…0e80 74 65 73 20 6f 6b 2e 20 20 52 6f 75 74 69 6e 65 73 20 74 68 61 74 0a 20 20 20 20 20 72 65 74 75   ┆tes ok.  Routines that      retu┆
0x0e80…0ea0 72 6e 20 61 20 5f 08 64 5f 08 61 5f 08 74 5f 08 75 5f 08 6d 20 69 6e 64 69 63 61 74 65 20 65 72   ┆rn a _ d_ a_ t_ u_ m indicate er┆
0x0ea0…0ec0 72 6f 72 73 20 77 69 74 68 20 61 20 6e 75 6c 6c 20 28 30 29 20 5f 08 64 5f 08 70 5f 08 74 5f 08   ┆rors with a null (0) _ d_ p_ t_ ┆
0x0ec0…0ee0 72 2e 0a 0a 4c 08 4c 08 4c 08 4c 49 08 49 08 49 08 49 4d 08 4d 08 4d 08 4d 49 08 49 08 49 08 49   ┆r.  L L L LI I I IM M M MI I I I┆
0x0ee0…0f00 54 08 54 08 54 08 54 41 08 41 08 41 08 41 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08   ┆T T T TA A A AT T T TI I I IO O ┆
0x0f00…0f20 4f 08 4f 4e 08 4e 08 4e 08 4e 53 08 53 08 53 08 53 0a 20 20 20 20 20 54 68 65 20 60 2e 70 61 67   ┆O ON N N NS S S S      The `.pag┆
0x0f20…0f40 27 20 66 69 6c 65 20 77 69 6c 6c 20 63 6f 6e 74 61 69 6e 20 68 6f 6c 65 73 20 73 6f 20 74 68 61   ┆' file will contain holes so tha┆
0x0f40…0f60 74 20 69 74 73 20 61 70 70 61 72 65 6e 74 20 73 69 7a 65 0a 20 20 20 20 20 69 73 20 61 62 6f 75   ┆t its apparent size      is abou┆
0x0f60…0f80 74 20 66 6f 75 72 20 74 69 6d 65 73 20 69 74 73 20 61 63 74 75 61 6c 20 63 6f 6e 74 65 6e 74 2e   ┆t four times its actual content.┆
0x0f80…0fa0 20 20 4f 6c 64 65 72 20 55 4e 49 58 20 73 79 73 74 65 6d 73 0a 20 20 20 20 20 6d 61 79 20 63 72   ┆  Older UNIX systems      may cr┆
0x0fa0…0fc0 65 61 74 65 20 72 65 61 6c 20 66 69 6c 65 20 62 6c 6f 63 6b 73 20 66 6f 72 20 74 68 65 73 65 20   ┆eate real file blocks for these ┆
0x0fc0…0fe0 68 6f 6c 65 73 20 77 68 65 6e 20 74 6f 75 63 68 65 64 2e 0a 20 20 20 20 20 54 68 65 73 65 20 66   ┆holes when touched.      These f┆
0x0fe0…1000 69 6c 65 73 20 63 61 6e 6e 6f 74 20 62 65 20 63 6f 70 69 65 64 20 62 79 20 6e 6f 72 6d 61 6c 20   ┆iles cannot be copied by normal ┆
0x1000…1020 6d 65 61 6e 73 20 28 63 70 2c 20 63 61 74 2c 20 74 70 2c 0a 20 20 20 20 20 74 61 72 2c 20 61 72   ┆means (cp, cat, tp,      tar, ar┆
0x1020…1040 29 20 77 69 74 68 6f 75 74 20 66 69 6c 6c 69 6e 67 20 69 6e 20 74 68 65 20 68 6f 6c 65 73 2e 0a   ┆) without filling in the holes. ┆
0x1040…1060 0a 20 20 20 20 20 5f 08 64 5f 08 70 5f 08 74 5f 08 72 20 70 6f 69 6e 74 65 72 73 20 72 65 74 75   ┆      _ d_ p_ t_ r pointers retu┆
0x1060…1080 72 6e 65 64 20 62 79 20 74 68 65 73 65 20 73 75 62 72 6f 75 74 69 6e 65 73 20 70 6f 69 6e 74 20   ┆rned by these subroutines point ┆
0x1080…10a0 69 6e 74 6f 0a 20 20 20 20 20 73 74 61 74 69 63 20 73 74 6f 72 61 67 65 20 74 68 61 74 20 69 73   ┆into      static storage that is┆
0x10a0…10c0 20 63 68 61 6e 67 65 64 20 62 79 20 73 75 62 73 65 71 75 65 6e 74 20 63 61 6c 6c 73 2e 0a 0a 20   ┆ changed by subsequent calls.   ┆
0x10c0…10e0 20 20 20 20 54 68 65 20 73 75 6d 20 6f 66 20 74 68 65 20 73 69 7a 65 73 20 6f 66 20 61 20 6b 65   ┆    The sum of the sizes of a ke┆
0x10e0…1100 79 2f 63 6f 6e 74 65 6e 74 20 70 61 69 72 20 6d 75 73 74 20 6e 6f 74 20 65 78 63 65 65 64 0a 20   ┆y/content pair must not exceed  ┆
0x1100…1120 20 20 20 20 74 68 65 20 69 6e 74 65 72 6e 61 6c 20 62 6c 6f 63 6b 20 73 69 7a 65 20 28 63 75 72   ┆    the internal block size (cur┆
0x1120…1140 72 65 6e 74 6c 79 20 31 30 32 34 20 62 79 74 65 73 29 2e 20 20 4d 6f 72 65 6f 76 65 72 0a 20 20   ┆rently 1024 bytes).  Moreover   ┆
0x1140…1160 20 20 20 61 6c 6c 20 6b 65 79 2f 63 6f 6e 74 65 6e 74 20 70 61 69 72 73 20 74 68 61 74 20 68 61   ┆   all key/content pairs that ha┆
0x1160…1180 73 68 20 74 6f 67 65 74 68 65 72 20 6d 75 73 74 20 66 69 74 20 6f 6e 20 61 20 73 69 6e 2d 0a 20   ┆sh together must fit on a sin-  ┆
0x1180…11a0 20 20 20 20 67 6c 65 20 62 6c 6f 63 6b 2e 20 20 5f 08 73 5f 08 74 5f 08 6f 5f 08 72 5f 08 65 20   ┆    gle block.  _ s_ t_ o_ r_ e ┆
0x11a0…11c0 77 69 6c 6c 20 72 65 74 75 72 6e 20 61 6e 20 65 72 72 6f 72 20 69 6e 20 74 68 65 20 65 76 65 6e   ┆will return an error in the even┆
0x11c0…11e0 74 20 74 68 61 74 20 61 0a 20 20 20 20 20 64 69 73 6b 20 62 6c 6f 63 6b 20 66 69 6c 6c 73 20 77   ┆t that a      disk block fills w┆
0x11e0…1200 69 74 68 20 69 6e 73 65 70 61 72 61 62 6c 65 20 64 61 74 61 2e 0a 0a 20 20 20 20 20 5f 08 64 5f   ┆ith inseparable data.       _ d_┆
0x1200…1220 08 65 5f 08 6c 5f 08 65 5f 08 74 5f 08 65 20 64 6f 65 73 20 6e 6f 74 20 70 68 79 73 69 63 61 6c   ┆ e_ l_ e_ t_ e does not physical┆
0x1220…1240 6c 79 20 72 65 63 6c 61 69 6d 20 66 69 6c 65 20 73 70 61 63 65 2c 20 61 6c 74 68 6f 75 67 68 20   ┆ly reclaim file space, although ┆
0x1240…1260 69 74 0a 20 20 20 20 20 64 6f 65 73 20 6d 61 6b 65 20 69 74 20 61 76 61 69 6c 61 62 6c 65 20 66   ┆it      does make it available f┆
0x1260…1280 6f 72 20 72 65 75 73 65 2e 0a 0a 20 20 20 20 20 54 68 65 20 6f 72 64 65 72 20 6f 66 20 6b 65 79   ┆or reuse.       The order of key┆
0x1280…12a0 73 20 70 72 65 73 65 6e 74 65 64 20 62 79 20 5f 08 66 5f 08 69 5f 08 72 5f 08 73 5f 08 74 5f 08   ┆s presented by _ f_ i_ r_ s_ t_ ┆
0x12a0…12c0 6b 5f 08 65 5f 08 79 20 61 6e 64 20 5f 08 6e 5f 08 65 5f 08 78 5f 08 74 5f 08 6b 5f 08 65 5f 08   ┆k_ e_ y and _ n_ e_ x_ t_ k_ e_ ┆
0x12c0…12e0 79 20 64 65 70 65 6e 64 73 0a 20 20 20 20 20 6f 6e 20 61 20 68 61 73 68 69 6e 67 20 66 75 6e 63   ┆y depends      on a hashing func┆
0x12e0…1300 74 69 6f 6e 2c 20 6e 6f 74 20 6f 6e 20 61 6e 79 74 68 69 6e 67 20 69 6e 74 65 72 65 73 74 69 6e   ┆tion, not on anything interestin┆
0x1300…1320 67 2e 0a 0a 4d 61 72 63 68 20 31 39 38 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆g.  March 1989                  ┆
0x1320…1340 20 20 20 20 20 20 20 20 20 20 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 73 20 52 65 66 65   ┆            TX Programmer's Refe┆
0x1340…1360 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a   ┆rence                           ┆
0x1360…1366 0a 0a 0a 0a 0a 0a                                                                                 ┆      ┆