chiark / gitweb /
*** empty log message ***
authorjames <james>
Thu, 14 Feb 2008 01:55:57 +0000 (01:55 +0000)
committerjames <james>
Thu, 14 Feb 2008 01:55:57 +0000 (01:55 +0000)
src/Makefile.am
src/ansi.c
src/context.h
src/term.c [new file with mode: 0644]
src/term.h [new file with mode: 0644]
src/terminal.c
src/vt102.c

index 63a00b4dea6f0c26b79a34b94af1f18e3764cf73..f648e7a09c78f421afcdbb8ca8f66f3fe96fbca1 100644 (file)
@@ -8,6 +8,9 @@
 # $Id$
 #
 # $Log$
+# Revision 1.11  2008/02/14 01:55:57  james
+# *** empty log message ***
+#
 # Revision 1.10  2008/02/13 18:05:06  james
 # *** empty log message ***
 #
 
 INCLUDES=
 
-PROJECTHDRS= crt.h tty.h ansi.h vt102.h keys.h history.h ring.h slide.h log.h ipc.h context.h symsocket.h prototypes.h
+PROJECTHDRS= crt.h tty.h ansi.h vt102.h keys.h history.h ring.h slide.h log.h ipc.h symsocket.h term.h context.h  prototypes.h
 
 HDRS=project.h 
 
-SRCS=ansi.c crt.c html.c libsympathy.c render.c  version.c vt102.c tty.c \
+SRCS=ansi.c crt.c html.c libsympathy.c render.c  version.c vt102.c tty.c term.c \
        history.c ring.c ptty.c terminal.c util.c log.c ipc.c slide.c symsocket.c
 
 CPROTO=cproto
index 7f44957cbb0516b708b7202e16e0b690de73d202..7ec9abd160dd9e83cda8ef3fce2003567baadbe6 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.20  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
  * Revision 1.19  2008/02/13 16:57:29  james
  * *** empty log message ***
  *
@@ -621,7 +624,7 @@ ansi_flush_escape (ANSI * a, Context * c)
 
   for (i = 0; i < p->escape_ptr; ++i)
     {
-      vt102_send (c, p->escape_buf[i]);
+      term_send (c, p->escape_buf[i]);
     }
 
   p->escape_ptr = 0;
@@ -640,11 +643,11 @@ ansi_parse_deckey (ANSI * a, Context * c)
 
   if ((p->escape_buf[2] >= 'A') || (p->escape_buf[2] <= 'Z'))
     {
-      vt102_send (c, KEY_UP + (p->escape_buf[2] - 'A'));
+      term_send (c, KEY_UP + (p->escape_buf[2] - 'A'));
     }
   else if ((p->escape_buf[2] >= 'a') || (p->escape_buf[2] <= 'z'))
     {
-      vt102_send (c, KEY_154 + (p->escape_buf[2] - 'a'));
+      term_send (c, KEY_154 + (p->escape_buf[2] - 'a'));
     }
   else
     {
@@ -667,7 +670,7 @@ ansi_parse_ansikey (ANSI * a, Context * c)
     }
   if ((p->escape_buf[2] >= '0') || (p->escape_buf[2] <= '9'))
     {
-      vt102_send (c, KEY_180 + (p->escape_buf[2] - '0'));
+      term_send (c, KEY_180 + (p->escape_buf[2] - '0'));
     }
   else
     {
@@ -780,7 +783,7 @@ ansi_parse_char (ANSI * a, Context * c, int ch)
     }
   else
     {
-      vt102_send (c, ch);
+      term_send (c, ch);
     }
 
 }
index c2b7798f4597faa04ed33acb9688dd680abf9dd8..a0edf33f42e7d19963e222fe8717084fcfc81196 100644 (file)
@@ -12,6 +12,9 @@
 
 /*
  * $Log$
+ * Revision 1.4  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
  * Revision 1.3  2008/02/13 09:12:21  james
  * *** empty log message ***
  *
@@ -32,6 +35,7 @@ typedef struct
   TTY *t;
   History *h;
   Log *l;
+  Term *r;
 } Context;
 
 #endif /* __CONTEXT_H__ */
diff --git a/src/term.c b/src/term.c
new file mode 100644 (file)
index 0000000..8c4f427
--- /dev/null
@@ -0,0 +1,17 @@
+/*
+ * term.c:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+static char rcsid[] = "$Id$";
+
+/*
+ * $Log$
+ * Revision 1.1  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
+ */
+
diff --git a/src/term.h b/src/term.h
new file mode 100644 (file)
index 0000000..3190ef3
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * term.h:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.1  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
+ */
+
+#ifndef __TERM_H__
+#define __TERM_H__
+
+#endif /* __TERM_H__ */
index 0a75f71cb0ddb8ad01641f074e23be41101d6f93..03b688a30b62288a5e2c1900b5d339b8db625f4b 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.7  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
  * Revision 1.6  2008/02/14 00:57:58  james
  * *** empty log message ***
  *
@@ -235,6 +238,7 @@ terminal_register_handlers (void)
   sigaction (SIGINT, &sa, NULL);
 }
 
+
 TTY *
 terminal_open (int rfd, int wfd)
 {
index df7b6b12e02c22098f6ffa1dbbea938ff1534772..33d2d67044617261353c461cce1de19202ccf12d 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.26  2008/02/14 01:55:57  james
+ * *** empty log message ***
+ *
  * Revision 1.25  2008/02/13 16:57:29  james
  * *** empty log message ***
  *
@@ -1205,6 +1208,9 @@ void
 vt102_send (Context * c, uint8_t key)
 {
   uint8_t ch;
+
+  if (!c->t) return;
+
 #if 0
   fprintf (stderr, "vts: %d(%c)\n", key, (key > 31) ? key : ' ');
 #endif