From: Vladimir E. <vo...@vo...> - 2012-10-30 08:45:13
|
Hello, I have been rxvt-uninode user for quite a while, but recently I've decided to move to mlterm. While rxvt eats memory like crazy, mlterm in the same situation uses 10 times less ;-). It's always takes a while to make initial configuration, so the same story with mlterm. It works perfectly fine but I have a few questions regarding adjusting some configuration parameters, so below they are: - Home/End keys and well as some Ctrl+Fx keys aren't working (I've tried to adjust termcap, but can't find the proper key codes) - While pseudo graphic characters displayed properly it the plain terminal, they don't work as expected in tmux/screen - How to make 265 colors working properly? I've adjusted the colors file, so it includes all the colorXXX=#XXXXXX lines and tried to use TERM with mlterm-256colors/xterm-256colors, but unsuccessfully... I'd appreciate any help or links to the useful info about the configuration questions above. Regards, Vlad. |
From: Araki K. <ara...@us...> - 2012-11-01 22:36:28
|
Hi, From: Vladimir Elisseev <vo...@vo...> Subject: [Mlterm-dev-en] few question regarding mlterm initial configuration Date: Tue, 30 Oct 2012 09:25:20 +0100 Message-ID: <135...@vo....home> > - Home/End keys and well as some Ctrl+Fx keys aren't working (I've tried > to adjust termcap, but can't find the proper key codes) If the value of TERM environmental variable is xterm and infocmp returns as follows $ infocmp xterm | grep khome khome = \EOH , how about adding a following option to ~/.mlterm/termcap ? xterm:\ kh=\EOH Control+F1 ... Control+F4 combinations are assigned to shortcut keys by default. If you want to disable these short cut keys, add following lines to ~/.mlterm/key. Control+F1=UNUSED Control+F2=UNUSED Control+F3=UNUSED Control+F4=UNUSED > - While pseudo graphic characters displayed properly it the plain > terminal, they don't work as expected in tmux/screen Does it work on xterm with tmux/screen ? I think tmux doesn't deal with graphic characters correctly. > - How to make 265 colors working properly? I've adjusted the colors > file, so it includes all the colorXXX=#XXXXXX lines and tried to use > TERM with mlterm-256colors/xterm-256colors, but unsuccessfully... 256 colors are supprted without any configuration of ~/.mlterm/color. Does http://frexx.de/xterm-256-notes/data/256colors2.pl work ? BTW, does "xterm-256colors" exist in terminfo ? (Whether it exists or not can be tested by "infocmp xterm-256colors".) How about using TERM with "xterm-256color" ? Regards, --- Araki Ken ara...@us... |
From: Vladimir E. <vo...@vo...> - 2012-11-02 05:28:42
|
Araki, Thanks for your replay as it's hard to find information in English regarding mlterm. See my comments in-line below. Regards, Vlad. On Fri, 2012-11-02 at 06:58 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Tue, 30 Oct 2012 09:25:20 +0100 > Message-ID: <135...@vo....home> > > > - Home/End keys and well as some Ctrl+Fx keys aren't working (I've tried > > to adjust termcap, but can't find the proper key codes) > > If the value of TERM environmental variable is xterm and infocmp returns > as follows > > $ infocmp xterm | grep khome > khome = \EOH > > , how about adding a following option to ~/.mlterm/termcap ? > > xterm:\ > kh=\EOH > Initially I've user TERM=mlterm-256color where Home/End keys waren't working, but if I use TERM=rxvt-unicode-256color, at least Home/End keys are working properly. Nevertheless, I don't understand why (khome is the same for both terminals): infocmp rxvt-unicode-256color | grep home home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, infocmp mlterm-256color | grep home enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, khome=\E[7~, kich1=\E[2~, kind=\E[a, kmous=\E[M, knp=\E[6~, > Control+F1 ... Control+F4 combinations are assigned to shortcut keys > by default. > If you want to disable these short cut keys, add following lines to > ~/.mlterm/key. > > Control+F1=UNUSED > Control+F2=UNUSED > Control+F3=UNUSED > Control+F4=UNUSED > This was exactly the reason! I didn't try to reassign these keys, but when I've tried to open new tty using corresponding key combination it doesn't work. > > - While pseudo graphic characters displayed properly it the plain > > terminal, they don't work as expected in tmux/screen > > Does it work on xterm with tmux/screen ? > I think tmux doesn't deal with graphic characters correctly. > As I mentioned already, I've been using rxvt and pseudo graphics works fine there with tmux/screen. > > - How to make 265 colors working properly? I've adjusted the colors > > file, so it includes all the colorXXX=#XXXXXX lines and tried to use > > TERM with mlterm-256colors/xterm-256colors, but unsuccessfully... > > 256 colors are supprted without any configuration of ~/.mlterm/color. > Does http://frexx.de/xterm-256-notes/data/256colors2.pl work ? > This script works perfectly fine. While base color definitions in ~/.mlterm/color works fine, if I define additional colors there like "color25=#005faf" they are not picked up. > BTW, does "xterm-256colors" exist in terminfo ? > (Whether it exists or not can be tested by "infocmp xterm-256colors".) > > How about using TERM with "xterm-256color" ? > > Regards, > --- > Araki Ken > ara...@us... |
From: Vladimir E. <vo...@vo...> - 2012-11-10 08:02:56
|
Thanks for your answer! See my comments in-line below. Regards, Vlad. On Sat, 2012-11-10 at 06:36 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Fri, 02 Nov 2012 06:28:33 +0100 > Message-ID: <135...@vo....home> > > > Initially I've user TERM=mlterm-256color where Home/End keys waren't > > working, but if I use TERM=rxvt-unicode-256color, at least Home/End keys > > are working properly. Nevertheless, I don't understand why (khome is the > > same for both terminals): > > > > infocmp rxvt-unicode-256color | grep home > > home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, > > kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, > > > > infocmp mlterm-256color | grep home > > enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, > > khome=\E[7~, kich1=\E[2~, kind=\E[a, kmous=\E[M, knp=\E[6~, > > I'm sorry but I can't understand why Home/End keys work in > TERM=rxvt-unicode-256color and doesn't work in TERM=mlterm-256color. > > Do you use Home/End keys in the shell (bash ? zsh?) or some > other applications ? Home/End keys work fine in bash/sh with TERM=mlterm-256color, for zsh I had fix for rxvt already, so I have to add similar for mlterm: case $TERM in (rxvt*) bindkey '^[[7~' beginning-of-line bindkey '^[[8~' end-of-line esac case $TERM in (mlterm*) bindkey '^[OH' beginning-of-line bindkey '^[OF' end-of-line esac > BTW, khome=\E7~ in "mlterm-256color" terminfo is wrong. > mlterm outputs \EOH for khome by default. > This doesn't seem to be the reason why Home/End keys doesn't work, though. > > > > > - While pseudo graphic characters displayed properly it the plain > > > > terminal, they don't work as expected in tmux/screen > > > > > > Does it work on xterm with tmux/screen ? > > > I think tmux doesn't deal with graphic characters correctly. > > > > > As I mentioned already, I've been using rxvt and pseudo graphics works > > fine there with tmux/screen. > > Will you show me the screenshot of pseudo graphic characters which > don't work as expected ? see https://www.vovan.nl/files/mlterm_tmux.png Note the bluish vertical lines, without tmux/screen they are white. > (Is something like "qqqq" shown ? Or are lines drawn in incorrect positions ?) > > Then please tell me the version numbers of rxvt/tmux/screen, screen - 4.00.03 tmux - 1.7 > and what is shown if you start mlterm without any configuration as follows. > > $ mlterm -type xcore -km utf8 -ac 1 -e tmux -c "dialog --msgbox test 5 10" the above works fine, but with non-antialiased font Terminus. > > > > > - How to make 265 colors working properly? I've adjusted the colors > > > > file, so it includes all the colorXXX=#XXXXXX lines and tried to use > > > > TERM with mlterm-256colors/xterm-256colors, but unsuccessfully... > > > > > > 256 colors are supprted without any configuration of ~/.mlterm/color. > > > Does http://frexx.de/xterm-256-notes/data/256colors2.pl work ? > > > > > This script works perfectly fine. While base color definitions in > > ~/.mlterm/color works fine, if I define additional colors there like > > "color25=#005faf" they are not picked up. > > If you want to define 256 colors manually, define ~/.mlterm/color as follows. > > 25 = #005faf Thanks for this. This is not clear from the manual page of mlterm what is the right names of colors. Though now all colors work they are a bit different then in urxvt. > > Regards, > --- > Araki Ken > ara...@us... |
From: Vladimir E. <vo...@vo...> - 2012-11-11 08:38:00
|
Just compiled mlterm with your patch applied. However the pseudo graphics characters look exactly the same. Regards, Vlad. On Sun, 2012-11-11 at 17:17 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Sat, 10 Nov 2012 09:02:48 +0100 > Message-ID: <135...@vo....home> > > > > > > > - While pseudo graphic characters displayed properly it the plain > > > > > > terminal, they don't work as expected in tmux/screen > > > > > > > > > > Does it work on xterm with tmux/screen ? > > > > > I think tmux doesn't deal with graphic characters correctly. > > > > > > > > > As I mentioned already, I've been using rxvt and pseudo graphics works > > > > fine there with tmux/screen. > > > > > > Will you show me the screenshot of pseudo graphic characters which > > > don't work as expected ? > > > > see https://www.vovan.nl/files/mlterm_tmux.png > > Note the bluish vertical lines, without tmux/screen they are white. > > > > > (Is something like "qqqq" shown ? Or are lines drawn in incorrect positions ?) > > > > > > Then please tell me the version numbers of rxvt/tmux/screen, > > > > screen - 4.00.03 > > tmux - 1.7 > > > > > and what is shown if you start mlterm without any configuration as follows. > > > > > > $ mlterm -type xcore -km utf8 -ac 1 -e tmux -c "dialog --msgbox test 5 10" > > > > the above works fine, but with non-antialiased font Terminus. > > I think this is because the unicode font you use doesn't contain line > drawing characters (U+2500 etc). > > I attached a patch to improve such a situation. > Apply this patch to mlterm-3.1.5 and start mlterm with -Y option. > > Regards, > --- > Araki Ken > ara...@us... > plain text document attachment (mlterm-3.1.5post-fixdecspecial.patch) > diff -r 689d086828ac main/main_loop.c > --- a/main/main_loop.c Tue Nov 06 20:30:18 2012 +0900 > +++ b/main/main_loop.c Sun Nov 11 13:56:28 2012 +0900 > @@ -279,6 +279,7 @@ > { > if( strcmp( value , "true") == 0) > { > + ml_use_dec_special_font() ; > x_compose_dec_special_font() ; > } > } > diff -r 689d086828ac mlterm/ml_vt100_parser.c > --- a/mlterm/ml_vt100_parser.c Tue Nov 06 20:30:18 2012 +0900 > +++ b/mlterm/ml_vt100_parser.c Sun Nov 11 13:56:28 2012 +0900 > @@ -87,9 +87,14 @@ > #endif > > > +/* --- static variables --- */ > + > +static int use_dec_special_font ; > + > + > /* --- static functions --- */ > > -/* XXX This function should be move to kiklib */ > +/* XXX This function should be moved to kiklib */ > static void > str_replace( > char * str , > @@ -108,6 +113,88 @@ > } > } > > +/* XXX This function should be moved to mkf */ > +u_char > +convert_ucs_to_dec_special( > + u_int16_t ucs > + ) > +{ > + static struct > + { > + u_int16_t ucs ; > + u_char decsp ; > + > + } ucs_to_decsp_table[] = > + { > + /* Not line characters */ > + #if 0 > + { 0xa3 , '}' } , > + { 0xb0 , 'f' } , > + { 0xb1 , 'g' } , > + { 0xb7 , '~' } , > + { 0x3c0 , '{' } , > + { 0x2260 , '|' } , > + { 0x2264 , 'y' } , > + { 0x2265 , 'z' } , > + #endif > + > + /* Line characters */ > + { 0x23ba , 'o' } , > + { 0x23bb , 'p' } , > + { 0x23bc , 'r' } , > + { 0x23bd , 's' } , > + { 0x2500 , 'q' } , > + { 0x2502 , 'x' } , > + { 0x250c , 'l' } , > + { 0x2510 , 'k' } , > + { 0x2514 , 'm' } , > + { 0x2518 , 'j' } , > + { 0x251c , 't' } , > + { 0x2524 , 'u' } , > + { 0x252c , 'w' } , > + { 0x2534 , 'v' } , > + { 0x253c , 'n' } , > + > + { 0x2592 , 'a' } , > + { 0x25c6 , '`' } , > + } ; > + int l_idx ; > + int h_idx ; > + int idx ; > + > + l_idx = 0 ; > + h_idx = sizeof(ucs_to_decsp_table) / sizeof(ucs_to_decsp_table[0]) - 1 ; > + > + if( ucs < ucs_to_decsp_table[l_idx].ucs || > + ucs_to_decsp_table[h_idx].ucs < ucs) > + { > + return 0 ; > + } > + > + while( 1) > + { > + idx = (l_idx + h_idx) / 2 ; > + > + if( ucs == ucs_to_decsp_table[idx].ucs) > + { > + return ucs_to_decsp_table[idx].decsp ; > + } > + else if( ucs < ucs_to_decsp_table[idx].ucs) > + { > + h_idx = idx ; > + } > + else > + { > + l_idx = idx + 1 ; > + } > + > + if( l_idx >= h_idx) > + { > + return 0 ; > + } > + } > +} > + > static void > start_vt100_cmd( > ml_vt100_parser_t * vt100_parser , > @@ -3929,6 +4016,8 @@ > */ > if( ch.cs == ISO10646_UCS4_1) > { > + u_char decsp ; > + > if( ch.ch[0] == 0x00 && ch.ch[1] == 0x00 && > ch.ch[2] == 0x00 && ch.ch[3] <= 0x7f > ) > @@ -3938,6 +4027,14 @@ > ch.size = 1 ; > ch.cs = US_ASCII ; > } > + else if( use_dec_special_font && > + ( decsp = convert_ucs_to_dec_special( > + mkf_bytes_to_int( ch.ch , ch.size)))) > + { > + ch.ch[0] = decsp ; > + ch.size = 1 ; > + ch.cs = DEC_SPECIAL ; > + } > else if( vt100_parser->unicode_policy & NOT_USE_UNICODE_FONT) > { > /* convert ucs4 to appropriate charset */ > @@ -4209,6 +4306,14 @@ > > /* --- global functions --- */ > > +int > +ml_use_dec_special_font(void) > +{ > + use_dec_special_font = 1 ; > + > + return 1 ; > +} > + > ml_vt100_parser_t * > ml_vt100_parser_new( > ml_screen_t * screen , |
From: Vladimir E. <vo...@vo...> - 2012-11-11 11:30:16
|
Since I'm using Xft I thought that this option is on by default. At least that's what man says: -Y, --decsp(=bool) Use dynamically composed line drawing character set. This overrides DEC_SPECIAL in "font" configuration file. The default is false. This option is automatically turned on when Xft or cairo is used. Nevertheless, with -Y option all the lines are displayed correctly, thanks! Do I still your patch applied? Regards, Vlad. On Sun, 2012-11-11 at 17:26 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Sun, 11 Nov 2012 09:37:53 +0100 > Message-ID: <135...@vo....home> > > > Just compiled mlterm with your patch applied. However the pseudo > > graphics characters look exactly the same. > > Hmm, is -Y option specified in starting mlterm ? > --- > Araki Ken > ara...@us... |
From: Araki K. <ara...@us...> - 2012-11-12 11:49:55
|
Hi, From: Vladimir Elisseev <vo...@vo...> Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration Date: Sun, 11 Nov 2012 12:30:08 +0100 Message-ID: <135...@vo....home> > Since I'm using Xft I thought that this option is on by default. At > least that's what man says: > -Y, --decsp(=bool) > Use dynamically composed line drawing character set. This overrides DEC_SPECIAL in "font" configuration file. The default is false. This > option is automatically turned on when Xft or cairo is used. > > Nevertheless, with -Y option all the lines are displayed correctly, thanks! Do I still your patch applied? My explanation is not enough, sorry. The patch I posted changes the behavior of -Y option (to avoid to add a new option), so it is necessary to specify -Y in starting mlterm after the patch is applied. (The manual page has been already changed in hg head.) This problem happens as follows. Console application -> (0x71[HORIZONTAL LINE] of DEC SPECIAL) -> tmux -> (U+2500 of Unicode which tmux converts 0x71 to) -> mlterm -> If the glyph for U+2500 doesn't exist in the unicode font mlterm loads, the line drawing character isn't shown correctly. Now if you specify -Y option explicitly, unicode line drawing characters (U+2500 etc) are converted to line drawing characters of DEC Special characters, not only drawn by dynamically composed glyphs. Console application -> (0x71[HORIZONTAL LINE] of DEC SPECIAL) -> tmux -> (U+2500 of Unicode which tmux converts 0x71 to) -> mlterm -Y -> (0x71 of DEC SPECIAL which mlterm converts U+2500 to) -> The line drawing character is correctly shown. --- Araki Ken ara...@us... |
From: Vladimir E. <vo...@vo...> - 2012-11-12 16:10:37
|
Thanks for the explanation and, of course, for your help! Regards, Vladimir. On Mon, 2012-11-12 at 20:49 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Sun, 11 Nov 2012 12:30:08 +0100 > Message-ID: <135...@vo....home> > > > Since I'm using Xft I thought that this option is on by default. At > > least that's what man says: > > -Y, --decsp(=bool) > > Use dynamically composed line drawing character set. This overrides DEC_SPECIAL in "font" configuration file. The default is false. This > > option is automatically turned on when Xft or cairo is used. > > > > Nevertheless, with -Y option all the lines are displayed correctly, thanks! Do I still your patch applied? > > My explanation is not enough, sorry. > > The patch I posted changes the behavior of -Y option (to avoid to add > a new option), so it is necessary to specify -Y in starting mlterm after > the patch is applied. > (The manual page has been already changed in hg head.) > > This problem happens as follows. > > Console application -> (0x71[HORIZONTAL LINE] of DEC SPECIAL) > -> tmux -> (U+2500 of Unicode which tmux converts 0x71 to) > -> mlterm > -> If the glyph for U+2500 doesn't exist in the unicode font mlterm > loads, the line drawing character isn't shown correctly. > > Now if you specify -Y option explicitly, unicode line drawing characters > (U+2500 etc) are converted to line drawing characters of DEC Special > characters, not only drawn by dynamically composed glyphs. > > Console application -> (0x71[HORIZONTAL LINE] of DEC SPECIAL) > -> tmux -> (U+2500 of Unicode which tmux converts 0x71 to) > -> mlterm -Y -> (0x71 of DEC SPECIAL which mlterm converts U+2500 to) > -> The line drawing character is correctly shown. > > --- > Araki Ken > ara...@us... |
From: Araki K. <ara...@us...> - 2012-11-11 09:57:09
|
Hi, From: Vladimir Elisseev <vo...@vo...> Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration Date: Sun, 11 Nov 2012 09:37:53 +0100 Message-ID: <135...@vo....home> > Just compiled mlterm with your patch applied. However the pseudo > graphics characters look exactly the same. Hmm, is -Y option specified in starting mlterm ? --- Araki Ken ara...@us... |
From: Araki K. <ara...@us...> - 2012-11-11 08:17:15
Attachments:
mlterm-3.1.5post-fixdecspecial.patch
|
Hi, From: Vladimir Elisseev <vo...@vo...> Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration Date: Sat, 10 Nov 2012 09:02:48 +0100 Message-ID: <135...@vo....home> > > > > > - While pseudo graphic characters displayed properly it the plain > > > > > terminal, they don't work as expected in tmux/screen > > > > > > > > Does it work on xterm with tmux/screen ? > > > > I think tmux doesn't deal with graphic characters correctly. > > > > > > > As I mentioned already, I've been using rxvt and pseudo graphics works > > > fine there with tmux/screen. > > > > Will you show me the screenshot of pseudo graphic characters which > > don't work as expected ? > > see https://www.vovan.nl/files/mlterm_tmux.png > Note the bluish vertical lines, without tmux/screen they are white. > > > (Is something like "qqqq" shown ? Or are lines drawn in incorrect positions ?) > > > > Then please tell me the version numbers of rxvt/tmux/screen, > > screen - 4.00.03 > tmux - 1.7 > > > and what is shown if you start mlterm without any configuration as follows. > > > > $ mlterm -type xcore -km utf8 -ac 1 -e tmux -c "dialog --msgbox test 5 10" > > the above works fine, but with non-antialiased font Terminus. I think this is because the unicode font you use doesn't contain line drawing characters (U+2500 etc). I attached a patch to improve such a situation. Apply this patch to mlterm-3.1.5 and start mlterm with -Y option. Regards, --- Araki Ken ara...@us... |
From: Vladimir E. <vo...@vo...> - 2012-11-11 08:28:59
|
Thanks! I'll try the patch, but I still can't understand why the same font draws lines properly without screen/tmux? Vlad. On Sun, 2012-11-11 at 17:17 +0900, Araki Ken wrote: > Hi, > > From: Vladimir Elisseev <vo...@vo...> > Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration > Date: Sat, 10 Nov 2012 09:02:48 +0100 > Message-ID: <135...@vo....home> > > > > > > > - While pseudo graphic characters displayed properly it the plain > > > > > > terminal, they don't work as expected in tmux/screen > > > > > > > > > > Does it work on xterm with tmux/screen ? > > > > > I think tmux doesn't deal with graphic characters correctly. > > > > > > > > > As I mentioned already, I've been using rxvt and pseudo graphics works > > > > fine there with tmux/screen. > > > > > > Will you show me the screenshot of pseudo graphic characters which > > > don't work as expected ? > > > > see https://www.vovan.nl/files/mlterm_tmux.png > > Note the bluish vertical lines, without tmux/screen they are white. > > > > > (Is something like "qqqq" shown ? Or are lines drawn in incorrect positions ?) > > > > > > Then please tell me the version numbers of rxvt/tmux/screen, > > > > screen - 4.00.03 > > tmux - 1.7 > > > > > and what is shown if you start mlterm without any configuration as follows. > > > > > > $ mlterm -type xcore -km utf8 -ac 1 -e tmux -c "dialog --msgbox test 5 10" > > > > the above works fine, but with non-antialiased font Terminus. > > I think this is because the unicode font you use doesn't contain line > drawing characters (U+2500 etc). > > I attached a patch to improve such a situation. > Apply this patch to mlterm-3.1.5 and start mlterm with -Y option. > > Regards, > --- > Araki Ken > ara...@us... > plain text document attachment (mlterm-3.1.5post-fixdecspecial.patch) > diff -r 689d086828ac main/main_loop.c > --- a/main/main_loop.c Tue Nov 06 20:30:18 2012 +0900 > +++ b/main/main_loop.c Sun Nov 11 13:56:28 2012 +0900 > @@ -279,6 +279,7 @@ > { > if( strcmp( value , "true") == 0) > { > + ml_use_dec_special_font() ; > x_compose_dec_special_font() ; > } > } > diff -r 689d086828ac mlterm/ml_vt100_parser.c > --- a/mlterm/ml_vt100_parser.c Tue Nov 06 20:30:18 2012 +0900 > +++ b/mlterm/ml_vt100_parser.c Sun Nov 11 13:56:28 2012 +0900 > @@ -87,9 +87,14 @@ > #endif > > > +/* --- static variables --- */ > + > +static int use_dec_special_font ; > + > + > /* --- static functions --- */ > > -/* XXX This function should be move to kiklib */ > +/* XXX This function should be moved to kiklib */ > static void > str_replace( > char * str , > @@ -108,6 +113,88 @@ > } > } > > +/* XXX This function should be moved to mkf */ > +u_char > +convert_ucs_to_dec_special( > + u_int16_t ucs > + ) > +{ > + static struct > + { > + u_int16_t ucs ; > + u_char decsp ; > + > + } ucs_to_decsp_table[] = > + { > + /* Not line characters */ > + #if 0 > + { 0xa3 , '}' } , > + { 0xb0 , 'f' } , > + { 0xb1 , 'g' } , > + { 0xb7 , '~' } , > + { 0x3c0 , '{' } , > + { 0x2260 , '|' } , > + { 0x2264 , 'y' } , > + { 0x2265 , 'z' } , > + #endif > + > + /* Line characters */ > + { 0x23ba , 'o' } , > + { 0x23bb , 'p' } , > + { 0x23bc , 'r' } , > + { 0x23bd , 's' } , > + { 0x2500 , 'q' } , > + { 0x2502 , 'x' } , > + { 0x250c , 'l' } , > + { 0x2510 , 'k' } , > + { 0x2514 , 'm' } , > + { 0x2518 , 'j' } , > + { 0x251c , 't' } , > + { 0x2524 , 'u' } , > + { 0x252c , 'w' } , > + { 0x2534 , 'v' } , > + { 0x253c , 'n' } , > + > + { 0x2592 , 'a' } , > + { 0x25c6 , '`' } , > + } ; > + int l_idx ; > + int h_idx ; > + int idx ; > + > + l_idx = 0 ; > + h_idx = sizeof(ucs_to_decsp_table) / sizeof(ucs_to_decsp_table[0]) - 1 ; > + > + if( ucs < ucs_to_decsp_table[l_idx].ucs || > + ucs_to_decsp_table[h_idx].ucs < ucs) > + { > + return 0 ; > + } > + > + while( 1) > + { > + idx = (l_idx + h_idx) / 2 ; > + > + if( ucs == ucs_to_decsp_table[idx].ucs) > + { > + return ucs_to_decsp_table[idx].decsp ; > + } > + else if( ucs < ucs_to_decsp_table[idx].ucs) > + { > + h_idx = idx ; > + } > + else > + { > + l_idx = idx + 1 ; > + } > + > + if( l_idx >= h_idx) > + { > + return 0 ; > + } > + } > +} > + > static void > start_vt100_cmd( > ml_vt100_parser_t * vt100_parser , > @@ -3929,6 +4016,8 @@ > */ > if( ch.cs == ISO10646_UCS4_1) > { > + u_char decsp ; > + > if( ch.ch[0] == 0x00 && ch.ch[1] == 0x00 && > ch.ch[2] == 0x00 && ch.ch[3] <= 0x7f > ) > @@ -3938,6 +4027,14 @@ > ch.size = 1 ; > ch.cs = US_ASCII ; > } > + else if( use_dec_special_font && > + ( decsp = convert_ucs_to_dec_special( > + mkf_bytes_to_int( ch.ch , ch.size)))) > + { > + ch.ch[0] = decsp ; > + ch.size = 1 ; > + ch.cs = DEC_SPECIAL ; > + } > else if( vt100_parser->unicode_policy & NOT_USE_UNICODE_FONT) > { > /* convert ucs4 to appropriate charset */ > @@ -4209,6 +4306,14 @@ > > /* --- global functions --- */ > > +int > +ml_use_dec_special_font(void) > +{ > + use_dec_special_font = 1 ; > + > + return 1 ; > +} > + > ml_vt100_parser_t * > ml_vt100_parser_new( > ml_screen_t * screen , |
From: Araki K. <ara...@us...> - 2012-11-09 21:36:10
|
Hi, From: Vladimir Elisseev <vo...@vo...> Subject: Re: [Mlterm-dev-en] few question regarding mlterm initial configuration Date: Fri, 02 Nov 2012 06:28:33 +0100 Message-ID: <135...@vo....home> > Initially I've user TERM=mlterm-256color where Home/End keys waren't > working, but if I use TERM=rxvt-unicode-256color, at least Home/End keys > are working properly. Nevertheless, I don't understand why (khome is the > same for both terminals): > > infocmp rxvt-unicode-256color | grep home > home=\E[H, hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@, > kf8=\E[19~, kf9=\E[20~, kfnd=\E[1~, khome=\E[7~, > > infocmp mlterm-256color | grep home > enacs=\E(B\E)0, flash=\E[?5h\E[?5l, home=\E[H, > khome=\E[7~, kich1=\E[2~, kind=\E[a, kmous=\E[M, knp=\E[6~, I'm sorry but I can't understand why Home/End keys work in TERM=rxvt-unicode-256color and doesn't work in TERM=mlterm-256color. Do you use Home/End keys in the shell (bash ? zsh?) or some other applications ? BTW, khome=\E7~ in "mlterm-256color" terminfo is wrong. mlterm outputs \EOH for khome by default. This doesn't seem to be the reason why Home/End keys doesn't work, though. > > > - While pseudo graphic characters displayed properly it the plain > > > terminal, they don't work as expected in tmux/screen > > > > Does it work on xterm with tmux/screen ? > > I think tmux doesn't deal with graphic characters correctly. > > > As I mentioned already, I've been using rxvt and pseudo graphics works > fine there with tmux/screen. Will you show me the screenshot of pseudo graphic characters which don't work as expected ? (Is something like "qqqq" shown ? Or are lines drawn in incorrect positions ?) Then please tell me the version numbers of rxvt/tmux/screen, and what is shown if you start mlterm without any configuration as follows. $ mlterm -type xcore -km utf8 -ac 1 -e tmux -c "dialog --msgbox test 5 10" > > > - How to make 265 colors working properly? I've adjusted the colors > > > file, so it includes all the colorXXX=#XXXXXX lines and tried to use > > > TERM with mlterm-256colors/xterm-256colors, but unsuccessfully... > > > > 256 colors are supprted without any configuration of ~/.mlterm/color. > > Does http://frexx.de/xterm-256-notes/data/256colors2.pl work ? > > > This script works perfectly fine. While base color definitions in > ~/.mlterm/color works fine, if I define additional colors there like > "color25=#005faf" they are not picked up. If you want to define 256 colors manually, define ~/.mlterm/color as follows. 25 = #005faf Regards, --- Araki Ken ara...@us... |