patch to cygwin.dll + ncurses for termcaps

Mikey jeffdb@netzone.com
Sat Mar 1 01:38:00 GMT 1997


A lot of people seem to be working on getting curses/ncurses based
applications to work, so I thought I would beat the rush. ;^)

Insert your favorite disclaimer here, I take no responsibility for anything
Svaha!!!!! ;^)

Enclosed is a patch for cdk/winsup/fhandler.{h,cc}, cdk/winsup/Makefile.in,
and cdk/winsup/utils/termcap to add ansi terminal capabilities to
cygwin.dll, and the ability to install just cygwin.dll, if you do (make
prefix=/fake-install-dir install-dll) in the winsup directory.

WARNING when replacing cygwin.dll don't use copy /b or move on
new-cygwin.dll, install it first, then do cut, and paste from explorer with
all cygwin applications closed, I don't know why, but when I tried the
first way it screwed up the dll.

Also a patch for user/ncurses/misc/terminfo.src, to add function key
support

Also a patch for user/less and user/bash, the one for less must be applied,
because of conflicts with iprintf() in libc.a, the patch for bash is
optional, ie it dosen't hurt to use the original bash.exe compiled against
gnu termcap, although compiled against ncurses, it's about 100k smaller
after striping.

export TERM=w32ansi in your .bashrc or set TERM=w32ansi in your startup
batch file, and enjoy

I have compiled, and tested (only for a few days, in the case of elvis)
ncurses, bash, less, and elvis-2.0 against this patch, and they all work,
if not perfectly.

for ncurses configure --host=i386-cygwin32 --enable-symlinks --prefix=/usr
--with-shared=no --with-profile=no -v

for less configure --host=i386-cygwin32 --prefix=/usr --with-x=no

ftp://ftp.cs.pdx.edu/pub/elvis/
for elvis-2.0 configure --with-x=no --bindir=/usr/bin
--datadir=/usr/lib/elvis --libs=-lncurses --ioctl=termios posix
e2 Makefile, and change EXE= to EXE=.exe before installation.
and ALL=elvis$(EXE) ref$(EXE) 	to ALL=elvis$(EXE) ref$(EXE) ctags$(EXE)
fmt$(EXE)	if you want ctags and fmt

Caveat.... The patch to fhandler.cc also contains Scott Kempf's patch to
open() to fix the tar overwrite bug, Sergey Okhapkin's fix for input in
FakeReadFile() and and my own fix to FakeReadFile() for when LINE_INPUT is
enabled, so if you have already applied any of those diff's this one won't
apply cleanly, 

Caveat #2 I am not a professional programer, so don't laugh too hard, OK?
;^)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bash_less.dif
Type: text/x-diff
Size: 1981 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19970301/af5fc299/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: termcaps.dif
Type: text/x-diff
Size: 22822 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19970301/af5fc299/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: terminfo.dif
Type: text/x-diff
Size: 603 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/19970301/af5fc299/attachment-0002.bin>


More information about the Cygwin mailing list