[Gterm-discuss] Re: Gterm VT 100
Brought to you by:
theosib
From: Jörg S. <joe...@we...> - 2002-12-06 13:45:28
|
On Fri, 6 Dec 2002 20:39:20 +0800 Zhang Le <ej...@pe...> wrote: > On Thursday 05 December 2002 22:01, Jörg Sonnenberger wrote: > > Hi Zhang (Le?), > Nice to see you here. > Zhang is my surname and Le is my first name which means "joy" in Chinese. Right, I wasn't sure. Le = joy was new for me. I am a bit wiser now ;-) > > nice patch. I tried to merge it with my own changes for clean compilation, > > the resulting diff against CVS is attached. Hope I haven't forgotten > > anything. If not, could you attach to sourceforge? > I carefully modified the original gterm VT parser according to the programming > section of VT100 user guide(got from vt100.net). > My changes include: > 1.fix inversed BW mode problem > 2.add charset support > 3.modify some cursor/scroll function so their behaver like what the VT100 UG > said > 4.use dynamic buffer instead a fixed one > 5.other enhancements and bug fixes. > I use vttest (found on freshmeat.net) to test my modified version so I believe > there should be no serious bug in VT100 parser(I hope so;-)). The linux kernel > itself does not pass the vttest problem. > Still, the double width char function(char width switch) , smooth scroll > function and other VT100 specific commands are not implemented since I > thought they are useless in a soft VT100 enumerator. I agree. > > > > > > Other changes are moving ASSERT_X and ASSERT_Y from gterm.hpp > > to use .cpp files to keep the namespace clean and adding #ifndef NDEBUG > > around the no_operator? defines and calls. Hope this is right. Are they > > used any more? > no_operator should be deleted, they are non-standard ESC sequence I found in > linux kernel's console.c which implements some vga setting function. > Since gterm is a vt100 colone, they can be removed. Done. > > > > > > Also can you reproduce one bug in your code? If I am using plain sh and I > > start ls or ls -w 80, it displays a really weired screen. After the first > > file is a line break, after the second there is a lot of whitespace and the > > first char of the third file is on the same line. This doesn't happen under > > bash or the original gterm. This isn't introduced by the merge, it works > > with your version too. If you can't reproduce it, I will try to debug it > > myself. > I've tracked down the bug. It seems ash(plain sh) does not initiate tab stops > on start so we should reset tab stops in GTerm::reset() I guessed it's that kind of problem. > here's my patch against CVS code: > --- actions.cpp.old Fri Dec 6 20:19:14 2002 > +++ actions.cpp Fri Dec 6 20:19:17 2002 > @@ -222,6 +222,9 @@ > } > for (i=0; i<height; i++) linenumbers[i] = i; > memset(tab_stops, 0, width); > + for (i=0; i<width;++i) > + if ((i + 1) % 8 ==0) > + tab_stops[i] = 1; > current_state = GTerm::normal_state; > > clear_mode_flag(NOEOLWRAP | CURSORAPPMODE | CURSORRELATIVE | > Applied. I changed to for-loop and dropped the if. Thanks, now it works. > > -- > Sincerely yours, > Zhang Le Sincerely yours, Joerg Sonnenberger |