changeset 4609:cd94e0f04e87

termcap: embed cygwin terminal definition in library
author John W. Eaton <jwe@octave.org>
date Wed, 28 Feb 2018 11:27:28 -0500
parents dac40a0ff814
children 56a53d1315c0
files src/termcap-1-fixes.patch
diffstat 1 files changed, 51 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/termcap-1-fixes.patch	Wed Feb 28 11:01:19 2018 -0500
+++ b/src/termcap-1-fixes.patch	Wed Feb 28 11:27:28 2018 -0500
@@ -9,3 +9,54 @@
  	cd $(srcdir); for f in termcap.info*; \
  	do $(INSTALL_DATA) $$f $(infodir)/$$f; done
  
+
+Note that CE is missing from this entry because it causes
+trouble for Octave.  Instead of performing the action, it
+is echoed to the terminal window when Readline tputs it to
+the terminal.
+
+diff -uNr a/termcap.c b/termcap.c
+--- a/termcap.c	2002-02-25 12:59:21.000000000 -0500
++++ b/termcap.c	2018-02-28 11:11:16.340155579 -0500
+@@ -120,6 +120,32 @@
+ }
+ #endif /* not emacs */
+ 
++
++#define INTERNAL_TERMINAL \
++"cygwin:\
++	:am:bs:eo:mi:ms:ut:xn@:op=\E[39;49m:xo:\
++	:Co#8:co#80:it#8:li#25:pa#64:\
++	:&7=^Z:@7=\\E[4~:kh=\\E[1~:kH=\\E[4~:AB=\\E[4%dm:AF=\\E[3%dm:\
++	:AL=\\E[%dL:DC=\\E[%dP:DL=\\E[%dM:F1=\\E[23~:F2=\\E[24~:\
++	:F3=\\E[25~:F4=\\E[26~:F5=\\E[28~:F6=\\E[29~:F7=\\E[31~:\
++	:F8=\\E[32~:F9=\\E[33~:FA=\\E[34~:IC=\\E[%d@:K2=\\E[G:\
++	:Km=\\E[M:S2=\\E[11m:S3=\\E[10m:Sb=\\E[%+(m:Sf=\\E[%+^^m:\
++	:ac=`\004a\261f\370g\361h\260j\331k\277l\332m\300n\305o~q\304r\362s_t\303u\264v\301w\302x\263y\371z\372{\373|\374}\375~\376.\031-\030\054\021+^P0\333:\
++	:ae=\\E[10m:al=\\E[L:as=\\E[11m:bl=^G:cd=\\E[J:\
++	:cl=\\E[H\\E[J:cm=\\E[%i%d;%dH:cr=^M:cs=\\E[%i%d;%dr:\
++	:ct=\\E[3g:dc=\\E[P:dl=\\E[M:do=^J:ei=\\E[4l:ho=\\E[H:\
++	:ic=\\E[@:im=\\E[4h:k1=\\E[[A:k2=\\E[[B:k3=\\E[[C:\
++	:k4=\\E[[D:k5=\\E[[E:k6=\\E[17~:k7=\\E[18~:k8=\\E[19~:\
++	:k9=\\E[20~:k;=\\E[21~:kD=\\E[3~:kI=\\E[2~:kN=\\E[6~:\
++	:kP=\\E[5~:kb=^H:kd=\\E[B:kh=\\E[1~:kl=\\E[D:kr=\\E[C:\
++	:ku=\\E[A:le=^H:mb=\\E[5m:md=\\E[1m:me=\\E[0;10m:\
++	:mr=\\E[7m:nd=\\E[C:nw=^M^J:op=\\E[37;40m:r1=\\Ec:rc=\\E8:\
++	:sc=\\E7:se=\\E[m:sf=^J:so=\\E[7m:sr=\\EM:st=\\EH:ta=^I:\
++	:te=\E[2J\E[?47l\E8:ti=\E7\E[?47h:\
++	:u6=\\E[%d;%dR:u7=\\E[6n:u8=\\E[?6c:u9=\\E[c:ue=\\E[24m:\
++	:up=\\E[A:us=\\E[4m:vb=\\E[?5h\\E[?5l:ve=\\E[?25h:\
++	:vi=\\E[?25l:";
++
+ /* Looking up capabilities in the entry already found.  */
+ 
+ /* The pointer to the data made by tgetent is left here
+@@ -464,7 +490,7 @@
+ #ifdef INTERNAL_TERMINAL
+   /* For the internal terminal we don't want to read any termcap file,
+      so fake it.  */
+-  if (!strcmp (name, "internal"))
++  if (!strcmp (name, "cygwin"))
+     {
+       term = INTERNAL_TERMINAL;
+       if (!bp)