- Subject: Re: Half-baked initialization for TERM=linuxfoo
- From: Pavel Roskin <proski@xxxxxxx>
- Date: Thu, 5 Jul 2001 14:09:00 -0400 (EDT)
Hi, John!
> >For some obscure reason SLtt_initialize() accepts any terminal names
> >beginning with "linux", "xterm", "rxvt", "Eterm" and in some cases "vt"
> >_regardless_ of whether _SLtt_tigetent() succeeded or not.
>
> It uses this information for defaults when it cannot find the
> appropriate terminal entry.
I understand that. I'm not against workarounds in general, but in this
case, hiding the problem is not really helpful IMHO.
> >What is worse, if _SLtt_tigetent() fails only some minimal initialization
> >is performed. Notably, SLtt_get_screen_size() doesn't get called, which
>
> Anything else? It is easy to add the call to SLtt_get_screen_size to
> sldisply.c. A work around until then would be to add it to the mc
> code before calling SLtt_initialize.
Quite a lot. It's a long chunk of code from the first "return 0;" in
SLtt_initialize() to the end of the function:
Termcap_Initalized is not set.
SLtt_Has_Alt_Charset is not set.
get_color_info() is not called.
Many other variables are not set (Cls_Str, Curs_Pos_Str,
Visible_Bell_Str, Curs_Up_Str, Rev_Scroll_Str, Del_N_Lines_Str,
Add_N_Lines_Str, Term_Init_Str, Term_Reset_Str ... to name a few).
> >I actually don't like the idea of adding SLtt_get_screen_size() for the
> >case when _SLtt_tigetent() fails but S-Lang "knows" the terminal. There is
> >still a lot of code skipped. MC is still pretty useless after such "half
> >baked" initialization, since the cursor movement keys don't work. Next
> >version of MC will abort if the screen size has not been set.
>
> Do the cursor keys not work because SLtt_get_screen_size was not
> called?
No. I put it and they still don't work. Most likely the reason is that
Termcap_Initalized remains 0.
--
Regards,
Pavel Roskin
[2001 date index]
[2001 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]