[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Dialog editbox bug
From: |
Thomas Dickey |
Subject: |
Re: Dialog editbox bug |
Date: |
Fri, 31 May 2019 04:56:53 -0400 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
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
traces.zip
Description: Zip archive
signature.asc
Description: Digital signature
Re: Dialog editbox bug, Stian Skjelstad, 2019/05/30
- Re: Dialog editbox bug,
Thomas Dickey <=