get9root.c (204B)
1 #include <u.h> 2 #include <libc.h> 3 4 char* 5 get9root(void) 6 { 7 static char *s; 8 9 if(s) 10 return s; 11 12 if((s = getenv("PLAN9")) != 0) 13 return s; 14 /* could do better - search $PATH */ 15 s = PREFIX; 16 return s; 17 } 18