13557Sdlw /* 2*10645Sdlw char id_getcwd[] = "@(#)getcwd_.c 1.4"; 33557Sdlw * Get pathname of current working directory. 43557Sdlw * 53557Sdlw * calling sequence: 63557Sdlw * character*128 path 73557Sdlw * ierr = getcwd(path) 83557Sdlw * where: 93557Sdlw * path will receive the pathname of the current working directory. 103557Sdlw * ierr will be 0 if successful, a system error code otherwise. 113557Sdlw */ 123557Sdlw 133557Sdlw extern int errno; 14*10645Sdlw char *getwd(); 153557Sdlw 163557Sdlw long 173557Sdlw getcwd_(path, len) 183557Sdlw char *path; 193579Sdlw long len; 203557Sdlw { 21*10645Sdlw char *p; 22*10645Sdlw char pathname[1024]; 233557Sdlw 24*10645Sdlw p = getwd(pathname); 25*10645Sdlw b_char(pathname, path, len); 263557Sdlw if (p) 273557Sdlw return(0L); 28*10645Sdlw else 29*10645Sdlw return((long)errno); 303557Sdlw } 31