diff --git a/moo/kernel/Moo.moo b/moo/kernel/Moo.moo index eaf032e..148c72d 100644 --- a/moo/kernel/Moo.moo +++ b/moo/kernel/Moo.moo @@ -9,6 +9,6 @@ #include 'Process.moo'. (* -------------------------------------------------------------------------- *) -#include 'FFI.moo'. +## #include 'FFI.moo'. #include 'Stdio.moo'. -#include 'Console.moo'. +## #include 'Console.moo'. diff --git a/moo/kernel/Process.moo b/moo/kernel/Process.moo index 687f7c4..7d1ce4f 100644 --- a/moo/kernel/Process.moo +++ b/moo/kernel/Process.moo @@ -237,25 +237,23 @@ method(#class,#abstract) xxx. => method(#class) xxx { self subclassResponsibilit ## arrange the processor to notify upon timeout. System signal: s after: seconds. - [ + [ ## wait on the semaphore group. - r := self wait. - ] on: Exception do: [:ex | + r := self wait. + + ## if the internal semaphore has been signaled, + ## arrange to return nil to indicate timeout. + if (r == s) { r := nil } + elsif (r signalAction notNil) { r signalAction value: r }. + ] ensure: [ + + ## nullify the membership + self removeSemaphore: s. + + ## cancel the notification arrangement in case it didn't time out. System unsignal: s. - ex throw ]. - ## if the internal semaphore has been signaled, - ## arrange to return nil to indicate timeout. - if (r == s) { r := nil } - elsif (r signalAction notNil) { r signalAction value: r }. - - ## nullify the membership - self removeSemaphore: s. - - ## cancel the notification arrangement in case it didn't time out. - System unsignal: s. - ^r. } } diff --git a/moo/lib/comp.c b/moo/lib/comp.c index 919543c..907a41b 100644 --- a/moo/lib/comp.c +++ b/moo/lib/comp.c @@ -1008,7 +1008,6 @@ not_comment: return 0; - unterminated: set_syntax_error (moo, MOO_SYNERR_CMTNC, LEXER_LOC(moo), MOO_NULL); return -1; diff --git a/moo/lib/main.c b/moo/lib/main.c index 32acf07..ad59777 100644 --- a/moo/lib/main.c +++ b/moo/lib/main.c @@ -2108,7 +2108,7 @@ static int handle_logopt (moo_t* moo, const moo_bch_t* str) xtn->logfd = open (xstr, O_CREAT | O_WRONLY | O_APPEND , 0644); if (xtn->logfd == -1) { - fprintf (stderr, "ERROR: cannot open %s\n", xstr); + fprintf (stderr, "ERROR: cannot open a log file %s\n", xstr); if (str != xstr) moo_freemem (moo, xstr); return -1; } @@ -2173,6 +2173,8 @@ int main (int argc, char* argv[]) goto print_usage; } } + + if (opt.ind >= argc) goto print_usage; #endif memset (&vmprim, 0, MOO_SIZEOF(vmprim)); @@ -2249,7 +2251,7 @@ int main (int argc, char* argv[]) #if defined(macintosh) i = 20; - xtn->source_path = "test.st"; + xtn->source_path = "test.moo"; goto compile; #endif