pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
2000-03-25
2000-03-25 21:25:31 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
d8a6fc70ba23b55c5720239133a6aee00f786a0e (
25
lines) (+
17
/-
8
)
[
Show
|
Annotate
]
Branch:
7.9
better error message
Rev: lib/master.pike.in:1.106
1:
/* -*- Pike -*- *
-
* $Id: master.pike.in,v 1.
105
2000/03/
23
20
:
09
:
41
mast
Exp $
+
* $Id: master.pike.in,v 1.
106
2000/03/
25
21
:
25
:
31
hubbe
Exp $
* * Master-file for Pike. *
117:
return compile(cpp(data,name||"-", 0, handler), handler); }
+
string master_read_file(string file)
+
{
+
object o=_static_modules.files()->Fd();
+
if(o->open(file,"r"))
+
return o->read();
+
return 0;
+
}
+
program compile_file(string file, object|void handler) { AUTORELOAD_CHECK_FILE(file);
-
return compile(cpp(_
static
_
modules.files
(
)->Fd(
file
,"r"
)
->read()
,
+
return compile(cpp(
master
_
read
_
file
(file),
file, 1, handler), handler); }
314:
mixed err=catch { AUTORELOAD_CHECK_FILE(oname); return programs[fname] =
-
decode_value(_
static
_
modules.files
(
)->Fd(
oname
,"r"
)
->read()
,
+
decode_value(
master
_
read
_
file
(oname),
Codec()); }; if (handler) {
561:
{ if(object o=low_cast_to_object(oname, current_file)) return o;
-
error("Cast to object
failed\n
");
+
error(
sprintf(
"Cast
'%s'
to object
failed%s.\n
"
,file,
+
current_file?sprintf("for '%s'",current_file
)
,""))
;
} class dirnode
1033:
exit(0); case "preprocess":
-
_static_modules.files()->_stdout->write(cpp(_
static
_
modules.files
(
)->Fd(
opts[1]
,"r"
)
->read()
,opts[1]));
+
_static_modules.files()->_stdout->write(cpp(
master
_
read
_
file
(opts[1]),
+
opts[1]));
exit(0); } }
1262:
string read_include(string f) { AUTORELOAD_CHECK_FILE(f)
-
object
o=
_
static
_
modules.files
(
)->Fd();
-
if(o->open(
f
,"r"
)
)
-
return o->read()
;
+
return
master
_
read
_
file
(f);
} int clipped=0;