|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: d
Length: 4568 (0x11d8)
Names: »directory.3«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/man/cat3/directory.3«
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 64 69 72 65 63 74 6f 72 79 28 33 29 0a 0a 0a 0a ┆ions directory(3) ┆
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 6f 70 65 6e 64 69 72 2c 20 72 65 61 64 64 69 72 2c 20 74 65 6c 6c 64 69 72 2c 20 73 65 65 ┆ opendir, readdir, telldir, see┆
0x00a0…00c0 6b 64 69 72 2c 20 72 65 77 69 6e 64 64 69 72 2c 20 63 6c 6f 73 65 64 69 72 20 2d 0a 20 20 20 20 ┆kdir, rewinddir, closedir - ┆
0x00c0…00e0 20 64 69 72 65 63 74 6f 72 79 20 6f 70 65 72 61 74 69 6f 6e 73 0a 0a 53 08 53 08 53 08 53 59 08 ┆ directory operations S S S SY ┆
0x00e0…0100 59 08 59 08 59 4e 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 ┆Y Y YN N N NT T T TA A A AX X X ┆
0x0100…0120 58 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 ┆X # # # #i i i in n n nc c ┆
0x0120…0140 63 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 ┆c cl l l lu u u ud d d de e e e ┆
0x0140…0160 3c 08 3c 08 3c 08 3c 73 08 73 08 73 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 ┆< < < <s s s sy y y ys s s s/ / ┆
0x0160…0180 2f 08 2f 70 08 70 08 70 08 70 61 08 61 08 61 08 61 72 08 72 08 72 08 72 61 08 61 08 61 08 61 6d ┆/ /p p p pa a a ar r r ra a a am┆
0x0180…01a0 08 6d 08 6d 08 6d 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 20 23 08 23 08 ┆ m m m. . . .h h h h> > > > # # ┆
0x01a0…01c0 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 75 ┆# #i i i in n n nc c c cl l l lu┆
0x01c0…01e0 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c 73 08 73 08 ┆ u u ud d d de e e e < < < <s s ┆
0x01e0…0200 73 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f 08 2f 64 08 64 08 64 08 64 69 ┆s sy y y ys s s s/ / / /d d d di┆
0x0200…0220 08 69 08 69 08 69 72 08 72 08 72 08 72 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e ┆ i i ir r r r. . . .h h h h> > >┆
0x0220…0240 08 3e 0a 0a 20 20 20 20 20 44 08 44 08 44 08 44 49 08 49 08 49 08 49 52 08 52 08 52 08 52 20 2a ┆ > D D D DI I I IR R R R *┆
0x0240…0260 08 2a 08 2a 08 2a 6f 08 6f 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 65 6e 08 6e 08 6e ┆ * * *o o o op p p pe e e en n n┆
0x0260…0280 08 6e 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 28 08 28 08 28 08 28 66 08 ┆ nd d d di i i ir r r r( ( ( (f ┆
0x0280…02a0 66 08 66 08 66 69 08 69 08 69 08 69 6c 08 6c 08 6c 08 6c 65 08 65 08 65 08 65 6e 08 6e 08 6e 08 ┆f f fi i i il l l le e e en n n ┆
0x02a0…02c0 6e 61 08 61 08 61 08 61 6d 08 6d 08 6d 08 6d 65 08 65 08 65 08 65 29 08 29 08 29 08 29 0a 20 20 ┆na a a am m m me e e e) ) ) ) ┆
0x02c0…02e0 20 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 ┆ c c c ch h h ha a a ar r r r ┆
0x02e0…0300 2a 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 ┆* * * *f f f fi i i il l l le e ┆
0x0300…0320 65 08 65 6e 08 6e 08 6e 08 6e 61 08 61 08 61 08 61 6d 08 6d 08 6d 08 6d 65 08 65 08 65 08 65 3b ┆e en n n na a a am m m me e e e;┆
0x0320…0340 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 73 08 73 08 73 08 73 74 08 74 08 74 08 74 72 08 72 08 72 ┆ ; ; ; s s s st t t tr r r┆
0x0340…0360 08 72 75 08 75 08 75 08 75 63 08 63 08 63 08 63 74 08 74 08 74 08 74 20 64 08 64 08 64 08 64 69 ┆ ru u u uc c c ct t t t d d d di┆
0x0360…0380 08 69 08 69 08 69 72 08 72 08 72 08 72 65 08 65 08 65 08 65 63 08 63 08 63 08 63 74 08 74 08 74 ┆ i i ir r r re e e ec c c ct t t┆
0x0380…03a0 08 74 20 2a 08 2a 08 2a 08 2a 72 08 72 08 72 08 72 65 08 65 08 65 08 65 61 08 61 08 61 08 61 64 ┆ t * * * *r r r re e e ea a a ad┆
0x03a0…03c0 08 64 08 64 08 64 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 28 08 28 08 28 ┆ d d dd d d di i i ir r r r( ( (┆
0x03c0…03e0 08 28 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 70 08 70 08 70 08 70 29 08 ┆ (d d d di i i ir r r rp p p p) ┆
0x03e0…0400 29 08 29 08 29 0a 20 20 20 20 20 44 08 44 08 44 08 44 49 08 49 08 49 08 49 52 08 52 08 52 08 52 ┆) ) ) D D D DI I I IR R R R┆
0x0400…0420 20 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 70 08 70 ┆ * * * *d d d di i i ir r r rp p┆
0x0420…0440 08 70 08 70 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f ┆ p p; ; ; ; l l l lo o o o┆
0x0440…0460 6e 08 6e 08 6e 08 6e 67 08 67 08 67 08 67 20 74 08 74 08 74 08 74 65 08 65 08 65 08 65 6c 08 6c ┆n n n ng g g g t t t te e e el l┆
0x0460…0480 08 6c 08 6c 6c 08 6c 08 6c 08 6c 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 ┆ l ll l l ld d d di i i ir r r r┆
0x0480…04a0 28 08 28 08 28 08 28 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 70 08 70 08 ┆( ( ( (d d d di i i ir r r rp p ┆
0x04a0…04c0 70 08 70 29 08 29 08 29 08 29 0a 20 20 20 20 20 44 08 44 08 44 08 44 49 08 49 08 49 08 49 52 08 ┆p p) ) ) ) D D D DI I I IR ┆
0x04c0…04e0 52 08 52 08 52 20 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 ┆R R R * * * *d d d di i i ir r r┆
0x04e0…0500 08 72 70 08 70 08 70 08 70 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 73 08 73 08 73 08 73 65 08 ┆ rp p p p; ; ; ; s s s se ┆
0x0500…0520 65 08 65 08 65 65 08 65 08 65 08 65 6b 08 6b 08 6b 08 6b 64 08 64 08 64 08 64 69 08 69 08 69 08 ┆e e ee e e ek k k kd d d di i i ┆
0x0520…0540 69 72 08 72 08 72 08 72 28 08 28 08 28 08 28 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 ┆ir r r r( ( ( (d d d di i i ir r┆
0x0540…0560 08 72 08 72 70 08 70 08 70 08 70 2c 08 2c 08 2c 08 2c 20 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 ┆ r rp p p p, , , , l l l lo o o ┆
0x0560…0580 6f 63 08 63 08 63 08 63 29 08 29 08 29 08 29 0a 20 20 20 20 20 44 08 44 08 44 08 44 49 08 49 08 ┆oc c c c) ) ) ) D D D DI I ┆
0x0580…05a0 49 08 49 52 08 52 08 52 08 52 20 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 69 08 69 08 69 08 69 ┆I IR R R R * * * *d d d di i i i┆
0x05a0…05c0 72 08 72 08 72 08 72 70 08 70 08 70 08 70 3b 08 3b 08 3b 08 3b 0a 20 20 20 20 20 6c 08 6c 08 6c ┆r r r rp p p p; ; ; ; l l l┆
0x05c0…05e0 08 6c 6f 08 6f 08 6f 08 6f 6e 08 6e 08 6e 08 6e 67 08 67 08 67 08 67 20 6c 08 6c 08 6c 08 6c 6f ┆ lo o o on n n ng g g g l l l lo┆
0x05e0…0600 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 72 08 72 08 72 ┆ o o oc c c c; ; ; ; r r r┆
0x0600…0620 08 72 65 08 65 08 65 08 65 77 08 77 08 77 08 77 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 64 08 ┆ re e e ew w w wi i i in n n nd ┆
0x0620…0640 64 08 64 08 64 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 28 08 28 08 28 08 ┆d d dd d d di i i ir r r r( ( ( ┆
0x0640…0660 28 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 70 08 70 08 70 08 70 29 08 29 ┆(d d d di i i ir r r rp p p p) )┆
0x0660…0680 08 29 08 29 0a 20 20 20 20 20 44 08 44 08 44 08 44 49 08 49 08 49 08 49 52 08 52 08 52 08 52 20 ┆ ) ) D D D DI I I IR R R R ┆
0x0680…06a0 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 72 08 72 08 72 70 08 70 08 ┆* * * *d d d di i i ir r r rp p ┆
0x06a0…06c0 70 08 70 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 6f ┆p p; ; ; ; c c c cl l l lo┆
0x06c0…06e0 08 6f 08 6f 08 6f 73 08 73 08 73 08 73 65 08 65 08 65 08 65 64 08 64 08 64 08 64 69 08 69 08 69 ┆ o o os s s se e e ed d d di i i┆
0x06e0…0700 08 69 72 08 72 08 72 08 72 28 08 28 08 28 08 28 64 08 64 08 64 08 64 69 08 69 08 69 08 69 72 08 ┆ ir r r r( ( ( (d d d di i i ir ┆
0x0700…0720 72 08 72 08 72 70 08 70 08 70 08 70 29 08 29 08 29 08 29 0a 20 20 20 20 20 44 08 44 08 44 08 44 ┆r r rp p p p) ) ) ) D D D D┆
0x0720…0740 49 08 49 08 49 08 49 52 08 52 08 52 08 52 20 2a 08 2a 08 2a 08 2a 64 08 64 08 64 08 64 69 08 69 ┆I I I IR R R R * * * *d d d di i┆
0x0740…0760 08 69 08 69 72 08 72 08 72 08 72 70 08 70 08 70 08 70 3b 08 3b 08 3b 08 3b 0a 0a 44 08 44 08 44 ┆ i ir r r rp p p p; ; ; ; D D D┆
0x0760…0780 08 44 45 08 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 ┆ DE E E ES S S SC C C CR R R RI ┆
0x0780…07a0 49 08 49 08 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 ┆I I IP P P PT T T TI I I IO O O ┆
0x07a0…07c0 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 5f 08 64 5f 08 69 ┆ON N N N _ o_ p_ e_ n_ d_ i┆
0x07c0…07e0 5f 08 72 20 6f 70 65 6e 73 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 6e 61 6d 65 64 20 62 79 ┆_ r opens the directory named by┆
0x07e0…0800 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 5f 08 6e 5f 08 61 5f 08 6d 5f 08 65 20 61 6e 64 20 61 73 ┆ _ f_ i_ l_ e_ n_ a_ m_ e and as┆
0x0800…0820 73 6f 63 69 61 74 65 73 0a 20 20 20 20 20 61 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 5f 08 63 5f ┆sociates a _ d_ i_ r_ e_ c_┆
0x0820…0840 08 74 5f 08 6f 5f 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 20 77 ┆ t_ o_ r_ y _ s_ t_ r_ e_ a_ m w┆
0x0840…0860 69 74 68 20 69 74 2e 20 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 5f 08 64 5f 08 69 5f 08 72 20 72 ┆ith it. _ o_ p_ e_ n_ d_ i_ r r┆
0x0860…0880 65 74 75 72 6e 73 20 61 20 70 6f 69 6e 74 65 72 20 74 6f 20 62 65 0a 20 20 20 20 20 75 73 65 64 ┆eturns a pointer to be used┆
0x0880…08a0 20 74 6f 20 69 64 65 6e 74 69 66 79 20 74 68 65 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 5f 08 63 ┆ to identify the _ d_ i_ r_ e_ c┆
0x08a0…08c0 5f 08 74 5f 08 6f 5f 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 20 ┆_ t_ o_ r_ y _ s_ t_ r_ e_ a_ m ┆
0x08c0…08e0 69 6e 20 73 75 62 73 65 71 75 65 6e 74 20 6f 70 65 72 61 2d 0a 20 20 20 20 20 74 69 6f 6e 73 2e ┆in subsequent opera- tions.┆
0x08e0…0900 20 20 54 68 65 20 70 6f 69 6e 74 65 72 20 4e 08 4e 08 4e 08 4e 55 08 55 08 55 08 55 4c 08 4c 08 ┆ The pointer N N N NU U U UL L ┆
0x0900…0920 4c 08 4c 4c 08 4c 08 4c 08 4c 20 69 73 20 72 65 74 75 72 6e 65 64 20 69 66 20 5f 08 66 5f 08 69 ┆L LL L L L is returned if _ f_ i┆
0x0920…0940 5f 08 6c 5f 08 65 5f 08 6e 5f 08 61 5f 08 6d 5f 08 65 20 63 61 6e 6e 6f 74 20 62 65 0a 20 20 20 ┆_ l_ e_ n_ a_ m_ e cannot be ┆
0x0940…0960 20 20 61 63 63 65 73 73 65 64 2c 20 6f 72 20 69 66 20 69 74 20 63 61 6e 6e 6f 74 20 5f 08 6d 5f ┆ accessed, or if it cannot _ m_┆
0x0960…0980 08 61 5f 08 6c 5f 08 6c 5f 08 6f 5f 08 63 28 33 29 20 65 6e 6f 75 67 68 20 6d 65 6d 6f 72 79 20 ┆ a_ l_ l_ o_ c(3) enough memory ┆
0x0980…09a0 74 6f 20 68 6f 6c 64 0a 20 20 20 20 20 74 68 65 20 77 68 6f 6c 65 20 74 68 69 6e 67 2e 0a 0a 20 ┆to hold the whole thing. ┆
0x09a0…09c0 20 20 20 20 5f 08 72 5f 08 65 5f 08 61 5f 08 64 5f 08 64 5f 08 69 5f 08 72 20 72 65 74 75 72 6e ┆ _ r_ e_ a_ d_ d_ i_ r return┆
0x09c0…09e0 73 20 61 20 70 6f 69 6e 74 65 72 20 74 6f 20 74 68 65 20 6e 65 78 74 20 64 69 72 65 63 74 6f 72 ┆s a pointer to the next director┆
0x09e0…0a00 79 20 65 6e 74 72 79 2e 20 20 49 74 0a 20 20 20 20 20 72 65 74 75 72 6e 73 20 4e 08 4e 08 4e 08 ┆y entry. It returns N N N ┆
0x0a00…0a20 4e 55 08 55 08 55 08 55 4c 08 4c 08 4c 08 4c 4c 08 4c 08 4c 08 4c 20 75 70 6f 6e 20 72 65 61 63 ┆NU U U UL L L LL L L L upon reac┆
0x0a20…0a40 68 69 6e 67 20 74 68 65 20 65 6e 64 20 6f 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 6f 72 ┆hing the end of the directory or┆
0x0a40…0a60 0a 20 20 20 20 20 64 65 74 65 63 74 69 6e 67 20 61 6e 20 69 6e 76 61 6c 69 64 20 5f 08 73 5f 08 ┆ detecting an invalid _ s_ ┆
0x0a60…0a80 65 5f 08 65 5f 08 6b 5f 08 64 5f 08 69 5f 08 72 20 6f 70 65 72 61 74 69 6f 6e 2e 0a 0a 20 20 20 ┆e_ e_ k_ d_ i_ r operation. ┆
0x0a80…0aa0 20 20 5f 08 74 5f 08 65 5f 08 6c 5f 08 6c 5f 08 64 5f 08 69 5f 08 72 20 72 65 74 75 72 6e 73 20 ┆ _ t_ e_ l_ l_ d_ i_ r returns ┆
0x0aa0…0ac0 74 68 65 20 63 75 72 72 65 6e 74 20 6c 6f 63 61 74 69 6f 6e 20 61 73 73 6f 63 69 61 74 65 64 20 ┆the current location associated ┆
0x0ac0…0ae0 77 69 74 68 20 74 68 65 0a 20 20 20 20 20 6e 61 6d 65 64 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 ┆with the named _ d_ i_ r_ e┆
0x0ae0…0b00 5f 08 63 5f 08 74 5f 08 6f 5f 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f ┆_ c_ t_ o_ r_ y _ s_ t_ r_ e_ a_┆
0x0b00…0b20 08 6d 2e 0a 0a 20 20 20 20 20 5f 08 73 5f 08 65 5f 08 65 5f 08 6b 5f 08 64 5f 08 69 5f 08 72 20 ┆ m. _ s_ e_ e_ k_ d_ i_ r ┆
0x0b20…0b40 73 65 74 73 20 74 68 65 20 70 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 6e 65 78 74 20 5f 08 ┆sets the position of the next _ ┆
0x0b40…0b60 72 5f 08 65 5f 08 61 5f 08 64 5f 08 64 5f 08 69 5f 08 72 20 6f 70 65 72 61 74 69 6f 6e 20 6f 6e ┆r_ e_ a_ d_ d_ i_ r operation on┆
0x0b60…0b80 0a 20 20 20 20 20 74 68 65 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 5f 08 63 5f 08 74 5f 08 6f 5f ┆ the _ d_ i_ r_ e_ c_ t_ o_┆
0x0b80…0ba0 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 2e 20 54 68 65 20 6e 65 ┆ r_ y _ s_ t_ r_ e_ a_ m. The ne┆
0x0ba0…0bc0 77 20 70 6f 73 69 74 69 6f 6e 20 72 65 76 65 72 74 73 20 74 6f 20 74 68 65 20 6f 6e 65 0a 20 20 ┆w position reverts to the one ┆
0x0bc0…0be0 20 20 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68 65 20 5f 08 64 5f 08 69 5f 08 72 ┆ associated with the _ d_ i_ r┆
0x0be0…0c00 5f 08 65 5f 08 63 5f 08 74 5f 08 6f 5f 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f ┆_ e_ c_ t_ o_ r_ y _ s_ t_ r_ e_┆
0x0c00…0c20 08 61 5f 08 6d 20 77 68 65 6e 20 74 68 65 20 5f 08 74 5f 08 65 5f 08 6c 5f 08 6c 5f 08 64 5f 08 ┆ a_ m when the _ t_ e_ l_ l_ d_ ┆
0x0c20…0c40 69 5f 08 72 20 6f 70 65 72 61 2d 0a 20 20 20 20 20 74 69 6f 6e 20 77 61 73 20 70 65 72 66 6f 72 ┆i_ r opera- tion was perfor┆
0x0c40…0c60 6d 65 64 2e 20 20 56 61 6c 75 65 73 20 72 65 74 75 72 6e 65 64 20 62 79 20 5f 08 74 5f 08 65 5f ┆med. Values returned by _ t_ e_┆
0x0c60…0c80 08 6c 5f 08 6c 5f 08 64 5f 08 69 5f 08 72 20 61 72 65 20 67 6f 6f 64 0a 20 20 20 20 20 6f 6e 6c ┆ l_ l_ d_ i_ r are good onl┆
0x0c80…0ca0 79 20 66 6f 72 20 74 68 65 20 6c 69 66 65 74 69 6d 65 20 6f 66 20 74 68 65 20 44 49 52 20 70 6f ┆y for the lifetime of the DIR po┆
0x0ca0…0cc0 69 6e 74 65 72 20 66 72 6f 6d 20 77 68 69 63 68 20 74 68 65 79 20 61 72 65 0a 20 20 20 20 20 64 ┆inter from which they are d┆
0x0cc0…0ce0 65 72 69 76 65 64 2e 20 20 49 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 20 69 73 20 63 6c 6f ┆erived. If the directory is clo┆
0x0ce0…0d00 73 65 64 20 61 6e 64 20 74 68 65 6e 20 72 65 6f 70 65 6e 65 64 2c 20 74 68 65 0a 20 20 20 20 20 ┆sed and then reopened, the ┆
0x0d00…0d20 5f 08 74 5f 08 65 5f 08 6c 5f 08 6c 5f 08 64 5f 08 69 5f 08 72 20 76 61 6c 75 65 20 6d 61 79 20 ┆_ t_ e_ l_ l_ d_ i_ r value may ┆
0x0d20…0d40 62 65 20 69 6e 76 61 6c 69 64 61 74 65 64 20 64 75 65 20 74 6f 20 75 6e 64 65 74 65 63 74 65 64 ┆be invalidated due to undetected┆
0x0d40…0d60 20 64 69 72 65 63 74 6f 72 79 0a 20 20 20 20 20 63 6f 6d 70 61 63 74 69 6f 6e 2e 20 20 49 74 20 ┆ directory compaction. It ┆
0x0d60…0d80 69 73 20 73 61 66 65 20 74 6f 20 75 73 65 20 61 20 70 72 65 76 69 6f 75 73 20 5f 08 74 5f 08 65 ┆is safe to use a previous _ t_ e┆
0x0d80…0da0 5f 08 6c 5f 08 6c 5f 08 64 5f 08 69 5f 08 72 20 76 61 6c 75 65 0a 20 20 20 20 20 69 6d 6d 65 64 ┆_ l_ l_ d_ i_ r value immed┆
0x0da0…0dc0 69 61 74 65 6c 79 20 61 66 74 65 72 20 61 20 63 61 6c 6c 20 74 6f 20 5f 08 6f 5f 08 70 5f 08 65 ┆iately after a call to _ o_ p_ e┆
0x0dc0…0de0 5f 08 6e 5f 08 64 5f 08 69 5f 08 72 20 61 6e 64 20 62 65 66 6f 72 65 20 61 6e 79 20 63 61 6c 6c ┆_ n_ d_ i_ r and before any call┆
0x0de0…0e00 73 20 74 6f 0a 20 20 20 20 20 5f 08 72 5f 08 65 5f 08 61 5f 08 64 5f 08 64 5f 08 69 5f 08 72 2e ┆s to _ r_ e_ a_ d_ d_ i_ r.┆
0x0e00…0e20 0a 0a 20 20 20 20 20 5f 08 72 5f 08 65 5f 08 77 5f 08 69 5f 08 6e 5f 08 64 5f 08 64 5f 08 69 5f ┆ _ r_ e_ w_ i_ n_ d_ d_ i_┆
0x0e20…0e40 08 72 20 72 65 73 65 74 73 20 74 68 65 20 70 6f 73 69 74 69 6f 6e 20 6f 66 20 74 68 65 20 6e 61 ┆ r resets the position of the na┆
0x0e40…0e60 6d 65 64 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 5f 08 63 5f 08 74 5f 08 6f 5f 08 72 5f 08 79 20 ┆med _ d_ i_ r_ e_ c_ t_ o_ r_ y ┆
0x0e60…0e80 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 0a 20 20 20 20 20 74 6f 20 74 68 65 20 62 ┆_ s_ t_ r_ e_ a_ m to the b┆
0x0e80…0ea0 65 67 69 6e 6e 69 6e 67 20 6f 66 20 74 68 65 20 64 69 72 65 63 74 6f 72 79 2e 0a 0a 20 20 20 20 ┆eginning of the directory. ┆
0x0ea0…0ec0 20 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 5f 08 64 5f 08 69 5f 08 72 20 63 6c 6f 73 65 73 ┆ _ c_ l_ o_ s_ e_ d_ i_ r closes┆
0x0ec0…0ee0 20 74 68 65 20 6e 61 6d 65 64 20 5f 08 64 5f 08 69 5f 08 72 5f 08 65 5f 08 63 5f 08 74 5f 08 6f ┆ the named _ d_ i_ r_ e_ c_ t_ o┆
0x0ee0…0f00 5f 08 72 5f 08 79 20 5f 08 73 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 20 61 6e 64 20 66 72 ┆_ r_ y _ s_ t_ r_ e_ a_ m and fr┆
0x0f00…0f20 65 65 73 20 74 68 65 0a 20 20 20 20 20 73 74 72 75 63 74 75 72 65 20 61 73 73 6f 63 69 61 74 65 ┆ees the structure associate┆
0x0f20…0f40 64 20 77 69 74 68 20 74 68 65 20 44 49 52 20 70 6f 69 6e 74 65 72 2e 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆d with the DIR pointer. ┆
0x0f40…0f60 20 20 20 20 20 53 61 6d 70 6c 65 20 63 6f 64 65 20 77 68 69 63 68 20 73 65 61 72 63 68 73 20 61 ┆ Sample code which searchs a┆
0x0f60…0f80 20 64 69 72 65 63 74 6f 72 79 20 66 6f 72 20 65 6e 74 72 79 20 60 60 6e 61 6d 65 27 27 20 69 73 ┆ directory for entry ``name'' is┆
0x0f80…0fa0 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 6c 65 6e 20 3d 20 73 74 72 6c 65 6e 28 6e 61 6d 65 29 3b ┆: len = strlen(name);┆
0x0fa0…0fc0 0a 20 20 20 20 20 20 20 20 20 20 64 69 72 70 20 3d 20 6f 70 65 6e 64 69 72 28 22 2e 22 29 3b 0a ┆ dirp = opendir("."); ┆
0x0fc0…0fe0 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 28 64 70 20 3d 20 72 65 61 64 64 69 72 28 64 69 72 70 ┆ for (dp = readdir(dirp┆
0x0fe0…1000 29 3b 20 64 70 20 21 3d 20 4e 55 4c 4c 3b 20 64 70 20 3d 20 72 65 61 64 64 69 72 28 64 69 72 70 ┆); dp != NULL; dp = readdir(dirp┆
0x1000…1020 29 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 64 70 2d 3e 64 5f 6e ┆)) if (dp->d_n┆
0x1020…1040 61 6d 6c 65 6e 20 3d 3d 20 6c 65 6e 20 26 26 20 21 73 74 72 63 6d 70 28 64 70 2d 3e 64 5f 6e 61 ┆amlen == len && !strcmp(dp->d_na┆
0x1040…1060 6d 65 2c 20 6e 61 6d 65 29 29 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆me, name)) { ┆
0x1060…1080 20 20 20 20 20 20 20 63 6c 6f 73 65 64 69 72 28 64 69 72 70 29 3b 0a 20 20 20 20 20 20 20 20 20 ┆ closedir(dirp); ┆
0x1080…10a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 46 4f 55 4e 44 3b 0a 20 ┆ return FOUND; ┆
0x10a0…10c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 63 6c 6f ┆ } clo┆
0x10c0…10e0 73 65 64 69 72 28 64 69 72 70 29 3b 0a 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 4e 4f ┆sedir(dirp); return NO┆
0x10e0…1100 54 5f 46 4f 55 4e 44 3b 0a 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 08 45 ┆T_FOUND; S S S SE E E EE E E E┆
0x1100…1120 20 41 08 41 08 41 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 ┆ A A A AL L L LS S S SO O O O ┆
0x1120…1140 20 20 20 53 79 73 74 65 6d 20 43 61 6c 6c 73 20 28 32 29 3a 20 20 6f 70 65 6e 2c 20 63 6c 6f 73 ┆ System Calls (2): open, clos┆
0x1140…1160 65 2c 20 72 65 61 64 2c 20 6c 73 65 65 6b 0a 20 20 20 20 20 46 69 6c 65 20 46 6f 72 6d 61 74 73 ┆e, read, lseek File Formats┆
0x1160…1180 20 28 35 29 3a 20 20 64 69 72 0a 0a 4d 61 72 63 68 20 31 39 38 39 20 20 20 20 20 20 20 20 20 20 ┆ (5): dir March 1989 ┆
0x1180…11a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 ┆ TX Programme┆
0x11a0…11c0 72 27 73 20 52 65 66 65 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆r's Reference ┆
0x11c0…11d8 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆ ┆