changeset 100:9204fe526e65

finish setField()
author Carl Byington <carl@five-ten-sg.com>
date Tue, 17 Jun 2014 15:57:18 -0700
parents eda03b809f48
children f0ec55006f31
files src/com/five_ten_sg/connectbot/service/TerminalMonitor.java src/com/five_ten_sg/connectbot/transport/AbsTransport.java src/org/tn5250j/framework/tn5250/tnvt.java
diffstat 3 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java	Tue Jun 17 15:13:41 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/service/TerminalMonitor.java	Tue Jun 17 15:57:18 2014 -0700
@@ -361,12 +361,12 @@
 
     public synchronized void setField(int l, int c, char[] data, int offset) {
         Log.i(TAG, "setField()");
-        byte[] b = new byte[data.length - offset];
+        char[] da = new byte[data.length - offset];
         int i;
-        for (i=0; i<b.length; i++) {
-            b[i] = (byte)(data[i+offset] & 0x00ff);
+        for (i=0; i<da.length; i++) {
+            da[i] = data[i+offset];
         }
-        buffer.write(b);
+        buffer.setField(l, c, da);
     }
 
     public synchronized void getField(int l, int c, int len) {
--- a/src/com/five_ten_sg/connectbot/transport/AbsTransport.java	Tue Jun 17 15:13:41 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/transport/AbsTransport.java	Tue Jun 17 15:57:18 2014 -0700
@@ -50,6 +50,17 @@
             Log.d(TAG, s);
         }
 
+        // monitor injecting a field
+        @Override
+        public void setField(int l, int c, char [] data) {
+            byte[] b = new byte[data.length];
+            int i;
+            for (i=0; i<b.length; i++) {
+                b[i] = (byte)(data[i] & 0x00ff);
+            }
+            write(d);
+        }
+
         // terminal key listener sending to the host
         @Override
         public void write(byte[] b) {
--- a/src/org/tn5250j/framework/tn5250/tnvt.java	Tue Jun 17 15:13:41 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/tnvt.java	Tue Jun 17 15:57:18 2014 -0700
@@ -1917,7 +1917,7 @@
                     //break;
 
                 default: // all others must be output to screen
-                    Log.d(TAG,"all others must be output to screen");
+                    //Log.d(TAG,"all others must be output to screen");
                     byte byte0 = bk.getByteOffset(-1);
                     if (isAttribute(byte0)) {
                         screen52.setAttr(byte0);