-/*
+/*
* keydis.c:
*
- * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ * Copyright (c) 2008 James McKenzie <sympathy@madingley.org>,
* All rights reserved.
*
*/
-static char rcsid[] = "$Id$";
+static char rcsid[] = "$Id: keydis.c,v 1.16 2008/03/10 11:49:33 james Exp $";
-/*
- * $Log$
+/*
+ * $Log: keydis.c,v $
+ * Revision 1.16 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
+ * Revision 1.15 2008/03/07 13:16:02 james
+ * *** empty log message ***
+ *
+ * Revision 1.14 2008/03/07 12:37:04 james
+ * *** empty log message ***
+ *
+ * Revision 1.13 2008/03/03 18:16:16 james
+ * *** empty log message ***
+ *
+ * Revision 1.12 2008/03/03 18:15:19 james
+ * *** empty log message ***
+ *
+ * Revision 1.11 2008/03/03 06:04:42 james
+ * *** empty log message ***
+ *
+ * Revision 1.10 2008/03/02 10:37:56 james
+ * *** empty log message ***
+ *
+ * Revision 1.9 2008/02/28 22:00:42 james
+ * *** empty log message ***
+ *
* Revision 1.8 2008/02/28 16:57:52 james
* *** empty log message ***
*
#define CMD_BUFLEN 128
-typedef struct
-{
+typedef struct {
KEYDIS_SIGNATURE;
} KeyDis_VT102;
-typedef struct
-{
+typedef struct {
KEYDIS_SIGNATURE;
Socket *s;
} KeyDis_IPC;
{
KeyDis_VT102 *t = (KeyDis_VT102 *) _t;
+ log_f (c->l, "<break sent>");
tty_send_break (c->t);
return 0;
{
KeyDis_VT102 *t = (KeyDis_VT102 *) _t;
+ log_f (c->l, "<flow control turned %s>", flow ? "on" : "off");
tty_set_flow (c->t, flow);
return 0;
{
KeyDis_VT102 *t = (KeyDis_VT102 *) _t;
+ log_f (c->l, "<hangup initiated>");
tty_hangup (c->t);
return 0;
KeyDis *
keydis_vt102_new (void)
{
- KeyDis_VT102 *t = malloc (sizeof (KeyDis_VT102));
+ KeyDis_VT102 *t = xmalloc (sizeof (KeyDis_VT102));
t->key = keydis_vt102_key;
t->close = keydis_close;
t->set_baud = keydis_vt102_set_baud;
KeyDis *
keydis_ipc_new (Socket * s)
{
- KeyDis_IPC *t = malloc (sizeof (KeyDis_IPC));
+ KeyDis_IPC *t = xmalloc (sizeof (KeyDis_IPC));
t->key = keydis_ipc_key;
t->close = keydis_close;
t->set_baud = keydis_ipc_set_baud;
+#if 0
int
keydis_key (KeyDis * t, Context * c, int key)
{
return t->key (t, c, key);
}
+#endif