touched up code a little bit
This commit is contained in:
parent
fa9e0f538a
commit
930b86e923
@ -48,7 +48,7 @@ static moo_ooch_t errstr_15[] = {'i','n','t','e','r','r','u','p','t','e','d','\0
|
||||
static moo_ooch_t errstr_16[] = {'p','i','p','e',' ','e','r','r','o','r','\0'};
|
||||
static moo_ooch_t errstr_17[] = {'r','e','s','o','u','r','c','e',' ','t','e','m','p','o','r','a','r','i','l','y',' ','u','n','a','v','a','i','l','a','b','l','e','\0'};
|
||||
static moo_ooch_t errstr_18[] = {'b','a','d',' ','s','y','s','t','e','m',' ','h','a','n','d','l','e','\0'};
|
||||
static moo_ooch_t errstr_19[] = {'d','a','t','a',' ','t','o','o',' ','l','a','r','g','e','\0'};
|
||||
static moo_ooch_t errstr_19[] = {'*','*','*',' ','u','n','d','e','f','i','n','e','d',' ','e','r','r','o','r',' ','*','*','*','\0'};
|
||||
static moo_ooch_t errstr_20[] = {'m','e','s','s','a','g','e',' ','r','e','c','e','i','v','e','r',' ','e','r','r','o','r','\0'};
|
||||
static moo_ooch_t errstr_21[] = {'m','e','s','s','a','g','e',' ','s','e','n','d','i','n','g',' ','e','r','r','o','r','\0'};
|
||||
static moo_ooch_t errstr_22[] = {'w','r','o','n','g',' ','n','u','m','b','e','r',' ','o','f',' ','a','r','g','u','m','e','n','t','s','\0'};
|
||||
@ -57,7 +57,7 @@ static moo_ooch_t errstr_24[] = {'b','y','t','e','-','c','o','d','e',' ','f','u'
|
||||
static moo_ooch_t errstr_25[] = {'d','i','c','t','i','o','n','a','r','y',' ','f','u','l','l','\0'};
|
||||
static moo_ooch_t errstr_26[] = {'p','r','o','c','e','s','s','o','r',' ','f','u','l','l','\0'};
|
||||
static moo_ooch_t errstr_27[] = {'t','o','o',' ','m','a','n','y',' ','s','e','m','a','p','h','o','r','e','s','\0'};
|
||||
static moo_ooch_t errstr_28[] = {'s','e','m','a','p','h','o','r','e',' ','l','i','s','t',' ','f','u','l','l','\0'};
|
||||
static moo_ooch_t errstr_28[] = {'*','*','*',' ','u','n','d','e','f','i','n','e','d',' ','e','r','r','o','r',' ','*','*','*','\0'};
|
||||
static moo_ooch_t errstr_29[] = {'d','i','v','i','d','e',' ','b','y',' ','z','e','r','o','\0'};
|
||||
static moo_ooch_t errstr_30[] = {'I','/','O',' ','e','r','r','o','r','\0'};
|
||||
static moo_ooch_t errstr_31[] = {'e','n','c','o','d','i','n','g',' ','c','o','n','v','e','r','s','i','o','n',' ','e','r','r','o','r','\0'};
|
||||
|
@ -553,7 +553,7 @@ reswitch:
|
||||
}
|
||||
|
||||
case 'O': /* object - ignore precision, width, adjustment */
|
||||
print_object (moo, data->mask, va_arg (ap, moo_oop_t), outbfmt);
|
||||
print_object (moo, data->mask, va_arg(ap, moo_oop_t), outbfmt);
|
||||
break;
|
||||
|
||||
#if 0
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
|
||||
#if !defined(__DOS__) && defined(HAVE_PTHREAD) && defined(HAVE_STRERROR_R)
|
||||
@ -58,6 +57,7 @@
|
||||
# include <time.h>
|
||||
# include <io.h>
|
||||
# include <signal.h>
|
||||
# include <errno.h>
|
||||
|
||||
/* fake XPOLLXXX values */
|
||||
# define XPOLLIN (1 << 0)
|
||||
@ -102,6 +102,7 @@
|
||||
# include <signal.h>
|
||||
# endif
|
||||
|
||||
# include <errno.h>
|
||||
# include <unistd.h>
|
||||
# include <fcntl.h>
|
||||
|
||||
@ -758,7 +759,6 @@ static void log_write (moo_t* moo, moo_oow_t mask, const moo_ooch_t* msg, moo_oo
|
||||
if (mask & MOO_LOG_STDOUT) logfd = 1;
|
||||
else
|
||||
{
|
||||
|
||||
logfd = xtn->logfd;
|
||||
if (logfd <= -1) return;
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ typedef enum moo_vmprim_opendl_flag_t moo_vmprim_opendl_flag_t;
|
||||
|
||||
typedef void* (*moo_vmprim_dlopen_t) (moo_t* moo, const moo_ooch_t* name, int flags);
|
||||
typedef void (*moo_vmprim_dlclose_t) (moo_t* moo, void* handle);
|
||||
typedef void* (*moo_vmprim_dlsym_t) (moo_t* moo, void* handle, const moo_ooch_t* name);
|
||||
typedef void* (*moo_vmprimt_dlgetsym_t) (moo_t* moo, void* handle, const moo_ooch_t* name);
|
||||
|
||||
typedef void (*moo_log_write_t) (moo_t* moo, moo_oow_t mask, const moo_ooch_t* msg, moo_oow_t len);
|
||||
typedef void (*moo_syserrstrb_t) (moo_t* moo, int syserr, moo_bch_t* buf, moo_oow_t len);
|
||||
@ -971,21 +971,21 @@ typedef void (*moo_vmprim_sleep_t) (
|
||||
|
||||
struct moo_vmprim_t
|
||||
{
|
||||
moo_vmprim_dlopen_t dl_open;
|
||||
moo_vmprim_dlclose_t dl_close;
|
||||
moo_vmprim_dlsym_t dl_getsym;
|
||||
moo_log_write_t log_write;
|
||||
moo_syserrstrb_t syserrstrb;
|
||||
moo_syserrstru_t syserrstru;
|
||||
moo_vmprim_dlopen_t dl_open;
|
||||
moo_vmprim_dlclose_t dl_close;
|
||||
moo_vmprimt_dlgetsym_t dl_getsym;
|
||||
moo_log_write_t log_write;
|
||||
moo_syserrstrb_t syserrstrb;
|
||||
moo_syserrstru_t syserrstru;
|
||||
|
||||
moo_vmprim_startup_t vm_startup;
|
||||
moo_vmprim_cleanup_t vm_cleanup;
|
||||
moo_vmprim_gettime_t vm_gettime;
|
||||
moo_vmprim_muxadd_t vm_muxadd;
|
||||
moo_vmprim_muxdel_t vm_muxdel;
|
||||
moo_vmprim_muxmod_t vm_muxmod;
|
||||
moo_vmprim_muxwait_t vm_muxwait;
|
||||
moo_vmprim_sleep_t vm_sleep;
|
||||
moo_vmprim_startup_t vm_startup;
|
||||
moo_vmprim_cleanup_t vm_cleanup;
|
||||
moo_vmprim_gettime_t vm_gettime;
|
||||
moo_vmprim_muxadd_t vm_muxadd;
|
||||
moo_vmprim_muxdel_t vm_muxdel;
|
||||
moo_vmprim_muxmod_t vm_muxmod;
|
||||
moo_vmprim_muxwait_t vm_muxwait;
|
||||
moo_vmprim_sleep_t vm_sleep;
|
||||
};
|
||||
|
||||
typedef struct moo_vmprim_t moo_vmprim_t;
|
||||
|
@ -31,7 +31,7 @@ void* moo_allocbytes (moo_t* moo, moo_oow_t size)
|
||||
moo_uint8_t* ptr;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
if ((moo->option.trait &MOO_DEBUG_GC) && !(moo->option.trait & MOO_NOGC)) moo_gc (moo);
|
||||
if ((moo->option.trait & MOO_DEBUG_GC) && !(moo->option.trait & MOO_NOGC)) moo_gc (moo);
|
||||
#endif
|
||||
|
||||
ptr = moo_allocheapmem (moo, moo->curheap, size);
|
||||
|
Loading…
Reference in New Issue
Block a user