2011-05-25 23:01:20 -04:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <unistd.h>
|
2013-03-05 15:46:48 -05:00
|
|
|
|
2011-05-25 23:01:20 -04:00
|
|
|
#include "../util.h"
|
|
|
|
|
|
|
|
char *
|
|
|
|
agetcwd(void)
|
|
|
|
{
|
|
|
|
char *buf;
|
2015-03-06 18:48:37 -05:00
|
|
|
size_t size;
|
2011-05-25 23:01:20 -04:00
|
|
|
|
2011-06-25 12:26:44 -04:00
|
|
|
apathmax(&buf, &size);
|
2014-11-13 13:54:28 -05:00
|
|
|
if (!getcwd(buf, size))
|
2011-05-25 23:01:20 -04:00
|
|
|
eprintf("getcwd:");
|
2013-03-05 15:46:48 -05:00
|
|
|
|
2011-05-25 23:01:20 -04:00
|
|
|
return buf;
|
|
|
|
}
|
2013-03-05 15:46:48 -05:00
|
|
|
|