Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
cc2c07ba
Commit
cc2c07ba
authored
Apr 20, 1998
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
old junk removed
Rev: lib/master.pike.in:1.16
parent
5a66b36a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/master.pike.in
+14
-39
14 additions, 39 deletions
lib/master.pike.in
with
14 additions
and
39 deletions
lib/master.pike.in
+
14
−
39
View file @
cc2c07ba
/* $Id: master.pike.in,v 1.1
5
1998/04/
19 00:08:5
3 hubbe Exp $
/* $Id: master.pike.in,v 1.1
6
1998/04/
20 02:34:0
3 hubbe Exp $
*
* Master-file for Pike.
*
...
...
@@ -45,7 +45,6 @@ string basename(string x)
string describe_backtrace(mixed *trace);
object low_cast_to_object(string oname, string current_file);
string pike_library_path;
string *pike_include_path=({});
string *pike_module_path=({});
string *pike_program_path=({});
...
...
@@ -378,16 +377,14 @@ object cast_to_object(string oname, string current_file)
class dirnode
{
string dirname;
object tm;
mixed module;
mapping cache=([]);
void create(string name
, object the_master
)
void create(string name)
{
dirname=name;
tm=the_master;
if(module=
tm->
findmodule(dirname+"/module"))
if(module=findmodule(dirname+"/module"))
if(mixed tmp=module->_module_value)
module=tmp;
}
...
...
@@ -397,7 +394,7 @@ class dirnode
if(module) if(object o=module[index]) return o;
index = dirname+"/"+index;
if(object o=
tm->
findmodule(index))
if(object o=findmodule(index))
{
if(mixed tmp=o->_module_value) o=tmp;
return o;
...
...
@@ -433,7 +430,7 @@ object findmodule(string fullname)
if(mixed *stat=master_file_stat(fullname+".pmod"))
{
if(stat[1]==-2)
return fc[fullname]=dirnode(fullname+".pmod"
,this_object()
);
return fc[fullname]=dirnode(fullname+".pmod");
}
if(o=low_cast_to_object(fullname+".pmod","/."))
...
...
@@ -447,18 +444,22 @@ object findmodule(string fullname)
return fc[fullname]=UNDEFINED;
}
mixed
resolv(string identifier
, string|void current_file)
mixed
handle_import(string what
, string|void current_file)
{
mixed ret;
string *tmp,path;
if(current_file)
{
tmp=explode_path(current_file);
tmp[-1]=
identifier
;
tmp[-1]=
what
;
path=combine_path_with_cwd( tmp*"/");
ret=findmodule(path);
}
return fc[path]=dirnode(path);
}
mixed resolv(string identifier, string|void current_file)
{
mixed ret;
string *tmp,path;
if(!ret)
{
...
...
@@ -467,14 +468,7 @@ mixed resolv(string identifier, string|void current_file)
string file=combine_path(path,identifier);
if(ret=findmodule(file)) break;
}
if(!ret)
{
string path=combine_path(pike_library_path+"/modules",identifier);
ret=findmodule(path);
}
}
if(ret)
{
...
...
@@ -513,9 +507,6 @@ void _main(string *orig_argv, string *env)
add_include_path("lib_prefix/include");
add_module_path("lib_prefix/modules");
add_program_path(getcwd());
add_module_path(getcwd());
q=(getenv("PIKE_INCLUDE_PATH")||"")/":"-({""});
for(i=sizeof(q)-1;i>=0;i--) add_include_path(q[i]);
...
...
@@ -730,22 +721,6 @@ string handle_include(string f,
path=0;
}
if(!path)
{
path=combine_path(pike_library_path+"/include",f);
if(!master_file_stat(path)) path=0;
}
}
if(path)
{
/* Handle preload */
if(path[-1]=='h' && path[-2]=='.' &&
master_file_stat(path[0..sizeof(path)-2]+"pre.pike"))
{
cast_to_object(path[0..sizeof(path)-2]+"pre.pike","/");
}
}
return path;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment