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

⟦1afa644c3⟧

    Length: 2259 (0x8d3)
    Names: »getcwd.3c«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/man/cat3/getcwd.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 20 67 65 74 63 77 64 28 33 63 29 0a 0a 0a 0a   ┆ions              getcwd(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 67 65 74 63 77 64 20 2d 20 67 65 74 20 70 61 74 68 6e 61 6d 65 20 6f 66 20 63 75 72 72 65   ┆  getcwd - get pathname of curre┆
0x0a0…0c0 6e 74 20 77 6f 72 6b 69 6e 67 20 64 69 72 65 63 74 6f 72 79 0a 0a 53 08 53 08 53 08 53 59 08 59   ┆nt working directory  S S S SY Y┆
0x0c0…0e0 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 58   ┆ Y YN N N NT T T TA A A AX X X X┆
0x0e0…100 0a 20 20 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   ┆      c c c ch h h ha a a ar r r┆
0x100…120 08 72 20 2a 08 2a 08 2a 08 2a 67 08 67 08 67 08 67 65 08 65 08 65 08 65 74 08 74 08 74 08 74 63   ┆ r * * * *g g g ge e e et t t tc┆
0x120…140 08 63 08 63 08 63 77 08 77 08 77 08 77 64 08 64 08 64 08 64 28 08 28 08 28 08 28 62 08 62 08 62   ┆ c c cw w w wd d d d( ( ( (b b b┆
0x140…160 08 62 75 08 75 08 75 08 75 66 08 66 08 66 08 66 2c 08 2c 08 2c 08 2c 20 73 08 73 08 73 08 73 69   ┆ bu u u uf f f f, , , , s s s si┆
0x160…180 08 69 08 69 08 69 7a 08 7a 08 7a 08 7a 65 08 65 08 65 08 65 29 08 29 08 29 08 29 0a 20 20 20 20   ┆ i i iz z z ze e e e) ) ) )     ┆
0x180…1a0 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 08   ┆ c c c ch h h ha a a ar r r r * ┆
0x1a0…1c0 2a 08 2a 08 2a 62 08 62 08 62 08 62 75 08 75 08 75 08 75 66 08 66 08 66 08 66 3b 08 3b 08 3b 08   ┆* * *b b b bu u u uf f f f; ; ; ┆
0x1c0…1e0 3b 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 73 08 73   ┆;      i i i in n n nt t t t s s┆
0x1e0…200 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 08 3b   ┆ s si i i iz z z ze e e e; ; ; ;┆
0x200…220 0a 0a 44 08 44 08 44 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   ┆  D D D DE E E ES S S SC C C CR ┆
0x220…240 52 08 52 08 52 49 08 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   ┆R R RI I I IP P P PT T T TI I I ┆
0x240…260 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 5f 08 67 5f 08 65 5f 08 74 5f 08   ┆IO O O ON N N N      _ g_ e_ t_ ┆
0x260…280 63 5f 08 77 5f 08 64 20 70 6c 61 63 65 73 20 61 6e 20 61 62 73 6f 6c 75 74 65 20 70 61 74 68 6e   ┆c_ w_ d places an absolute pathn┆
0x280…2a0 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 77 6f 72 6b 69 6e 67 0a 20 20 20 20 20   ┆ame of the current working      ┆
0x2a0…2c0 64 69 72 65 63 74 6f 72 79 20 69 6e 20 74 68 65 20 61 72 72 61 79 20 70 6f 69 6e 74 65 64 20 74   ┆directory in the array pointed t┆
0x2c0…2e0 6f 20 62 79 20 5f 08 62 5f 08 75 5f 08 66 2c 20 61 6e 64 20 72 65 74 75 72 6e 73 20 5f 08 62 5f   ┆o by _ b_ u_ f, and returns _ b_┆
0x2e0…300 08 75 5f 08 66 2e 0a 20 20 20 20 20 54 68 65 20 5f 08 73 5f 08 69 5f 08 7a 5f 08 65 20 61 72 67   ┆ u_ f.      The _ s_ i_ z_ e arg┆
0x300…320 75 6d 65 6e 74 20 73 68 6f 75 6c 64 20 62 65 20 74 68 65 20 73 69 7a 65 20 69 6e 20 62 79 74 65   ┆ument should be the size in byte┆
0x320…340 73 20 6f 66 20 74 68 65 20 63 68 61 72 61 63 2d 0a 20 20 20 20 20 74 65 72 20 61 72 72 61 79 20   ┆s of the charac-      ter array ┆
0x340…360 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20 74 68 65 20 5f 08 62 5f 08 75 5f 08 66 20 61 72 67 75   ┆pointed to by the _ b_ u_ f argu┆
0x360…380 6d 65 6e 74 2e 0a 0a 52 08 52 08 52 08 52 45 08 45 08 45 08 45 54 08 54 08 54 08 54 55 08 55 08   ┆ment.  R R R RE E E ET T T TU U ┆
0x380…3a0 55 08 55 52 08 52 08 52 08 52 4e 08 4e 08 4e 08 4e 20 56 08 56 08 56 08 56 41 08 41 08 41 08 41   ┆U UR R R RN N N N V V V VA A A A┆
0x3a0…3c0 4c 08 4c 08 4c 08 4c 55 08 55 08 55 08 55 45 08 45 08 45 08 45 0a 20 20 20 20 20 55 70 6f 6e 20   ┆L L L LU U U UE E E E      Upon ┆
0x3c0…3e0 73 75 63 63 65 73 73 66 75 6c 20 63 6f 6d 70 6c 65 74 69 6f 6e 2c 20 5f 08 67 5f 08 65 5f 08 74   ┆successful completion, _ g_ e_ t┆
0x3e0…400 5f 08 63 5f 08 77 5f 08 64 20 72 65 74 75 72 6e 73 20 73 20 70 6f 69 6e 74 65 72 20 74 6f 20 61   ┆_ c_ w_ d returns s pointer to a┆
0x400…420 0a 20 20 20 20 20 73 74 72 69 6e 67 20 63 6f 6e 74 61 69 6e 69 6e 67 20 74 68 65 20 61 62 73 6f   ┆      string containing the abso┆
0x420…440 6c 75 74 65 20 70 61 74 68 6e 61 6d 65 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 77 6f 72   ┆lute pathname of the current wor┆
0x440…460 6b 2d 0a 20 20 20 20 20 69 6e 67 20 64 69 72 65 63 74 6f 72 79 2e 20 4f 74 68 65 72 77 69 73 65   ┆k-      ing directory. Otherwise┆
0x460…480 20 5f 08 67 5f 08 65 5f 08 74 5f 08 63 5f 08 77 5f 08 64 20 72 65 74 75 72 6e 73 20 4e 55 4c 4c   ┆ _ g_ e_ t_ c_ w_ d returns NULL┆
0x480…4a0 20 77 69 74 68 20 5f 08 65 5f 08 72 5f 08 72 5f 08 6e 5f 08 6f 20 73 65 74 0a 20 20 20 20 20 69   ┆ with _ e_ r_ r_ n_ o set      i┆
0x4a0…4c0 66 20 5f 08 73 5f 08 69 5f 08 7a 5f 08 65 20 69 73 20 6e 6f 74 20 6c 61 72 67 65 20 65 6e 6f 75   ┆f _ s_ i_ z_ e is not large enou┆
0x4c0…4e0 67 68 2c 20 6f 72 20 69 66 20 61 6e 20 65 72 72 6f 72 20 6f 63 63 75 72 73 20 69 6e 20 61 0a 20   ┆gh, or if an error occurs in a  ┆
0x4e0…500 20 20 20 20 6c 6f 77 65 72 2d 6c 65 76 65 6c 20 66 75 6e 63 74 69 6f 6e 2e 20 54 68 65 20 63 6f   ┆    lower-level function. The co┆
0x500…520 6e 74 65 6e 74 73 20 6f 66 20 74 68 65 20 61 72 72 61 79 20 70 6f 69 6e 74 65 64 20 74 6f 0a 20   ┆ntents of the array pointed to  ┆
0x520…540 20 20 20 20 62 79 20 5f 08 62 5f 08 75 5f 08 66 20 69 73 20 74 68 65 6e 20 75 6e 64 65 66 69 6e   ┆    by _ b_ u_ f is then undefin┆
0x540…560 65 64 2e 0a 0a 45 08 45 08 45 08 45 52 08 52 08 52 08 52 52 08 52 08 52 08 52 4f 08 4f 08 4f 08   ┆ed.  E E E ER R R RR R R RO O O ┆
0x560…580 4f 52 08 52 08 52 08 52 53 08 53 08 53 08 53 0a 20 20 20 20 20 5f 08 67 5f 08 65 5f 08 74 5f 08   ┆OR R R RS S S S      _ g_ e_ t_ ┆
0x580…5a0 63 5f 08 77 5f 08 64 20 77 69 6c 6c 20 66 61 69 6c 20 69 66 3a 0a 0a 20 20 20 20 20 5b 45 49 4e   ┆c_ w_ d will fail if:       [EIN┆
0x5a0…5c0 56 41 4c 5d 20 20 20 20 20 20 20 5f 08 73 5f 08 69 5f 08 7a 5f 08 65 20 69 73 20 7a 65 72 6f 20   ┆VAL]       _ s_ i_ z_ e is zero ┆
0x5c0…5e0 6f 72 20 6e 65 67 61 74 69 76 65 2e 0a 0a 20 20 20 20 20 5b 45 52 41 4e 47 45 5d 20 20 20 20 20   ┆or negative.       [ERANGE]     ┆
0x5e0…600 20 20 5f 08 73 5f 08 69 5f 08 7a 5f 08 65 20 69 73 20 67 72 65 61 74 65 72 20 74 68 61 6e 20 7a   ┆  _ s_ i_ z_ e is greater than z┆
0x600…620 65 72 6f 2c 20 62 75 74 20 69 73 20 73 6d 61 6c 6c 65 72 0a 20 20 20 20 20 20 20 20 20 20 20 20   ┆ero, but is smaller             ┆
0x620…640 20 20 20 20 20 20 20 20 74 68 61 6e 20 74 68 65 20 6c 65 6e 67 74 68 20 6f 66 20 74 68 65 20 70   ┆        than the length of the p┆
0x640…660 61 74 68 6e 61 6d 65 20 2b 31 2e 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45   ┆athname +1.  S S S SE E E EE E E┆
0x660…680 08 45 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   ┆ E A A A AL L L LS S S SO O O O ┆
0x680…6a0 20 20 20 20 20 55 73 65 72 20 43 6f 6d 6d 61 6e 64 73 20 28 31 29 3a 20 20 70 77 64 0a 20 20 20   ┆     User Commands (1):  pwd    ┆
0x6a0…6c0 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 20 6d 61 6c 6c 6f 63   ┆  Library Functions (3):  malloc┆
0x6c0…6e0 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 08 45 08 45 53 08   ┆  N N N NO O O OT T T TE E E ES ┆
0x6e0…700 53 08 53 08 53 0a 20 20 20 20 20 49 66 20 5f 08 62 5f 08 75 5f 08 66 20 69 73 20 61 20 6e 75 6c   ┆S S S      If _ b_ u_ f is a nul┆
0x700…720 6c 20 70 6f 69 6e 74 65 72 2c 20 5f 08 67 5f 08 65 5f 08 74 5f 08 63 5f 08 77 5f 08 64 20 77 69   ┆l pointer, _ g_ e_ t_ c_ w_ d wi┆
0x720…740 6c 6c 20 6f 62 74 61 69 6e 20 5f 08 73 5f 08 69 5f 08 7a 5f 08 65 20 62 79 74 65 73 20 6f 66 0a   ┆ll obtain _ s_ i_ z_ e bytes of ┆
0x740…760 20 20 20 20 20 73 70 61 63 65 2c 20 75 73 69 6e 67 20 5f 08 6d 5f 08 61 5f 08 6c 5f 08 6c 5f 08   ┆     space, using _ m_ a_ l_ l_ ┆
0x760…780 6f 5f 08 63 28 29 2e 20 20 49 6e 20 74 68 69 73 20 63 61 73 65 2c 20 74 68 65 20 70 6f 69 6e 74   ┆o_ c().  In this case, the point┆
0x780…7a0 65 72 20 72 65 74 75 72 6e 65 64 0a 20 20 20 20 20 62 79 20 5f 08 67 5f 08 65 5f 08 74 5f 08 63   ┆er returned      by _ g_ e_ t_ c┆
0x7a0…7c0 5f 08 77 5f 08 64 20 6d 61 79 20 73 75 62 73 65 71 75 65 6e 74 6c 79 20 62 65 20 75 73 65 64 20   ┆_ w_ d may subsequently be used ┆
0x7c0…7e0 69 6e 20 61 20 63 61 6c 6c 20 74 6f 20 5f 08 66 5f 08 72 5f 08 65 5f 08 65 28 29 2e 0a 20 20 20   ┆in a call to _ f_ r_ e_ e().    ┆
0x7e0…800 20 20 49 6e 76 6f 6b 69 6e 67 20 5f 08 67 5f 08 65 5f 08 74 5f 08 63 5f 08 77 5f 08 64 20 77 69   ┆  Invoking _ g_ e_ t_ c_ w_ d wi┆
0x800…820 74 68 20 5f 08 62 5f 08 75 5f 08 66 20 61 73 20 61 20 6e 75 6c 6c 20 70 6f 69 6e 74 65 72 20 69   ┆th _ b_ u_ f as a null pointer i┆
0x820…840 73 20 6e 6f 74 20 72 65 63 6f 6d 2d 0a 20 20 20 20 20 6d 65 6e 64 65 64 20 61 73 20 74 68 69 73   ┆s not recom-      mended as this┆
0x840…860 20 66 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 6d 61 79 20 62 65 20 73 75 62 6a 65 63 74 20 74 6f   ┆ functionality may be subject to┆
0x860…880 20 77 69 74 68 64 72 61 77 61 6c 20 69 6e 0a 20 20 20 20 20 74 68 65 20 66 75 74 75 72 65 2e 0a   ┆ withdrawal in      the future. ┆
0x880…8a0 0a 44 65 63 65 6d 62 65 72 20 31 39 39 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ December 1990                  ┆
0x8a0…8c0 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┆
0x8c0…8d3 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a                                          ┆ce                 ┆