|
|
1.1 root 1: .TH GETWD 3
2: .CT 2 dirs
3: .SH NAME
4: getwd, getcwd \(mi get current directory
5: .SH SYNOPSIS
6: .B char *getwd(buf)
7: .br
8: .B char *buf;
9: .PP
10: .B char *getcwd(buf, size)
11: .br
12: .B char *buf;
13: .SH DESCRIPTION
14: .I Getwd
15: and
16: .I getcwd
17: fill
18: .I buf
19: with a null-terminated string representing the current directory
20: and return
21: .IR buf .
22: .PP
23: .I Getwd
24: is in the style of BSD systems and
25: .I getcwd
26: in that of System V.
27: If
28: .I buf
29: is 0,
30: .I getcwd
31: will call
32: .IR malloc (3)
33: to allocate
34: .I size
35: bytes for the buffer.
36: .SH "SEE ALSO
37: .IR pwd (1)
38: .SH DIAGNOSTICS
39: On error, zero is returned and
40: .I buf
41: is filled with a diagnostic message.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.