Installing Newt

Installing Newt

am 30.06.2007 10:17:41 von swylieguard-google

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?
TIA
Steve

Re: Installing Newt

am 30.06.2007 20:18:46 von Christopher Nehren

On 2007-06-30, swylieguard-google@yahoo.co.uk scribbled these
curious markings:
> 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.

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;
newtListboxRealSetCurrent(co);
er.result = ER_SWALLOWED;
break;
default:
/* keeps gcc quiet */
}
break;

Interestingly, the line that "keeps gcc quiet" is the line that breaks
things. Removing the C 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 ( 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