ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

agetcwd.c (237B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include <unistd.h>
      3 
      4 #include "../util.h"
      5 
      6 char *
      7 agetcwd(void)
      8 {
      9 	char *buf;
     10 	long size;
     11 
     12 	apathmax(&buf, &size);
     13 	if (!getcwd(buf, size))
     14 		eprintf("getcwd:");
     15 
     16 	return buf;
     17 }
     18