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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
0283a135
Commit
0283a135
authored
28 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
master()->resolv() & --version implemented
Rev: lib/master.pike:1.15
parent
04dad4dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/master.pike
+26
-4
26 additions, 4 deletions
lib/master.pike
with
26 additions
and
4 deletions
lib/master.pike
+
26
−
4
View file @
0283a135
#define VERSION "Pike v0.4pl1"
string describe_backtrace(mixed *trace);
string pike_library_path;
...
...
@@ -101,8 +103,6 @@ void handle_error(mixed *trace)
werror(describe_backtrace(trace));
}
object new(mixed prog, mixed ... args)
{
return ((program)prog)(@args);
...
...
@@ -115,7 +115,7 @@ void create()
/* make ourselves known */
add_constant("master",lambda() { return this_object(); });
add_constant("describe_backtrace",describe_backtrace);
add_constant("version",lambda() { return
"Pike v0.4"
; });
add_constant("version",lambda() { return
VERSION
; });
add_constant("mkmultiset",lambda(mixed *a) { return aggregate_multiset(@a); });
add_constant("strlen",sizeof);
add_constant("new",new);
...
...
@@ -167,6 +167,12 @@ object cast_to_object(string oname)
}
mixed resolv(string identifier, string file)
{
/* Module system goes here */
throw(sprintf("'%s' is undefined.",identifier));
}
/* This function is called when all the driver is done with all setup
* of modules, efuns, tables etc. etc. and is ready to start executing
* _real_ programs. It receives the arguments not meant for the driver
...
...
@@ -177,6 +183,7 @@ void _main(string *argv, string *env)
{
int i;
object script;
object tmp;
string a,b;
string *q;
...
...
@@ -190,7 +197,22 @@ void _main(string *argv, string *env)
q=a/"/";
pike_library_path = q[0..sizeof(q)-2] * "/";
// clone(compile_file(pike_library_path+"/simulate.pike"));
tmp=new(pike_library_path+"/include/getopt.pre.pike");
if(tmp->find_option(argv,"v","version"))
{
werror(VERSION " Copyright (C) 1994-1997 Fredrik Hübinette\n");
werror("Pike comes with ABSOLUTELY NO WARRANTY; This is free software and you are\n");
werror("welcome to redistribute it under certain conditions; Read the files\n");
werror("COPYING and DISCLAIMER in the Pike distribution for more details.\n");
exit(0);
}
destruct(tmp);
for(i=1;i<sizeof(argv);i++)
if(sizeof(argv[i]) && argv[i][0]!='-')
break;
argv=argv[i..];
if(!sizeof(argv))
{
...
...
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