aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorjames <>2008-02-28 16:37:16 +0000
committerjames <>2008-02-28 16:37:16 +0000
commit57dd88f415d70356e41f2bfd5c00c250bd085723 (patch)
treec9ab3a642c9b5700057cf22d1c4f71348af68333 /src
parentcc6c5bbd8a277969b30b85dfab8a0fb11066bc9e (diff)
downloadsympathy-57dd88f415d70356e41f2bfd5c00c250bd085723.tar.gz
sympathy-57dd88f415d70356e41f2bfd5c00c250bd085723.tar.bz2
sympathy-57dd88f415d70356e41f2bfd5c00c250bd085723.zip
*** empty log message ***
Diffstat (limited to 'src')
-rw-r--r--src/keydis.c5
-rw-r--r--src/prototypes.h10
-rw-r--r--src/tty.c11
-rw-r--r--src/vt102.c36
4 files changed, 39 insertions, 23 deletions
diff --git a/src/keydis.c b/src/keydis.c
index 27140ec..3aed96e 100644
--- a/src/keydis.c
+++ b/src/keydis.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.7 2008/02/28 16:37:16 james
+ * *** empty log message ***
+ *
* Revision 1.6 2008/02/28 12:12:25 james
* *** empty log message ***
*
@@ -127,6 +130,7 @@ CRT_Pos p={w,h};
KeyDis_IPC *t = (KeyDis_IPC *) _t;
+ vt102_resize(c,p);
ipc_msg_send_setsize (t->s,p);
return 0;
@@ -138,6 +142,7 @@ keydis_ipc_reset (KeyDis * _t, Context * c)
{
KeyDis_IPC *t = (KeyDis_IPC *) _t;
+ vt102_reset(c);
ipc_msg_send_reset (t->s);
return 0;
diff --git a/src/prototypes.h b/src/prototypes.h
index 07fd0df..cd4fcd0 100644
--- a/src/prototypes.h
+++ b/src/prototypes.h
@@ -174,9 +174,9 @@ extern UTF8 *utf8_new(void);
extern int utf8_encode(char *ptr, int ch);
extern void utf8_emit(TTY *t, int ch);
/* vt102_charset.c */
-extern uint32_t vt102_charset_c0[128];
-extern uint32_t vt102_charset_us[128];
-extern uint32_t vt102_charset_uk[128];
-extern uint32_t vt102_charset_vt52[128];
-extern uint32_t vt102_charset_gl[128];
+extern uint32_t vt102_charset_c0[VT102_CHARSET_SIZE];
+extern uint32_t vt102_charset_us[VT102_CHARSET_SIZE];
+extern uint32_t vt102_charset_uk[VT102_CHARSET_SIZE];
+extern uint32_t vt102_charset_vt52[VT102_CHARSET_SIZE];
+extern uint32_t vt102_charset_gl[VT102_CHARSET_SIZE];
extern uint32_t *charset_from_csid[];
diff --git a/src/tty.c b/src/tty.c
index 6090af2..f27afea 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.18 2008/02/28 16:37:16 james
+ * *** empty log message ***
+ *
* Revision 1.17 2008/02/28 15:37:06 james
* *** empty log message ***
*
@@ -324,12 +327,6 @@ tty_set_flow (TTY * t, int flow)
}
-void tty_winch(TTY *y,CRT_Pos p)
-{
-//FIXME:
-
-}
-
void
tty_hangup (TTY * t)
{
@@ -351,7 +348,7 @@ void tty_winch(TTY * t,CRT_Pos size)
sz.ws_col=size.x;
sz.ws_row=size.y;
- ioctl (t->wfd, TIOCGWINSZ, &sz);
+ ioctl (t->wfd, TIOCSWINSZ, &sz);
}
diff --git a/src/vt102.c b/src/vt102.c
index d94bc4d..1d3709b 100644
--- a/src/vt102.c
+++ b/src/vt102.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.51 2008/02/28 16:37:16 james
+ * *** empty log message ***
+ *
* Revision 1.50 2008/02/28 12:12:25 james
* *** empty log message ***
*
@@ -399,7 +402,23 @@ in_margins (VT102 * v, CRT_Pos p)
return 1;
}
+void vt102_crt_update(Context *c)
+{
+VT102 *v=c->v;
+
+ v->crt.pos = v->pos;
+ v->crt.hide_cursor =
+ v->private_modes[VT102_PRIVATE_MODE_SHOW_CURSOR] ? 0 : 1;
+
+ if (v->current_line.y != v->pos.y)
+ {
+ vt102_log_line (c, v->current_line.y);
+ v->current_line = v->pos;
+ }
+ if (c->d)
+ cmd_show_status (c->d, c);
+}
void vt102_do_resize(Context *c)
{
@@ -417,6 +436,9 @@ VT102 *v=c->v;
if (c->t)
tty_winch(c->t,v->current_size);
+
+ log_f(c->l,"<size now %dx%d>", v->current_size.x,v->current_size.y);
+vt102_crt_update(c);
}
@@ -1834,18 +1856,9 @@ vt102_parse_char (Context * c, int ch)
#endif
}
- v->crt.pos = v->pos;
- v->crt.hide_cursor =
- v->private_modes[VT102_PRIVATE_MODE_SHOW_CURSOR] ? 0 : 1;
+ vt102_crt_update(c);
- if (v->current_line.y != v->pos.y)
- {
- vt102_log_line (c, v->current_line.y);
- v->current_line = v->pos;
- }
- if (c->d)
- cmd_show_status (c->d, c);
}
void
@@ -2092,9 +2105,10 @@ vt102_set_ansi (VT102 * v, int ansi)
void vt102_resize(Context *c,CRT_Pos size)
{
+ log_f(c->l,"<size change to %dx%d requested>", size.x,size.y);
if (!size.x) size.x=c->v->current_size.x;
- if (!size.y) size.x=c->v->current_size.y;
+ if (!size.y) size.y=c->v->current_size.y;
if (size.x < 1)
size.x = 1;