comparison src/org/tn5250j/framework/tn5250/Screen5250.java @ 428:b525a8141923

strip some debug code
author Carl Byington <carl@five-ten-sg.com>
date Sun, 14 Dec 2014 19:02:48 -0800
parents b284b8f9e535
children
comparison
equal deleted inserted replaced
427:f6d26c5f878e 428:b525a8141923
3300 } 3300 }
3301 3301
3302 fireScreenChanged(); 3302 fireScreenChanged();
3303 } 3303 }
3304 3304
3305 private int xx_position = 0;
3306 private int xx_length = 0;
3307 private char[] xx_pending = new char[2048];
3308
3309 private void xx_flush() {
3310 if (xx_length > 0) {
3311 char[] p = new char[xx_length];
3312 System.arraycopy(xx_pending, 0, p, 0, xx_length);
3313 Log.i(TAG, String.format("row %d col %d %s", getRow(xx_position), getCol(xx_position), new String(p)));
3314 }
3315 xx_length = 0;
3316 }
3317
3318 private void xx_debug(int cByte) {
3319 if (cByte == 0) {
3320 xx_flush();
3321 }
3322 else {
3323 if (xx_length == 0) {
3324 xx_position = lastPos;
3325 xx_pending[xx_length++] = (char)cByte;
3326 }
3327 else if (lastPos == xx_position + xx_length) {
3328 xx_pending[xx_length++] = (char)cByte;
3329 }
3330 else {
3331 xx_flush();
3332 xx_position = lastPos;
3333 xx_pending[xx_length++] = (char)cByte;
3334 }
3335 }
3336 }
3337
3338 protected void setChar(int cByte) { 3305 protected void setChar(int cByte) {
3339 xx_debug(cByte);
3340
3341 if (lastPos > 0) { 3306 if (lastPos > 0) {
3342 lastAttr = planes.getCharAttr(lastPos - 1); 3307 lastAttr = planes.getCharAttr(lastPos - 1);
3343 } 3308 }
3344 3309
3345 if (cByte > 0 && (char)cByte < ' ') { 3310 if (cByte > 0 && (char)cByte < ' ') {