/*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. * * %sccs.include.redist.c% */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)getwd.c 5.1 (Berkeley) 02/20/91"; #endif /* LIBC_SCCS and not lint */ #include #include #include #include #include char * getwd(buf) char *buf; { char *p; if (p = getcwd(buf, MAXPATHLEN)) return(p); (void)strcpy(buf, strerror(errno)); return((char *)NULL); }