Installing Newt

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I'm trying to install Newt on a Kubuntu 7 box using CPAN shell and get
a message:

listbox.c: in function listboxEvent:

listbox.c: 634: error: label at end of compound statement.

Any ideas?

Re: Installing Newt

On 2007-06-30, scribbled these
curious markings:
Quoted text here. Click to load it

Since you didn't say *which* version of newt, I'm going to have to guess
that you're trying to install the latest version.

Around line 634 of listbox.c is this beautiful code:

  case NEWT_KEY_END:
            if(li->numItems <= 0) break;
            li->startShowItem = li->numItems - li->curHeight;
            if(li->startShowItem < 0)
                li->startShowItem = 0;
            li->currItem = li->numItems - 1;
            er.result = ER_SWALLOWED;
            /* keeps gcc quiet */

Interestingly, the line that "keeps gcc quiet" is the line that breaks
things. Removing the C<default:> line fixes things, at least for my
compiler. I've no idea whether the code will actually finish building,
though, because it seems to have been written in an extremely unportable
fashion (<alloca.h> and friends... may as well do #ifndef LINUX #error
"no newt for you" #endif). Seems to me like this code was written for
either an older compiler, a broken, RH-specific compiler, or both. Good
luck, I hope you know C, and GCC's oft-weird implementation thereof.

Best Regards,
Christopher Nehren

Site Timeline