chiark / gitweb /
*** empty log message ***
authorjames <james>
Wed, 27 Feb 2008 00:27:21 +0000 (00:27 +0000)
committerjames <james>
Wed, 27 Feb 2008 00:27:21 +0000 (00:27 +0000)
src/crt.c
src/symsocket.c
src/vt102.c
src/vt102_charset.c

index b9174f9cdb7f5093e01749796d671b4d3e170fe6..9d6606a15bcb148486987ee0353aa35ab59d0ca5 100644 (file)
--- a/src/crt.c
+++ b/src/crt.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.14  2008/02/27 00:27:21  james
+ * *** empty log message ***
+ *
  * Revision 1.13  2008/02/26 23:56:12  james
  * *** empty log message ***
  *
@@ -141,14 +144,14 @@ crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea, int color)
   l *= sizeof (CRT_CA);
 
   n = e.y - s.y;
-  n++;
+  //n++;
 
   p = CRT_ADDR_POS (&e);
 
   while (n--)
     {
-      memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l);
       p -= CRT_COLS;
+      memcpy (&c->screen[p], &c->screen[p - CRT_COLS], l);
     }
 
   e.y = s.y;
index ee5869a23c3220c4d95f637789ac91717074a695..22f0bf675fcc31333e76c13fb81ee9fc86ba1a8e 100644 (file)
@@ -11,6 +11,9 @@ static char rcsid[] =
 
 /*
  * $Log$
+ * Revision 1.6  2008/02/27 00:27:22  james
+ * *** empty log message ***
+ *
  * Revision 1.5  2008/02/20 22:54:22  staffcvs
  * *** empty log message ***
  *
@@ -32,7 +35,7 @@ static char rcsid[] =
 #include <sys/socket.h>
 #include <sys/un.h>
 
-#define BUF_SIZE 16384
+#define BUF_SIZE 65536
 #define MAX_TXN 4096
 
 int
index a22fe691a4adb6edac6be91058f6359ce0c108e7..88210873f2d1e1e31b9dadcbd6e36b38e7f32f36 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.43  2008/02/27 00:27:22  james
+ * *** empty log message ***
+ *
  * Revision 1.42  2008/02/26 23:56:12  james
  * *** empty log message ***
  *
@@ -297,9 +300,9 @@ ESC+B
 #include "project.h"
 #include "syslog.h"
 
-//static char terminal_reply[]={033,0133,077,066,0143};
-
 #define TABLE_LENGTH 128
+#undef DEBUG
+
 
 static char terminal_id[] = "vt102";
 
@@ -678,9 +681,9 @@ vt102_insert_into_line (VT102 * v, CRT_Pos p)
                &v->crt.screen[CRT_ADDR_POS (&p)], sizeof (CRT_CA) * n);
     }
 
-  v->crt.screen[CRT_ADDR (p.y, v->bottom_margin.x)].chr = ' ';
-  v->crt.screen[CRT_ADDR (p.y, v->bottom_margin.x)].attr = CRT_ATTR_NORMAL;
-  v->crt.screen[CRT_ADDR (p.y, v->bottom_margin.x)].color = CRT_COLOR_NORMAL;
+  v->crt.screen[CRT_ADDR_POS (&p)].chr = ' ';
+  v->crt.screen[CRT_ADDR_POS (&p)].attr = CRT_ATTR_NORMAL;
+  v->crt.screen[CRT_ADDR_POS (&p)].color = CRT_COLOR_NORMAL;
 }
 
 
@@ -1262,23 +1265,26 @@ vt102_parse_csi (Context * c, char *buf, int len)
           vt102_parse_attr_string (v, &buf[1], len - 1);
           break;
         case 'n':              //Device status report
-         switch (buf[1]) {
-       case '5':
-          vt102_send_id (c, "\033[0n");
-         break;
-        case '6':
-        if (c->t) {
-        char buf[16];
-       int i;
-        i=sprintf(buf,"\033[%d;%dR",v->pos.y+1,v->pos.x+1);
-       c->t->xmit (c->t, buf, i);
-         }
-       break;
-       default:
-          //?15n printer status
-          log_f (c->l, "<%s:%d unhandled DSR: \\033%s>", __FILE__, __LINE__,
-                 buf);
-       }
+          switch (buf[1])
+            {
+            case '5':
+              vt102_send_id (c, "\033[0n");
+              break;
+            case '6':
+              if (c->t)
+                {
+                  char buf[16];
+                  int i;
+                  i =
+                    sprintf (buf, "\033[%d;%dR", v->pos.y + 1, v->pos.x + 1);
+                  c->t->xmit (c->t, buf, i);
+                }
+              break;
+            default:
+              //?15n printer status
+              log_f (c->l, "<%s:%d unhandled DSR: \\033%s>", __FILE__,
+                     __LINE__, buf);
+            }
           break;
         case 'q':              //Load LED on off 
           break;
@@ -1314,8 +1320,8 @@ vt102_parse_csi (Context * c, char *buf, int len)
           break;
         case 'y':              //Invoke confidence test
           break;
-       case 'z':       //request terminal parameters
-         break;
+        case 'z':              //request terminal parameters
+          break;
 
         default:
           log_f (c->l, "<%s:%d unhandled CSI: \\033%s>", __FILE__, __LINE__,
@@ -1340,10 +1346,11 @@ vt102_parse_esc (Context * c)
   VT102 *v = c->v;
   VT102_parser *p = &v->parser;
 
-#if 1
+#ifdef DEBUG
   p->cmd_buf[p->cmd_ptr] = 0;
-  log_f (c->l, "<cmd in  x=%3d y=%2d aw=%d vt=%d <ESC>%s >", v->pos.x, v->pos.y,
-         v->pending_wrap, !v->private_modes[VT102_PRIVATE_MODE_VT52],p->cmd_buf);
+  log_f (c->l, "<cmd in  x=%3d y=%2d aw=%d vt=%d <ESC>%s >", v->pos.x,
+         v->pos.y, v->pending_wrap,
+         !v->private_modes[VT102_PRIVATE_MODE_VT52], p->cmd_buf);
 #endif
 
   if (!v->private_modes[VT102_PRIVATE_MODE_VT52])
@@ -1514,8 +1521,10 @@ vt102_parse_esc (Context * c)
     }
 
   p->cmd_buf[p->cmd_ptr] = 0;
+#ifdef DEBUG
   log_f (c->l, "<cmd out x=%3d y=%2d aw=%d>", v->pos.x, v->pos.y,
          v->pending_wrap);
+#endif
 }
 
 void
@@ -1700,7 +1709,7 @@ vt102_parse_char (Context * c, int ch)
     }
   else
     {
-#if 1
+#ifdef DEBUG
       if (ch != 27)
         log_f (c->l,
                "<chr in  x=%3d y=%2d aw=%d  \\%03o %3d %c",
@@ -1770,7 +1779,7 @@ vt102_parse_char (Context * c, int ch)
           vt102_regular_char (c, v, ch);
         }
 
-#if 1
+#ifdef DEBUG
       if (ch != 27)
         log_f (c->l, "<chr out x=%3d y=%2d aw=%d>", v->pos.x, v->pos.y,
                v->pending_wrap);
index 1835455b6887ddc1ad381a8145bf16f715020c9b..49abe8fda0740bb702ff3e8b7df332a0714a1c64 100644 (file)
@@ -11,6 +11,9 @@ static char rcsid[] =
 
 /*
  * $Log$
+ * Revision 1.3  2008/02/27 00:27:22  james
+ * *** empty log message ***
+ *
  * Revision 1.2  2008/02/26 23:56:12  james
  * *** empty log message ***
  *
@@ -67,24 +70,24 @@ uint32_t vt102_charset_vt52[VT102_CHARSET_SIZE] = {
   [0x5f] = 0x25ae,
   [0x60] = 0x25ae,
   [0x61] = 0x25ae,
-  [0x62] = 0x215f, 
-  [0x63] = '3',          // 3/
-  [0x64] = '5',   // 5/
-  [0x65] = '7',   // 7/
+  [0x62] = 0x215f,
+  [0x63] = '3',                 // 3/
+  [0x64] = '5',                 // 5/
+  [0x65] = '7',                 // 7/
   [0x66] = 0x00b0,
   [0x67] = 0x00b1,
   [0x68] = 0x2192,
   [0x69] = 0x2026,
   [0x6a] = 0x00f7,
   [0x6b] = 0x2193,
-  [0x6c] = 0x25ba, //bar scan 0
-  [0x6d] = 0x23ba, 
-  [0x6e] = 0x25ba, //bar scan 2
-  [0x6f] = 0x23bb, 
-  [0x70] = 0x23bb, //bar scan 4
-  [0x71] = 0x2500, 
-  [0x72] = 0x23bc, //bar scan 6
-  [0x73] = 0x23bc, 
+  [0x6c] = 0x25ba,              //bar scan 0
+  [0x6d] = 0x23ba,
+  [0x6e] = 0x25ba,              //bar scan 2
+  [0x6f] = 0x23bb,
+  [0x70] = 0x23bb,              //bar scan 4
+  [0x71] = 0x2500,
+  [0x72] = 0x23bc,              //bar scan 6
+  [0x73] = 0x23bc,
   [0x74] = 0x2080,
   [0x75] = 0x2081,
   [0x76] = 0x2082,