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
686ed6af
Commit
686ed6af
authored
26 years ago
by
Fredrik Hübinette (Hubbe)
Browse files
Options
Downloads
Patches
Plain Diff
bugfixes and some minor new features
Rev: NT/init_nt:1.13 Rev: NT/tools/lib.pike:1.4 Rev: NT/tools/rntcc:1.17
parent
2ede1d07
Branches
Branches containing commit
Tags
rxnpatch/2020-08-18T134910
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitattributes
+1
-0
1 addition, 0 deletions
.gitattributes
NT/init_nt
+2
-0
2 additions, 0 deletions
NT/init_nt
NT/tools/lib.pike
+2
-1
2 additions, 1 deletion
NT/tools/lib.pike
NT/tools/rntcc
+45
-14
45 additions, 14 deletions
NT/tools/rntcc
with
50 additions
and
15 deletions
.gitattributes
+
1
−
0
View file @
686ed6af
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
*.gz binary
*.gz binary
*.ppm binary
*.ppm binary
*.rs binary
*.rs binary
init_nt -text -crlf
lib -text -crlf
lib -text -crlf
testfont binary
testfont binary
...
...
This diff is collapsed.
Click to expand it.
NT/init_nt
+
2
−
0
View file @
686ed6af
...
@@ -32,6 +32,8 @@ else
...
@@ -32,6 +32,8 @@ else
MNTREPLACE
=
"s@
$NTMOUNT
@@g
MNTREPLACE
=
"s@
$NTMOUNT
@@g
"
"
fi
fi
IFS
=
'
'
export
NTHOST NTDRIVE NTCC CC PATH NTTOOLS MNTREPLACE MNTREPLACE NTPORT USE_SPRSH
export
NTHOST NTDRIVE NTCC CC PATH NTTOOLS MNTREPLACE MNTREPLACE NTPORT USE_SPRSH
...
...
This diff is collapsed.
Click to expand it.
NT/tools/lib.pike
+
2
−
1
View file @
686ed6af
...
@@ -60,6 +60,7 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)
...
@@ -60,6 +60,7 @@ int silent_do_cmd(string *cmd, mixed|void filter, int|void silent)
sscanf(f->read(4),"%4c",int len);
sscanf(f->read(4),"%4c",int len);
if(!len) break;
if(!len) break;
s=f->read(len);
s=f->read(len);
s=replace(s,"\r\n","\n");
if(!silent) write(s);
if(!silent) write(s);
ret+=s;
ret+=s;
}
}
...
@@ -123,7 +124,7 @@ string find_next_in_path(string argv0,string cmd)
...
@@ -123,7 +124,7 @@ string find_next_in_path(string argv0,string cmd)
{
{
if(argv0)
if(argv0)
{
{
if(argv0==
s
)
if(argv0==
fname
)
argv0=0;
argv0=0;
}else{
}else{
return fname;
return fname;
...
...
This diff is collapsed.
Click to expand it.
NT/tools/rntcc
+
45
−
14
View file @
686ed6af
...
@@ -11,6 +11,15 @@ inherit "lib.pike";
...
@@ -11,6 +11,15 @@ inherit "lib.pike";
int verbose=1;
int verbose=1;
// Temporary variable
int linking_failed;
string get_ext(string file)
{
sscanf(file=lower_case(reverse(file)),"%s.",file);
return reverse(file);
}
int compile(string *sources,
int compile(string *sources,
string dest,
string dest,
string errorfile,
string errorfile,
...
@@ -28,11 +37,19 @@ int compile(string *sources,
...
@@ -28,11 +37,19 @@ int compile(string *sources,
dest=fixpath(dest);
dest=fixpath(dest);
sources=Array.map(sources,fixpath);
sources=Array.map(sources,fixpath);
if(lower_case(sources[0][strlen(sources[0])-3..])==".s"
)
switch(get_ext(sources[0])
)
{
{
cmd=({ "wasm", "-fe"+errorfile, "-fo"+dest,})+ sources;
case "c":
}else{
cmd=({ "wcc386" }) + cflags + ({"-fr"+errorfile, "-fo"+dest}) + sources;
cmd=({ "wcc386" }) + cflags + ({"-fr"+errorfile, "-fo"+dest}) + sources;
break;
case "cpp":
case "cc":
cmd=({ "wpp386" }) + cflags + ({"-fr"+errorfile, "-fo"+dest}) + sources;
break;
case "s":
cmd=({ "wasm", "-fe"+errorfile, "-fo"+dest,})+ sources;
}
}
if(verbose)
if(verbose)
...
@@ -65,7 +82,7 @@ int main(int argc, string *argv)
...
@@ -65,7 +82,7 @@ int main(int argc, string *argv)
{
{
string target;
string target;
string operation="link";
string operation="link";
string *cflags=({});
string *cflags=({
"-d__WIN32__","-d_WIN32"
});
string *ldopts=({"OPTION","STACK=8m"});
string *ldopts=({"OPTION","STACK=8m"});
string *libraries=({});
string *libraries=({});
string *objects=({});
string *objects=({});
...
@@ -196,22 +213,20 @@ int main(int argc, string *argv)
...
@@ -196,22 +213,20 @@ int main(int argc, string *argv)
argv=Getopt.get_args(argv);
argv=Getopt.get_args(argv);
foreach(argv[1..], string tmp)
foreach(argv[1..], string tmp)
{
{
string ext;
if(tmp[0]=='-')
if(tmp[0]=='-')
{
{
werror("Unrecognized option "+tmp+".\n");
werror("Unrecognized option "+tmp+".\n");
exit(1);
exit(1);
}
}
sscanf(reverse(tmp),"%s.",ext);
// Recognize which files need to be compiled
// Recognize which files need to be compiled
switch(
ext
)
switch(
get_ext(tmp)
)
{
{
case "bil":
case "o":
case "o":
case "jbo":
case "a":
case "a":
case "lld":
case "obj":
case "dll":
case "lib":
objects+=({tmp});
objects+=({tmp});
break;
break;
...
@@ -240,8 +255,19 @@ int main(int argc, string *argv)
...
@@ -240,8 +255,19 @@ int main(int argc, string *argv)
case "preprocess":
case "preprocess":
{
{
switch(get_ext(sources[0]))
{
default:
case "c":
int ret=silent_do_cmd( ({"wcc386","-p","-fr"+errorfile}) + cflags + Array.map(sources, fixpath));
int ret=silent_do_cmd( ({"wcc386","-p","-fr"+errorfile}) + cflags + Array.map(sources, fixpath));
break;
break;
case "cc":
case "cpp":
int ret=silent_do_cmd( ({"wpp386","-p","-fr"+errorfile}) + cflags + Array.map(sources, fixpath));
break;
}
break;
}
}
case "link":
case "link":
...
@@ -256,10 +282,12 @@ int main(int argc, string *argv)
...
@@ -256,10 +282,12 @@ int main(int argc, string *argv)
check_errorfile(errorfile);
check_errorfile(errorfile);
}
}
// objects+=({"BINMODE.OBJ"});
string ldfile="TMP"+getpid()+".lk";
string ldfile="TMP"+getpid()+".lk";
if(!output) output="a.out";
if(!output) output="a.out";
rm(ldfile);
rm(ldfile);
target=output;
target=output;
if(!share) target+=".exe";
if(!share) target+=".exe";
...
@@ -275,15 +303,18 @@ int main(int argc, string *argv)
...
@@ -275,15 +303,18 @@ int main(int argc, string *argv)
Process.system("cat "+ldfile);
Process.system("cat "+ldfile);
write("\n");
write("\n");
#endif
#endif
linking_failed=0;
silent_do_cmd( ({"wlink","@"+ldfile }), lambda(string data)
silent_do_cmd( ({"wlink","@"+ldfile }), lambda(string data)
{
{
if(search(data," W1008:")!=-1)
if(search(data," W1008:")!=-1)
exit(1)
;
linking_failed++
;
});
});
if(getenv("CLEANUP")!="no")
if(getenv("CLEANUP")!="no")
rm(ldfile);
rm(ldfile);
if(linking_failed) exit(1);
}
}
check_errorfile(errorfile);
check_errorfile(errorfile);
...
...
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