mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Improve some unicode functions
This commit is contained in:
parent
b9187061a7
commit
1b5a5719c3
33 changed files with 8366 additions and 197 deletions
|
@ -89,14 +89,16 @@ textwindows noasan int GetDosArgv(const char16_t *cmdline, char *buf,
|
|||
argc = 0;
|
||||
st.wc = DecodeDosArgv(&st.s);
|
||||
while (st.wc) {
|
||||
while (st.wc && isspace(st.wc)) st.wc = DecodeDosArgv(&st.s);
|
||||
while (st.wc && (st.wc == ' ' || st.wc == '\t')) {
|
||||
st.wc = DecodeDosArgv(&st.s);
|
||||
}
|
||||
if (!st.wc) break;
|
||||
if (++argc < max) {
|
||||
argv[argc - 1] = st.p < st.pe ? st.p : NULL;
|
||||
}
|
||||
inquote = false;
|
||||
while (st.wc) {
|
||||
if (!inquote && isspace(st.wc)) break;
|
||||
if (!inquote && (st.wc == ' ' || st.wc == '\t')) break;
|
||||
if (st.wc == '"' || st.wc == '\\') {
|
||||
slashes = 0;
|
||||
quotes = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue