minor touch-up

This commit is contained in:
hyung-hwan 2025-06-09 15:36:46 +09:00
parent 63eb61c5c0
commit 24c48fab9a
4 changed files with 108 additions and 103 deletions

View File

@ -7714,7 +7714,6 @@ done:
return &mdp->mod; return &mdp->mod;
} }
hawk_mod_t* hawk_querymodulewithname (hawk_t* hawk, hawk_ooch_t* name, hawk_mod_sym_t* sym) hawk_mod_t* hawk_querymodulewithname (hawk_t* hawk, hawk_ooch_t* name, hawk_mod_sym_t* sym)
{ {
const hawk_ooch_t* dc; const hawk_ooch_t* dc;
@ -7724,7 +7723,6 @@ hawk_mod_t* hawk_querymodulewithname (hawk_t* hawk, hawk_ooch_t* name, hawk_mod_
hawk_ooch_t tmp; hawk_ooch_t tmp;
/*TOOD: non-module builtin function? fnc? */ /*TOOD: non-module builtin function? fnc? */
name_len = hawk_count_oocstr(name); name_len = hawk_count_oocstr(name);
dc = hawk_find_oochars_in_oochars(name, name_len, HAWK_T("::"), 2, 0); dc = hawk_find_oochars_in_oochars(name, name_len, HAWK_T("::"), 2, 0);
if (!dc) if (!dc)

View File

@ -83,6 +83,9 @@ static int fnc_errstr (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
} }
#endif #endif
/*
* sed::file_to_file("s|root|ROOT|g", "/etc/passwd", "/tmp/x");
*/
static int fnc_file_to_file (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) static int fnc_file_to_file (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
{ {
hawk_sed_t* sed = HAWK_NULL; hawk_sed_t* sed = HAWK_NULL;
@ -140,6 +143,10 @@ oops:
return 0; return 0;
} }
/*
* sed::str_to_str("s|ab|cd|g", "abcdefg", k);
* print k;
*/
static int fnc_str_to_str (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi) static int fnc_str_to_str (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
{ {
hawk_sed_t* sed = HAWK_NULL; hawk_sed_t* sed = HAWK_NULL;