Skip to content
Snippets Groups Projects
Commit 6b548713 authored by Or Cohen's avatar Or Cohen
Browse files

Added stty JNI call for ioctl flags needed by JLine

parent 32ff60e4
No related branches found
No related tags found
No related merge requests found
......@@ -51,6 +51,17 @@ Java_com_cloudius_util_Stty_raw
ioctl(0, TCSETS, &t);
}
JNIEXPORT void JNICALL
Java_com_cloudius_util_Stty_jlineMode
(JNIEnv *env, jobject self)
{
struct termios t;
ioctl(0, TCGETS, &t);
t.c_iflag &= ~(INLCR | ICRNL);
t.c_lflag &= ~(ICANON | ECHO);
ioctl(0, TCSETS, &t);
}
JNIEXPORT void JNICALL
Java_com_cloudius_util_Stty_reset
(JNIEnv *env, jobject self, jlong addr)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment