mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-18 00:20:30 +00:00
Add siglongjmp() for aarch64
This commit is contained in:
parent
c88f95a892
commit
22cf6e11eb
13 changed files with 34 additions and 49 deletions
|
@ -214,10 +214,12 @@ static textwindows int ProcessKeyEvent(const struct NtInputRecord *r, char *p) {
|
|||
}
|
||||
|
||||
// handle ctrl-d the end of file keystroke
|
||||
if (c == __veof && __veof != _POSIX_VDISABLE) {
|
||||
STRACE("encountered CTRL(%#c) c_cc[VEOF] closing console input", CTRL(c));
|
||||
__keystroke.end_of_file = true;
|
||||
return 0;
|
||||
if (!(__ttymagic & kFdTtyUncanon)) {
|
||||
if (c == __veof && __veof != _POSIX_VDISABLE) {
|
||||
STRACE("encountered CTRL(%#c) c_cc[VEOF] closing console input", CTRL(c));
|
||||
__keystroke.end_of_file = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// insert esc prefix when alt is held
|
||||
|
|
|
@ -53,8 +53,8 @@ int setpgid(int pid, int pgid) {
|
|||
rc = __winerr();
|
||||
}
|
||||
} else {
|
||||
// irregular use cases not supported on windows
|
||||
rc = einval();
|
||||
// avoid bash printing scary warnings for now
|
||||
rc = 0;
|
||||
}
|
||||
}
|
||||
STRACE("setpgid(%d, %d) → %d% m", pid, pgid, rc);
|
||||
|
|
|
@ -21,7 +21,7 @@ COSMOPOLITAN_C_START_
|
|||
|
||||
#define kFdTtyEchoing 1 /* read()→write() (ECHO && !ICANON) */
|
||||
#define kFdTtyEchoRaw 2 /* don't ^X visualize control codes */
|
||||
#define kFdTtyMunging 4 /* enable input / output remappings */
|
||||
#define kFdTtyUncanon 4 /* enables non-canonical (raw) mode */
|
||||
#define kFdTtyNoCr2Nl 8 /* don't map \r → \n (a.k.a !ICRNL) */
|
||||
#define kFdTtyNoIsigs 16
|
||||
#define kFdTtyNoBlock 32
|
||||
|
|
|
@ -95,7 +95,7 @@ textwindows int tcgetattr_nt(int fd, struct termios *tio) {
|
|||
if (!(__ttymagic & kFdTtyNoIsigs)) {
|
||||
tio->c_lflag |= ISIG;
|
||||
}
|
||||
if ((inmode & kNtEnableProcessedInput) || (__ttymagic & kFdTtyMunging)) {
|
||||
if (inmode & kNtEnableProcessedInput) {
|
||||
tio->c_lflag |= IEXTEN;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ textwindows int tcsetattr_nt(int fd, int opt, const struct termios *tio) {
|
|||
}
|
||||
|
||||
if (opt == TCSAFLUSH) {
|
||||
tcflush(fd, TCIFLUSH);
|
||||
FlushConsoleInputBytes(hInput);
|
||||
}
|
||||
inmode &= ~(kNtEnableLineInput | kNtEnableEchoInput |
|
||||
kNtEnableProcessedInput | kNtEnableVirtualTerminalInput);
|
||||
|
@ -78,7 +78,7 @@ textwindows int tcsetattr_nt(int fd, int opt, const struct termios *tio) {
|
|||
kNtEnableLineInput | kNtEnableProcessedInput | kNtEnableQuickEditMode;
|
||||
} else {
|
||||
inmode &= ~kNtEnableQuickEditMode;
|
||||
__ttymagic |= kFdTtyMunging;
|
||||
__ttymagic |= kFdTtyUncanon;
|
||||
if (!tio->c_cc[VMIN]) {
|
||||
__ttymagic |= kFdTtyNoBlock;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue