[Kos-cvs] kos/modules/tty _tty.c,1.17,1.18 _vt100.c,1.4,1.5

thomas at kos.enix.org thomas at kos.enix.org
Thu Jan 6 21:15:59 CET 2005


Update of /home/kos/cvs/kos/modules/tty
In directory the-doors:/tmp/cvs-serv22665/modules/tty

Modified Files:
	_tty.c _vt100.c 
Log Message:
2005-01-06  Thomas Petazzoni  <thomas at crazy.kos.nx>

	* modules/tty/_vt100.c: VT100 driver is now responsible to move
	the cursor. Some whitespace cleanup also. Cursor is not working
	perfectly yet, but you can sometimes see it under Qemu ;-)

	* modules/console/_console.c: Correctly initialize the cursor, and
	correctly move it.



Index: _tty.c
===================================================================
RCS file: /home/kos/cvs/kos/modules/tty/_tty.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- _tty.c	29 Dec 2003 13:42:51 -0000	1.17
+++ _tty.c	6 Jan 2005 20:15:57 -0000	1.18
@@ -96,7 +96,7 @@
 }
 
 result_t _tty_write(struct ures *ures, const char *buf, size_t *len)
-{		     
+{
   CONCEPTION_ASSERT(ures && buf);
 
   _tty_putchar((tty_t *) ures->view->view_data, buf, len);

Index: _vt100.c
===================================================================
RCS file: /home/kos/cvs/kos/modules/tty/_vt100.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- _vt100.c	29 Dec 2003 13:42:51 -0000	1.4
+++ _vt100.c	6 Jan 2005 20:15:57 -0000	1.5
@@ -26,7 +26,7 @@
 	{
 	  tty->x = 0;
 	  tty->y++;
-	  
+
 	  if(tty->y >= tty->height)
 	    {
 	      tty->y--;
@@ -41,25 +41,27 @@
 	      tty->x--;
 	    }
 	}
-      else 
+      else
 	{
 	  output_driver->write(tty->output, & buf[i], 1, tty->x, tty->y);
-	  
+
 	  tty->x++;
 	  if(tty->x >= tty->width)
 	    {
 	      tty->x = 0;
 	      tty->y++;
-	      
+
 	      if(tty->y >= tty->height)
 		{
 		  tty->y--;
 		  output_driver->scroll(tty->output, 1);
 		}
 	    }
-	  
+
 	}
     }
 
   *size = i;
+
+  output_driver->set_cursor_pos(tty->output, tty->x, tty->y);
 }



More information about the Kos-cvs mailing list