1: /*
   2:  * Copyright (c) 1980 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)getcwd_.c	5.1	6/7/85
   7:  */
   8: 
   9: /*
  10:  * Get pathname of current working directory.
  11:  *
  12:  * calling sequence:
  13:  *	character*128 path
  14:  *	ierr = getcwd(path)
  15:  * where:
  16:  *	path will receive the pathname of the current working directory.
  17:  *	ierr will be 0 if successful, a system error code otherwise.
  18:  */
  19: 
  20: #include <sys/param.h>
  21: #ifndef MAXPATHLEN
  22: #define MAXPATHLEN  128
  23: #endif
  24: 
  25: extern int errno;
  26: char    *getwd();
  27: 
  28: long
  29: getcwd_(path, len)
  30: char *path;
  31: long len;
  32: {
  33:     char    *p;
  34:     char    pathname[MAXPATHLEN];
  35: 
  36:     p = getwd(pathname);
  37:     b_char(pathname, path, len);
  38:     if (p)
  39:         return(0L);
  40:     else
  41:         return((long)errno);
  42: }

Defined functions

getcwd_ defined in line 28; never used

Defined macros

MAXPATHLEN defined in line 22; used 2 times
Last modified: 1987-02-18
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 484
Valid CSS Valid XHTML 1.0 Strict