This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

patch to cygwin.dll + ncurses for termcaps


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?
;^)

bash_less.dif (DIF File)

termcaps.dif (DIF File)

terminfo.dif (DIF File)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]