[Gterm-discuss] Re: Gterm VT 100
Brought to you by:
theosib
From: Zhang Le <ej...@pe...> - 2002-12-06 12:45:22
|
On Thursday 05 December 2002 22:01, J=F6rg 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. > nice patch. I tried to merge it with my own changes for clean compilati= on, > 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 progra= mming=20 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 VT10= 0 UG=20 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 be= lieve=20 there should be no serious bug in VT100 parser(I hope so;-)). The linux k= ernel=20 itself does not pass the vttest problem. Still, the double width char function(char width switch) , smooth scroll=20 function and other VT100 specific commands are not implemented since I=20 thought they are useless in a soft VT100 enumerator. > > > 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=20 linux kernel's console.c which implements some vga setting function. Since gterm is a vt100 colone, they can be removed. > > > 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 fir= st > 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 u= nder > bash or the original gterm. This isn't introduced by the merge, it work= s > with your version too. If you can't reproduce it, I will try to debug i= t > myself. I've tracked down the bug. It seems ash(plain sh) does not initiate tab s= tops=20 on start so we should reset tab stops in GTerm::reset() 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=3D0; i<height; i++) linenumbers[i] =3D i; memset(tab_stops, 0, width); + for (i=3D0; i<width;++i) + if ((i + 1) % 8 =3D=3D0) + tab_stops[i] =3D 1; current_state =3D GTerm::normal_state; =20 clear_mode_flag(NOEOLWRAP | CURSORAPPMODE | CURSORRELATIVE | --=20 Sincerely yours, Zhang Le |