bug-ncurses
[Top][All Lists]
Advanced

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

RE: Very interesting thing happend while creating a menu item...


From: Jürgen Pfeifer
Subject: RE: Very interesting thing happend while creating a menu item...
Date: Thu, 27 Feb 2003 01:18:14 +0100

This is not a bug, it is intended behaviour.
Non-Printable strings as menu labels are simply not allowed.
If you do a check for null on the new_item() call and if null
evaluate errno you would see that you got an E_BAD_ARGUMENT.

Cheers
Jürgen

> -----Original Message-----
> From: jon wackley [mailto:address@hidden 
> Sent: Wednesday, February 26, 2003 9:59 PM
> To: address@hidden
> Cc: address@hidden
> Subject: RE: Very interesting thing happend while creating a 
> menu item...
> 
> 
> 
> It happens in 5.3 in cygwin, and solaris.  This seems so 
> consistent that I did not try other platforms, let me know if 
> this is o.k.;
> 
> #include <ncurses/curses.h>
> #include <ncurses/menu.h>
> #include <stdio.h>
> 
> int
> main( int argc, char * argv[ ] ) {
> 
>     ITEM * the_menu_item_one = NULL;
>     ITEM * the_menu_item_two = NULL;
> 
>     if ( initscr( ) == FALSE ) {
>         return -1;
>     }
> 
>     the_menu_item_one = new_item("This is a test","");
>     the_menu_item_two = new_item("\x1BThis is a test","");
> 
>     endwin();
> 
>     printf( "Menu item one is%snull\n", the_menu_item_one == 
> NULL ? " " : " not " );
>     printf( "Menu item two is%snull\n", the_menu_item_two == 
> NULL ? " " : " not " );
> 
>     return 0;
> 
> }
> 
> Thanks,
> jonw
> 
> > -----Original Message-----
> > From: Thomas Dickey [mailto:address@hidden
> > Sent: February 26, 2003 1:28 PM
> > To: jon wackley
> > Cc: address@hidden
> > Subject: Re: Very interesting thing happend while creating a menu 
> > item...
> >
> >
> > On Wed, Feb 26, 2003 at 12:48:12PM -0500, jon wackley wrote:
> > >
> > > Hi All,
> > >
> > > Just a curiousity, is this a bug, or a case of improper api use?
> >
> > I'm inclined to regard it as a bug - a simple test-program 
> would help 
> > make certain I understand it (as a display issue).  I 
> looked a little 
> > at this on Saturday, but since there wasn't a test-program, put it 
> > aside for the ones that did (the socket issue).
> >
> > --
> > Thomas E. Dickey <address@hidden> 
> > http://invisible-island.net ftp://invisible-island.net
> >
> 
> 
> 
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses
> 




reply via email to

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