source: trunk/src/gcc/libiberty/getcwd.c@ 81

Last change on this file since 81 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1/* Emulate getcwd using getwd.
2 This function is in the public domain. */
3
4/*
5
6@deftypefn Supplemental char* getcwd (char *@var{pathname}, int @var{len})
7
8Copy the absolute pathname for the current working directory into
9@var{pathname}, which is assumed to point to a buffer of at least
10@var{len} bytes, and return a pointer to the buffer. If the current
11directory's path doesn't fit in @var{len} characters, the result is
12@code{NULL} and @code{errno} is set. If @var{pathname} is a null pointer,
13@code{getcwd} will obtain @var{len} bytes of space using
14@code{malloc}.