Subject: Re: progamming with Cygwin GNU Readline Library
From: Hiroo Hayashi <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Tue, 08 Jan 2002 01:02:57 -0500 (CDT)

Charles,

Charles> Please don't send cygwin related questions to me personal.
Charles> This belongs on the cygwin list. I have copied the list and
Charles> reset the Reply-To: appropriately.

Sorry.  I'm not sure I could post cygwin list or not.  But I should
try it.

Charles> 'gcc -static' + -DREADLINE_STATIC

Your answer solved my problems.  Thank you very much.

Charles> Or wait for the next release of cygwin readline, which should
Charles> make all of these problems go away.

Do you have a rough estimatation when will it be released?  If it may
take a few months or more, I'll consider to make a new release of my
perl module.

BTW the test script in my distribution fails on one of tests.  It
seems a bug of cygwin readline library.

The return value of rl_get_screen_size is wrong as follows;

The version of Cygwin Readline Library is 4.2-3.

bug.c
------------------------------------------------------------------------
#include <stdio.h>
#include <readline/readline.h>
main(){
	int	row, col;

	rl_initialize();

	rl_get_screen_size(&row, &col);
	printf("row=%d, col=%d\n", row, col);

	rl_set_screen_size(10, 20);
	rl_get_screen_size(&row, &col);
	printf("row=%d, col=%d\n", row, col);
}
------------------------------------------------------------------------

------------------------------------------------------------------------
(HERBIE) hiroo[281] gcc bug.c -lreadline -ltermcap
(HERBIE) hiroo[284] echo $LINES $COLUMNS
25 80
(HERBIE) hiroo[282] ./a.exe
row=25, col=79
row=10, col=19
------------------------------------------------------------------------

On my Linux environment a.out prints
	row=25, col=80
	row=10, col=20

Best,

Hiroo Hayashi

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/