added MOO_LOG_STDOUT, MOO_LOG_STDERR

changed the main program to write log messages to a specified file
added moo_getuopt()/moo_getbopt()/moo_getopt()
This commit is contained in:
hyunghwan.chung
2017-11-22 04:52:45 +00:00
parent 6177cd6865
commit 7710ad99d0
76 changed files with 15675 additions and 10060 deletions

View File

@ -268,6 +268,28 @@ moo_bch_t* moo_rfindbchar (const moo_bch_t* ptr, moo_oow_t len, moo_bch_t c)
return MOO_NULL;
}
moo_uch_t* moo_finducharinucstr (const moo_uch_t* ptr, moo_uch_t c)
{
while (*ptr != '\0')
{
if (*ptr == c) return (moo_uch_t*)ptr;
ptr++;
}
return MOO_NULL;
}
moo_bch_t* moo_findbcharinbcstr (const moo_bch_t* ptr, moo_bch_t c)
{
while (*ptr != '\0')
{
if (*ptr == c) return (moo_bch_t*)ptr;
ptr++;
}
return MOO_NULL;
}
/* ----------------------------------------------------------------------- */
int moo_concatoocstrtosbuf (moo_t* moo, const moo_ooch_t* str, int id)