From: james Date: Thu, 14 Feb 2008 01:55:57 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=sympathy.git;a=commitdiff_plain;h=ca18756e89e072fa067751f421a4f9879596e70b *** empty log message *** --- diff --git a/src/Makefile.am b/src/Makefile.am index 63a00b4..f648e7a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 *** # @@ -44,11 +47,11 @@ 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 diff --git a/src/ansi.c b/src/ansi.c index 7f44957..7ec9abd 100644 --- a/src/ansi.c +++ b/src/ansi.c @@ -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); } } diff --git a/src/context.h b/src/context.h index c2b7798..a0edf33 100644 --- a/src/context.h +++ b/src/context.h @@ -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 index 0000000..8c4f427 --- /dev/null +++ b/src/term.c @@ -0,0 +1,17 @@ +/* + * term.c: + * + * Copyright (c) 2008 James McKenzie , + * 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 index 0000000..3190ef3 --- /dev/null +++ b/src/term.h @@ -0,0 +1,23 @@ +/* + * term.h: + * + * Copyright (c) 2008 James McKenzie , + * 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__ */ diff --git a/src/terminal.c b/src/terminal.c index 0a75f71..03b688a 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -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) { diff --git a/src/vt102.c b/src/vt102.c index df7b6b1..33d2d67 100644 --- a/src/vt102.c +++ b/src/vt102.c @@ -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