[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unknown malfunction of ncurses
From: |
fred smith |
Subject: |
Re: Unknown malfunction of ncurses |
Date: |
Tue, 11 Sep 2012 21:16:15 -0400 |
User-agent: |
Mutt/1.4.2.2i |
On Tue, Sep 11, 2012 at 07:03:53PM -0400, Thomas Dickey wrote:
> On Tue, Sep 11, 2012 at 12:01:39PM +0200, Anthony Marshall wrote:
> > Greetings,
> >
> > Whilst trying Example 9. A Simple Color example in the
> > NCURSES-Programming-HOWTO.html, I extended the program slightly, thus:
> >
> > /*
> > * colr_ex.c color example
> > *
> > * $Revision: 1.46 $
> > */
> >
> > #include <ncurses.h>
> > #include <string.h>
> >
> > static char *msg[] = {
> > "Viola !!! In color ...","A slightly longer string here ...",
> > "Short string ..."
>
> msg[] contains 3 strings (msg[0], msg[1], msg[2]).
> msg[3] is undefined.
>
> for (; x < 4; x++) {
> print_in_middle(stdscr, LINES / 2, 0, 0, msg[x], x + 1);
>
> > As you may notice in the main, I have commented out the for() loop
> > because, uncommented, it seems to generate a segmentation error each time
> > it is compiled in and run, and I cannot seem to work out why.
> >
> > Could you please advise me why this is the case and is there a solution?
I tried to restrain myself, but find I am unable. Therefore I must point
out that a "viola" is a stringed instrument that looks a lot like a
violin. Perhaps you meant "Voila!" ???