pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:284:      protected array(string) search_path_entries=0;      //!   string search_path(string command)   {    if (command=="" || command[0]=='/') return command;       if (!search_path_entries)    { + #ifdef __NT__ +  array(string) e=replace(getenv("PATH")||"", "\\", "/")/";"-({""}); + #elif defined(__amigaos__) +  array(string) e=(getenv("PATH")||"")/";"-({""}); + #else    array(string) e=(getenv("PATH")||"")/":"-({""}); -  + #endif       multiset(string) filter=(<>);    search_path_entries=({});    foreach (e,string s)    {    string t;    if (s[0]=='~') // some shells allow ~-expansion in PATH    {    if (s[0..1]=="~/" && (t=[string]getenv("HOME")))    s=t+s[1..];