summaryrefslogtreecommitdiff
path: root/static/unix-v10/man3/getwd.3
diff options
context:
space:
mode:
Diffstat (limited to 'static/unix-v10/man3/getwd.3')
-rw-r--r--static/unix-v10/man3/getwd.341
1 files changed, 41 insertions, 0 deletions
diff --git a/static/unix-v10/man3/getwd.3 b/static/unix-v10/man3/getwd.3
new file mode 100644
index 00000000..3f26286d
--- /dev/null
+++ b/static/unix-v10/man3/getwd.3
@@ -0,0 +1,41 @@
+.TH GETWD 3
+.CT 2 dirs
+.SH NAME
+getwd, getcwd \(mi get current directory
+.SH SYNOPSIS
+.B char *getwd(buf)
+.br
+.B char *buf;
+.PP
+.B char *getcwd(buf, size)
+.br
+.B char *buf;
+.SH DESCRIPTION
+.I Getwd
+and
+.I getcwd
+fill
+.I buf
+with a null-terminated string representing the current directory
+and return
+.IR buf .
+.PP
+.I Getwd
+is in the style of BSD systems and
+.I getcwd
+in that of System V.
+If
+.I buf
+is 0,
+.I getcwd
+will call
+.IR malloc (3)
+to allocate
+.I size
+bytes for the buffer.
+.SH "SEE ALSO
+.IR pwd (1)
+.SH DIAGNOSTICS
+On error, zero is returned and
+.I buf
+is filled with a diagnostic message.