1: /*
2: char id_getcwd[] = "@(#)getcwd_.c 1.5";
3: * Get pathname of current working directory.
4: *
5: * calling sequence:
6: * character*128 path
7: * ierr = getcwd(path)
8: * where:
9: * path will receive the pathname of the current working directory.
10: * ierr will be 0 if successful, a system error code otherwise.
11: */
12:
13: #include "../libI77/fiodefs.h"
14: #include <sys/param.h>
15: #ifndef MAXPATHLEN
16: #define MAXPATHLEN 128
17: #endif
18:
19: extern int errno;
20: char *getwd();
21:
22: ftnint
23: getcwd_(path, len)
24: char *path;
25: ftnlen len;
26: {
27: char *p;
28: char pathname[MAXPATHLEN];
29:
30: p = getwd(pathname);
31: b_char(pathname, path, len);
32: if (p)
33: return((ftnint) 0);
34: else
35: return((ftnint)errno);
36: }
Defined functions
Defined macros