mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 14:28:30 +00:00
Improve system calls
- Wrap clock_getres() - Wrap sched_setscheduler() - Make sleep() api conformant - Polyfill sleep() using select() - Improve clock_gettime() polyfill - Make nanosleep() POSIX conformant - Slightly improve some DNS functions - Further strengthen pledge() sandboxing - Improve rounding of timeval / timespec - Allow layering of pledge() calls on Linux - Polyfill sched_yield() using select() on XNU - Delete more system constants we probably don't need
This commit is contained in:
parent
5df3e4e7a8
commit
853b6c3864
330 changed files with 1971 additions and 1223 deletions
8
third_party/unzip/fileio.c
vendored
8
third_party/unzip/fileio.c
vendored
|
@ -2395,13 +2395,13 @@ int do_string(__G__ length, option) /* return PK-type error code */
|
|||
p = G.outbuf - 1;
|
||||
q = slide;
|
||||
while (*++p) {
|
||||
int pause = FALSE;
|
||||
int pause_ = FALSE;
|
||||
|
||||
if (*p == 0x1B) { /* ASCII escape char */
|
||||
*q++ = '^';
|
||||
*q++ = '[';
|
||||
} else if (*p == 0x13) { /* ASCII ^S (pause) */
|
||||
pause = TRUE;
|
||||
pause_ = TRUE;
|
||||
if (p[1] == LF) /* ASCII LF */
|
||||
*q++ = *++p;
|
||||
else if (p[1] == CR && p[2] == LF) { /* ASCII CR LF */
|
||||
|
@ -2410,10 +2410,10 @@ int do_string(__G__ length, option) /* return PK-type error code */
|
|||
}
|
||||
} else
|
||||
*q++ = *p;
|
||||
if ((unsigned)(q-slide) > WSIZE-3 || pause) { /* flush */
|
||||
if ((unsigned)(q-slide) > WSIZE-3 || pause_) { /* flush */
|
||||
(*G.message)((zvoid *)&G, slide, (ulg)(q-slide), 0);
|
||||
q = slide;
|
||||
if (pause && G.extract_flag) /* don't pause for list/test */
|
||||
if (pause_ && G.extract_flag) /* don't pause for list/test */
|
||||
(*G.mpause)((zvoid *)&G, LoadFarString(QuitPrompt), 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue