ncurses tests

Joel Sherrill joel.sherrill at OARcorp.com
Thu Jun 1 23:35:47 UTC 2000


OUTWATER wrote:
> 
> Eric - Thanks for the info!
> 
> I have been using the examples directory, though, and I'm still running into
> problems.  I tried the changes suggested in you message, but still no output.
> 
> I set up a basic test which also had networking running and I was able to
> capture the ncurses log output vi ftp.  I based my Init on the Init you placed
> in the examples/ncurses directory.
> 
> Here it is:

I don't have ncurses code handy but I bet it is opening more file
descriptors.  The default USED to be 20 but is now 3 since MOST
applications barely use stdin/err/out.  Try upping this to 20.

#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 3



> 
> rtems_task Init(
>   rtems_task_argument argument
> )
> {
>   rtems_status_code status;
> 
>   rtems_bsdnet_initialize_network ();
>   rtems_initialize_ftpd();
>   status = Untar_FromMemory((unsigned char *)(&_binary_tarfile_start),
>              &_binary_tarfile_size);
>   rtems_initialize_webserver();
> 
>   printf("Start\n");
>   putchar('1');
>   putchar('\n');
>   putc('2', stdout);
>   putc('\n', stdout);
> 
>   putenv ("TERM=xterm");
> /* putenv ("NCURSES_TRACE=20"); */
>   trace(TRACE_MAXIMUM);
>   initscr();
>   printw("A Test\n");
>   refresh();
>   endwin();
> 
>   printf("End\n");
> 
> for (;;){}
> 
>   status = rtems_task_delete( RTEMS_SELF );
> }
> 
> When run, I get
> Start
> 1
> 2
> 
> But nothing in between. Seems like console I/O is working, just not for ncurses.
> 
> I've attached the ncurses log if you're interested...
> 
> BTW, I'm using kermit on an HP workstation as my emulator (kermit is run in an
> xterm).  I wonder if taht's the problem...
> 
> keith
> 
> >
> > One reason for sure that you'll not see any output from the tests linked
> > against dummy.rel is that there's no TERM environment variable.  Also,
> > the tests provide a main function which conflicts with the RTEMS main
> > function.
> >
> > The build procedure for the ncurses package was not intended to create
> > working tests.  Only the programs in the examples directory should be
> > expected to work.
> >
> > When I compiled the tests with -Dmain=rtems_main and used the following
> > Init routine I was able to run the curses tests I tried.
> >
> > void
> > Init (rtems_task_argument ignored)
> > {
> >         static char *argv[] = {
> >                 "test",
> >                 NULL
> >         };
> >         putenv ("TERM=xterm");
> >         rtems_main (1, argv);
> > }
> >
> > --
> > Eric Norum                                 eric at cls.usask.ca
> > Canadian Light Source                      Phone: (306) 966-6308
> > University of Saskatchewan                 FAX:   (306) 966-6058
> > Saskatoon, Canada.
> >
> 
>   ------------------------------------------------------------------------
>                Name: trace
>    trace       Type: unspecified type (application/octet-stream)
>            Encoding: 7bit
>         Description: trace

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list