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: l

⟦b726267a4⟧

    Length: 2644 (0xa54)
    Names: »lsearch.3c«

Derivation

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

Default Hex Dump

0x000…020 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_┆
0x020…040 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┆
0x040…060 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 73 65 61 72 63 68 28 33 63 29 0a 0a 0a 0a   ┆ions             lsearch(3c)    ┆
0x060…080 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    ┆
0x080…0a0 20 20 6c 73 65 61 72 63 68 20 2d 20 6c 69 6e 65 61 72 20 73 65 61 72 63 68 20 61 6e 64 20 75 70   ┆  lsearch - linear search and up┆
0x0a0…0c0 64 61 74 65 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08 4e 08 4e 08 4e 54 08 54 08 54   ┆date  S S S SY Y Y YN N N NT T T┆
0x0c0…0e0 08 54 41 08 41 08 41 08 41 58 08 58 08 58 08 58 0a 20 20 20 20 20 63 08 63 08 63 08 63 68 08 68   ┆ TA A A AX X X X      c c c ch h┆
0x0e0…100 08 68 08 68 61 08 61 08 61 08 61 72 08 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 6c 08 6c 08 6c 08   ┆ h ha a a ar r r r * * * *l l l ┆
0x100…120 6c 73 08 73 08 73 08 73 65 08 65 08 65 08 65 61 08 61 08 61 08 61 72 08 72 08 72 08 72 63 08 63   ┆ls s s se e e ea a a ar r r rc c┆
0x120…140 08 63 08 63 68 08 68 08 68 08 68 20 28 08 28 08 28 08 28 28 08 28 08 28 08 28 63 08 63 08 63 08   ┆ c ch h h h ( ( ( (( ( ( (c c c ┆
0x140…160 63 68 08 68 08 68 08 68 61 08 61 08 61 08 61 72 08 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 29 08   ┆ch h h ha a a ar r r r * * * *) ┆
0x160…180 29 08 29 08 29 6b 08 6b 08 6b 08 6b 65 08 65 08 65 08 65 79 08 79 08 79 08 79 2c 08 2c 08 2c 08   ┆) ) )k k k ke e e ey y y y, , , ┆
0x180…1a0 2c 20 28 08 28 08 28 08 28 63 08 63 08 63 08 63 68 08 68 08 68 08 68 61 08 61 08 61 08 61 72 08   ┆, ( ( ( (c c c ch h h ha a a ar ┆
0x1a0…1c0 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 29 08 29 08 29 08 29 62 08 62 08 62 08 62 61 08 61 08 61   ┆r r r * * * *) ) ) )b b b ba a a┆
0x1c0…1e0 08 61 73 08 73 08 73 08 73 65 08 65 08 65 08 65 2c 08 2c 08 2c 08 2c 20 6e 08 6e 08 6e 08 6e 65   ┆ as s s se e e e, , , , n n n ne┆
0x1e0…200 08 65 08 65 08 65 6c 08 6c 08 6c 08 6c 70 08 70 08 70 08 70 2c 08 2c 08 2c 08 2c 0a 20 20 20 20   ┆ e e el l l lp p p p, , , ,     ┆
0x200…220 20 73 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 6f 08 6f   ┆ s s s si i i iz z z ze e e eo o┆
0x220…240 08 6f 08 6f 66 08 66 08 66 08 66 28 08 28 08 28 08 28 2a 08 2a 08 2a 08 2a 6b 08 6b 08 6b 08 6b   ┆ o of f f f( ( ( (* * * *k k k k┆
0x240…260 65 08 65 08 65 08 65 79 08 79 08 79 08 79 29 08 29 08 29 08 29 2c 08 2c 08 2c 08 2c 20 63 08 63   ┆e e e ey y y y) ) ) ), , , , c c┆
0x260…280 08 63 08 63 6f 08 6f 08 6f 08 6f 6d 08 6d 08 6d 08 6d 70 08 70 08 70 08 70 61 08 61 08 61 08 61   ┆ c co o o om m m mp p p pa a a a┆
0x280…2a0 72 08 72 08 72 08 72 29 08 29 08 29 08 29 0a 20 20 20 20 20 75 08 75 08 75 08 75 6e 08 6e 08 6e   ┆r r r r) ) ) )      u u u un n n┆
0x2a0…2c0 08 6e 73 08 73 08 73 08 73 69 08 69 08 69 08 69 67 08 67 08 67 08 67 6e 08 6e 08 6e 08 6e 65 08   ┆ ns s s si i i ig g g gn n n ne ┆
0x2c0…2e0 65 08 65 08 65 64 08 64 08 64 08 64 20 2a 08 2a 08 2a 08 2a 6e 08 6e 08 6e 08 6e 65 08 65 08 65   ┆e e ed d d d * * * *n n n ne e e┆
0x2e0…300 08 65 6c 08 6c 08 6c 08 6c 70 08 70 08 70 08 70 3b 08 3b 08 3b 08 3b 0a 20 20 20 20 20 69 08 69   ┆ el l l lp p p p; ; ; ;      i i┆
0x300…320 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 28 08 28 08 28 08 28 2a 08 2a 08 2a 08   ┆ i in n n nt t t t ( ( ( (* * * ┆
0x320…340 2a 63 08 63 08 63 08 63 6f 08 6f 08 6f 08 6f 6d 08 6d 08 6d 08 6d 70 08 70 08 70 08 70 61 08 61   ┆*c c c co o o om m m mp p p pa a┆
0x340…360 08 61 08 61 72 08 72 08 72 08 72 29 08 29 08 29 08 29 28 08 28 08 28 08 28 20 29 08 29 08 29 08   ┆ a ar r r r) ) ) )( ( ( ( ) ) ) ┆
0x360…380 29 3b 08 3b 08 3b 08 3b 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43   ┆); ; ; ;  D D D DE E E ES S S SC┆
0x380…3a0 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54   ┆ C C CR R R RI I I IP P P PT T T┆
0x3a0…3c0 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 5f 08 6c   ┆ TI I I IO O O ON N N N      _ l┆
0x3c0…3e0 5f 08 73 5f 08 65 5f 08 61 5f 08 72 5f 08 63 5f 08 68 20 69 73 20 61 20 6c 69 6e 65 61 72 20 73   ┆_ s_ e_ a_ r_ c_ h is a linear s┆
0x3e0…400 65 61 72 63 68 20 72 6f 75 74 69 6e 65 20 67 65 6e 65 72 61 6c 69 7a 65 64 20 66 72 6f 6d 20 4b   ┆earch routine generalized from K┆
0x400…420 6e 75 74 68 0a 20 20 20 20 20 28 36 2e 31 29 20 41 6c 67 6f 72 69 74 68 6d 20 53 2e 20 20 49 74   ┆nuth      (6.1) Algorithm S.  It┆
0x420…440 20 72 65 74 75 72 6e 73 20 61 20 70 6f 69 6e 74 65 72 20 69 6e 74 6f 20 61 20 74 61 62 6c 65 20   ┆ returns a pointer into a table ┆
0x440…460 69 6e 64 69 2d 0a 20 20 20 20 20 63 61 74 69 6e 67 20 77 68 65 72 65 20 61 20 64 61 74 75 6d 20   ┆indi-      cating where a datum ┆
0x460…480 6d 61 79 20 62 65 20 66 6f 75 6e 64 2e 20 20 49 66 20 74 68 65 20 64 61 74 75 6d 20 64 6f 65 73   ┆may be found.  If the datum does┆
0x480…4a0 20 6e 6f 74 0a 20 20 20 20 20 6f 63 63 75 72 2c 20 69 74 20 69 73 20 61 64 64 65 64 20 61 74 20   ┆ not      occur, it is added at ┆
0x4a0…4c0 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 74 61 62 6c 65 2e 20 20 5f 08 4b 5f 08 65 5f 08 79   ┆the end of the table.  _ K_ e_ y┆
0x4c0…4e0 20 70 6f 69 6e 74 73 20 74 6f 0a 20 20 20 20 20 74 68 65 20 64 61 74 75 6d 20 74 6f 20 62 65 20   ┆ points to      the datum to be ┆
0x4e0…500 73 6f 75 67 68 74 20 69 6e 20 74 68 65 20 74 61 62 6c 65 2e 20 20 5f 08 42 5f 08 61 5f 08 73 5f   ┆sought in the table.  _ B_ a_ s_┆
0x500…520 08 65 20 70 6f 69 6e 74 73 20 74 6f 20 74 68 65 0a 20 20 20 20 20 66 69 72 73 74 20 65 6c 65 6d   ┆ e points to the      first elem┆
0x520…540 65 6e 74 20 69 6e 20 74 68 65 20 74 61 62 6c 65 2e 20 20 5f 08 4e 5f 08 65 5f 08 6c 5f 08 70 20   ┆ent in the table.  _ N_ e_ l_ p ┆
0x540…560 70 6f 69 6e 74 73 20 74 6f 20 61 6e 20 69 6e 74 65 67 65 72 20 63 6f 6e 2d 0a 20 20 20 20 20 74   ┆points to an integer con-      t┆
0x560…580 61 69 6e 69 6e 67 20 74 68 65 20 63 75 72 72 65 6e 74 20 6e 75 6d 62 65 72 20 6f 66 20 65 6c 65   ┆aining the current number of ele┆
0x580…5a0 6d 65 6e 74 73 20 69 6e 20 74 68 65 20 74 61 62 6c 65 2e 20 20 54 68 65 0a 20 20 20 20 20 69 6e   ┆ments in the table.  The      in┆
0x5a0…5c0 74 65 67 65 72 20 69 73 20 69 6e 63 72 65 6d 65 6e 74 65 64 20 69 66 20 74 68 65 20 64 61 74 75   ┆teger is incremented if the datu┆
0x5c0…5e0 6d 20 69 73 20 61 64 64 65 64 20 74 6f 20 74 68 65 20 74 61 62 6c 65 2e 0a 20 20 20 20 20 5f 08   ┆m is added to the table.      _ ┆
0x5e0…600 43 5f 08 6f 5f 08 6d 5f 08 70 5f 08 61 5f 08 72 20 69 73 20 74 68 65 20 6e 61 6d 65 20 6f 66 20   ┆C_ o_ m_ p_ a_ r is the name of ┆
0x600…620 74 68 65 20 63 6f 6d 70 61 72 69 73 6f 6e 20 66 75 6e 63 74 69 6f 6e 20 77 68 69 63 68 20 74 68   ┆the comparison function which th┆
0x620…640 65 20 75 73 65 72 0a 20 20 20 20 20 6d 75 73 74 20 73 75 70 70 6c 79 20 28 5f 08 73 5f 08 74 5f   ┆e user      must supply (_ s_ t_┆
0x640…660 08 72 5f 08 63 5f 08 6d 5f 08 70 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 29 2e 20 20 49 74 20 69   ┆ r_ c_ m_ p, for example).  It i┆
0x660…680 73 20 63 61 6c 6c 65 64 20 77 69 74 68 20 74 77 6f 0a 20 20 20 20 20 61 72 67 75 6d 65 6e 74 73   ┆s called with two      arguments┆
0x680…6a0 20 74 68 61 74 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 20 65 6c 65 6d 65 6e 74 73 20 62 65 69 6e   ┆ that point to the elements bein┆
0x6a0…6c0 67 20 63 6f 6d 70 61 72 65 64 2e 20 20 54 68 65 0a 20 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 6d   ┆g compared.  The      function m┆
0x6c0…6e0 75 73 74 20 72 65 74 75 72 6e 20 7a 65 72 6f 20 69 66 20 74 68 65 20 65 6c 65 6d 65 6e 74 73 20   ┆ust return zero if the elements ┆
0x6e0…700 61 72 65 20 65 71 75 61 6c 20 61 6e 64 0a 20 20 20 20 20 6e 6f 6e 2d 7a 65 72 6f 20 6f 74 68 65   ┆are equal and      non-zero othe┆
0x700…720 72 77 69 73 65 2e 0a 0a 4e 08 4e 08 4e 08 4e 4f 08 4f 08 4f 08 4f 54 08 54 08 54 08 54 45 08 45   ┆rwise.  N N N NO O O OT T T TE E┆
0x720…740 08 45 08 45 53 08 53 08 53 08 53 0a 20 20 20 20 20 54 68 65 20 70 6f 69 6e 74 65 72 73 20 74 6f   ┆ E ES S S S      The pointers to┆
0x740…760 20 74 68 65 20 6b 65 79 20 61 6e 64 20 74 68 65 20 65 6c 65 6d 65 6e 74 20 61 74 20 74 68 65 20   ┆ the key and the element at the ┆
0x760…780 62 61 73 65 20 6f 66 20 74 68 65 0a 20 20 20 20 20 74 61 62 6c 65 20 73 68 6f 75 6c 64 20 62 65   ┆base of the      table should be┆
0x780…7a0 20 6f 66 20 74 79 70 65 20 70 6f 69 6e 74 65 72 2d 74 6f 2d 65 6c 65 6d 65 6e 74 2c 20 61 6e 64   ┆ of type pointer-to-element, and┆
0x7a0…7c0 20 63 61 73 74 20 74 6f 20 74 79 70 65 0a 20 20 20 20 20 70 6f 69 6e 74 65 72 2d 74 6f 2d 63 68   ┆ cast to type      pointer-to-ch┆
0x7c0…7e0 61 72 61 63 74 65 72 2e 0a 20 20 20 20 20 54 68 65 20 63 6f 6d 70 61 72 69 73 6f 6e 20 66 75 6e   ┆aracter.      The comparison fun┆
0x7e0…800 63 74 69 6f 6e 20 6e 65 65 64 20 6e 6f 74 20 63 6f 6d 70 61 72 65 20 65 76 65 72 79 20 62 79 74   ┆ction need not compare every byt┆
0x800…820 65 2c 20 73 6f 0a 20 20 20 20 20 61 72 62 69 74 72 61 72 79 20 64 61 74 61 20 6d 61 79 20 62 65   ┆e, so      arbitrary data may be┆
0x820…840 20 63 6f 6e 74 61 69 6e 65 64 20 69 6e 20 74 68 65 20 65 6c 65 6d 65 6e 74 73 20 69 6e 20 61 64   ┆ contained in the elements in ad┆
0x840…860 64 69 74 69 6f 6e 0a 20 20 20 20 20 74 6f 20 74 68 65 20 76 61 6c 75 65 73 20 62 65 69 6e 67 20   ┆dition      to the values being ┆
0x860…880 63 6f 6d 70 61 72 65 64 2e 0a 20 20 20 20 20 41 6c 74 68 6f 75 67 68 20 64 65 63 6c 61 72 65 64   ┆compared.      Although declared┆
0x880…8a0 20 61 73 20 74 79 70 65 20 70 6f 69 6e 74 65 72 2d 74 6f 2d 63 68 61 72 61 63 74 65 72 2c 20 74   ┆ as type pointer-to-character, t┆
0x8a0…8c0 68 65 20 76 61 6c 75 65 0a 20 20 20 20 20 72 65 74 75 72 6e 65 64 20 73 68 6f 75 6c 64 20 62 65   ┆he value      returned should be┆
0x8c0…8e0 20 63 61 73 74 20 69 6e 74 6f 20 74 79 70 65 20 70 6f 69 6e 74 65 72 2d 74 6f 2d 65 6c 65 6d 65   ┆ cast into type pointer-to-eleme┆
0x8e0…900 6e 74 2e 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 08 45 20 41 08 41 08 41   ┆nt.  S S S SE E E EE E E E A A A┆
0x900…920 08 41 4c 08 4c 08 4c 08 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f 0a 20 20 20 20 20 4c 69 62   ┆ AL L L LS S S SO O O O      Lib┆
0x920…940 72 61 72 79 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 20 62 73 65 61 72 63 68 2c 20 68 73   ┆rary Functions (3):  bsearch, hs┆
0x940…960 65 61 72 63 68 2c 20 74 73 65 61 72 63 68 0a 0a 4c 08 4c 08 4c 08 4c 49 08 49 08 49 08 49 4d 08   ┆earch, tsearch  L L L LI I I IM ┆
0x960…980 4d 08 4d 08 4d 49 08 49 08 49 08 49 54 08 54 08 54 08 54 41 08 41 08 41 08 41 54 08 54 08 54 08   ┆M M MI I I IT T T TA A A AT T T ┆
0x980…9a0 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 53 08 53 08 53 08 53 0a 20 20   ┆TI I I IO O O ON N N NS S S S   ┆
0x9a0…9c0 20 20 20 55 6e 64 65 66 69 6e 65 64 20 72 65 73 75 6c 74 73 20 63 61 6e 20 6f 63 63 75 72 20 69   ┆   Undefined results can occur i┆
0x9c0…9e0 66 20 74 68 65 72 65 20 69 73 20 6e 6f 74 20 65 6e 6f 75 67 68 20 72 6f 6f 6d 20 69 6e 0a 20 20   ┆f there is not enough room in   ┆
0x9e0…a00 20 20 20 74 68 65 20 74 61 62 6c 65 20 74 6f 20 61 64 64 20 61 20 6e 65 77 20 69 74 65 6d 2e 0a   ┆   the table to add a new item. ┆
0xa00…a20 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 20 20 20   ┆ March 1989                     ┆
0xa20…a40 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 72 65 6e   ┆         TX Programmer's Referen┆
0xa40…a54 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a                                       ┆ce                  ┆