aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2008-03-10 11:49:33 +0000
committerjames <>2008-03-10 11:49:33 +0000
commit0a4c67a874e7bce9e358c82489782c9e402a58a4 (patch)
tree8c157ec80ee5373abf27075e91906a9a03ad99c0
parent3bfc6a76971bce4c16360f6cc2896dec3f1fbafe (diff)
downloadsympathy-0a4c67a874e7bce9e358c82489782c9e402a58a4.tar.gz
sympathy-0a4c67a874e7bce9e358c82489782c9e402a58a4.tar.bz2
sympathy-0a4c67a874e7bce9e358c82489782c9e402a58a4.zip
*** empty log message ***
-rw-r--r--AUTHORS20
-rw-r--r--COPYING22
-rw-r--r--NEWS21
-rw-r--r--README41
-rw-r--r--apps/clients.h9
-rw-r--r--apps/expand.c6
-rw-r--r--apps/mainloop.c6
-rw-r--r--apps/sympathy.c49
-rw-r--r--src/ansi.h9
-rw-r--r--src/cmd.h6
-rw-r--r--src/context.h6
-rw-r--r--src/crt.h12
-rw-r--r--src/history.h9
-rw-r--r--src/ipc.h57
-rw-r--r--src/keydis.c9
-rw-r--r--src/keydis.h6
-rw-r--r--src/lockfile.h12
-rw-r--r--src/log.c87
-rw-r--r--src/log.h8
-rw-r--r--src/ptty.c6
-rw-r--r--src/raw.c9
-rw-r--r--src/ring.h6
-rw-r--r--src/rx.h6
-rw-r--r--src/serial.c6
-rw-r--r--src/slide.h6
-rw-r--r--src/symsocket.h6
-rw-r--r--src/terminal.c8
-rw-r--r--src/tty.c6
-rw-r--r--src/tty.h12
-rw-r--r--src/utf8.h6
-rw-r--r--src/vt102.h12
-rw-r--r--sympathy.114
-rw-r--r--version-micro2
-rw-r--r--version-minor2
34 files changed, 300 insertions, 202 deletions
diff --git a/AUTHORS b/AUTHORS
index 0572210..f45e3fa 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,15 +1,5 @@
-#
-#
-# AUTHORS:
-#
-# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
-# All rights reserved.
-#
-# $Id$
-#
-# $Log$
-# Revision 1.1 2008/02/03 16:20:23 james
-# *** empty log message ***
-#
-#
-#
+AUTHORS:
+
+ $Id$
+
+James McKenzie <james@fishsoup.dhs.org>
diff --git a/COPYING b/COPYING
index f404dfe..6686f6e 100644
--- a/COPYING
+++ b/COPYING
@@ -1,15 +1,7 @@
-#
-#
-# COPYING:
-#
-# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
-# All rights reserved.
-#
-# $Id$
-#
-# $Log$
-# Revision 1.1 2008/02/03 16:20:23 james
-# *** empty log message ***
-#
-#
-#
+COPYING:
+
+ Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ All rights reserved.
+
+ $Id$
+
diff --git a/NEWS b/NEWS
index 9442347..8582a34 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,8 @@
-#
-# NEWS:
-#
-# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
-# All rights reserved.
-#
-# $Id$
-#
-# $Log$
-# Revision 1.1 2008/02/03 16:20:23 james
-# *** empty log message ***
-#
-#
+NEWS:
+
+ Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+ All rights reserved.
+
+ $Id$
+
+
diff --git a/README b/README
index 4c2edea..6886876 100644
--- a/README
+++ b/README
@@ -1,16 +1,27 @@
-#
-#
-# README:
-#
-# Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
-# All rights reserved.
-#
-# $Id$
-#
-# $Log$
-# Revision 1.1 2008/02/03 16:20:23 james
-# *** empty log message ***
-#
-#
-#
+Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
+All rights reserved.
+
+$Id$
+
+ Sympathy is a replacement for screen(1), minicom(1) and consolidate(1).
+It is a VT52/VT100/ANSI terminal emulator with some special features. In
+normal use sympathy would sit between a terminal device (a serial port or
+a pseudo-tty) and the user’s usual terminal emulator (eg xterm(1)).
+Sympathy renders data from the terminal device into an internal frame
+buffer and then expresses changes in this frame buffer to the outer terminal
+emulator using a small subset of ANSI escape codes. Sympathy always
+generates valid escape codes to the outer ter- minal, and will reset the state
+of its internal terminal emulator when it detects receive errors on the
+terminal device.
+
+ Sympathy, unlike screen(1), takes care to preserve the scroll-back fea-
+tures of the outer terminal emulator: lines that scroll off the top of the
+internal frame buffer are scrolled off the top of the outer termi- nal
+emulator. When sympathy is used in client/server mode, some history is added to
+the outer terminal emulator when the client connects.
+
+ Sympathy also supports automatic baud-rate detection, and advanced log-
+ging features. Sympathy logs whenever any of the modem control lines change
+state, receive errors, and the contents of any line on the frame buffer as the
+cursor moves off it.
diff --git a/apps/clients.h b/apps/clients.h
index 8a1625e..b2e669a 100644
--- a/apps/clients.h
+++ b/apps/clients.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.9 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.8 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -41,16 +44,14 @@
#ifndef __CLIENTS_H__
#define __CLIENTS_H__
-typedef struct Client_struct
-{
+typedef struct Client_struct {
struct Client_struct *next;
int initialized;
Socket *s;
int dead;
} Client;
-typedef struct
-{
+typedef struct {
Client *head;
int n;
} Clients;
diff --git a/apps/expand.c b/apps/expand.c
index f8f8d48..8b26d32 100644
--- a/apps/expand.c
+++ b/apps/expand.c
@@ -6,10 +6,14 @@
*
*/
-static char rcsid[] = "$Id$";
+static char rcsid[] =
+ "$Id$";
/*
* $Log$
+ * Revision 1.5 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/03/07 14:19:29 staffcvs
* *** empty log message ***
*
diff --git a/apps/mainloop.c b/apps/mainloop.c
index 15c30ed..74e456e 100644
--- a/apps/mainloop.c
+++ b/apps/mainloop.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.29 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.28 2008/03/07 13:56:39 james
* *** empty log message ***
*
@@ -140,8 +143,7 @@ static char rcsid[] =
#include "clients.h"
-typedef struct
-{
+typedef struct {
int nclients;
int lines;
int baud;
diff --git a/apps/sympathy.c b/apps/sympathy.c
index ef120ec..94cd801 100644
--- a/apps/sympathy.c
+++ b/apps/sympathy.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.41 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.40 2008/03/07 14:16:44 james
* *** empty log message ***
*
@@ -462,8 +465,8 @@ main (int argc, char *argv[])
ANSI *ansi = NULL;
- int csnok_pipe[2] = { 0 };
- int csnok = 0;
+ int cs_pipe[2] = { 0 };
+ int cs = 0;
int oflags[128];
char *oargs[128];
@@ -568,10 +571,8 @@ main (int argc, char *argv[])
/* to find out the pid of the server, we use a pipe */
if (oflags['s'] && oflags['c']) {
- if (!oflags['k']) {
- csnok++;
- pipe (csnok_pipe);
- }
+ cs++;
+ pipe (cs_pipe);
switch (pid = fork ()) {
case 0: /* child becomes the server */
@@ -580,8 +581,7 @@ main (int argc, char *argv[])
oflags['N'] = 0;
oflags['I'] = 0;
- if (csnok)
- close (csnok_pipe[0]);
+ close (cs_pipe[0]);
break;
case -1:
fatal_moan ("fork failed");
@@ -604,16 +604,18 @@ main (int argc, char *argv[])
/* if there was no k argument we need to find the */
/* pid of the server process so that we can work out */
/* what the socket is called. The server tells us on */
- /* a pipe */
+ /* a pipe. We do this even if k is specified to avoid */
+ /* a race, the server writes to the pipe when the socket */
+ /* is opened */
- if (csnok) {
- close (csnok_pipe[1]);
+ close (cs_pipe[1]);
- if (read (csnok_pipe[0], &pid, sizeof (pid)) != sizeof (pid))
- fatal_moan ("Failed to receive pid of server process");
+ if (read (cs_pipe[0], &pid, sizeof (pid)) != sizeof (pid))
+ fatal_moan ("Failed to receive pid of server process");
- close (csnok_pipe[0]);
+ close (cs_pipe[0]);
+ if (!oflags['k']) {
oargs['k'] = mome ("/.sympathy/%s%d", hostname, pid);
oflags['k']++;
}
@@ -680,11 +682,12 @@ main (int argc, char *argv[])
server_socket = socket_listen (oargs['k']);
/* Tell our parent's parent what our pid is */
- if (csnok) {
+ /* and that we've opened the server socket */
+ if (cs) {
pid = getpid ();
- write (csnok_pipe[1], &pid, sizeof (pid));
- close (csnok_pipe[1]);
+ write (cs_pipe[1], &pid, sizeof (pid));
+ close (cs_pipe[1]);
}
if (!server_socket)
@@ -792,7 +795,6 @@ main (int argc, char *argv[])
fatal_moan ("-I requires an arugment");
send_to_server (client_socket, oargs['I']);
} else {
-
if (client_socket)
ipc_msg_send_initialize (client_socket);
@@ -807,13 +809,20 @@ main (int argc, char *argv[])
ansi =
ansi_new_from_terminal (terminal_open (0, 1), oflags['u'] ? 0 : 1);
ansi->reset (ansi, NULL);
- if (ansi->set_title)
+
+ }
+
+ if (ansi->set_title) {
+ if (oflags['c'] && oargs['k']) {
ansi->set_title (ansi, oargs['k']);
+ } else if ((ctx->t) && (ctx->t->name)) {
+ ansi->set_title (ansi, ctx->t->name);
+ }
}
+
}
}
-
ctx->v = vt102_new (&size);
ctx->h = history_new (history);
diff --git a/src/ansi.h b/src/ansi.h
index 5ea6cad..6f412c7 100644
--- a/src/ansi.h
+++ b/src/ansi.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.20 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.19 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -79,8 +82,7 @@
#define ANSI_ESCAPE_BUF_LEN 10
#define ANSI_ESCAPE_TIMEOUT 100000 /* in ms */
-typedef struct
-{
+typedef struct {
int in_escape;
struct timeval last_escape;
char escape_buf[ANSI_ESCAPE_BUF_LEN];
@@ -90,8 +92,7 @@ typedef struct
struct CRT_struct;
struct Context_struct;
-typedef struct ANSI_struct
-{
+typedef struct ANSI_struct {
ANSI_Parser parser;
TTY *terminal;
diff --git a/src/cmd.h b/src/cmd.h
index 7094485..3e3f775 100644
--- a/src/cmd.h
+++ b/src/cmd.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.8 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.7 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -41,8 +44,7 @@
#define CMD_KEY 2 /* CTRL B */
#define CMD_CANCEL_KEY 3 /* CTRL C */
-typedef struct
-{
+typedef struct {
int active;
int error;
int disconnect;
diff --git a/src/context.h b/src/context.h
index 139a8f0..a1ce8d2 100644
--- a/src/context.h
+++ b/src/context.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.13 2008/03/10 11:49:32 james
+ * *** empty log message ***
+ *
* Revision 1.12 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -53,8 +56,7 @@
#ifndef __CONTEXT_H__
#define __CONTEXT_H__
-typedef struct Context_struct
-{
+typedef struct Context_struct {
VT102 *v;
TTY *t;
TTY_Parser *tp;
diff --git a/src/crt.h b/src/crt.h
index 7f5c1e1..68ecfd4 100644
--- a/src/crt.h
+++ b/src/crt.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.18 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.17 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -114,22 +117,19 @@ typedef struct __attribute__ ((packed)) {
uint8_t color;
} CRT_CA;
-typedef struct
-{
+typedef struct {
int x;
int y;
} CRT_Pos;
-typedef struct
-{
+typedef struct {
CRT_Pos s;
CRT_Pos e;
int dir;
} CRT_ScrollHint;
-typedef struct CRT_struct
-{
+typedef struct CRT_struct {
CRT_CA screen[CRT_CELS];
CRT_Pos pos;
int hide_cursor;
diff --git a/src/history.h b/src/history.h
index 8ca80b2..3baa097 100644
--- a/src/history.h
+++ b/src/history.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.7 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -35,15 +38,13 @@
#ifndef __HISTORY_H__
#define __HISTORY_H__
-typedef struct
-{
+typedef struct {
int valid;
time_t t;
CRT_CA line[CRT_COLS];
} History_ent;
-typedef struct
-{
+typedef struct {
History_ent *lines;
int nlines;
int wptr;
diff --git a/src/ipc.h b/src/ipc.h
index 9b2f438..212d3cf 100644
--- a/src/ipc.h
+++ b/src/ipc.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.12 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.11 2008/03/07 14:13:40 james
* *** empty log message ***
*
@@ -69,44 +72,38 @@
#define IPC_MSG_TYPE_RESET 14
#define IPC_MSG_TYPE_KILLME 15
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
uint8_t payload[0];
} IPC_Msg_hdr;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
} IPC_Msg_noop;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
char msg[0];
} IPC_Msg_debug;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
char msg[0];
} IPC_Msg_initialize;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
History_ent history;
} IPC_Msg_history;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t len;
@@ -114,15 +111,13 @@ typedef struct
} IPC_Msg_VT102;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t key;
} IPC_Msg_key;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t len;
@@ -130,76 +125,66 @@ typedef struct
} IPC_Msg_term;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
char status[0];
} IPC_Msg_status;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t baud;
} IPC_Msg_setbaud;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
} IPC_Msg_sendbreak;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t flow;
} IPC_Msg_setflow;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
int32_t ansi;
} IPC_Msg_setansi;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
} IPC_Msg_hangup;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
CRT_Pos winsize;
} IPC_Msg_setsize;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
} IPC_Msg_reset;
-typedef struct
-{
+typedef struct {
int32_t size;
int32_t type;
} IPC_Msg_killme;
-typedef union
-{
+typedef union {
IPC_Msg_hdr hdr;
IPC_Msg_noop noop;
IPC_Msg_debug debug;
diff --git a/src/keydis.c b/src/keydis.c
index 75c6d98..ad75996 100644
--- a/src/keydis.c
+++ b/src/keydis.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * 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 ***
*
@@ -65,13 +68,11 @@ static char rcsid[] = "$Id$";
#define CMD_BUFLEN 128
-typedef struct
-{
+typedef struct {
KEYDIS_SIGNATURE;
} KeyDis_VT102;
-typedef struct
-{
+typedef struct {
KEYDIS_SIGNATURE;
Socket *s;
} KeyDis_IPC;
diff --git a/src/keydis.h b/src/keydis.h
index ac69b7a..f1f2c2b 100644
--- a/src/keydis.h
+++ b/src/keydis.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.10 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.9 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -63,8 +66,7 @@ struct Context_struct;
-typedef struct KeyDis_struct
-{
+typedef struct KeyDis_struct {
KEYDIS_SIGNATURE;
} KeyDis;
diff --git a/src/lockfile.h b/src/lockfile.h
index b8b1775..cfd1899 100644
--- a/src/lockfile.h
+++ b/src/lockfile.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.11 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.10 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -52,20 +55,17 @@
#define FILE_LIST_MAX_LEN 1024
-typedef struct Filelist_ent
-{
+typedef struct Filelist_ent {
char name[FILE_LIST_MAX_LEN];
struct Filelist_ent *next;
} Filelist_ent;
-typedef struct
-{
+typedef struct {
Filelist_ent *head;
} Filelist;
-typedef struct
-{
+typedef struct {
int mode;
int i;
struct timeval last_stale_purge;
diff --git a/src/log.c b/src/log.c
index c117779..b8b2186 100644
--- a/src/log.c
+++ b/src/log.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.12 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.11 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -47,8 +50,7 @@ static char rcsid[] = "$Id$";
#include "project.h"
-typedef struct
-{
+typedef struct {
LOG_SIGNATURE;
int do_close;
int rotate;
@@ -56,6 +58,69 @@ typedef struct
char *filename;
} File_Log;
+
+static Log *loggers = NULL;
+
+
+static void
+sighup (int dummy)
+{
+ Log *l;
+
+ for (l = loggers; l; l = l->next) {
+ if (l->sighup)
+ l->sighup (l);
+ }
+}
+
+
+void
+log_register_handlers (void)
+{
+ struct sigaction sa = { 0 };
+
+ sa.sa_handler = sighup;
+ sa.sa_flags = SA_RESTART;
+ sigaction (SIGHUP, &sa, NULL);
+}
+
+
+void
+log_add (Log * l)
+{
+ log_register_handlers ();
+
+ l->next = loggers;
+ loggers = l;
+}
+
+void
+log_remove (Log * l)
+{
+ Log **ptr = &loggers;
+
+ /* Take out of cleanup list */
+ while (*ptr && (*ptr != l))
+ ptr = &((*ptr)->next);
+
+ if (*ptr)
+ *ptr = l->next;
+}
+
+
+static void
+flog_sighup (Log * _l)
+{
+ File_Log *l = (File_Log *) _l;
+ if (!l->fp)
+ return;
+
+ fclose (l->fp);
+
+ l->fp = fopen (l->filename, "a+");
+}
+
+
static void
flog_log (Log * _l, char *buf)
{
@@ -110,28 +175,32 @@ Log *
file_log_new (char *fn, int rotate)
{
File_Log *l;
- FILE *f;
int dc = 1;
+ l = xmalloc (sizeof (File_Log));
+
if (fn && strcmp (fn, "-")) {
- f = fopen (fn, "a+");
- if (!f)
+ l->fp = fopen (fn, "a+");
+ if (!l->fp) {
+ free (l);
return NULL;
+ }
+ l->sighup = flog_sighup;
} else {
- f = stderr;
+ l->fp = stderr;
dc = 0;
}
- l = xmalloc (sizeof (File_Log));
l->log = flog_log;
l->close = flog_close;
- l->fp = f;
l->do_close = dc;
l->rotate = rotate;
l->filename = strdup (fn);
- fput_cp (f, 0xffef);
+ fput_cp (l->fp, 0xffef);
+
+ log_add ((Log *) l);
return (Log *) l;
}
diff --git a/src/log.h b/src/log.h
index 27510b9..81a95c4 100644
--- a/src/log.h
+++ b/src/log.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.6 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.5 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -33,11 +36,12 @@
#define __LOG_H__
#define LOG_SIGNATURE \
+ struct Log_struct *next; \
void (*log)(struct Log_struct *,char *); \
+ void (*sighup)(struct Log_struct *); \
void (*close)(struct Log_struct *)
-typedef struct Log_struct
-{
+typedef struct Log_struct {
LOG_SIGNATURE;
} Log;
diff --git a/src/ptty.c b/src/ptty.c
index 393eab6..000587b 100644
--- a/src/ptty.c
+++ b/src/ptty.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.21 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.20 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -90,8 +93,7 @@ static char rcsid[] = "$Id$";
#include "project.h"
-typedef struct
-{
+typedef struct {
TTY_SIGNATURE;
int fd;
pid_t child;
diff --git a/src/raw.c b/src/raw.c
index 15c12f8..4f4af5e 100644
--- a/src/raw.c
+++ b/src/raw.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.8 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.7 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -36,15 +39,13 @@ static char rcsid[] = "$Id$";
#include "project.h"
-typedef struct
-{
+typedef struct {
RX_SIGNATURE;
int rfd;
int wfd;
} RX_Raw;
-typedef struct
-{
+typedef struct {
TTY_SIGNATURE;
} RAW_TERMINAL;
diff --git a/src/ring.h b/src/ring.h
index 303faca..51cf4c0 100644
--- a/src/ring.h
+++ b/src/ring.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.6 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.5 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -32,8 +35,7 @@
#ifndef __RING_H__
#define __RING_H__
-typedef struct
-{
+typedef struct {
uint8_t *ring;
int wptr;
int rptr;
diff --git a/src/rx.h b/src/rx.h
index c1c58ea..d1a6110 100644
--- a/src/rx.h
+++ b/src/rx.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.5 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -34,8 +37,7 @@
void (*close)(struct RX_struct *);
-typedef struct RX_struct
-{
+typedef struct RX_struct {
RX_SIGNATURE;
} RX;
diff --git a/src/serial.c b/src/serial.c
index 1592f9e..b32e48e 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.17 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.16 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -93,8 +96,7 @@ static char rcsid[] = "$Id$";
#include <sys/stat.h>
-typedef struct
-{
+typedef struct {
TTY_SIGNATURE;
Serial_lock *lock;
int fd;
diff --git a/src/slide.h b/src/slide.h
index f42b99c..d92726b 100644
--- a/src/slide.h
+++ b/src/slide.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.5 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.4 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -35,8 +38,7 @@
#ifndef __SLIDE_H__
#define __SLIDE_H__
-typedef struct
-{
+typedef struct {
uint8_t *slide;
int nbytes;
int target_size;
diff --git a/src/symsocket.h b/src/symsocket.h
index fdc4ff5..7d93beb 100644
--- a/src/symsocket.h
+++ b/src/symsocket.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.6 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.5 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -32,8 +35,7 @@
#ifndef __SYMSOCKET_H__
#define __SYMSOCKET_H__
-typedef struct
-{
+typedef struct {
int fd;
Slide *read_buf;
diff --git a/src/terminal.c b/src/terminal.c
index 48f57a3..e01a6f6 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.20 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.19 2008/03/07 14:16:44 james
* *** empty log message ***
*
@@ -91,8 +94,7 @@ static char rcsid[] =
#include "project.h"
-typedef struct TERMINAL_struct
-{
+typedef struct TERMINAL_struct {
TTY_SIGNATURE;
struct termios orig_termios;
struct TERMINAL_struct *next;
@@ -140,6 +142,8 @@ terminal_close (TTY * _t)
//
//
//
+ //
+ //
// to
// bottom
t->xmit (_t, buf, i);
diff --git a/src/tty.c b/src/tty.c
index df1ad8f..86551d1 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.26 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.25 2008/03/07 13:16:02 james
* *** empty log message ***
*
@@ -377,8 +380,7 @@ tty_winch (TTY * t, CRT_Pos size)
#if 0
-typedef struct
-{
+typedef struct {
int in_dle;
int in_errmark;
diff --git a/src/tty.h b/src/tty.h
index b5b3888..f695c41 100644
--- a/src/tty.h
+++ b/src/tty.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.16 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.15 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -81,8 +84,7 @@
#define TTY_BITFREQ_LEN 10
-typedef struct
-{
+typedef struct {
int in_dle;
int in_errmark;
@@ -94,13 +96,11 @@ typedef struct
} TTY_Parser;
-typedef struct TTY_struct
-{
+typedef struct TTY_struct {
TTY_SIGNATURE;
} TTY;
-typedef struct
-{
+typedef struct {
int lines;
int blocked;
struct termios termios;
diff --git a/src/utf8.h b/src/utf8.h
index e1958d5..0643e72 100644
--- a/src/utf8.h
+++ b/src/utf8.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.8 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.7 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -40,8 +43,7 @@
#define __UTF8_H__
-typedef struct
-{
+typedef struct {
int in_utf8;
uint8_t utf_buf[4];
diff --git a/src/vt102.h b/src/vt102.h
index 54fa84c..246c6f0 100644
--- a/src/vt102.h
+++ b/src/vt102.h
@@ -12,6 +12,9 @@
/*
* $Log$
+ * Revision 1.25 2008/03/10 11:49:33 james
+ * *** empty log message ***
+ *
* Revision 1.24 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -101,8 +104,7 @@
#define VT102_NMODES 32
-typedef struct
-{
+typedef struct {
int in_escape;
int in_cmd;
@@ -112,8 +114,7 @@ typedef struct
char cmd_buf[VT102_CMD_LEN];
} VT102_parser;
-typedef struct
-{
+typedef struct {
CRT_Pos pos;
int attr;
int color;
@@ -121,8 +122,7 @@ typedef struct
} VT102_State;
-typedef struct
-{
+typedef struct {
CRT_Pos top_margin, bottom_margin;
CRT_Pos screen_start, screen_end;
VT102_parser parser;
diff --git a/sympathy.1 b/sympathy.1
index 0769aef..5f795cc 100644
--- a/sympathy.1
+++ b/sympathy.1
@@ -106,7 +106,9 @@ server process and injects the history into the outer terminal
emulator,
and connects the user with the terminal device. One server process can support multiple
client processes. This mode can also be used to obtain a dump of the current screen
-in HTML format (see the \-\fBH\fP option). The \-\fPr\fP option connects to a
+in HTML format (see the \-\fBH\fP option), inject key\-presses (see \-\fBI\fP)
+or allow control via a dumb terminal (see \-\fBN\fP).
+The \-\fPr\fP option connects to a
server process socket called \fIid\fP, or if \fIid\fP is an integer
\fIhost-name\fP.\fIid\fP mimicking the behaviour of screen(1).
.I Sympathy
@@ -252,7 +254,7 @@ Inject \fIstring\fP to the device as if it had been typed at the keyboard. Each
the string is treated as a keypress.
.I Sympathy
recognizes various common escapes for control characters. Other keys, for example the arrow keys,
-are mapped to character codes between 128 and 255.
+are mapped to character codes between 128 and 255, see src/keys.h for details.
.PP
.B \fIserver_options\fP:
.TP 5
@@ -455,7 +457,7 @@ which together with the \fB\-P\fP allows the use of of a program such
as logrotate(8)
.SH SIGNALS
.I Sympathy
-reacts to a set of signals. You can use the \fB-P\fI option
+reacts to a set of signals. You can use the \fB-P\fP option
to easily determine the PID of the
.I sympathy
process to which you would like to send a signal.
@@ -485,7 +487,11 @@ location for sockets.
.br
.I sympathy
sets the value of \fBTERM\fP in pseudo-ttys spawned using the
-\-\fBp\fP argument to `xterm'
+\-\fBp\fP argument to `xterm'.
+.br
+.I Sympathy
+will use \fBCSI ] 0 ;\fP to set the window title to the name of the
+socket or device if \fBTERM\fP starts with \fIxterm\fP or \fIrxvt\fP.
.SH EMULATION
.I Sympathy
completely emulates a VT102 terminal (including the VT52 emulation).
diff --git a/version-micro b/version-micro
index b1bd38b..3a2e3f4 100644
--- a/version-micro
+++ b/version-micro
@@ -1 +1 @@
-13
+-1
diff --git a/version-minor b/version-minor
index d00491f..0cfbf08 100644
--- a/version-minor
+++ b/version-minor
@@ -1 +1 @@
-1
+2