X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=xDPsW53izRcQV56LTkm/olxsKmtMXghafa9/AEyJ8pP v286Qs92ZvZrJSPc9Xeq3x/CjXKswPUrYC75QsRObn6lbudHPsDlgoZLHT7bi+na s1YAtJi8YtUBGDfOkcZa2HkEiF5vzEC1XIY5HHJL5z/+8GwAGy0JCK2J7sGwrpFo = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=3iPZ9MVXHbMyOrlIf1HYhmUEYyw=; b=S6MeE595Hvd6cdlWJ QdMSOSBCwaO3rbuF74pTGSXw77UFkHKbqVFWmE8ZAG9TRXZcM6qtjpcLxthlTtZq XgVKALiVvmikCcT4Icr57A1z0xpA11lI/TWx/LZ6GSZWTL+g/vuyWay9yQ89UKWM UAKDOMTYMJXEekvLWZYmZ5Uhi8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_YE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Message-ID: <5165C836.8000600@schueler.homeip.net> Date: Wed, 10 Apr 2013 22:14:46 +0200 From: =?ISO-8859-15?Q?=22D=2E_Sch=FCler=22?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.3 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: perl 5.14 ncursesw: calling getbegyx() crashes References: <51617A39 DOT 9000901 AT schueler DOT homeip DOT net> In-Reply-To: <51617A39.9000901@schueler.homeip.net> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit I got it working! And it's no issue with cygwin. I had to build the Curses library by hand and edit the testsym.c and list.syms. I suppose that the original version will compile fine on Linux, but the compiler in cygwin complains about the "LINES" constant in list.syms. So here's what i've done. Maybe it will be usefull for someone: ~ $ export CURSES_LDFLAGS="-L/usr/lib/ncursesw -lncursesw" ~ $ export CURSES_CFLAGS="-I/usr/include/ncursesw" ~/Curses-1.28 $ perl Makefile.PL PANELS MENUS FORMS GEN function: not applicable PANELS functions: enabled MENUS functions: enabled FORMS functions: enabled WARNING: Your Curses form.h file appears to be in the default system search path, which will not work for us because of the conflicting Perl form.h file. This means your 'make' will probably fail unless you fix this, as described in the INSTALL file. Writing Makefile for Curses Writing MYMETA.yml ### Then i edited the files testsym.c and list.syms ~/Curses-1.28 $ make ### Now nearly every function will be found and compiled in. ~/Curses-1.28 $ make install ### Now the curses.dll should be insalled in /usr/lib/perl5/... Here are the files i've edited: testsym.c ==========8<========== #include "c-config.h" main() { int x,y; /*Add this line*/ SYM; } ==========>8========== diff of list.syms ==========8<========== --- Curses-1.28/list.syms 2001-07-25 20:09:34.000000000 +0200 +++ Curses-1.28_new/list.syms 2013-04-10 17:52:38.871052800 +0200 @@ -16,7 +16,7 @@ E wattrset(stdscr,0) E wstandend(stdscr) E wstandout(stdscr) -E wattr_get(stdscr,&LINES,&LINES,0) +E wattr_get(stdscr,&y,&x,0) E wattr_off(stdscr,0,0) E wattr_on(stdscr,0,0) E wattr_set(stdscr,0,0,0) @@ -41,8 +41,8 @@ E init_color(0,0,0,0) E has_colors() E can_change_color() -E color_content(0,&LINES,&LINES,&LINES) -E pair_content(0,&LINES,&LINES) +E color_content(0,&y,&x,&x) +E pair_content(0,&y,&x) E wdelch(stdscr) E wdeleteln(stdscr) E winsdelln(stdscr,0) @@ -53,10 +53,10 @@ E KEY_F(0) E wgetstr(stdscr,0) E wgetnstr(stdscr,0,0) -E getyx(stdscr,LINES,LINES) -E getparyx(stdscr,LINES,LINES) -E getbegyx(stdscr,LINES,LINES) -E getmaxyx(stdscr,LINES,LINES) +E getyx(stdscr,y,x) +E getparyx(stdscr,y,x) +E getbegyx(stdscr,y,x) +E getmaxyx(stdscr,y,x) E winch(stdscr) E winchstr(stdscr,0) E winchnstr(stdscr,0,0) @@ -99,8 +99,8 @@ E reset_shell_mode() E resetty() E savetty() -E getsyx(LINES,LINES) -I getsyx(LINES,LINES) +E getsyx(y,x) +I getsyx(y,x) E setsyx(0,0) I setsyx(0,0) E curs_set(0) @@ -186,7 +186,7 @@ E ungetmouse(0) E mousemask(0,&LINES) E wenclose(stdscr,0,0) -E wmouse_trafo(stdscr,&LINES,&LINES,0) +E wmouse_trafo(stdscr,&y,&x,0) E mouseinterval(0) E BUTTON_RELEASE(0,0) E BUTTON_PRESS(0,0) @@ -232,7 +232,7 @@ E pos_menu_cursor(0) E menu_driver(0,0) E set_menu_format(0,0,0) -E menu_format(0,&LINES,&LINES) +E menu_format(0,&y,&x) E set_menu_items(0,0) E menu_items(0) E item_count(0) @@ -254,7 +254,7 @@ E menu_win(0) E set_menu_sub(0,stdscr) E menu_sub(0) -E scale_menu(0,&LINES,&LINES) +E scale_menu(0,&y,&x) E set_current_item(0,0) E current_item(0) E set_top_row(0,0) @@ -276,7 +276,7 @@ E menu_request_name(0) E menu_request_by_name(0) E set_menu_spacing(0,0,0,0) -E menu_spacing(0,&LINES,&LINES,&LINES) +E menu_spacing(0,&y,&x,&x) E pos_form_cursor(0) E data_ahead(0) E data_behind(0) @@ -306,7 +306,7 @@ E form_win(0) E set_form_sub(0,stdscr) E form_sub(0) -E scale_form(0,&LINES,&LINES) +E scale_form(0,&y,&x) E set_field_fore(0,0) E field_fore(0) E set_field_back(0,0) @@ -318,8 +318,8 @@ E set_field_status(0,0) E field_status(0) E set_max_field(0,0) -E field_info(0,&LINES,&LINES,&LINES,&LINES,&LINES,&LINES) -E dynamic_field_info(0,&LINES,&LINES,&LINES) +E field_info(0,&y,&x,&y,&x,&y,&x) +E dynamic_field_info(0,&y,&x,&y,&x) E set_field_just(0,0) E field_just(0) E new_field(0,0,0,0,0,0) ==========>8========== Regards, David -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple