/* char id_getcwd[] = "@(#)getcwd_.c 1.5"; * Get pathname of current working directory. * * calling sequence: * character*128 path * ierr = getcwd(path) * where: * path will receive the pathname of the current working directory. * ierr will be 0 if successful, a system error code otherwise. */ #include "../libI77/fiodefs.h" #include #ifndef MAXPATHLEN #define MAXPATHLEN 128 #endif extern int errno; char *getwd(); ftnint getcwd_(path, len) char *path; ftnlen len; { char *p; char pathname[MAXPATHLEN]; p = getwd(pathname); b_char(pathname, path, len); if (p) return((ftnint) 0); else return((ftnint)errno); }