Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'core/org.eclipse.cdt.core.solaris/library/pty.c')
-rw-r--r--core/org.eclipse.cdt.core.solaris/library/pty.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/core/org.eclipse.cdt.core.solaris/library/pty.c b/core/org.eclipse.cdt.core.solaris/library/pty.c
index 37a7604457a..a1d33b5396d 100644
--- a/core/org.eclipse.cdt.core.solaris/library/pty.c
+++ b/core/org.eclipse.cdt.core.solaris/library/pty.c
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002 - 2005 QNX Software Systems and others.
+ * Copyright (c) 2002, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@
* Signature: ()I
*/
JNIEXPORT jstring JNICALL
-Java_org_eclipse_cdt_utils_pty_PTY_openMaster (JNIEnv *env, jobject jobj) {
+Java_org_eclipse_cdt_utils_pty_PTY_openMaster (JNIEnv *env, jobject jobj, jboolean console) {
jfieldID fid; /* Store the field ID */
jstring jstr = NULL;
int master = -1;
@@ -28,8 +28,10 @@ Java_org_eclipse_cdt_utils_pty_PTY_openMaster (JNIEnv *env, jobject jobj) {
master = ptym_open(line);
if (master >= 0) {
- // turn off echo
- set_noecho(master);
+ if (console) {
+ // turn off echo
+ set_noecho(master);
+ }
/* Get a reference to the obj's class */
cls = (*env)->GetObjectClass(env, jobj);
@@ -46,3 +48,20 @@ Java_org_eclipse_cdt_utils_pty_PTY_openMaster (JNIEnv *env, jobject jobj) {
}
return jstr;
}
+
+JNIEXPORT jint JNICALL Java_org_eclipse_cdt_utils_pty_PTY_change_1window_1size
+ (JNIEnv *env, jobject jobj, jint fdm, jint width, jint height)
+{
+#ifdef TIOCGWINSZ
+ struct winsize win;
+
+ win.ws_col = width;
+ win.ws_row = height;
+ win.ws_xpixel = 0;
+ win.ws_ypixel = 0;
+
+ return ioctl(fdm, TIOCSWINSZ, &win);
+#else
+ return 0;
+#endif
+}

Back to the top