0cd76f1998-10-22Fredrik Hübinette (Hubbe) #define UNDEFINED (([])[0])
9073712000-03-26Fredrik Hübinette (Hubbe) string fakeroot;
0cd76f1998-10-22Fredrik Hübinette (Hubbe) void handle_error(mixed err) { werror("%O\n",err); }
9073712000-03-26Fredrik Hübinette (Hubbe)  string read_file(string s) { if(fakeroot) s=fakeroot+combine_path(getcwd(),s); return _static_modules.files()->Fd(s,"r")->read(); }
0cd76f1998-10-22Fredrik Hübinette (Hubbe) program compile_file(string file) {
9073712000-03-26Fredrik Hübinette (Hubbe)  return compile(cpp(read_file(file),file));
0cd76f1998-10-22Fredrik Hübinette (Hubbe) } class Codec { string nameof(string x) { if(mixed tmp=search(all_constants(),x)) return tmp; return UNDEFINED; } } void _main(string *argv, string *env) {
9073712000-03-26Fredrik Hübinette (Hubbe)  foreach(argv[1..sizeof(argv)-2], string f) sscanf(f,"--fakeroot=%s",fakeroot);
0cd76f1998-10-22Fredrik Hübinette (Hubbe)  program p=compile_file(argv[-1]); string s=encode_value(p, Codec()); _static_modules.files()->Fd(argv[-1] + ".o","wct")->write(s); exit(0); }
cc0bf12000-01-31Fredrik Hübinette (Hubbe)  mixed resolv() { return ([])[0]; }