aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/mud
diff options
context:
space:
mode:
authorJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-24 23:07:29 +0000
committerJeffrey Sharkey <jsharkey@jsharkey.org>2008-08-24 23:07:29 +0000
commit5b1352c54c66fbe3307e7ff22e0543dc47f76da6 (patch)
tree5d586e4e84d8ca13f2b52a0d3ffb19e0019a72eb /src/de/mud
parent2d555d046e185b229a688817ac78e7e277e5b391 (diff)
downloadconnectbot-5b1352c54c66fbe3307e7ff22e0543dc47f76da6.tar.gz
connectbot-5b1352c54c66fbe3307e7ff22e0543dc47f76da6.tar.bz2
connectbot-5b1352c54c66fbe3307e7ff22e0543dc47f76da6.zip
* Fixing an off-by-one error in vt320 for ANSI 'U' escape sequences.Was messing up scrollback on irssi sessions.
* Filling buffer will ' ' (spaces) instead of null characters. Android's MONOSPACE font doesn't render the null correctly; might be trying to interpret them as unicode. Was messing up indentation on rtorrent sessions. * Removed SoftFont from redraw() and sped things up immensely. Everything seems to still render fine, was there a reason we needed the SoftFont? * Corrected buffer.update[] handling so we aren't repainting entire screen each time; much faster now. * Added OpenGL rendering by default, but doesn't change speed on emulator.
Diffstat (limited to 'src/de/mud')
-rw-r--r--src/de/mud/terminal/SoftFont.java3
-rw-r--r--src/de/mud/terminal/VDUBuffer.java16
-rw-r--r--src/de/mud/terminal/VDUInput.java5
-rw-r--r--src/de/mud/terminal/vt320.java6
4 files changed, 23 insertions, 7 deletions
diff --git a/src/de/mud/terminal/SoftFont.java b/src/de/mud/terminal/SoftFont.java
index bd25a60..e5da3db 100644
--- a/src/de/mud/terminal/SoftFont.java
+++ b/src/de/mud/terminal/SoftFont.java
@@ -1,7 +1,7 @@
/*
* This file is part of "JTA - Telnet/SSH for the JAVA(tm) platform".
*
- * (c) Matthias L. Jugel, Marcus Meißner 1996-2005. All Rights Reserved.
+ * (c) Matthias L. Jugel, Marcus Meiner 1996-2005. All Rights Reserved.
*
* Please visit http://javatelnet.org/ for updates and contact.
*
@@ -43,6 +43,7 @@ public class SoftFont {
final static private char SF_BITMAP = 0;
final static private char SF_FILLRECT = 1;
+
//final static private char SF_CHAR = 0;
final static private char SF_WIDTH= 1;
final static private char SF_HEIGHT= 2;
diff --git a/src/de/mud/terminal/VDUBuffer.java b/src/de/mud/terminal/VDUBuffer.java
index a4f8244..ffd9127 100644
--- a/src/de/mud/terminal/VDUBuffer.java
+++ b/src/de/mud/terminal/VDUBuffer.java
@@ -1,7 +1,7 @@
/*
* This file is part of "JTA - Telnet/SSH for the JAVA(tm) platform".
*
- * (c) Matthias L. Jugel, Marcus Meißner 1996-2005. All Rights Reserved.
+ * (c) Matthias L. Jugel, Marcus Meiner 1996-2005. All Rights Reserved.
*
* Please visit http://javatelnet.org/ for updates and contact.
*
@@ -25,12 +25,15 @@
package de.mud.terminal;
+import java.util.Arrays;
+import android.util.Log;
+
/**
* Implementation of a Video Display Unit (VDU) buffer. This class contains
* all methods to manipulate the buffer that stores characters and their
* attributes as well as the regions displayed.
*
- * @author Matthias L. Jugel, Marcus Mei�ner
+ * @author Matthias L. Jugel, Marcus Meiner
* @version $Id: VDUBuffer.java 503 2005-10-24 07:34:13Z marcus $
*/
public class VDUBuffer {
@@ -504,6 +507,8 @@ public class VDUBuffer {
char cbuf[] = new char[w];
int abuf[] = new int[w];
+ Arrays.fill(cbuf, ' ');
+
for (int i = 0; i < w; i++) abuf[i] = curAttr;
for (int i = 0; i < h && l + i < height; i++) {
System.arraycopy(cbuf, 0, charArray[screenBase + l + i], c, w);
@@ -530,6 +535,8 @@ public class VDUBuffer {
char cbuf[] = new char[w];
int abuf[] = new int[w];
+ Arrays.fill(cbuf, ' ');
+
for (int i = 0; i < h && l + i < height; i++) {
System.arraycopy(cbuf, 0, charArray[screenBase + l + i], c, w);
System.arraycopy(abuf, 0, charAttributes[screenBase + l + i], c, w);
@@ -727,6 +734,11 @@ public class VDUBuffer {
cbuf = new char[bufSize][w];
abuf = new int[bufSize][w];
+
+ for (int i = 0; i < bufSize; i++) {
+ Arrays.fill(cbuf[i], ' ');
+ }
+
if (charArray != null && charAttributes != null) {
for (int i = 0; i < bsize && i < bufSize; i++) {
System.arraycopy(charArray[i], 0, cbuf[i], 0,
diff --git a/src/de/mud/terminal/VDUInput.java b/src/de/mud/terminal/VDUInput.java
index 79a8bb7..2aa2496 100644
--- a/src/de/mud/terminal/VDUInput.java
+++ b/src/de/mud/terminal/VDUInput.java
@@ -1,7 +1,7 @@
/*
* This file is part of "JTA - Telnet/SSH for the JAVA(tm) platform".
*
- * (c) Matthias L. Jugel, Marcus Meißner 1996-2005. All Rights Reserved.
+ * (c) Matthias L. Jugel, Marcus Meiner 1996-2005. All Rights Reserved.
*
* Please visit http://javatelnet.org/ for updates and contact.
*
@@ -29,7 +29,7 @@ import java.util.Properties;
/**
* An interface for a terminal that accepts input from keyboard and mouse.
*
- * @author Matthias L. Jugel, Marcus Mei�ner
+ * @author Matthias L. Jugel, Marcus Meiner
* @version $Id: VDUInput.java 499 2005-09-29 08:24:54Z leo $
*/
public interface VDUInput {
@@ -40,6 +40,7 @@ public interface VDUInput {
public final static int KEY_ACTION = 0x08;
+
/**
* Direct access to writing data ...
* @param b
diff --git a/src/de/mud/terminal/vt320.java b/src/de/mud/terminal/vt320.java
index 099c877..483c665 100644
--- a/src/de/mud/terminal/vt320.java
+++ b/src/de/mud/terminal/vt320.java
@@ -1,7 +1,7 @@
/*
* This file is part of "JTA - Telnet/SSH for the JAVA(tm) platform".
*
- * (c) Matthias L. Jugel, Marcus Meißner 1996-2005. All Rights Reserved.
+ * (c) Matthias L. Jugel, Marcus Meiner 1996-2005. All Rights Reserved.
*
* Please visit http://javatelnet.org/ for updates and contact.
*
@@ -36,6 +36,7 @@ import java.util.Properties;
* @author Matthias L. Jugel, Marcus Mei\u00dfner
*/
public abstract class vt320 extends VDUBuffer implements VDUInput {
+
/** The current version id tag.<P>
* $Id: vt320.java 507 2005-10-25 10:14:52Z marcus $
*/
@@ -78,6 +79,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
}
protected void sendTelnetCommand(byte cmd) {
+
}
/**
@@ -2326,7 +2328,7 @@ public abstract class vt320 extends VDUBuffer implements VDUInput {
int limit;
/* FIXME: xterm only cares about 0 and topmargin */
if (R > bm)
- limit = bm + 1;
+ limit = bm; // BUGFIX: corrects scrollback dissapearing in irssi
else if (R >= tm) {
limit = tm;
} else