sbase/util/agetcwd.c

16 lines
233 B
C
Raw Normal View History

2011-05-26 04:01:20 +01:00
/* See LICENSE file for copyright and license details. */
#include <unistd.h>
#include "../util.h"
char *
agetcwd(void)
{
char *buf;
2011-06-21 05:05:37 +01:00
long size;
2011-05-26 04:01:20 +01:00
2011-06-25 17:26:44 +01:00
apathmax(&buf, &size);
2011-05-26 04:01:20 +01:00
if(!getcwd(buf, size))
eprintf("getcwd:");
return buf;
}