bugGNU Screen - Bugs: bug #55482, TERMCAP can break on systems that...

 
 

bug #55482: TERMCAP can break on systems that don't support terminfo

Submitted by:  Scott Shambarger <sshambar>
Submitted on:  Tue 15 Jan 2019 10:33:20 PM UTC
Votes:  10  
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.6.2
Fixed Release:  4.8.0 Planned Release:  4.8.0
Work Required:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       No canned response available

 

Tue 15 Feb 2022 07:05:10 PM UTC, comment #1: 
Alexander Naumov <anaumov>
Project Administrator
Tue 15 Jan 2019 10:33:20 PM UTC, original submission:  

I'm using TERM=xterm-256color on OSX, and the TERMCAP screen creates is too large for the "compatibility" mode for many of the command line tools (such as ls, man etc), eg error:

/bin/ls
"TERMCAP", line 20, col 1, terminal 'SC': Missing separator
(ls output then shown)

I can create a ~/.terminfo entry (providing I use OSX /usr/bin/tic, not a newer ncurses6 one), but it's clear the TERMCAP entry is not functioning -- the newer .terminfo entry also forces all my new apps to lose some functionality (eg, color-pairs limited to 32767, since ncurses5 uses signed short int)

man tic (and tic.h) declares 1023 as the maximum TERMCAP size (tic on  GNU/Linux does the same), and the TERMCAP screen generates is much larger (1325 in the case of screen.xterm-256color).

I worked a bit with the screen source, and figured that I could get the TERMCAP to fit well if I excluded some extra keys (shifted function keys etc).  In the process, I created a patch which limits TERMCAP_BUFSIZE to 1023 (it can still be configured at build), and creates an "unwrapped" TERMCAP w/o the vt220 extra keys (saving space), but still include the navigation keys etc.  (if BUFSIZE is set larger, all keys are included).

I also have AddCap silently ignore any caps that push the TERMCAP past the limit, rather than Panicing.

To support the termcap dump, I created a function DumpTermcap that writes a wrapped/indented copy to the .termcap file.

I've tried this out, and it works great on my Mac, and still allows modern apps (eg emacs) to use the full capabilities of ncurses6 terminfo.

I'll attach the patch.

Scott Shambarger <sshambar>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by anaumov (Posted a comment)
  • -email is unavailable- added by soliton (Voted in favor of this item)
  • -email is unavailable- added by sshambar (Submitted the item)
  • -email is unavailable- added by sshambar
  •  

    There are 10 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-02-15 anaumov StatusNone => Fixed
        Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.8.0
        Planned ReleaseNone => 4.8.0
    2021-07-27 soliton Carbon-Copy- => Added soliton
    2019-01-15 sshambar Attached File- => Added 0001-Create-TERMCAP-entries-limited-to-1023-bytes-by-defa.patch, #45981
        Carbon-Copy- => Added sshambar

    Back to the top


    Powered by Savane 3.9