chiark / gitweb /
*** empty log message ***
authorjames <james>
Thu, 7 Feb 2008 00:39:13 +0000 (00:39 +0000)
committerjames <james>
Thu, 7 Feb 2008 00:39:13 +0000 (00:39 +0000)
src/Makefile.am
src/ansi.c
src/ansi.h
src/keys.h
src/libsympathy.c
src/project.h
src/prototypes.h
src/tty.h
src/vt102.c
src/vt102.h

index 1c63eaf234111c30e1526157f64c1bb1d0c44313..a163fd058f7304d27c7d91984d844d481722a5a1 100644 (file)
@@ -8,6 +8,9 @@
 # $Id$
 #
 # $Log$
+# Revision 1.3  2008/02/07 00:39:13  james
+# *** empty log message ***
+#
 # Revision 1.2  2008/02/04 01:32:39  james
 # *** empty log message ***
 #
@@ -20,7 +23,7 @@
 
 INCLUDES = 
 
-SRCS= ansi.c crt.c html.c libsympathy.c render.c testtty.c version.c vt102.c
+SRCS= ansi.c crt.c html.c libsympathy.c render.c testtty.c version.c vt102.c tty.c
 CPROTO=cproto
 
 SYMPATHYSRCS=${SRCS}
index 16d9970194bb634c95b67692deee2952dbbd8c90..cf92e711123c853ddd91ff7d7640be27ae8fa341 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.9  2008/02/07 00:43:27  james
+ * *** empty log message ***
+ *
  * Revision 1.8  2008/02/07 00:39:13  james
  * *** empty log message ***
  *
@@ -56,26 +59,29 @@ set_blocking (int fd)
 }
 
 
-int ansi_read(ANSI *a,void *buf,int n)
+int
+ansi_read (ANSI * a, void *buf, int n)
 {
-int red;
+  int red;
 
-  set_nonblocking(a->fd);
-red=read(a->fd,buf,n);
+  set_nonblocking (a->fd);
+  red = read (a->fd, buf, n);
 
-if (!red) return -1;
+  if (!red)
+    return -1;
 
-if ((red==-1) && (errno==EAGAIN)) {
-       return 0;
-}
+  if ((red == -1) && (errno == EAGAIN))
+    {
+      return 0;
+    }
 
-return red;
+  return red;
 }
 
 void
 ansi_write (ANSI * a, char *buf, int n)
 {
-  set_blocking(a->fd);
+  set_blocking (a->fd);
   write (a->fd, buf, n);
 }
 
@@ -377,176 +383,206 @@ ansi_reset (ANSI * a)
   crt_reset (&a->crt);
 
   ansi_cls (a);
-  ansi_write(a,"\033=",2);
+  ansi_write (a, "\033=", 2);
   ansi_draw (a, &a->crt);
 }
-void ansi_flush_escape(ANSI *a,VT102 *v)
+
+void
+ansi_flush_escape (ANSI * a, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
-int i;
+  ANSI_Parser *p = &a->parser;
+  int i;
 
-for (i=0;i<p->escape_ptr;++i) {
-vt102_send(v,p->escape_buf[i]);
-}
+  for (i = 0; i < p->escape_ptr; ++i)
+    {
+      vt102_send (v, p->escape_buf[i]);
+    }
 
-p->escape_ptr=0;
-p->in_escape=0;
+  p->escape_ptr = 0;
+  p->in_escape = 0;
 }
 
-void ansi_parse_deckey(ANSI *a,VT102 *v)
+void
+ansi_parse_deckey (ANSI * a, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
-if ((p->escape_buf[1]!='[') && (p->escape_buf[1]!='O')) {
-       ansi_flush_escape(a,v);
-       return;
-}
-       
-if ((p->escape_buf[2]>='A') || (p->escape_buf[2]<='Z')){
-       vt102_send(v,KEY_UP+(p->escape_buf[2]-'A'));
-}else if ((p->escape_buf[2]>='a') || (p->escape_buf[2]<='z')){
-       vt102_send(v,KEY_154+(p->escape_buf[2]-'a'));
-} else {
-       ansi_flush_escape(a,v);
-       return;
-}
-p->in_escape=0;
-p->escape_ptr=0;
+  ANSI_Parser *p = &a->parser;
+  if ((p->escape_buf[1] != '[') && (p->escape_buf[1] != 'O'))
+    {
+      ansi_flush_escape (a, v);
+      return;
+    }
+
+  if ((p->escape_buf[2] >= 'A') || (p->escape_buf[2] <= 'Z'))
+    {
+      vt102_send (v, KEY_UP + (p->escape_buf[2] - 'A'));
+    }
+  else if ((p->escape_buf[2] >= 'a') || (p->escape_buf[2] <= 'z'))
+    {
+      vt102_send (v, KEY_154 + (p->escape_buf[2] - 'a'));
+    }
+  else
+    {
+      ansi_flush_escape (a, v);
+      return;
+    }
+  p->in_escape = 0;
+  p->escape_ptr = 0;
 }
 
-void ansi_parse_ansikey(ANSI *a,VT102 *v)
+void
+ansi_parse_ansikey (ANSI * a, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
+  ANSI_Parser *p = &a->parser;
 
-if ((p->escape_buf[1]!='[') ||(p->escape_buf[3]!='~')) {
-       ansi_flush_escape(a,v);
-       return;
-}
-if ((p->escape_buf[2]>='0') || (p->escape_buf[2]<='9')){
-       vt102_send(v,KEY_180+(p->escape_buf[2]-'0'));
-} else {
-       ansi_flush_escape(a,v);
-       return;
-}
+  if ((p->escape_buf[1] != '[') || (p->escape_buf[3] != '~'))
+    {
+      ansi_flush_escape (a, v);
+      return;
+    }
+  if ((p->escape_buf[2] >= '0') || (p->escape_buf[2] <= '9'))
+    {
+      vt102_send (v, KEY_180 + (p->escape_buf[2] - '0'));
+    }
+  else
+    {
+      ansi_flush_escape (a, v);
+      return;
+    }
 
-p->in_escape=0;
-p->escape_ptr=0;
+  p->in_escape = 0;
+  p->escape_ptr = 0;
 }
 
 
 
-void ansi_parse_escape(ANSI *a,VT102 *v)
+void
+ansi_parse_escape (ANSI * a, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
-switch(p->escape_ptr) {
-case 0:
-case 1:
-       return;
-case 2:
-       switch (p->escape_buf[1]) {
-       case '[':
-       case 'O':
-               break;
-       default:
-               ansi_flush_escape(a,v);
-       }
-       break;
-case 3:
-       switch(p->escape_buf[1]) {
-       case 'O':
-               ansi_parse_deckey(a,v);
-               break;
-       case '[':
-               if ((p->escape_buf[2]>='A') &&
-               (p->escape_buf[2]<='Z')) 
-                       ansi_parse_deckey(a,v);
-               break;
-       default:
-               ansi_flush_escape(a,v);
-       }
-       break;
-case 4:
-       switch(p->escape_buf[1]) {
-       case '[':
-               ansi_parse_ansikey(a,v);
-               break;
-       default:
-               ansi_flush_escape(a,v);
-       }
-       break;
-case 5:
-       ansi_flush_escape(a,v);
-}
+  ANSI_Parser *p = &a->parser;
+  switch (p->escape_ptr)
+    {
+    case 0:
+    case 1:
+      return;
+    case 2:
+      switch (p->escape_buf[1])
+        {
+        case '[':
+        case 'O':
+          break;
+        default:
+          ansi_flush_escape (a, v);
+        }
+      break;
+    case 3:
+      switch (p->escape_buf[1])
+        {
+        case 'O':
+          ansi_parse_deckey (a, v);
+          break;
+        case '[':
+          if ((p->escape_buf[2] >= 'A') && (p->escape_buf[2] <= 'Z'))
+            ansi_parse_deckey (a, v);
+          break;
+        default:
+          ansi_flush_escape (a, v);
+        }
+      break;
+    case 4:
+      switch (p->escape_buf[1])
+        {
+        case '[':
+          ansi_parse_ansikey (a, v);
+          break;
+        default:
+          ansi_flush_escape (a, v);
+        }
+      break;
+    case 5:
+      ansi_flush_escape (a, v);
+    }
 }
 
 
-void ansi_check_escape(ANSI *a,VT102 *v)
+void
+ansi_check_escape (ANSI * a, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
-       struct timeval now,diff;
-       gettimeofday(&now,NULL);
-       timersub(&now,&p->last_escape,&diff);
+  ANSI_Parser *p = &a->parser;
+  struct timeval now, diff;
+  gettimeofday (&now, NULL);
+  timersub (&now, &p->last_escape, &diff);
 
 #if 0
-fprintf(stderr,"ie %d tl %d.%06d eb %d\n",
-       p->in_escape,diff.tv_sec,diff.tv_usec,p->escape_ptr);
+  fprintf (stderr, "ie %d tl %d.%06d eb %d\n",
+           p->in_escape, diff.tv_sec, diff.tv_usec, p->escape_ptr);
 #endif
 
-if (!p->in_escape) return;
+  if (!p->in_escape)
+    return;
 
 
-       /*Time up?*/
-       if (diff.tv_sec || (diff.tv_usec > ANSI_ESCAPE_TIMEOUT))
-               ansi_flush_escape(a,v);
+  /*Time up? */
+  if (diff.tv_sec || (diff.tv_usec > ANSI_ESCAPE_TIMEOUT))
+    ansi_flush_escape (a, v);
 
 }
 
 
-void ansi_parse_char(ANSI *a,int c,VT102 *v)
+void
+ansi_parse_char (ANSI * a, int c, VT102 * v)
 {
-ANSI_Parser *p=&a->parser;
+  ANSI_Parser *p = &a->parser;
 
 
 /*See if it's time to flush the escape*/
-ansi_check_escape(a,v);
+  ansi_check_escape (a, v);
 
-if (c==033) {
-       if (p->in_escape) 
-               ansi_flush_escape(a,v);
+  if (c == 033)
+    {
+      if (p->in_escape)
+        ansi_flush_escape (a, v);
 
-       p->in_escape++;
-       p->escape_ptr=0;
-       gettimeofday(&p->last_escape,NULL);
-}
+      p->in_escape++;
+      p->escape_ptr = 0;
+      gettimeofday (&p->last_escape, NULL);
+    }
 
-if (p->in_escape) {
-       p->escape_buf[p->escape_ptr++]=c;
-       ansi_parse_escape(a,v);
-} else {
-       vt102_send(v,c);
-}
+  if (p->in_escape)
+    {
+      p->escape_buf[p->escape_ptr++] = c;
+      ansi_parse_escape (a, v);
+    }
+  else
+    {
+      vt102_send (v, c);
+    }
 
 }
 
-void ansi_parse(ANSI *a,char *buf,int len,VT102 *v)
+void
+ansi_parse (ANSI * a, char *buf, int len, VT102 * v)
 {
-while (len--) 
-ansi_parse_char(a,*(buf++),v);
+  while (len--)
+    ansi_parse_char (a, *(buf++), v);
 }
 
-int ansi_dispatch(ANSI *a,VT102 *v)
+int
+ansi_dispatch (ANSI * a, VT102 * v)
 {
-char buf[1024];
-int red;
+  char buf[1024];
+  int red;
 
-ansi_check_escape(a,v);
+  ansi_check_escape (a, v);
 
 
-red=ansi_read(a,buf,sizeof(buf));
-if (red<=0) return red;
+  red = ansi_read (a, buf, sizeof (buf));
+  if (red <= 0)
+    return red;
 
-if (*buf==3) return -1;
+  if (*buf == 3)
+    return -1;
 
-ansi_parse(a,buf,red,v);
+  ansi_parse (a, buf, red, v);
 
-return 0;
+  return 0;
 }
index 1b84ddc09e55734a26035b4bd086c00ff19ed421..bc245243b0eec1a291bb89a6f66ee077dea5c866 100644 (file)
@@ -12,6 +12,9 @@
 
 /*
  * $Log$
+ * Revision 1.4  2008/02/07 00:43:27  james
+ * *** empty log message ***
+ *
  * Revision 1.3  2008/02/07 00:39:13  james
  * *** empty log message ***
  *
 #define ANSI_INVAL -1
 
 #define ANSI_ESCAPE_BUF_LEN 10
-#define ANSI_ESCAPE_TIMEOUT    100000 /*in ms*/
+#define ANSI_ESCAPE_TIMEOUT    100000 /*in ms */
 
-typedef struct {
-int in_escape;
-struct timeval last_escape;
-char escape_buf[ANSI_ESCAPE_BUF_LEN];
-int escape_ptr;
+typedef struct
+{
+  int in_escape;
+  struct timeval last_escape;
+  char escape_buf[ANSI_ESCAPE_BUF_LEN];
+  int escape_ptr;
 } ANSI_Parser;
 
 typedef struct
index 93b27f93fd7bf3e233fb03a1e28e5dc5d7e8dfc6..1e6c0621789269a2e2482ac25df09c0a59270614 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * src/keys.h:
+ *
+ * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * All rights reserved.
+ *
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * $Log$
+ * Revision 1.4  2008/02/07 00:44:07  james
+ * *** empty log message ***
+ *
+ */
+
+#ifndef __KEYS_H__
+#define __KEYS_H__
+
 #define KEY_UP         128 /*A*/
 #define KEY_DOWN       129 /*B*/
 #define KEY_RIGHT      130 /*C*/
@@ -61,3 +83,4 @@
 #define KEY_188                188            /*8 */
 #define KEY_189                189            /*9 */
 #define KEY_NUM                190
+#endif /* __KEYS_H__ */
index 8f28c17aa2e73c3e11ae257bb04bb02176de8027..5ffd04d01127633467c3ad43b4aa5c1c1d196301 100644 (file)
@@ -11,6 +11,9 @@ static char rcsid[] =
 
 /*
  * $Log$
+ * Revision 1.8  2008/02/07 00:43:27  james
+ * *** empty log message ***
+ *
  * Revision 1.7  2008/02/07 00:39:13  james
  * *** empty log message ***
  *
@@ -85,8 +88,8 @@ testy (void)
   ansi_reset (&a);
 
 
-  t=tty_new_test();  
-  v=vt102_new(t);
+  t = tty_new_test ();
+  v = vt102_new (t);
 
   FD_ZERO (&rfd);
   for (;;)
@@ -102,12 +105,14 @@ testy (void)
         {
         }
 #endif
-       if (ansi_dispatch(&a,v))
-               break;
+      if (ansi_dispatch (&a, v))
+        break;
 
-      if (FD_ISSET (t->fd, &rfd)) {
-          if (vt102_dispatch (v)) break;
-      }
+      if (FD_ISSET (t->fd, &rfd))
+        {
+          if (vt102_dispatch (v))
+            break;
+        }
 
       if (had_winch)
         {
@@ -116,7 +121,7 @@ testy (void)
           ansi_reset (&a);
           ansi_draw (&a, &v->crt);
         }
-       ansi_draw (&a, &v->crt);
+      ansi_draw (&a, &v->crt);
     }
   tcsetattr (0, TCSANOW, &old);
   printf ("QUAT\n");
index 259bb6ad54b2ff4e4ad2c4ed1aeed473c873a9dc..e7ed065080e1664ef967ed62c32a4c45638de4b4 100644 (file)
@@ -12,6 +12,9 @@
 
 /*
  * $Log$
+ * Revision 1.5  2008/02/07 00:39:13  james
+ * *** empty log message ***
+ *
  * Revision 1.4  2008/02/06 20:26:58  james
  * *** empty log message ***
  *
@@ -72,6 +75,8 @@
 #include <termio.h>
 #include <termios.h>
 #include <signal.h>
+#include <fcntl.h>
+#include <errno.h>
 
 #include <utmp.h>
 #include <pty.h>
index 5bbd01ac82b7693d6c1936a480369af6cbc4b846..94186247499e84993fb528728f23978fa3fdae21 100644 (file)
@@ -1,70 +1,76 @@
 /* ansi.c */
-void ansi_write(ANSI *a, char *buf, int n);
-void ansi_getsize(ANSI *a);
-void ansi_move(ANSI *a, CRT_Pos p);
-void ansi_showhide_cursor(ANSI *a, int hide);
-void ansi_force_attr_normal(ANSI *a);
-void ansi_set_attr(ANSI *a, int attr);
-void ansi_render(ANSI *a, CRT_CA ca);
-void ansi_cls(ANSI *a);
-void ansi_draw(ANSI *a, CRT *c);
-void ansi_reset(ANSI *a);
-void ansi_parse_char(ANSI *a, int c, VT102 *v);
-void ansi_parse(ANSI *a, char *buf, int len, VT102 *v);
-int ansi_dispatch(ANSI *a, VT102 *v);
+int ansi_read (ANSI * a, void *buf, int n);
+void ansi_write (ANSI * a, char *buf, int n);
+void ansi_getsize (ANSI * a);
+void ansi_move (ANSI * a, CRT_Pos p);
+void ansi_showhide_cursor (ANSI * a, int hide);
+void ansi_force_attr_normal (ANSI * a);
+void ansi_set_attr (ANSI * a, int attr);
+void ansi_render (ANSI * a, CRT_CA ca);
+void ansi_cls (ANSI * a);
+void ansi_draw (ANSI * a, CRT * c);
+void ansi_reset (ANSI * a);
+void ansi_flush_escape (ANSI * a, VT102 * v);
+void ansi_parse_deckey (ANSI * a, VT102 * v);
+void ansi_parse_ansikey (ANSI * a, VT102 * v);
+void ansi_parse_escape (ANSI * a, VT102 * v);
+void ansi_check_escape (ANSI * a, VT102 * v);
+void ansi_parse_char (ANSI * a, int c, VT102 * v);
+void ansi_parse (ANSI * a, char *buf, int len, VT102 * v);
+int ansi_dispatch (ANSI * a, VT102 * v);
 /* crt.c */
-void crt_erase(CRT *c, CRT_Pos s, CRT_Pos e, int ea);
-void crt_cls(CRT *c);
-void crt_scroll_up(CRT *c, CRT_Pos s, CRT_Pos e, int ea);
-void crt_scroll_down(CRT *c, CRT_Pos s, CRT_Pos e, int ea);
-void crt_reset(CRT *c);
-void crt_insert(CRT *c, CRT_CA ca);
+void crt_erase (CRT * c, CRT_Pos s, CRT_Pos e, int ea);
+void crt_cls (CRT * c);
+void crt_scroll_up (CRT * c, CRT_Pos s, CRT_Pos e, int ea);
+void crt_scroll_down (CRT * c, CRT_Pos s, CRT_Pos e, int ea);
+void crt_reset (CRT * c);
+void crt_insert (CRT * c, CRT_CA ca);
 /* html.c */
-void html_entity(FILE *f, int c);
-void html_render(FILE *f, CRT_CA c);
-void html_draw(FILE *f, CRT *c);
+void html_entity (FILE * f, int c);
+void html_render (FILE * f, CRT_CA c);
+void html_draw (FILE * f, CRT * c);
 /* libsympathy.c */
 struct termios old;
-void testy(void);
+void testy (void);
 /* render.c */
 /* testtty.c */
-int open_fd_to_bash(void);
+int open_fd_to_bash (void);
 /* version.c */
 /* vt102.c */
-void vt102_log_line(VT102 *v, int line);
-void vt102_clip_cursor(VT102 *v, CRT_Pos tl, CRT_Pos br);
-void vt102_cursor_normalize(VT102 *v);
-void vt102_cursor_carriage_return(VT102 *v);
-void vt102_cursor_advance_line(VT102 *v);
-void vt102_cursor_advance(VT102 *v);
-void vt102_do_pending_wrap(VT102 *v);
-void vt102_cursor_retard(VT102 *v);
-void vt102_reset_tabs(VT102 *v);
-void vt102_cursor_advance_tab(VT102 *v);
-int vt102_cursor_home(VT102 *v);
-int vt102_cursor_absolute(VT102 *v, int x, int y);
-int vt102_cursor_relative(VT102 *v, int x, int y);
-void vt102_delete_from_line(VT102 *v, CRT_Pos p);
-void vt102_insert_into_line(VT102 *v, CRT_Pos p);
-void vt102_change_mode(VT102 *v, int private, char *ns, int set);
-void vt102_parse_mode_string(VT102 *v, char *buf, int len);
-void vt102_change_attr(VT102 *v, char *na);
-void vt102_parse_attr_string(VT102 *v, char *buf, int len);
-void vt102_save_state(VT102 *v);
-void vt102_restore_state(VT102 *v);
-void vt102_parse_esc(VT102 *v, int c);
-void vt102_parse_csi(VT102 *v, char *buf, int len);
-void vt102_status_line(VT102 *v, char *str);
-void vt102_parse_char(VT102 *v, int c);
-int vt102_parse(VT102 *v, char *buf, int len);
-void vt102_parser_reset(VT102_parser *p);
-void vt102_send(VT102 *v, uint8_t key);
-void vt102_reset(VT102 *v);
-int vt102_dispatch(VT102 *v);
-VT102 *vt102_new(TTY *t);
-void vt102_free(VT102 *v);
+void vt102_log_line (VT102 * v, int line);
+void vt102_clip_cursor (VT102 * v, CRT_Pos tl, CRT_Pos br);
+void vt102_cursor_normalize (VT102 * v);
+void vt102_cursor_carriage_return (VT102 * v);
+void vt102_cursor_advance_line (VT102 * v);
+void vt102_cursor_advance (VT102 * v);
+void vt102_do_pending_wrap (VT102 * v);
+void vt102_cursor_retard (VT102 * v);
+void vt102_reset_tabs (VT102 * v);
+void vt102_cursor_advance_tab (VT102 * v);
+int vt102_cursor_home (VT102 * v);
+int vt102_cursor_absolute (VT102 * v, int x, int y);
+int vt102_cursor_relative (VT102 * v, int x, int y);
+void vt102_delete_from_line (VT102 * v, CRT_Pos p);
+void vt102_insert_into_line (VT102 * v, CRT_Pos p);
+void vt102_change_mode (VT102 * v, int private, char *ns, int set);
+void vt102_parse_mode_string (VT102 * v, char *buf, int len);
+void vt102_change_attr (VT102 * v, char *na);
+void vt102_parse_attr_string (VT102 * v, char *buf, int len);
+void vt102_save_state (VT102 * v);
+void vt102_restore_state (VT102 * v);
+void vt102_parse_esc (VT102 * v, int c);
+void vt102_parse_csi (VT102 * v, char *buf, int len);
+void vt102_status_line (VT102 * v, char *str);
+void vt102_parse_char (VT102 * v, int c);
+int vt102_parse (VT102 * v, char *buf, int len);
+void vt102_parser_reset (VT102_parser * p);
+void vt102_send (VT102 * v, uint8_t key);
+void vt102_reset (VT102 * v);
+int vt102_dispatch (VT102 * v);
+VT102 *vt102_new (TTY * t);
+void vt102_free (VT102 * v);
 /* tty.c */
-TTY *tty_new_test(void);
-int tty_read(TTY *t, void *buf, int len);
-int tty_write(TTY *t, void *buf, int len);
-void tty_free(TTY *t);
+TTY *tty_new_test (void);
+int tty_read (TTY * t, void *buf, int len);
+int tty_write (TTY * t, void *buf, int len);
+void tty_free (TTY * t);
index 14a791be67bfc98a83a38fd05778793b6b5d7f88..1da83393eb5989593a5fea0afed1baa41b8668ac 100644 (file)
--- a/src/tty.h
+++ b/src/tty.h
@@ -12,6 +12,9 @@
 
 /*
  * $Log$
+ * Revision 1.2  2008/02/07 00:43:27  james
+ * *** empty log message ***
+ *
  * Revision 1.1  2008/02/06 20:26:58  james
  * *** empty log message ***
  *
@@ -20,8 +23,9 @@
 #ifndef __TTY_H__
 #define __TTY_H__
 
-typedef struct {
-       int fd;
+typedef struct
+{
+  int fd;
 } TTY;
 
 #endif /* __TTY_H__ */
index 25d7187e12209595576beebcf7ebd85b83366721..301e22436cd95b8c54089c4648b6953db9bbdeae 100644 (file)
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
 
 /*
  * $Log$
+ * Revision 1.15  2008/02/07 00:43:27  james
+ * *** empty log message ***
+ *
  * Revision 1.14  2008/02/07 00:40:23  james
  * *** empty log message ***
  *
@@ -1052,7 +1055,7 @@ vt102_send (VT102 * v, uint8_t key)
 {
   uint8_t c;
 #if 0
-  fprintf(stderr,"vts: %d(%c)\n",key,(key>31)?key:' ');
+  fprintf (stderr, "vts: %d(%c)\n", key, (key > 31) ? key : ' ');
 #endif
   if ((key > 31) && (key < 127))
     {
index 2fa56e603afda8f17c608d2ed729585cfb6cb874..fcf7aca690c6a08f7f73d836da1dfb2efc44d04f 100644 (file)
@@ -12,6 +12,9 @@
 
 /*
  * $Log$
+ * Revision 1.8  2008/02/07 00:39:13  james
+ * *** empty log message ***
+ *
  * Revision 1.7  2008/02/06 20:26:58  james
  * *** empty log message ***
  *
@@ -82,7 +85,7 @@ typedef struct
 
   int application_keypad_mode;
 
-  TTY *t;
+  TTY *tty;
 
 } VT102;