[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

interix termcap and terminfo



Dear Martin Köppe,

Thomas E. Dickey sent me the following when I asked if he might explain the details of what the /usr/share/termcap and /usr/share/terminfo.src patches fix; maybe you also have some input as you might be more familiar with SFU/SUA Interix.

Sincerely,
Eric Lindblad

--------------------------------------------
On Fri, 2/3/17, Thomas Dickey < ... > wrote:
Subject: Re: question about patches (old)
To: "Eric Lindblad" < ... >
Date: Friday, February 3, 2017, 12:29 AM

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Building_on_Windows_with_SFU_(Interix)

--- termcap
+++ termcap
@@ -50,9 +50,9 @@
     :k0=\EFA:k1=\EF1:k2=\EF2:k3=\EF3:k4=\EF4:k5=\EF5:\
     :k6=\EF6:k7=\EF7:k8=\EF8:k9=\EF9:kB=\E[Z:\
-    :kN=\E[T:kP=\E[S:kU=\E[U:kb=^H:kd=\E[B:kD=\E[M:kH=\E[U:kI=\E[L:\
+    :kN=\E[T:kP=\E[S:kH=\E[U:kb=^H:kd=\E[B:kD=\177:kh=\E[H:kI=\E[L:\
     :kl=\E[D:kr=\E[C:ku=\E[A:\
     :le=^H:LE=\E[%dD:ll=\E[U:md=\E[1m:me=\E[0m:mr=\E[7m:\
-    :nd=\E[C:nw=\r\n:rc=\E[u:RI=\E%dC:rs=\Ec:\
-    :sc=\E[s:se=\E[m:sf=\E[S:SF=\E[%S:so=\E[1m:sr=\E[T:SR=\E%dT:\
+    :nd=\E[C:nw=\r\n:rc=\E[u:RI=\E[%dC:rs=\Ec:\
+    :sc=\E[s:se=\E[m:sf=\E[S:SF=\E[%dS:so=\E[1m:sr=\E[T:SR=\E%dT:\
     :ta=^I:te=\E[2b\E[u\r\E[K:ti=\E[s\E[1b:\
     :ue=\E[m:up=\E[A:UP=\E[%dA:us=\E[4m:

The termcap patch is changing the delete-character key, apparently
someone confusing it with the backspace key:

       key_dc                        kdch1      kD        delete-character key

       key_backspace                 kbs        kb        backspace key

That's not the way it's conventionally assigned.  Whether backspace is \177
or ^H depends mostly on whether the developer prefers Linux to other platforms.

The changes to RI and SF are okay (the "%d" is the parameter):

       parm_index                    indn       SF        scroll forward #1
                                                          lines (P)
       parm_right_cursor             cuf        RI        move #1 characters
                                                          to the right (P*)

It misses a similar change for SR (there should be a '[' after each occurence
of \E in the control sequences - not the function keys beginning with 'k').

The terminfo changes make the same modification of the delete-character
key, as well as adding definitions for the home and insert keys.  In
the latter I have the insert-key in ncurses, but no definition for a home
key.  It might be correct - might not (might be cut/paste).  On most
PC-keyboards, home/end are on the editing keypad and often are \E[H (or
\EOH) and \E[F (or \EOF).  It won't do any harm to keep that bit.

The terminfo's strings for indn and cuf look okay.  In ncurses I have

#    Reconstructed via infocmp from file: /usr/local/ncurses/share/terminfo/i/interix
interix|opennt|opennt-25|ntconsole|ntconsole-25|OpenNT-term compatible with color,
    am, bw, msgr,
    colors#8, cols#80, lines#25, ncv#3, pairs#64,
    acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,
    bel=^G, bold=\E[1m, cbt=\E[Z, clear=\E[2J, cub=\E[%p1%dD,
    cub1=\E[D, cud=\E[%p1%dB, cud1=^J, cuf=\E[%p1%dC,
    cuf1=\E[C, cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA,
    cuu1=\E[A, dl=\E[%p1%dM, dl1=\E[M, ed=\E[J, el=\E[K,
    home=\E[H, ht=^I, il=\E[%p1%dL, il1=\E[L, ind=\E[S,
    indn=\E[%p1%dS, kbs=^H, kcbt=\E[Z, kcub1=\E[D, kcud1=\E[B,
    kcuf1=\E[C, kcuu1=\E[A, kdch1=\E[M, kend=\E[U, kf0=\EFA,
    kf1=\EF1, kf10=\EFA, kf11=\EFB, kf12=\EFC, kf13=\EFD,
    kf14=\EFE, kf15=\EFF, kf16=\EFG, kf17=\EFH, kf18=\EFI,
    kf19=\EFJ, kf2=\EF2, kf20=\EFK, kf21=\EFL, kf22=\EFM,
    kf23=\EFN, kf24=\EFO, kf25=\EFP, kf26=\EFQ, kf27=\EFR,
    kf28=\EFS, kf29=\EFT, kf3=\EF3, kf30=\EFU, kf31=\EFV,
    kf32=\EFW, kf33=\EFX, kf34=\EFY, kf35=\EFZ, kf36=\EFa,
    kf37=\EFb, kf38=\EFc, kf39=\EFd, kf4=\EF4, kf40=\EFe,
    kf41=\EFf, kf42=\EFg, kf43=\EFh, kf44=\EFi, kf45=\EFj,
    kf46=\EFk, kf47=\EFm, kf48=\EFn, kf49=\EFo, kf5=\EF5,
    kf50=\EFp, kf51=\EFq, kf52=\EFr, kf53=\EFs, kf54=\EFt,
    kf55=\EFu, kf56=\EFv, kf57=\EFw, kf58=\EFx, kf59=\EFy,
    kf6=\EF6, kf60=\EFz, kf61=\EF+, kf62=\EF-, kf63=\EF^L,
    kf7=\EF7, kf8=\EF8, kf9=\EF9, kich1=\E[L, kll=\E[U, knp=\E[T,
    kpp=\E[S, ll=\E[U, nel=^M^J, op=\E[m, rc=\E[u, rev=\E[7m,
    ri=\E[T, rin=\E[%p1%dT, rmcup=\E[2b\E[u\r\E[K, rmso=\E[m,
    rmul=\E[m, rs1=\Ec, sc=\E[s, setab=\E[4%p1%dm,
    setaf=\E[3%p1%dm, setb=\E[%p1%'('%+%dm,
    setf=\E[%p1%{30}%+%dm, sgr0=\E[0m, smcup=\E[s\E[1b,
    smso=\E[7m, smul=\E[4m,


Reply to: