mirror of
https://git.suckless.org/9base
synced 2025-08-29 11:23:48 -07:00
19 lines
204 B
C
19 lines
204 B
C
#include <u.h>
|
|
#include <libc.h>
|
|
|
|
char*
|
|
get9root(void)
|
|
{
|
|
static char *s;
|
|
|
|
if(s)
|
|
return s;
|
|
|
|
if((s = getenv("PLAN9")) != 0)
|
|
return s;
|
|
/* could do better - search $PATH */
|
|
s = PREFIX;
|
|
return s;
|
|
}
|
|
|