plan9port/man/man3/getwd.3
Russ Cox 977b25a76a tmac: introduce real manual reference macro instead of overloading IR
The overloading of IR emits magic \X'...' sequences that turn into HTML manual links.
But not all such IR invocations should be manual links;
those had to be written to avoid the IR macro before.
Worse, the \X'...' ending the IR causes troff to emit only a single space after a period.

Defining a new IM macro for manual references fixes both problems.

Fixes #441.
2020-08-13 23:43:43 -04:00

37 lines
643 B
Groff

.TH GETWD 3
.SH NAME
getwd \- get current directory
.SH SYNOPSIS
.B #include <u.h>
.br
.B #include <libc.h>
.PP
.B
char* getwd(char *buf, int size)
.SH DESCRIPTION
.I Getwd
fills
.I buf
with a null-terminated string representing the current directory
and returns
.IR buf .
.PP
.I Getwd
places no more than
.I size
bytes in the buffer provided.
.SH SOURCE
.B \*9/src/lib9/getwd.c
.SH "SEE ALSO"
.IM pwd (1)
.SH DIAGNOSTICS
On error, zero is returned.
.IM Errstr (3)
may be consulted for more information.
.SH BUGS
To avoid name conflicts with the underlying system,
.I getwd
is a preprocessor macro defined as
.IR p9getwd ;
see
.IM intro (3) .