ref: 1c7f39ccba2038892671bcb708adf32bbf39c157
parent: be21845c92abf4eb606116c760900105dc64816d
author: Ori Bernstein <ori@eigenstate.org'>
date: Wed Dec 30 10:13:03 EST 2015
Update for plan9
--- a/lib/std/env+plan9.myr
+++ b/lib/std/env+plan9.myr
@@ -11,6 +11,7 @@
use "sleq.use"
use "slpush.use"
use "slurp.use"
+use "cstrconv.use"
pkg std =
const getenv : (name : byte[:] -> option(byte[:]))
@@ -40,7 +41,8 @@
match std.slurp(s)
| `Fail m: -> `None
| `Ok data:
- envkey = slpush(envkey, sldup(name))
+ data = cstrconv(data)
+ envkey = slpush(envkey, sldup(data))
envval = slpush(envval, data)
-> `Some data
;;
--- a/lib/std/test/slcp.myr
+++ b/lib/std/test/slcp.myr
@@ -10,5 +10,5 @@
std.slcp(a[:a.len-2], a[2:])
std.slcp(b[2:], b[:b.len-2])
std.assert(std.sleq(a[:], a_cped[:]), "slcp of a failed: got {}, wanted {}", a[:], a_cped[:])
- std.assert(std.sleq(b[:], b_cped[:]), "slcp of b failed: got {}, wanted {}", a[:], a_cped[:])
+ std.assert(std.sleq(b[:], b_cped[:]), "slcp of b failed: got {}, wanted {}", b[:], b_cped[:])
}
--- a/mk/bootstrap/bootstrap+Plan9-amd64.sh
+++ b/mk/bootstrap/bootstrap+Plan9-amd64.sh
@@ -59,6 +59,7 @@
echo $pwd/6/6.out -I ../sys -I . spork.myr ; $pwd/6/6.out -I ../sys -I . spork.myr
echo $pwd/6/6.out -I ../sys -I . getint.myr ; $pwd/6/6.out -I ../sys -I . getint.myr
echo $pwd/6/6.out -I ../sys -I . blat.myr ; $pwd/6/6.out -I ../sys -I . blat.myr
+echo $pwd/6/6.out -I ../sys -I . mktemp.myr ; $pwd/6/6.out -I ../sys -I . mktemp.myr
echo $pwd/6/6.out -I ../sys -I . writeall.myr ; $pwd/6/6.out -I ../sys -I . writeall.myr
echo $pwd/6/6.out -I ../sys -I . clear.myr ; $pwd/6/6.out -I ../sys -I . clear.myr
echo $pwd/6/6.out -I ../sys -I . wait+plan9.myr ; $pwd/6/6.out -I ../sys -I . wait+plan9.myr
@@ -81,8 +82,8 @@
echo $pwd/6/6.out -I ../sys -I . swap.myr ; $pwd/6/6.out -I ../sys -I . swap.myr
echo $pwd/6/6.out -I ../sys -I . dial+plan9.myr ; $pwd/6/6.out -I ../sys -I . dial+plan9.myr
echo 6a -o memops-impl.6 memops-impl+plan9-x64.s ; 6a -o memops-impl.6 memops-impl+plan9-x64.s
-echo $pwd/muse/6.out -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use syswrap-ss.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use env.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use resolve.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use writeall.use putint.use sort.use blat.use mk.use errno.use hassuffix.use execvp.use swap.use ipparse.use types.use slpop.use strfind.use utf.use cstrconv.use search.use die.use units.use wait.use result.use bitset.use intparse.use hasprefix.use mkpath.use getint.use syswrap.use dirname.use sleq.use endian.use spork.use dial.use assert.use cmp.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use ; $pwd/muse/6.out -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use syswrap-ss.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use env.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use resolve.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use writeall.use putint.use sort.use blat.use mk.use errno.use hassuffix.use execvp.use swap.use ipparse.use types.use slpop.use strfind.use utf.use cstrconv.use search.use die.use units.use wait.use result.use bitset.use intparse.use hasprefix.use mkpath.use getint.use syswrap.use dirname.use sleq.use endian.use spork.use dial.use assert.use cmp.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use
-echo ar vu libstd.a fmtfuncs.6 fmt.6 try.6 pathjoin.6 strjoin.6 syswrap-ss.6 sljoin.6 slpush.6 strstrip.6 htab.6 now.6 getcwd.6 rand.6 env.6 slurp.6 varargs.6 strbuf.6 clear.6 slput.6 strsplit.6 introspect.6 resolve.6 alloc.6 optparse.6 memops.6 fltbits.6 sldup.6 fltfmt.6 extremum.6 option.6 slcp.6 writeall.6 putint.6 sort.6 blat.6 mk.6 errno.6 hassuffix.6 execvp.6 swap.6 ipparse.6 types.6 slpop.6 strfind.6 utf.6 cstrconv.6 search.6 die.6 units.6 wait.6 result.6 bitset.6 intparse.6 hasprefix.6 mkpath.6 getint.6 syswrap.6 dirname.6 sleq.6 endian.6 spork.6 dial.6 assert.6 cmp.6 chartype.6 memops-impl.6 bigint.6 hashfuncs.6 slfill.6 fndup.6 ; ar vu libstd.a fmtfuncs.6 fmt.6 try.6 pathjoin.6 strjoin.6 syswrap-ss.6 sljoin.6 slpush.6 strstrip.6 htab.6 now.6 getcwd.6 rand.6 env.6 slurp.6 varargs.6 strbuf.6 clear.6 slput.6 strsplit.6 introspect.6 resolve.6 alloc.6 optparse.6 memops.6 fltbits.6 sldup.6 fltfmt.6 extremum.6 option.6 slcp.6 writeall.6 putint.6 sort.6 blat.6 mk.6 errno.6 hassuffix.6 execvp.6 swap.6 ipparse.6 types.6 slpop.6 strfind.6 utf.6 cstrconv.6 search.6 die.6 units.6 wait.6 result.6 bitset.6 intparse.6 hasprefix.6 mkpath.6 getint.6 syswrap.6 dirname.6 sleq.6 endian.6 spork.6 dial.6 assert.6 cmp.6 chartype.6 memops-impl.6 bigint.6 hashfuncs.6 slfill.6 fndup.6
+echo $pwd/muse/6.out -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use syswrap-ss.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use env.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use resolve.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use writeall.use putint.use sort.use blat.use mk.use errno.use hassuffix.use execvp.use swap.use ipparse.use types.use slpop.use strfind.use utf.use cstrconv.use search.use die.use units.use wait.use result.use bitset.use intparse.use hasprefix.use mkpath.use getint.use syswrap.use dirname.use sleq.use endian.use spork.use dial.use assert.use cmp.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use ; $pwd/muse/6.out -o std fmtfuncs.use fmt.use try.use pathjoin.use strjoin.use syswrap-ss.use sljoin.use slpush.use strstrip.use htab.use now.use getcwd.use rand.use env.use slurp.use varargs.use strbuf.use clear.use slput.use strsplit.use introspect.use resolve.use alloc.use optparse.use memops.use fltbits.use sldup.use fltfmt.use extremum.use option.use slcp.use writeall.use putint.use sort.use blat.use mk.use errno.use hassuffix.use execvp.use swap.use ipparse.use types.use slpop.use strfind.use utf.use cstrconv.use search.use die.use units.use wait.use result.use bitset.use intparse.use hasprefix.use mkpath.use getint.use syswrap.use dirname.use sleq.use endian.use spork.use dial.use assert.use cmp.use chartype.use bigint.use hashfuncs.use slfill.use fndup.use mktemp.use
+echo ar vu libstd.a fmtfuncs.6 fmt.6 try.6 pathjoin.6 strjoin.6 syswrap-ss.6 sljoin.6 slpush.6 strstrip.6 htab.6 now.6 getcwd.6 rand.6 env.6 slurp.6 varargs.6 strbuf.6 clear.6 slput.6 strsplit.6 introspect.6 resolve.6 alloc.6 optparse.6 memops.6 fltbits.6 sldup.6 fltfmt.6 extremum.6 option.6 slcp.6 writeall.6 putint.6 sort.6 blat.6 mk.6 errno.6 hassuffix.6 execvp.6 swap.6 ipparse.6 types.6 slpop.6 strfind.6 utf.6 cstrconv.6 search.6 die.6 units.6 wait.6 result.6 bitset.6 intparse.6 hasprefix.6 mkpath.6 getint.6 syswrap.6 dirname.6 sleq.6 endian.6 spork.6 dial.6 assert.6 cmp.6 chartype.6 memops-impl.6 bigint.6 hashfuncs.6 slfill.6 fndup.6 ; ar vu libstd.a fmtfuncs.6 fmt.6 try.6 pathjoin.6 strjoin.6 syswrap-ss.6 sljoin.6 slpush.6 strstrip.6 htab.6 now.6 getcwd.6 rand.6 env.6 slurp.6 varargs.6 strbuf.6 clear.6 slput.6 strsplit.6 introspect.6 resolve.6 alloc.6 optparse.6 memops.6 fltbits.6 sldup.6 fltfmt.6 extremum.6 option.6 slcp.6 writeall.6 putint.6 sort.6 blat.6 mk.6 errno.6 hassuffix.6 execvp.6 swap.6 ipparse.6 types.6 slpop.6 strfind.6 utf.6 cstrconv.6 search.6 die.6 units.6 wait.6 result.6 bitset.6 intparse.6 hasprefix.6 mkpath.6 getint.6 syswrap.6 dirname.6 sleq.6 endian.6 spork.6 dial.6 assert.6 cmp.6 chartype.6 memops-impl.6 bigint.6 hashfuncs.6 slfill.6 fndup.6 mktemp.6
echo cd $pwd/lib/regex; cd $pwd/lib/regex
echo $pwd/6/6.out -I ../std -I ../sys types.myr ; $pwd/6/6.out -I ../std -I ../sys types.myr
echo $pwd/6/6.out -I ../std -I ../sys interp.myr ; $pwd/6/6.out -I ../std -I ../sys interp.myr