|
From: | Thomas Dickey |
Subject: | Re: Ncurses 5.9 -> 6.0 - libform |
Date: | Sat, 16 May 2020 18:42:43 -0400 |
User-agent: | NeoMutt/20170113 (1.7.2) |
On Fri, May 15, 2020 at 01:45:14PM +0100, Mike Aubury wrote: > Ok - heres a sample program - derived from calls detected using "ltrace" > (its impossible to extract the main application into a small example) - so > apologies for it being terrible, bad names, void*s' etc > > This is run on a putty session with a wide screen (200 odd columns wide) - > if you're running on anything else - you might need to adjust the > window/field sizes I think the problem is the "sleep" call. That can interfere with flushing the output buffer. However, I'm not certain, since in a quick build of 5.9 and 6.2-current, both gave me a blank screen. But replacing the sleep() with a wgetch() (or "napms(6000)" should work) made both versions show text. See attached > #include <curses.h> > #include <form.h> > #include <panel.h> > main() { > void *ptr0=initscr ( ); //0x13c21e0 > void *ptr1=newwin (0, 0, 0, 0 ); //0x13d12a0 > void *ptr2=new_panel (ptr1 ); //0x13db400 > void *ptr7=derwin (ptr1, 1, 198, 0, 0 ); //0x13dbb60 > FIELD *ptr8=new_field (1, 5, 0, 0,0,0 ); //0x1375700 > set_field_buffer (ptr8, 0, "XXX") ; > FIELD *ptr10=new_field (1, 193, 0, 5,0,0 ); //0x13de270 > set_field_buffer (ptr10, 0, "yyy") ; > FIELD *fields[3]; > fields[0]=ptr8; > fields[1]=ptr10; > fields[2]=0; > FORM *ptr12=new_form (fields ); //0x13757c0 > set_form_win (ptr12, ptr7) ; > set_form_sub (ptr12, 0) ; > post_form (ptr12 ); > set_current_field(ptr12,ptr10); > pos_form_cursor (ptr12 ); > update_panels ( ); > doupdate ( ); > sleep(6); ^^^^^^^^ > endwin(); > } > > > > When I run this against 5.9 - it displays. > XXX yyy > > When I run against 6.0 - it displays nothing. > > > On Fri, 15 May 2020 at 01:53, Thomas Dickey <address@hidden> wrote: > > > On Thu, May 14, 2020 at 07:30:19PM +0100, Mike Aubury wrote: > > > (I know this is probably getting filed under "not enough information", or > > > "hey thats a really old version you have there", but just on the > > > offchance someone might have some pointers...) > > > > > > I've got an application that's been working for years, and a client has > > > just tried using it on Centos8 and a particular command (a "prompt") > > > doesnt work.. > > > > > > In the app - i open a form with a label and a field, get them to type in > > a > > > value and return it. > > > Centos comes with ncurses 6.2, I also tried 6.0 and it also breaks, but > > > ncurses 5.9 on the same machine works fine. > > > > > > So - does anyone have any ideas on why fields might not be displaying on > > > 6.0, when it worked fine on 5.9, or have any ideas of what I can do to > > > troubleshoot? > > > > not offhand (that's several years). I don't recall any particular > > changes in the form library, but a quick diff shows that about 10% > > of the source changed since 5.9 (a lot of that would be cosmetic, > > but still...) > > > > If it's something that I could test, I could look into it. > > > > -- > > Thomas E. Dickey <address@hidden> > > https://invisible-island.net > > ftp://ftp.invisible-island.net > > -- Thomas E. Dickey <address@hidden> https://invisible-island.net ftp://ftp.invisible-island.net
demo_forms.c
Description: Text Data
doit
Description: Text document
testit
Description: Text document
signature.asc
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |