Branch: Tag:

2000-09-01

2000-09-01 22:56:41 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

progress bars backported

Rev: bin/install.pike:1.62
Rev: src/dumpmaster.pike:1.4

1:   #define UNDEFINED (([])[0])    - string fakeroot; + string fr;      void handle_error(mixed err)   {    werror("%O\n",err);   }    - string read_file(string s) + void compile_error(string file,int line,string err)   { -  if(fakeroot) -  s=fakeroot+combine_path(getcwd(),s); +  werror(sprintf("%s:%s:%s\n",file, line?(string)line:"-",err)); + }    -  return _static_modules.files()->Fd(s,"r")->read(); + string fakeroot(string s) + { +  if(fr) s=fr+combine_path(getcwd(),s); +  return s;   }    -  + string read_file(string s) + { +  return _static_modules.files()->Fd(fakeroot(s),"r")->read(); + } +    program compile_file(string file)   {    return compile(cpp(read_file(file),file));
31:   void _main(string *argv, string *env)   {    foreach(argv[1..sizeof(argv)-2], string f) -  sscanf(f,"--fakeroot=%s",fakeroot); +  sscanf(f,"--fakeroot=%s",fr);       program p=compile_file(argv[-1]);    string s=encode_value(p, Codec()); -  _static_modules.files()->Fd(argv[-1] + ".o","wct")->write(s); +  _static_modules.files()->Fd(fakeroot(argv[-1]) + ".o","wct")->write(s);    exit(0);   }         mixed resolv() { return ([])[0]; }