renamed the suffix of some scripts to .hawk

fixed mod-sys.c a bit
This commit is contained in:
hyung-hwan 2020-03-24 07:08:21 +00:00
parent 565e51091b
commit 77640ef73c
5 changed files with 9 additions and 19 deletions

View File

@ -3223,7 +3223,6 @@ static int fnc_utime (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
{ {
#if defined(USE_EPOLL)
sys_list_t* sys_list; sys_list_t* sys_list;
sys_node_t* sys_node = HAWK_NULL; sys_node_t* sys_node = HAWK_NULL;
hawk_int_t rx; hawk_int_t rx;
@ -3248,9 +3247,6 @@ static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
} }
#endif #endif
} }
#else
/* TODO: */
#endif
if (fd >= 0) if (fd >= 0)
{ {
@ -3269,19 +3265,17 @@ static int fnc_openmux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
{ {
rx = set_error_on_sys_list_with_errno(rtx, sys_list, HAWK_NULL); rx = set_error_on_sys_list_with_errno(rtx, sys_list, HAWK_NULL);
} }
#else
rx = set_error_on_sys_list(rtx, sys_list, HAWK_ENOIMPL, HAWK_NULL);
#endif
/*HAWK_ASSERT (HAWK_IN_QUICKINT_RANGE(rx));*/ /*HAWK_ASSERT (HAWK_IN_QUICKINT_RANGE(rx));*/
hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx)); hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx));
return 0; return 0;
#else
hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, ERRNUM_TO_RC(HAWK_ENOIMPL)));
return 0;
#endif
} }
static int fnc_closemux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) static int fnc_closemux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
{ {
#if defined(USE_EPOLL)
sys_list_t* sys_list; sys_list_t* sys_list;
sys_node_t* sys_node; sys_node_t* sys_node;
hawk_int_t rx = ERRNUM_TO_RC(HAWK_ENOERR); hawk_int_t rx = ERRNUM_TO_RC(HAWK_ENOERR);
@ -3293,10 +3287,6 @@ static int fnc_closemux (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx)); hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, rx));
return 0; return 0;
#else
hawk_rtx_setretval (rtx, hawk_rtx_makeintval(rtx, ERRNUM_TO_RC(HAWK_ENOIMPL)));
return 0;
#endif
} }
#if defined(USE_EPOLL) #if defined(USE_EPOLL)

View File

@ -1680,7 +1680,7 @@ hawk_val_t* hawk_rtx_execwithucstrarr (hawk_rtx_t* rtx, const hawk_uch_t* args[]
#if defined(HAWK_ENABLE_GC) #if defined(HAWK_ENABLE_GC)
/* i assume this function is a usual hawk program starter. /* i assume this function is a usual hawk program starter.
* call garbage collection after a whole program finishes */ * call garbage collection after a whole program finishes */
//hawk_rtx_gc (rtx); hawk_rtx_gc (rtx);
#endif #endif
return v; return v;
@ -1697,7 +1697,7 @@ hawk_val_t* hawk_rtx_execwithbcstrarr (hawk_rtx_t* rtx, const hawk_bch_t* args[]
#if defined(HAWK_ENABLE_GC) #if defined(HAWK_ENABLE_GC)
/* i assume this function is a usual hawk program starter. /* i assume this function is a usual hawk program starter.
* call garbage collection after a whole program finishes */ * call garbage collection after a whole program finishes */
//hawk_rtx_gc (rtx); hawk_rtx_gc (rtx);
#endif #endif
return v; return v;

View File

@ -1,7 +1,7 @@
# #
# generrcode.awk # generrcode.hawk
# #
# hawk -f generrcode.awk hawk-cmn.h # hawk -f generrcode.hawk hawk-cmn.h
# #
BEGIN { BEGIN {

View File

@ -1,7 +1,7 @@
# #
# genoptcode.awk # genoptcode.hawk
# #
# hawk -f genoptcode.awk hawk.h # hawk -f genoptcode.hawk hawk.h
# #
BEGIN { BEGIN {