getcwd_.c
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· C语言 代码 · 共 36 行
C
36 行
/*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 <sys/param.h>#ifndef MAXPATHLEN#define MAXPATHLEN 128#endifextern int errno;char *getwd();longgetcwd_(path, len)char *path;long len;{ char *p; char pathname[MAXPATHLEN]; p = getwd(pathname); b_char(pathname, path, len); if (p) return(0L); else return((long)errno);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?