Branch: Tag:

1998-03-22

1998-03-22 03:06:36 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

minor enhancements

Rev: NT/tools/lib.pike:1.2

48:    return f;   }    - int silent_do_cmd(string *cmd, mixed|void filter) + int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)   {    object(Stdio.File) f=low_do_cmd(cmd);   
59:    string s;    sscanf(f->read(4),"%4c",int len);    if(!len) break; -  write(s=f->read(len)); +  s=f->read(len); +  if(!silent) write(s);    ret+=s;    }    if(filter) filter(ret);
70:    return code;   }    + string tmp; +  + string popen_cmd(string *cmd) + { +  tmp=""; +  silent_do_cmd(cmd,lambda(string x) { tmp=x; }, 1); +  return tmp; + } +    string getntenv(string var)   {    string s="";