aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <>2008-03-07 12:42:08 +0000
committerjames <>2008-03-07 12:42:08 +0000
commitfc0af42eb82bf94a9b1174d3ba96536238bc5fcd (patch)
tree5153f5587d3adefcb53996b138835e8464449a6d
parent4cd3114c5013aeccd790582f6cd1dd2760be9dd0 (diff)
downloadsympathy-fc0af42eb82bf94a9b1174d3ba96536238bc5fcd.tar.gz
sympathy-fc0af42eb82bf94a9b1174d3ba96536238bc5fcd.tar.bz2
sympathy-fc0af42eb82bf94a9b1174d3ba96536238bc5fcd.zip
*** empty log message ***
-rw-r--r--src/terminal.c4
-rw-r--r--src/vt102.c61
2 files changed, 27 insertions, 38 deletions
diff --git a/src/terminal.c b/src/terminal.c
index c89ca16..3e2cc64 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -11,6 +11,9 @@ static char rcsid[] =
/*
* $Log$
+ * Revision 1.16 2008/03/07 12:42:08 james
+ * *** empty log message ***
+ *
* Revision 1.15 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -125,6 +128,7 @@ terminal_close (TTY * _t)
i = sprintf (buf, "\033[%d;%dH", t->displayed_length ? (t->displayed_length + 1) : (CRT_ROWS + 1), 1); // Cursor
//
//
+ //
// to
// bottom
t->xmit (_t, buf, i);
diff --git a/src/vt102.c b/src/vt102.c
index 2105802..ca0096e 100644
--- a/src/vt102.c
+++ b/src/vt102.c
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$";
/*
* $Log$
+ * Revision 1.65 2008/03/07 12:42:08 james
+ * *** empty log message ***
+ *
* Revision 1.64 2008/03/07 12:37:04 james
* *** empty log message ***
*
@@ -504,7 +507,7 @@ vt102_cursor_normalize (VT102 * v)
void
vt102_cursor_carriage_return (VT102 * v)
{
- /*FISH*/ v->pos.x = v->top_margin.x;
+ v->pos.x = v->top_margin.x;
v->pending_wrap = 0;
}
@@ -514,12 +517,8 @@ vt102_cursor_advance_line (Context * c)
VT102 *v = c->v;
int couldscroll = in_margins (v, v->pos);
- /*
- * have wraped off end of last line in scrolling region
- */
- /*
- * (|| not necessary, but shuts compiler up
- */
+ /* have wraped off end of last line in scrolling region */
+ /* not necessary, but shuts compiler up */
if (((v->pos.y == v->bottom_margin.y) || (v->pos.y == v->screen_end.y))
&& (couldscroll)) {
vt102_log_line (c, v->pos.y);
@@ -542,12 +541,8 @@ vt102_cursor_retreat_line (Context * c)
VT102 *v = c->v;
int couldscroll = in_margins (v, v->pos);
- /*
- * have wraped off end of last line in scrolling region
- */
- /*
- * (|| not necessary, but shuts compiler up
- */
+ /* have wraped off end of first line in scrolling region */
+ /* (|| not necessary, but shuts compiler up */
if (((v->pos.y == v->top_margin.y) || (v->pos.y == v->screen_start.y)) &&
(couldscroll)) {
vt102_log_line (c, v->pos.y);
@@ -572,15 +567,11 @@ vt102_do_pending_wrap (Context * c)
if (!v->pending_wrap)
return;
- /*
- * End of line but no autowrap, nothing to do
- */
+ /* End of line but no autowrap, nothing to do */
if (!autowrap)
return;
- /*
- * End of screen and not allowed to scroll, nothing to do
- */
+ /* End of screen and not allowed to scroll, nothing to do */
if ((v->pos.y == v->screen_end.y) && (!couldscroll))
return;
@@ -599,9 +590,7 @@ vt102_cursor_advance (Context * c)
VT102 *v = c->v;
if (v->pos.x < v->bottom_margin.x) {
- /*
- * Normal advance
- */
+ /* Normal advance */
v->pos.x++;
v->pending_wrap = 0;
return;
@@ -706,9 +695,7 @@ vt102_delete_from_line (VT102 * v, CRT_Pos p)
}
v->crt.screen[CRT_ADDR (p.y, v->bottom_margin.x)].chr = ' ';
- /*
- * But not attr due to vt102 bug
- */
+ /* But not attr due to vt102 bug */
}
void
@@ -761,10 +748,6 @@ vt102_change_mode (Context * c, int private, char *ns, int set)
vt102_cursor_home (v);
break;
case VT102_PRIVATE_MODE_132COLS:
- /*
- * We don't implement 132 col mode - yet
- */
-
v->current_size.x =
v->
private_modes[VT102_PRIVATE_MODE_132COLS] ? VT102_COLS_132 :
@@ -1111,8 +1094,7 @@ vt102_parse_csi (Context * c, char *buf, int len)
vt102_cursor_relative (v, 0, -narg);
vt102_cursor_carriage_return (v);
break;
- case 'G':
- /* CHG */
+ case 'G': /* CHG */
vt102_cursor_absolute (v, narg - 1, v->pos.y);
break;
case 'H': /* CUP */
@@ -1136,8 +1118,9 @@ vt102_parse_csi (Context * c, char *buf, int len)
vt102_cursor_advance_tab (c->v);
break;
case 'J': /* ED */
+ /* Different default */
if (len == 2)
- narg = 0; /* Different default */
+ narg = 0;
switch (narg) {
case 0:
crt_erase (&v->crt, v->pos, v->screen_end, 1, v->color);
@@ -1154,8 +1137,9 @@ vt102_parse_csi (Context * c, char *buf, int len)
{
CRT_Pos ls = { 0, v->pos.y };
CRT_Pos le = { v->current_size.x - 1, v->pos.y };
+ /* Different default */
if (len == 2)
- narg = 0; /* Different default */
+ narg = 0;
switch (narg) {
case 0:
@@ -1239,14 +1223,16 @@ vt102_parse_csi (Context * c, char *buf, int len)
vt102_cursor_absolute (v, v->pos.x, narg - 1);
break;
case 'g': /* TBC */
+ /* Different default */
if (len == 2)
- narg = 0; /* Different default */
+ narg = 0;
switch (narg) {
case 0:
v->tabs[v->pos.x] = 0;
break;
- case 2: // FIXME: - LA120 says current line only WTF?
+ case 2:
+ // FIXME: - LA120 says current line only WTF?
case 3:
memset (v->tabs, 0, sizeof (v->tabs));
break;
@@ -1520,7 +1506,6 @@ vt102_parse_esc (Context * c)
case '<': /* DECANM */
// Set ansi mode - ignored
break;
-
case '7': /* DECSC */
vt102_save_state (v);
break;
@@ -1744,8 +1729,8 @@ vt102_parse_char (Context * c, int ch)
case 0x9c: /* \ ST */
case 0x9d: /* ] OSC */
case 0x9e: /* ^ PM */
- case 0x9f:
- /*_ APC*/
+ case 0x9f: /* _ APC */
+ /* C1 chars are equavlent to ESC ch-0x40 */
p->cmd_ptr = 0;
p->cmd_buf[p->cmd_ptr++] = ch;
p->in_escape = 0;