diff --git a/moo/lib/exec.c b/moo/lib/exec.c index ce88a5c..0630053 100644 --- a/moo/lib/exec.c +++ b/moo/lib/exec.c @@ -1707,8 +1707,8 @@ moo_oop_method_t moo_findmethod (moo_t* moo, moo_oop_t receiver, const moo_oocs_ MOO_ASSERT (moo, moo->active_method->owner); c = (moo_oop_class_t)((moo_oop_class_t)moo->active_method->owner)->superclass; if ((moo_oop_t)c == moo->_nil) goto not_found; - // c is nil if it reached the top of the hierarch. - // otherwise c points to a class object + /* c is nil if it reached the top of the hierarchy. + * otherwise c points to a class object */ } diff --git a/moo/lib/icc.mak b/moo/lib/icc.mak index c3853f9..53a4e5a 100644 --- a/moo/lib/icc.mak +++ b/moo/lib/icc.mak @@ -22,8 +22,12 @@ SRCS := \ logfmt.c \ moo.c \ obj.c \ + opt.c \ + pf.c \ rbt.c \ + std.c \ sym.c \ + utf16.c \ utf8.c \ utl.c \ main.c \ diff --git a/moo/lib/pf.c b/moo/lib/pf.c new file mode 100644 index 0000000..093547e --- /dev/null +++ b/moo/lib/pf.c @@ -0,0 +1,5 @@ +/* this file is used for the icc compiler which + * doesn't accept a file name containing a dash over the command line */ +#include "pf-basic.c" +#include "pf-sys.c" +#include "pf-utf8.c" diff --git a/moo/lib/std.c b/moo/lib/std.c index 19a90a6..78e7445 100644 --- a/moo/lib/std.c +++ b/moo/lib/std.c @@ -89,6 +89,7 @@ # include # include # include +# include # if defined(_INTELC32_) # define DOS_EXIT 0x4C @@ -2149,28 +2150,23 @@ static void vm_gettime (moo_t* moo, moo_ntime_t* now) MOO_INIT_NTIME (now, bigsec, MOO_MSEC_TO_NSEC(bigmsec)); #elif defined(__DOS__) && (defined(_INTELC32_) || defined(__WATCOMC__)) + xtn_t* xtn = GET_XTN(moo); clock_t c; - moo_uint64_t bigc; /* TODO: handle overflow?? */ - c = clock (); - if (c < xtn->tc_last) - { - xtn->tc_overflow++; - bigc= ((moo_uint64_t)MOO_TYPE_MAX(clock_t) * xtn->tc_overflow) + c; - } - else bigc = c; + c = clock(); + if (c < xtn->tc_last) xtn->tc_overflow++; xtn->tc_last = c; - now->sec = bigc / CLOCKS_PER_SEC; + now->sec = c / CLOCKS_PER_SEC; #if (CLOCKS_PER_SEC == 100) - now->nsec = MOO_MSEC_TO_NSEC((bigc % CLOCKS_PER_SEC) * 10); + now->nsec = MOO_MSEC_TO_NSEC((c % CLOCKS_PER_SEC) * 10); #elif (CLOCKS_PER_SEC == 1000) - now->nsec = MOO_MSEC_TO_NSEC(bigc % CLOCKS_PER_SEC); + now->nsec = MOO_MSEC_TO_NSEC(c % CLOCKS_PER_SEC); #elif (CLOCKS_PER_SEC == 1000000L) - now->nsec = MOO_USEC_TO_NSEC(bigc % CLOCKS_PER_SEC); + now->nsec = MOO_USEC_TO_NSEC(c % CLOCKS_PER_SEC); #elif (CLOCKS_PER_SEC == 1000000000L) - now->nsec = (bigc % CLOCKS_PER_SEC); + now->nsec = (c % CLOCKS_PER_SEC); #else # error UNSUPPORTED CLOCKS_PER_SEC #endif @@ -3041,7 +3037,7 @@ static MOO_INLINE void start_ticker (void) _dos_setvect (0x1C, dos_timer_intr_handler); } -static MOO_INLINE void moo_stop_ticker (void) +static MOO_INLINE void stop_ticker (void) { _dos_setvect (0x1C, dos_prev_timer_intr_handler); } @@ -3238,7 +3234,7 @@ static struct static int parse_logoptb (moo_t* moo, const moo_bch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask) { xtn_t* xtn = GET_XTN(moo); - moo_bch_t* cm, * flt; + const moo_bch_t* cm, * flt; moo_bitmask_t logmask; moo_oow_t i, len, pathlen; @@ -3293,7 +3289,7 @@ static int parse_logoptb (moo_t* moo, const moo_bch_t* str, moo_oow_t* xpathlen, static int parse_logoptu (moo_t* moo, const moo_uch_t* str, moo_oow_t* xpathlen, moo_bitmask_t* xlogmask) { xtn_t* xtn = GET_XTN(moo); - moo_uch_t* cm, * flt; + const moo_uch_t* cm, * flt; moo_bitmask_t logmask; moo_oow_t i, len, pathlen; @@ -3645,7 +3641,7 @@ int moo_compilestd (moo_t* moo, const moo_iostd_t* in, moo_oow_t count) } return 0; -}; +} void moo_rcvtickstd (moo_t* moo, int v) { @@ -3752,7 +3748,7 @@ void moo_catch_termreq (void) void moo_uncatch_termreq (void) { signal (SIGINT, SIG_DFL); - signal (SIGTERM, SGI_DFL); + signal (SIGTERM, SIG_DFL); } void moo_ignore_termreq (void) diff --git a/moo/mod/icc.mak b/moo/mod/icc.mak index 5b8410d..f9d599e 100644 --- a/moo/mod/icc.mak +++ b/moo/mod/icc.mak @@ -5,7 +5,7 @@ CFLAGS := /D__DOS__ /DMOO_ENABLE_STATIC_MODULE /DNDEBUG /I..\lib SRCS := \ - console.c \ + _con.c \ ffi.c \ stdio.c