Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!usc!jarthur!uunet!mcsun!hp4nl!star.cs.vu.nl!philip From: philip@cs.vu.nl (Philip Homburg) Newsgroups: comp.os.minix Subject: Re: 1.5.10 Console driver problem Keywords: console.c 1.5.10 Message-ID: <9308@star.cs.vu.nl> Date: 14 Mar 91 18:27:41 GMT References: Sender: news@cs.vu.nl Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 49 In article elmo@clarkson.edu (Paul B. Davidson) writes: %When I looked deep into the source, and poked around with my test program, I %seemed to have tracked the actual problem, although I've not found the actual %bug. Essentially, when the \n or \r is output, the console first treats it as %a regular character, and outputs it to the screen, which effectively rolls the %current cursor pos around to the left side of the screen. Then, the special %character function is performed, either moving the cursor down one line to pos %0, or simply returning the cursor to position 0. % %If anyone has seen this behavior, and has solved the problem, please let me %know. I'm more than willing to hack the kernel to fix it myself, but I don't %want to reinvent the patch. :-) I fixed it some time ago, and I think it's fixed in 1.6.xx The trick is to move some lines of code to a place just before screen is scolled or just after the screen is scolled or something like that. Philip *** ../../1.5/kernel/console.c Sat Apr 21 22:26:23 1990 --- console.c Sun Dec 9 23:51:56 1990 *************** *** 202,210 **** #if !LINEWRAP if (tp->tty_column >= LINE_WIDTH) return; /* long line */ #endif - if (tp->tty_rwords == TTY_RAM_WORDS) flush(tp); - tp->tty_ramqueue[tp->tty_rwords++]=one_con_attribute|(c&BYTE); - tp->tty_column++; /* next column */ #if LINEWRAP if (tp->tty_column >= LINE_WIDTH) { flush(tp); --- 202,207 ---- *************** *** 215,220 **** --- 212,220 ---- move_to(tp, 0, tp->tty_row); } #endif /* LINEWRAP */ + if (tp->tty_rwords == TTY_RAM_WORDS) flush(tp); + tp->tty_ramqueue[tp->tty_rwords++]=one_con_attribute|(c&BYTE); + tp->tty_column++; /* next column */ return; } }