ref: 369c06e41546d82b820ca7013385482ebe1a017d
parent: ca454cdabf7ac83e68f1cef68b145e4439bd710f
parent: 6cf46423e60eea41968150df6ff0b5a6e7a336a9
author: Ori Bernstein <ori@eigenstate.org'>
date: Thu Oct 8 18:42:08 EDT 2015
Merge updates of bootstrap scripts.
--- a/lib/std/dirname.myr
+++ b/lib/std/dirname.myr
@@ -4,6 +4,7 @@
use "sldup.use"
use "strfind.use"
use "option.use"
+use "types.use"
pkg std =
const dirname : (p : byte[:] -> byte[:])
@@ -10,28 +11,38 @@
const basename : (p : byte[:] -> byte[:])
;;
+extern const put : (fmt : byte[:], args : ... -> size)
+
const dirname = {p
+ var end
+
+ for end = p.len; end > 1; end--
+ if p[end-1] != '/' castto(byte)
+ break
+ ;;
+ ;;
+ std.put("p: {}, end: {}, p[:{}]: {}\n", p, end, end, p[:end])
+ p = p[:end]
match std.strrfind(p, "/")
- | `std.Some idx:
- -> std.sldup(p[:idx])
- | `std.None:
- -> std.sldup(".")
+ | `std.None: -> std.sldup(".")
+ | `std.Some 0: -> std.sldup("/")
+ | `std.Some i: -> std.sldup(p[:i])
;;
}
const basename = {p
-:again
- if p.len == 0
- -> std.sldup(".")
+ var end
+
+ for end = p.len; end > 1; end--
+ if p[end-1] != '/' castto(byte)
+ break
+ ;;
;;
+ std.put("p: {}, end: {}, p[:{}]: {}\n", p, end, end, p[:end])
+ p = p[:end]
match std.strrfind(p, "/")
- | `std.Some idx:
- if idx == p.len - 1
- goto again
- ;;
- -> std.sldup(p[idx+1:])
- | `std.None:
- -> std.sldup(p)
+ | `std.None: -> std.sldup(p[:end])
+ | `std.Some i: -> std.sldup(p[i+1:end])
;;
}
--- a/lib/std/mkpath.myr
+++ b/lib/std/mkpath.myr
@@ -2,20 +2,20 @@
use "errno.use"
pkg std =
- const mkpath : (p : byte[:] -> bool)
+ const mkpath : (p : byte[:], mode : int64 -> errno)
;;
-const mkpath = {p
+const mkpath = {p, mode
var st
for var i = 0; i < p.len; i++
if p[i] == '/' castto(byte) && i != 0
- st = mkdir(p[:i], 0o777)
- if st != 0 && (st castto(errno)) != Eexist
- -> false
+ st = mkdir(p[:i], mode)
+ if st != 0 && st != Eexist
+ -> st
;;
;;
;;
- -> true
+ -> Enone
}
--- a/lib/std/syswrap+plan9.myr
+++ b/lib/std/syswrap+plan9.myr
@@ -54,7 +54,7 @@
const getsysinfo : (si : sysinfo# -> void)
/* path manipulation */
- const mkdir : (path : byte[:], mode : int64 -> int64)
+ const mkdir : (path : byte[:], mode : int64 -> errno)
const chdir : (path : byte[:] -> bool)
const remove : (path : byte[:] -> bool)
@@ -153,7 +153,7 @@
fd = sys.create(path, sys.Ordonly, sys.Dmdir | (mode castto(int)))
if fd < 0
- -> -1
+ -> lasterr()
;;
sys.close(fd)
-> 0
--- a/lib/std/syswrap+posixy.myr
+++ b/lib/std/syswrap+posixy.myr
@@ -52,7 +52,7 @@
const getsysinfo : (si : sysinfo# -> void)
/* path manipulation */
- const mkdir : (path : byte[:], mode : int64 -> int64)
+ const mkdir : (path : byte[:], mode : int64 -> errno)
const remove : (path : byte[:] -> bool)
const chdir : (path : byte[:] -> bool)
@@ -83,7 +83,7 @@
const dup2 = {ofd, nfd; -> check(sys.dup2(ofd castto(sys.fd), nfd castto(sys.fd)) castto(fd))}
/* path manipulation */
-const mkdir = {path, mode; -> sys.mkdir(path, mode)}
+const mkdir = {path, mode; -> sys.mkdir(path, mode) castto(errno)}
const chdir = {path; -> sys.chdir(path) == 0}
const remove = {path; -> sys.unlink(path) == 0}
--- /dev/null
+++ b/lib/std/test/dirname.myr
@@ -1,0 +1,23 @@
+use std
+
+const main = {
+ eq(std.dirname("foo/bar"), "foo")
+ eq(std.dirname("/foo/bar"), "/foo")
+ eq(std.dirname("/foo/bar/"), "/foo")
+ eq(std.dirname("/bar/"), "/")
+ eq(std.dirname("/"), "/")
+ eq(std.dirname("///"), "/")
+
+ eq(std.basename("foo/bar"), "bar")
+ eq(std.basename("/foo/bar"), "bar")
+ eq(std.basename("/foo/bar/"), "bar")
+ eq(std.basename("/bar/"), "bar")
+ eq(std.basename("/"), "")
+ eq(std.basename("///"), "")
+}
+
+const eq = {a, e
+ if !std.sleq(e, a)
+ std.fatal("expected '{}', got '{}'\n", e, a)
+ ;;
+}
--- a/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
+++ b/mk/bootstrap/bootstrap+FreeBSD-amd64.sh
@@ -15,8 +15,9 @@
echo cd $pwd/lib/std; cd $pwd/lib/std
echo $pwd/6/6m -I ../sys -I . types.myr ; $pwd/6/6m -I ../sys -I . types.myr
echo $pwd/6/6m -I ../sys -I . cstrconv.myr ; $pwd/6/6m -I ../sys -I . cstrconv.myr
-echo $pwd/6/6m -I ../sys -I . option.myr ; $pwd/6/6m -I ../sys -I . option.myr
echo $pwd/6/6m -I ../sys -I . errno.myr ; $pwd/6/6m -I ../sys -I . errno.myr
+echo $pwd/6/6m -I ../sys -I . option.myr ; $pwd/6/6m -I ../sys -I . option.myr
+echo $pwd/6/6m -I ../sys -I . result.myr ; $pwd/6/6m -I ../sys -I . result.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap`
echo $pwd/6/6m -I ../sys -I . die.myr ; $pwd/6/6m -I ../sys -I . die.myr
echo $pwd/6/6m -I ../sys -I . sleq.myr ; $pwd/6/6m -I ../sys -I . sleq.myr
@@ -23,34 +24,35 @@
echo $pwd/6/6m -I ../sys -I . hassuffix.myr ; $pwd/6/6m -I ../sys -I . hassuffix.myr
echo $pwd/6/6m -I ../sys -I . extremum.myr ; $pwd/6/6m -I ../sys -I . extremum.myr
echo $pwd/6/6m -I ../sys -I . units.myr ; $pwd/6/6m -I ../sys -I . units.myr
+echo $pwd/6/6m -I ../sys -I . memops.myr ; $pwd/6/6m -I ../sys -I . memops.myr
echo $pwd/6/6m -I ../sys -I . alloc.myr ; $pwd/6/6m -I ../sys -I . alloc.myr
-echo $pwd/6/6m -I ../sys -I . now.myr ; $pwd/6/6m -I ../sys -I . now.myr
-echo $pwd/6/6m -I ../sys -I . rand.myr ; $pwd/6/6m -I ../sys -I . rand.myr
-echo $pwd/6/6m -I ../sys -I . slcp.myr ; $pwd/6/6m -I ../sys -I . slcp.myr
-echo $pwd/6/6m -I ../sys -I . sldup.myr ; $pwd/6/6m -I ../sys -I . sldup.myr
-echo $pwd/6/6m -I ../sys -I . sljoin.myr ; $pwd/6/6m -I ../sys -I . sljoin.myr
-echo $pwd/6/6m -I ../sys -I . result.myr ; $pwd/6/6m -I ../sys -I . result.myr
-echo $pwd/6/6m -I ../sys -I . slurp.myr ; $pwd/6/6m -I ../sys -I . slurp.myr
-echo $pwd/6/6m -I ../sys -I . strfind.myr ; $pwd/6/6m -I ../sys -I . strfind.myr
-echo $pwd/6/6m -I ../sys -I . dirname.myr ; $pwd/6/6m -I ../sys -I . dirname.myr
-echo $pwd/6/6m -I ../sys -I . introspect.myr ; $pwd/6/6m -I ../sys -I . introspect.myr
-echo $pwd/6/6m -I ../sys -I . slpush.myr ; $pwd/6/6m -I ../sys -I . slpush.myr
-echo $pwd/6/6m -I ../sys -I . strsplit.myr ; $pwd/6/6m -I ../sys -I . strsplit.myr
-echo $pwd/6/6m -I ../sys -I . fltbits.myr ; $pwd/6/6m -I ../sys -I . fltbits.myr
echo $pwd/6/6m -I ../sys -I . chartype.myr ; $pwd/6/6m -I ../sys -I . chartype.myr
echo $pwd/6/6m -I ../sys -I . cmp.myr ; $pwd/6/6m -I ../sys -I . cmp.myr
echo $pwd/6/6m -I ../sys -I . hasprefix.myr ; $pwd/6/6m -I ../sys -I . hasprefix.myr
-echo $pwd/6/6m -I ../sys -I . utf.myr ; $pwd/6/6m -I ../sys -I . utf.myr
-echo $pwd/6/6m -I ../sys -I . intparse.myr ; $pwd/6/6m -I ../sys -I . intparse.myr
+echo $pwd/6/6m -I ../sys -I . slcp.myr ; $pwd/6/6m -I ../sys -I . slcp.myr
+echo $pwd/6/6m -I ../sys -I . sldup.myr ; $pwd/6/6m -I ../sys -I . sldup.myr
echo $pwd/6/6m -I ../sys -I . slfill.myr ; $pwd/6/6m -I ../sys -I . slfill.myr
+echo $pwd/6/6m -I ../sys -I . slpush.myr ; $pwd/6/6m -I ../sys -I . slpush.myr
+echo $pwd/6/6m -I ../sys -I . utf.myr ; $pwd/6/6m -I ../sys -I . utf.myr
echo $pwd/6/6m -I ../sys -I . bigint.myr ; $pwd/6/6m -I ../sys -I . bigint.myr
+echo $pwd/6/6m -I ../sys -I . fltbits.myr ; $pwd/6/6m -I ../sys -I . fltbits.myr
echo $pwd/6/6m -I ../sys -I . strbuf.myr ; $pwd/6/6m -I ../sys -I . strbuf.myr
echo $pwd/6/6m -I ../sys -I . fltfmt.myr ; $pwd/6/6m -I ../sys -I . fltfmt.myr
echo $pwd/6/6m -I ../sys -I . hashfuncs.myr ; $pwd/6/6m -I ../sys -I . hashfuncs.myr
echo $pwd/6/6m -I ../sys -I . htab.myr ; $pwd/6/6m -I ../sys -I . htab.myr
+echo $pwd/6/6m -I ../sys -I . introspect.myr ; $pwd/6/6m -I ../sys -I . introspect.myr
+echo $pwd/6/6m -I ../sys -I . intparse.myr ; $pwd/6/6m -I ../sys -I . intparse.myr
+echo $pwd/6/6m -I ../sys -I . strfind.myr ; $pwd/6/6m -I ../sys -I . strfind.myr
+echo $pwd/6/6m -I ../sys -I . strsplit.myr ; $pwd/6/6m -I ../sys -I . strsplit.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap-ss`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap-ss`
echo $pwd/6/6m -I ../sys -I . varargs.myr ; $pwd/6/6m -I ../sys -I . varargs.myr
echo $pwd/6/6m -I ../sys -I . fmt.myr ; $pwd/6/6m -I ../sys -I . fmt.myr
+echo $pwd/6/6m -I ../sys -I . assert.myr ; $pwd/6/6m -I ../sys -I . assert.myr
+echo $pwd/6/6m -I ../sys -I . now.myr ; $pwd/6/6m -I ../sys -I . now.myr
+echo $pwd/6/6m -I ../sys -I . rand.myr ; $pwd/6/6m -I ../sys -I . rand.myr
+echo $pwd/6/6m -I ../sys -I . sljoin.myr ; $pwd/6/6m -I ../sys -I . sljoin.myr
+echo $pwd/6/6m -I ../sys -I . slurp.myr ; $pwd/6/6m -I ../sys -I . slurp.myr
+echo $pwd/6/6m -I ../sys -I . dirname.myr ; $pwd/6/6m -I ../sys -I . dirname.myr
echo $pwd/6/6m -I ../sys -I . optparse.myr ; $pwd/6/6m -I ../sys -I . optparse.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dir`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dir`
echo $pwd/6/6m -I ../sys -I . ipparse.myr ; $pwd/6/6m -I ../sys -I . ipparse.myr
@@ -64,6 +66,7 @@
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh wait`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh wait`
echo $pwd/6/6m -I ../sys -I . strjoin.myr ; $pwd/6/6m -I ../sys -I . strjoin.myr
echo $pwd/6/6m -I ../sys -I . mk.myr ; $pwd/6/6m -I ../sys -I . mk.myr
+echo $pwd/6/6m -I ../sys -I . fndup.myr ; $pwd/6/6m -I ../sys -I . fndup.myr
echo $pwd/6/6m -I ../sys -I . putint.myr ; $pwd/6/6m -I ../sys -I . putint.myr
echo $pwd/6/6m -I ../sys -I . mkpath.myr ; $pwd/6/6m -I ../sys -I . mkpath.myr
echo $pwd/6/6m -I ../sys -I . endian.myr ; $pwd/6/6m -I ../sys -I . endian.myr
@@ -78,14 +81,15 @@
echo $pwd/6/6m -I ../sys -I . getcwd.myr ; $pwd/6/6m -I ../sys -I . getcwd.myr
echo $pwd/6/6m -I ../sys -I . swap.myr ; $pwd/6/6m -I ../sys -I . swap.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dial`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dial`
-echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use dir.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use dial.use ; $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use dir.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use dial.use
-echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o dir.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o dial.o ; ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o dir.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o dial.o
+echo as -g -o memops-impl.o `$pwd/sysselect.sh memops-impl`; as -g -o memops-impl.o `$pwd/sysselect.sh memops-impl`
+echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use dir.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use ; $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use dir.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use
+echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o memops.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o dir.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o ; ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o memops.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o dir.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o
echo cd $pwd; cd $pwd
echo cd $pwd/lib/regex; cd $pwd/lib/regex
-echo $pwd/6/6m -I ../sys -I ../std types.myr ; $pwd/6/6m -I ../sys -I ../std types.myr
-echo $pwd/6/6m -I ../sys -I ../std interp.myr ; $pwd/6/6m -I ../sys -I ../std interp.myr
-echo $pwd/6/6m -I ../sys -I ../std ranges.myr ; $pwd/6/6m -I ../sys -I ../std ranges.myr
-echo $pwd/6/6m -I ../sys -I ../std compile.myr ; $pwd/6/6m -I ../sys -I ../std compile.myr
+echo $pwd/6/6m -I ../std -I ../sys types.myr ; $pwd/6/6m -I ../std -I ../sys types.myr
+echo $pwd/6/6m -I ../std -I ../sys interp.myr ; $pwd/6/6m -I ../std -I ../sys interp.myr
+echo $pwd/6/6m -I ../std -I ../sys ranges.myr ; $pwd/6/6m -I ../std -I ../sys ranges.myr
+echo $pwd/6/6m -I ../std -I ../sys compile.myr ; $pwd/6/6m -I ../std -I ../sys compile.myr
echo $pwd/muse/muse -o regex interp.use types.use compile.use ranges.use ; $pwd/muse/muse -o regex interp.use types.use compile.use ranges.use
echo ar -rcs libregex.a interp.o types.o compile.o ranges.o ; ar -rcs libregex.a interp.o types.o compile.o ranges.o
echo cd $pwd; cd $pwd
@@ -97,16 +101,16 @@
echo ar -rcs libbio.a puti.o bio.o geti.o ; ar -rcs libbio.a puti.o bio.o geti.o
echo cd $pwd; cd $pwd
echo cd $pwd/mbld; cd $pwd/mbld
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys config.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys config.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys opts.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys opts.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys types.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys types.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys util.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys util.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys deps.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys deps.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys syssel.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys syssel.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys parse.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys parse.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys build.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys build.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys install.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys install.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys clean.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys clean.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys test.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys test.myr
-echo $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys main.myr ; $pwd/6/6m -I $pwd/lib/regex -I $pwd/lib/bio -I $pwd/lib/std -I $pwd/lib/sys main.myr
-echo ld -o mbld $pwd/rt/_myrrt.o clean.o config.o deps.o types.o syssel.o util.o parse.o main.o build.o opts.o install.o test.o -L$pwd/lib/regex -L$pwd/lib/bio -L$pwd/lib/std -L$pwd/lib/sys -lregex -lbio -lstd -lsys ; ld -o mbld $pwd/rt/_myrrt.o clean.o config.o deps.o types.o syssel.o util.o parse.o main.o build.o opts.o install.o test.o -L$pwd/lib/regex -L$pwd/lib/bio -L$pwd/lib/std -L$pwd/lib/sys -lregex -lbio -lstd -lsys
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys config.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys config.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys opts.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys opts.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys types.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys types.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys util.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys util.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys deps.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys deps.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys syssel.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys syssel.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys parse.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys parse.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys build.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys build.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys install.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys install.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys clean.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys clean.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys test.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys test.myr
+echo $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys main.myr ; $pwd/6/6m -I ../lib/regex -I ../lib/bio -I ../lib/std -I ../lib/sys main.myr
+echo ld -o mbld $pwd/rt/_myrrt.o clean.o config.o deps.o types.o syssel.o util.o parse.o main.o build.o opts.o install.o test.o -L../lib/regex -L../lib/bio -L../lib/std -L../lib/sys -lregex -lbio -lstd -lsys ; ld -o mbld $pwd/rt/_myrrt.o clean.o config.o deps.o types.o syssel.o util.o parse.o main.o build.o opts.o install.o test.o -L../lib/regex -L../lib/bio -L../lib/std -L../lib/sys -lregex -lbio -lstd -lsys
--- a/mk/bootstrap/bootstrap+Linux-x86_64.sh
+++ b/mk/bootstrap/bootstrap+Linux-x86_64.sh
@@ -15,8 +15,9 @@
echo cd $pwd/lib/std; cd $pwd/lib/std
echo $pwd/6/6m -I ../sys -I . types.myr ; $pwd/6/6m -I ../sys -I . types.myr
echo $pwd/6/6m -I ../sys -I . cstrconv.myr ; $pwd/6/6m -I ../sys -I . cstrconv.myr
-echo $pwd/6/6m -I ../sys -I . option.myr ; $pwd/6/6m -I ../sys -I . option.myr
echo $pwd/6/6m -I ../sys -I . errno.myr ; $pwd/6/6m -I ../sys -I . errno.myr
+echo $pwd/6/6m -I ../sys -I . option.myr ; $pwd/6/6m -I ../sys -I . option.myr
+echo $pwd/6/6m -I ../sys -I . result.myr ; $pwd/6/6m -I ../sys -I . result.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap`
echo $pwd/6/6m -I ../sys -I . die.myr ; $pwd/6/6m -I ../sys -I . die.myr
echo $pwd/6/6m -I ../sys -I . sleq.myr ; $pwd/6/6m -I ../sys -I . sleq.myr
@@ -23,34 +24,35 @@
echo $pwd/6/6m -I ../sys -I . hassuffix.myr ; $pwd/6/6m -I ../sys -I . hassuffix.myr
echo $pwd/6/6m -I ../sys -I . extremum.myr ; $pwd/6/6m -I ../sys -I . extremum.myr
echo $pwd/6/6m -I ../sys -I . units.myr ; $pwd/6/6m -I ../sys -I . units.myr
+echo $pwd/6/6m -I ../sys -I . memops.myr ; $pwd/6/6m -I ../sys -I . memops.myr
echo $pwd/6/6m -I ../sys -I . alloc.myr ; $pwd/6/6m -I ../sys -I . alloc.myr
-echo $pwd/6/6m -I ../sys -I . now.myr ; $pwd/6/6m -I ../sys -I . now.myr
-echo $pwd/6/6m -I ../sys -I . rand.myr ; $pwd/6/6m -I ../sys -I . rand.myr
-echo $pwd/6/6m -I ../sys -I . slcp.myr ; $pwd/6/6m -I ../sys -I . slcp.myr
-echo $pwd/6/6m -I ../sys -I . sldup.myr ; $pwd/6/6m -I ../sys -I . sldup.myr
-echo $pwd/6/6m -I ../sys -I . sljoin.myr ; $pwd/6/6m -I ../sys -I . sljoin.myr
-echo $pwd/6/6m -I ../sys -I . result.myr ; $pwd/6/6m -I ../sys -I . result.myr
-echo $pwd/6/6m -I ../sys -I . slurp.myr ; $pwd/6/6m -I ../sys -I . slurp.myr
-echo $pwd/6/6m -I ../sys -I . strfind.myr ; $pwd/6/6m -I ../sys -I . strfind.myr
-echo $pwd/6/6m -I ../sys -I . dirname.myr ; $pwd/6/6m -I ../sys -I . dirname.myr
-echo $pwd/6/6m -I ../sys -I . introspect.myr ; $pwd/6/6m -I ../sys -I . introspect.myr
-echo $pwd/6/6m -I ../sys -I . slpush.myr ; $pwd/6/6m -I ../sys -I . slpush.myr
-echo $pwd/6/6m -I ../sys -I . strsplit.myr ; $pwd/6/6m -I ../sys -I . strsplit.myr
-echo $pwd/6/6m -I ../sys -I . fltbits.myr ; $pwd/6/6m -I ../sys -I . fltbits.myr
echo $pwd/6/6m -I ../sys -I . chartype.myr ; $pwd/6/6m -I ../sys -I . chartype.myr
echo $pwd/6/6m -I ../sys -I . cmp.myr ; $pwd/6/6m -I ../sys -I . cmp.myr
echo $pwd/6/6m -I ../sys -I . hasprefix.myr ; $pwd/6/6m -I ../sys -I . hasprefix.myr
-echo $pwd/6/6m -I ../sys -I . utf.myr ; $pwd/6/6m -I ../sys -I . utf.myr
-echo $pwd/6/6m -I ../sys -I . intparse.myr ; $pwd/6/6m -I ../sys -I . intparse.myr
+echo $pwd/6/6m -I ../sys -I . slcp.myr ; $pwd/6/6m -I ../sys -I . slcp.myr
+echo $pwd/6/6m -I ../sys -I . sldup.myr ; $pwd/6/6m -I ../sys -I . sldup.myr
echo $pwd/6/6m -I ../sys -I . slfill.myr ; $pwd/6/6m -I ../sys -I . slfill.myr
+echo $pwd/6/6m -I ../sys -I . slpush.myr ; $pwd/6/6m -I ../sys -I . slpush.myr
+echo $pwd/6/6m -I ../sys -I . utf.myr ; $pwd/6/6m -I ../sys -I . utf.myr
echo $pwd/6/6m -I ../sys -I . bigint.myr ; $pwd/6/6m -I ../sys -I . bigint.myr
+echo $pwd/6/6m -I ../sys -I . fltbits.myr ; $pwd/6/6m -I ../sys -I . fltbits.myr
echo $pwd/6/6m -I ../sys -I . strbuf.myr ; $pwd/6/6m -I ../sys -I . strbuf.myr
echo $pwd/6/6m -I ../sys -I . fltfmt.myr ; $pwd/6/6m -I ../sys -I . fltfmt.myr
echo $pwd/6/6m -I ../sys -I . hashfuncs.myr ; $pwd/6/6m -I ../sys -I . hashfuncs.myr
echo $pwd/6/6m -I ../sys -I . htab.myr ; $pwd/6/6m -I ../sys -I . htab.myr
+echo $pwd/6/6m -I ../sys -I . introspect.myr ; $pwd/6/6m -I ../sys -I . introspect.myr
+echo $pwd/6/6m -I ../sys -I . intparse.myr ; $pwd/6/6m -I ../sys -I . intparse.myr
+echo $pwd/6/6m -I ../sys -I . strfind.myr ; $pwd/6/6m -I ../sys -I . strfind.myr
+echo $pwd/6/6m -I ../sys -I . strsplit.myr ; $pwd/6/6m -I ../sys -I . strsplit.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap-ss`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh syswrap-ss`
echo $pwd/6/6m -I ../sys -I . varargs.myr ; $pwd/6/6m -I ../sys -I . varargs.myr
echo $pwd/6/6m -I ../sys -I . fmt.myr ; $pwd/6/6m -I ../sys -I . fmt.myr
+echo $pwd/6/6m -I ../sys -I . assert.myr ; $pwd/6/6m -I ../sys -I . assert.myr
+echo $pwd/6/6m -I ../sys -I . now.myr ; $pwd/6/6m -I ../sys -I . now.myr
+echo $pwd/6/6m -I ../sys -I . rand.myr ; $pwd/6/6m -I ../sys -I . rand.myr
+echo $pwd/6/6m -I ../sys -I . sljoin.myr ; $pwd/6/6m -I ../sys -I . sljoin.myr
+echo $pwd/6/6m -I ../sys -I . slurp.myr ; $pwd/6/6m -I ../sys -I . slurp.myr
+echo $pwd/6/6m -I ../sys -I . dirname.myr ; $pwd/6/6m -I ../sys -I . dirname.myr
echo $pwd/6/6m -I ../sys -I . optparse.myr ; $pwd/6/6m -I ../sys -I . optparse.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dir`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dir`
echo $pwd/6/6m -I ../sys -I . ipparse.myr ; $pwd/6/6m -I ../sys -I . ipparse.myr
@@ -79,14 +81,15 @@
echo $pwd/6/6m -I ../sys -I . getcwd.myr ; $pwd/6/6m -I ../sys -I . getcwd.myr
echo $pwd/6/6m -I ../sys -I . swap.myr ; $pwd/6/6m -I ../sys -I . swap.myr
echo $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dial`; $pwd/6/6m -I ../sys -I . `$pwd/sysselect.sh dial`
-echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use dir.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use ; $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use dir.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use
-echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o dir.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o ; ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o dir.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o
+echo as -g -o memops-impl.o `$pwd/sysselect.sh memops-impl`; as -g -o memops-impl.o `$pwd/sysselect.sh memops-impl`
+echo $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use dir.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use ; $pwd/muse/muse -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use dir.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use errno.use wait.use putint.use syswrap.use sort.use blat.use mk.use swap.use hassuffix.use execvp.use ipparse.use types.use strfind.use utf.use cstrconv.use search.use die.use units.use result.use bitset.use env.use resolve.use intparse.use hasprefix.use mkpath.use getint.use dirname.use sleq.use endian.use spork.use assert.use cmp.use syswrap-ss.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use dial.use
+echo ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o dir.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o memops.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o ; ar -rcs libstd.a fmtfuncs.o fmt.o try.o pathjoin.o strjoin.o dir.o memops-impl.o sljoin.o slpush.o strstrip.o htab.o now.o getcwd.o rand.o slurp.o varargs.o strbuf.o clear.o slput.o strsplit.o introspect.o alloc.o optparse.o memops.o fltbits.o sldup.o fltfmt.o extremum.o option.o slcp.o errno.o wait.o putint.o syswrap.o sort.o blat.o mk.o swap.o hassuffix.o execvp.o ipparse.o types.o strfind.o utf.o cstrconv.o search.o die.o units.o result.o bitset.o env.o resolve.o intparse.o hasprefix.o mkpath.o getint.o dirname.o sleq.o endian.o spork.o assert.o cmp.o syswrap-ss.o chartype.o bigint.o hashfuncs.o slfill.o fndup.o dial.o
echo cd $pwd; cd $pwd
echo cd $pwd/lib/regex; cd $pwd/lib/regex
-echo $pwd/6/6m -I ../sys -I ../std types.myr ; $pwd/6/6m -I ../sys -I ../std types.myr
-echo $pwd/6/6m -I ../sys -I ../std interp.myr ; $pwd/6/6m -I ../sys -I ../std interp.myr
-echo $pwd/6/6m -I ../sys -I ../std ranges.myr ; $pwd/6/6m -I ../sys -I ../std ranges.myr
-echo $pwd/6/6m -I ../sys -I ../std compile.myr ; $pwd/6/6m -I ../sys -I ../std compile.myr
+echo $pwd/6/6m -I ../std -I ../sys types.myr ; $pwd/6/6m -I ../std -I ../sys types.myr
+echo $pwd/6/6m -I ../std -I ../sys interp.myr ; $pwd/6/6m -I ../std -I ../sys interp.myr
+echo $pwd/6/6m -I ../std -I ../sys ranges.myr ; $pwd/6/6m -I ../std -I ../sys ranges.myr
+echo $pwd/6/6m -I ../std -I ../sys compile.myr ; $pwd/6/6m -I ../std -I ../sys compile.myr
echo $pwd/muse/muse -o regex interp.use types.use compile.use ranges.use ; $pwd/muse/muse -o regex interp.use types.use compile.use ranges.use
echo ar -rcs libregex.a interp.o types.o compile.o ranges.o ; ar -rcs libregex.a interp.o types.o compile.o ranges.o
echo cd $pwd; cd $pwd