From 19d480719e88131479e21adc79aa2cf9bdf7acdc Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Sat, 28 Sep 2019 09:14:21 +0000 Subject: [PATCH] monor code touch-up --- moo/lib/exec.c | 8 ++++---- moo/lib/icc.mak | 3 ++- moo/lib/moo-utl.h | 2 +- moo/lib/moo.h | 2 +- moo/lib/pf-basic.c | 4 ++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/moo/lib/exec.c b/moo/lib/exec.c index 056d5af..1c52c63 100644 --- a/moo/lib/exec.c +++ b/moo/lib/exec.c @@ -4199,7 +4199,7 @@ static moo_pfrc_t pf_strfmt (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) static moo_pfrc_t pf_strlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) { - moo_oop_t rcv, ret; + moo_oop_t rcv, retv; moo_oow_t i, limit; moo_ooch_t* ptr; @@ -4216,10 +4216,10 @@ static moo_pfrc_t pf_strlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) if (*ptr == '\0') break; ptr++; } - ret = moo_oowtoint (moo, i); - if (!ret) return MOO_PF_FAILURE; + retv = moo_oowtoint(moo, i); + if (!retv) return MOO_PF_FAILURE; - MOO_STACK_SETRET (moo, nargs, ret); + MOO_STACK_SETRET (moo, nargs, retv); return MOO_PF_SUCCESS; } diff --git a/moo/lib/icc.mak b/moo/lib/icc.mak index 682fb26..2536e65 100644 --- a/moo/lib/icc.mak +++ b/moo/lib/icc.mak @@ -20,9 +20,10 @@ LIBSRCS := \ dic.c \ err.c \ exec.c \ + fmt.c \ gc.c \ heap.c \ - logfmt.c \ + mb8.c \ moo.c \ number.c \ obj.c \ diff --git a/moo/lib/moo-utl.h b/moo/lib/moo-utl.h index a93e156..7a44832 100644 --- a/moo/lib/moo-utl.h +++ b/moo/lib/moo-utl.h @@ -291,7 +291,7 @@ enum moo_cmgr_id_t { MOO_CMGR_UTF8, MOO_CMGR_UTF16, - MOO_CMGR_MB8, + MOO_CMGR_MB8 }; typedef enum moo_cmgr_id_t moo_cmgr_id_t; diff --git a/moo/lib/moo.h b/moo/lib/moo.h index 29c1a58..e7e8d4a 100644 --- a/moo/lib/moo.h +++ b/moo/lib/moo.h @@ -101,7 +101,7 @@ enum moo_option_t MOO_OPTION_SYMTAB_SIZE, /* default system table size */ MOO_OPTION_SYSDIC_SIZE, /* default system dictionary size */ MOO_OPTION_PROCSTK_SIZE, /* default process stack size */ - MOO_OPTION_MOD_INCTX, + MOO_OPTION_MOD_INCTX /* MOO_OPTION_CMGR_FS, diff --git a/moo/lib/pf-basic.c b/moo/lib/pf-basic.c index ab29074..cf89377 100644 --- a/moo/lib/pf-basic.c +++ b/moo/lib/pf-basic.c @@ -743,7 +743,7 @@ done: else { moo_oop_t v; - v = moo_oowtoint (moo, ssz); + v = moo_oowtoint(moo, ssz); if (!v) MOO_PF_FAILURE; MOO_STACK_SETRET (moo, nargs, v); } @@ -949,7 +949,7 @@ done: else { moo_oop_t v; - v = moo_oowtoint (moo, ssz); + v = moo_oowtoint(moo, ssz); if (!v) MOO_PF_FAILURE; MOO_STACK_SETRET (moo, nargs, v); }