aruu

[MIRROR] Actual replacement for Busybox | suckless
git clone https://git.daat.foo/aruu.git
Log | Files | Refs | README | LICENSE

agetcwd.c (243B)


      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 }