pike.git/
lib/
master.pike.in
Branch:
Tag:
Non-build tags
All tags
No tags
1998-04-06
1998-04-06 04:34:59 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
862fb4699de1b679e1a64124f80d2cb406992085 (
27
lines) (+
21
/-
6
)
[
Show
|
Annotate
]
Branch:
7.9
new option -p
Rev: lib/master.pike.in:1.2
1:
-
/* $Id: master.pike.in,v 1.
1
1998/
03
/
28
16
:
36
:
56
grubba
Exp $
+
/* $Id: master.pike.in,v 1.
2
1998/
04
/
06
04
:
34
:
59
hubbe
Exp $
* * Master-file for Pike. *
59:
program compile_file(string file) {
-
return compile(cpp(_static_modules.files()->
file
(file,"r")->read(),file));
+
return compile(cpp(_static_modules.files()->
Fd
(file,"r")->read(),file));
}
480:
*/ void _main(string *argv, string *env) {
-
int i;
+
int i
,debug,trace
;
object script; object tmp; string a,b;
490:
add_constant("getenv",getenv); add_constant("putenv",putenv);
-
add_constant("write",_static_modules.files()->
file("
stdout
")
->write);
+
add_constant("write",_static_modules.files()->
_
stdout->write);
_master_file_name=backtrace()[-1][0]; q=explode_path(_master_file_name);
536:
({"ppath",tmp->HAS_ARG,({"-P","--program-path"})}), ({"warnings",tmp->NO_ARG,({"-w","--warnings"})}), ({"ignore",tmp->HAS_ARG,"-ms"}),
-
({"ignore",tmp->MAY_HAVE_ARG,"-
Ddatpl
",0,1})
+
({"
debug",tmp->MAY_HAVE_ARG,"--debug",0,1}),
+
({"trace",tmp->MAY_HAVE_ARG,"--trace",0,1}),
+
({"
ignore",tmp->MAY_HAVE_ARG,"-
Dqdatpl
",0,1})
}), 1); /* Parse -M and -I backwards */
544:
{ switch(q[i][0]) {
+
case "debug":
+
debug+=(int)q[i][1];
+
break;
+
+
case "trace":
+
trace+=(int)q[i][1];
+
break;
+
case "modpath": add_module_path(q[i][1]); break;
629:
object script=tmp();
+
#if constant(_debug)
+
if(debug) _debug(debug);
+
#endif
+
if(trace) predef::trace(trace);
if(!script->main) { werror("Error: "+argv[0]+" has no main().\n");
739:
string read_include(string f) {
-
return _static_modules
->
files()->
file
(f,"r")->read();
+
return _static_modules
.
files()->
Fd
(f,"r")->read();
} // FIXME