kern

diff src/term.c @ 52:fa65b4f45366

picking this up again, let's fix it
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 07 Aug 2011 06:42:00 +0300
parents 06172322fb76
children
line diff
     1.1 --- a/src/term.c	Mon Aug 01 06:45:29 2011 +0300
     1.2 +++ b/src/term.c	Sun Aug 07 06:42:00 2011 +0300
     1.3 @@ -1,6 +1,7 @@
     1.4  #include <ctype.h>
     1.5  #include "term.h"
     1.6  #include "vid.h"
     1.7 +#include "intr.h"
     1.8  
     1.9  static int bg, fg = LTGRAY;
    1.10  static int cursor_x, cursor_y;
    1.11 @@ -32,6 +33,9 @@
    1.12   */
    1.13  int putchar(int c)
    1.14  {
    1.15 +	int istate = get_intr_state();
    1.16 +	disable_intr();
    1.17 +
    1.18  	switch(c) {
    1.19  	case '\n':
    1.20  		cursor_y++;
    1.21 @@ -65,5 +69,7 @@
    1.22  	}
    1.23  
    1.24  	set_cursor(cursor_x, cursor_y);
    1.25 +
    1.26 +	set_intr_state(istate);
    1.27  	return c;
    1.28  }