--- ssh-1.2.16/vt220.c	Fri Jul 25 18:42:16 1997
+++ ssh-1.2.16dunc/vt220.c	Fri Jul 25 18:13:24 1997
@@ -162,6 +162,30 @@
   0xFA
 };
 
+/* Conversion table from `l1' charset to `cp850' charset.
+   Generated mechanically by GNU recode 3.4.1.
+
+   Corrected, and reduced to just characters 160 onwards (apart
+   from ascii characters, only these ones are printable), 
+   by Duncan Sargeant, 19970725
+*/
+
+unsigned char const l1_to_cp850[] =
+{
+    255, 173, 189, 156, 207, 190, 221, 245,	/* 160 - 167 */
+    249, 184, 166, 174, 170, 240, 169, 238,	/* 168 - 175 */
+    248, 241, 253, 252, 239, 230, 244, 250,	/* 176 - 183 */
+    247, 251, 167, 175, 172, 171, 243, 168,	/* 184 - 191 */
+    183, 181, 182, 199, 142, 143, 146, 128,	/* 192 - 199 */
+    212, 144, 210, 211, 222, 214, 215, 216,	/* 200 - 207 */
+    209, 165, 227, 224, 226, 229, 153, 158,	/* 208 - 215 */
+    157, 235, 233, 234, 154, 237, 232, 225,	/* 216 - 223 */
+    133, 160, 131, 198, 132, 134, 145, 135,	/* 224 - 231 */
+    138, 130, 136, 137, 141, 161, 140, 139,	/* 232 - 239 */
+    208, 164, 149, 162, 147, 228, 148, 246,	/* 240 - 247 */
+    155, 151, 163, 150, 129, 236, 231, 152,	/* 248 - 255 */
+};
+
 static int  blink  = 0;
 static int  bold   = 0;
 static int  invis  = 0;
@@ -454,6 +478,9 @@
 {
   char Cell[2];
 
+#ifdef DEBUG_VT220
+  fprintf(stderr, "%i\n", numlines);
+#endif
   Cell[0] = SP;
   Cell[1] = attr_default;
   if (direction < 0)
@@ -509,6 +536,8 @@
                  if ((c >= 96) && (c <= 126) &&
                     ((charset && graph_g1) || (!charset && graph_g0)))
                    c = vt_graph[c - 96];
+		 else if (c >= 160)
+		   c = l1_to_cp850[c - 160];
 
                if (insert_mode)
                  {
@@ -550,6 +579,8 @@
         if ((*s >= 96) && (*s <= 126) &&
           ((charset && graph_g1) || (!charset && graph_g0)))
           *s = vt_graph[*s - 96];
+	else if (*s >= 160)
+	  *s = l1_to_cp850[*s - 160];
 
       s++;
     }
@@ -950,14 +981,16 @@
                   }
       break;
 
-      case 'L': /* IL - insert line */
+      case 'L': /* IL - insert line
                 for (i = 1; i <= arg[0]; i++)
-                  scroll(1, ypos, botmargin, 1);
+		*/
+                  scroll(1, ypos, botmargin, arg[0]);
       break;
 
-      case 'M': /* DL - delete line */
+      case 'M': /* DL - delete line
                 for (i = 1; i <= arg[0]; ++i)
-                  scroll(-1, ypos, botmargin, 1);
+		*/
+                  scroll(-1, ypos, botmargin, arg[0]);
       break;
 
       case 'm': /* SGR - select graphic rendition */
