Merge remote-tracking branch 'galen/test' into pending

This commit is contained in:
Philip C Monk 2015-10-05 20:14:42 -04:00
commit 337b93e8f9
5 changed files with 96 additions and 56 deletions

View File

@ -327,9 +327,6 @@ V_OFILES=\
MAIN_FILE =\
vere/main.o
MEME_FILE =\
tests/test.o
VERE_OFILES=\
$(CRE2_OFILES) \
$(OUT_OFILES) \
@ -337,12 +334,6 @@ VERE_OFILES=\
$(MAIN_FILE) \
$(V_OFILES)
MEME_OFILES=\
$(CRE2_OFILES) \
$(OUT_OFILES) \
$(BASE_OFILES) \
$(MEME_FILE)
VERE_DFILES=$(VERE_OFILES:%.o=.d/%.d)
-include $(VERE_DFILES)
@ -388,7 +379,6 @@ all: urbit
@echo "# Set custom configuration here, please!" > ".make.conf"
urbit: $(BIN)/urbit
meme: $(BIN)/meme
$(LIBUV_MAKEFILE) $(LIBUV_MAKEFILE2):
cd outside/libuv_0.11 ; sh autogen.sh ; ./configure --disable-dtrace
@ -445,10 +435,6 @@ $(BIN)/urbit: $(LIBCRE) $(LIBCOMMONMARK) $(VERE_OFILES) $(LIBUV) $(LIBRE2) $(LIB
@$(CLD) $(CLDOSFLAGS) -o $(BIN)/urbit $(VERE_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT)
endif
$(BIN)/meme: $(LIBCRE) $(LIBCOMMONMARK) $(MEME_OFILES) $(LIBUV) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBSCRYPT) $(LIBSOFTFLOAT)
mkdir -p $(BIN)
$(CLD) $(CLDOSFLAGS) -o $(BIN)/meme $(MEME_OFILES) $(LIBUV) $(LIBCRE) $(LIBRE2) $(LIBED25519) $(LIBANACHRONISM) $(LIBS) $(LIBCOMMONMARK) $(LIBSCRYPT) $(LIBSOFTFLOAT)
tags:
ctags -R -f .tags --exclude=root

View File

@ -3,13 +3,12 @@ urbit
Urbit is a new computing environment designed from scratch.
At present urbit is under heavy development. It's not useful for
any external purpose. Documentation is completely inadequate.
Anyone can use the interpreter, of course, but the network is
invitation-only.
At present urbit is under heavy development. It's not useful for any
external purpose. Documentation is completely inadequate. Anyone can use
the interpreter, of course, but the network is invitation-only.
If you're interested in keeping in touch or following the project
you can:
If you're interested in keeping in touch or following the project you
can:
- Enter your email address at [urbit.org](http://urbit.org).
- Subscribe to the
@ -25,7 +24,9 @@ Packages
#### Ubuntu or Debian
Third-party package files are maintained at https://github.com/yebyen/urbit-deb. Urbit is only supported on Jessie onward.
Third-party package files are maintained at
https://github.com/yebyen/urbit-deb. Urbit is only supported on Jessie
onward.
#### OS X - Homebrew
@ -33,6 +34,7 @@ Third-party package files are maintained at https://github.com/yebyen/urbit-deb.
Dependencies
------------
urbit depends on:
gcc
@ -52,8 +54,8 @@ urbit depends on:
sudo apt-get install libgmp3-dev libsigsegv-dev openssl libssl-dev libncurses5-dev git make exuberant-ctags automake autoconf libtool g++ ragel cmake re2c
*note: http requests are not supported on debian jessie
due to an ssl issue*
*note: http requests are not supported on debian jessie due to an ssl
issue*
#### Fedora
@ -97,26 +99,28 @@ Just run `make`:
(On FreeBSD, use `gmake` instead.)
Run (with a network invitation)
---
-------------------------------
If you have a planet named `~fintud-macrep` and a ticket
`~fortyv-tombyt-tabsen-sonres`, run
`~fortyv-tombyt-tabsen-sonres`, run
bin/urbit -w fintud-macrep -t fortyv-tombyt-tabsen-sonres
Your pier (all Urbit state, log and checkpoint) will be in
`./fintud-macrep`. To restart Urbit:
`./fintud-macrep`.
To start Urbit again omit the `-w` and `-t` flags:
bin/urbit fintud-macrep
Run (without a network invitation)
---
Run
----------------------------------
bin/urbit -c mypier
Urbit will create a comet in `mypier`. To restart:
Urbit will create a comet in `mypier`.
To start Urbit again omit the `-c` flag:
bin/urbit mypier
@ -140,7 +144,8 @@ turned it off.
Talk
----
If you're on the network, you can use its most basic application, `talk`.
If you're on the network, you can use its most basic application,
`talk`.
If `talk` is not running, start it with `*talk` from the task manager.
@ -169,20 +174,34 @@ for a private message.
Filesystem Sync
---------------
Our filesystem, `%clay`, does not automatically sync to unix. If you want
to get files in and out of urbit, you'll need to setup a mount point.
The Urbit filesystem, `%clay` doesn't automatically sync to unix. If
you'd like to browse the contents of your Urbit from unix you'll need to
use `|mount`.
`|mount` creates a mirror in unix of files from `%clay` that is always
watching for changes. To sync your entire `home/` desk run:
|mount %
you should see a directory called `home/` get created inside your pier.
When you change files in this directory the changes will get synced into
your urbit.
Since each mount point is always watching for changes you may also want
to unmount from time to time.
The syntax is as follows (from `dojo`):
The full syntax is as follows (from `dojo`):
|mount <clay-path> <mount-name>
|mount <path-in-clay> [<mount-name>]
The `<mount-name>` is optional and defaults to the last part of
the `<path-in-clay>`.
|unmount <mount-name>
or:
|unmount <clay-path>
|unmount <path-in-clay>
Sysadmin
--------
@ -209,7 +228,8 @@ pier. Your original ticket will still work.
Contributing
------------
The first step in contributing to urbit is to come and join us on `:talk`.
The first step in contributing to urbit is to come and join us on
`:talk`.
For more detailed instructions check out
For more detailed instructions check out
[`contributing.md`](https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md),.

View File

@ -89,7 +89,8 @@
u3r_mp(a->expWidth, h);
if ( !(_(u3a_is_cat(d)) && _(u3a_is_cat(e))) ) {
mpz_clears(a->minExp, a->expWidth, 0);
mpz_clear(a->minExp);
mpz_clear(a->expWidth);
u3m_bail(c3__exit);
}
a->rMode = d;
@ -160,12 +161,14 @@
_noun_to_ea(&c, a);
_noun_to_flOptions(&d, b);
if ( mpz_sgn(c.a) == 0 ) {
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3m_bail(c3__exit);
}
size_t m = mpz_sizeinbase(c.a, 2);
if ( !_(j) && (m <= d.precision) ) {
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3m_bail(c3__exit);
}
c3_w q = 0;
@ -175,7 +178,9 @@
(mpz_cmp(c.e, d.minExp) < 0) ) {
mpz_sub(g, d.minExp, c.e);
if ( !mpz_fits_uint_p(g) ) {
mpz_clears(g, d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(g);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3m_bail(c3__exit);
}
q = mpz_get_ui(g);
@ -192,19 +197,21 @@
c3_t y;
switch ( i ) {
default:
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3m_bail(c3__exit);
case c3__fl:
case c3__sm:
mpz_set_ui(c.a, 0);
mpz_set_ui(c.e, 0);
mpz_clears(v, h, g, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
break;
case c3__ce:
case c3__lg:
mpz_set_ui(c.a, 1);
mpz_set(c.e, d.minExp);
mpz_clears(v, h, g, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
break;
case c3__ne:
case c3__nt:
@ -217,12 +224,11 @@
if ( y ) {
mpz_set_ui(c.a, 0);
mpz_set_ui(c.e, 0);
mpz_clears(v, h, g, 0);
} else {
mpz_set_ui(c.a, 1);
mpz_set(c.e, d.minExp);
mpz_clears(v, h, g, 0);
}
mpz_clear(v); mpz_clear(h); mpz_clear(g);
break;
}
goto end;
@ -231,7 +237,9 @@
switch ( i ) {
c3_ws x;
default:
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3m_bail(c3__exit);
case c3__fl:
break;
@ -288,16 +296,18 @@
}
if ( mpz_sgn(c.a) == 0 ) {
mpz_set_ui(c.e, 0);
mpz_clears(v, h, g, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
goto end;
}
mpz_set(g, d.minExp);
mpz_add(g, g, d.expWidth);
if ( (d.eMode != c3__i) && (mpz_cmp(g, c.e) < 0) ) {
mpz_clears(v, h, g, d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
return u3nc(c3__i, c3y);
}
mpz_clears(v, h, g, 0);
mpz_clear(v); mpz_clear(h); mpz_clear(g);
// all mpz except in c, d structures cleared; c contains result
end:
@ -308,7 +318,7 @@
}
}
u3_noun ret = u3nq(c3__f, c3y, u3k(_mp_to_satom(c.e)), u3k(u3i_mp(c.a)));
mpz_clears(d.minExp, d.expWidth, 0);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
return ret;
}
@ -332,12 +342,14 @@
_noun_to_ea(&c, a);
_noun_to_flOptions(&d, b);
if ( mpz_sgn(c.a) == 0 ) {
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
u3m_bail(c3__exit);
}
_xpd(&c, &d);
if ( !mpz_fits_sint_p(c.e) ) {
mpz_clears(d.minExp, d.expWidth, c.a, c.e, 0);
mpz_clear(d.minExp); mpz_clear(d.expWidth);
mpz_clear(c.a); mpz_clear(c.e);
u3m_bail(c3__exit);
}
mpz_t r, s, m, i, j, u, o;
@ -398,7 +410,9 @@
mpz_add(o, o, u);
}
mpz_set(c.a, o);
mpz_clears(r, s, m, i, j, u, o, d.minExp, d.expWidth, 0);
mpz_clear(r); mpz_clear(s); mpz_clear(m);
mpz_clear(i); mpz_clear(j); mpz_clear(u);
mpz_clear(o); mpz_clear(d.minExp); mpz_clear(d.expWidth);
return _ea_to_noun(&c);
}

View File

@ -163,6 +163,13 @@ _main_getopt(c3_i argc, c3_c** argv)
return c3n;
}
if ( u3_Host.ops_u.tic_c == 0 && u3_Host.ops_u.who_c != 0 ) {
c3_c tic_c[29];
printf("your ticket: ~");
scanf("%28s",tic_c);
u3_Host.ops_u.tic_c = _main_presig(tic_c);
}
if ( c3y == u3_Host.ops_u.bat ) {
u3_Host.ops_u.dem = c3y;
u3_Host.ops_u.nuu = c3y;
@ -315,6 +322,14 @@ main(c3_i argc,
return 1;
}
if ( c3y == u3_Host.ops_u.nuu ) {
struct stat s;
if ( !stat(u3_Host.dir_c, &s) ) {
fprintf(stderr, "used -c but %s already exists\n", u3_Host.dir_c);
exit(1);
}
}
u3_ve_sysopt();
printf("~\n");

View File

@ -359,7 +359,10 @@ _unix_scan_mount_point(u3_umon* mon_u)
else {
if ( '.' != out_u->d_name[len_w]
|| '\0' == out_u->d_name[len_w + 1]
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1] ) {
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1]
|| ('#' == out_u->d_name[0] &&
'#' == out_u->d_name[strlen(out_u->d_name) - 1])
) {
free(pax_c);
continue;
}
@ -895,6 +898,8 @@ _unix_update_dir(u3_udir* dir_u)
if ( !S_ISDIR(buf_u.st_mode) ) {
if ( !strchr(out_u->d_name,'.')
|| '~' == out_u->d_name[strlen(out_u->d_name) - 1]
|| ('#' == out_u->d_name[0] &&
'#' == out_u->d_name[strlen(out_u->d_name) - 1])
) {
free(pax_c);
continue;