1. don't use MB_CUR_MAX, but MB_LEN_MAX because MB_CUR_MAX is a variable.
2. return a size_t type.
3. added const cond on do while macros.
4. remove unused variables and code,
The shquote() and shquotev() functions copy strings and transform the
copies by adding shell escape and quoting characters. They are used to
encapsulate arguments to be included in command strings passed to the
system() and popen() functions, so that the arguments will have the cor-
rect values after being evaluated by the shell.