bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dialog editbox bug


From: dmitry maybe
Subject: Re: Dialog editbox bug
Date: Fri, 31 May 2019 09:17:18 +0000

Thank you!
But why characters are showing up as ^@'s ?

On Fri, May 31, 2019 at 8:56 AM Thomas Dickey <address@hidden> wrote:
On Fri, May 31, 2019 at 02:02:17AM +0200, Stian Skjelstad wrote:
> On Fri, 31 May 2019, 01:02 dmitry maybe, <address@hidden> wrote:
>
> >
> >                 char **list;
> >                 list = (char **) malloc(2+1);
> >
>
> list=(char **)malloc(2*sizeof(char *));

perhaps (that seems to be a response to something off-list).

Before looking inside dialog, I'm looking for something that I
can compile and run, so that I can use valgrind (and compiler)
to show me where to look for the actual problem.

The example still has a typo (the ":" in the declaration for tmp_status
should be a ";"), but fixing and compiling that and running it, I don't see
a problem in valgrind:

> g++-min -g -o foo2 foo2.cpp -I/usr/build/ncurses/foo2.cpp -L/usr/build/ncurses/foo2.cpp -ldialog `ncursesw6dev-config --cflags --libs`
cc1plus: warning: /usr/build/ncurses/foo2.cpp: not a directory
foo2.cpp: In function ‘int main(int, char**)’:
foo2.cpp:10:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
                 dlg_items_ip[0].name = "Server:";
                                      ^
foo2.cpp:12:38: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
                 dlg_items_ip[0].text = "" ;
                                      ^
foo2.cpp:32:72: warning: operation on ‘status’ may be undefined [-Wsequence-point]
                 status = status=dialog_editbox("Post",input_post,20,30);
                                                                        ^
foo2.cpp:28:5: warning: variable ‘tmp_status’ set but not used [-Wunused-but-set-variable]
 int tmp_status;
     ^

The example shows some problems on the screen which I suppose are due
to problems in the sample code, since the line-drawing characters are
showing up as ^@'s.

--
Thomas E. Dickey <address@hidden>
https://invisible-island.net
ftp://ftp.invisible-island.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]