[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [MiNT] BORDER window kind
On Saturday 23 November 2013 13:00:53 Jo Even Skarstein wrote:
> On Sat, 2013-11-23 at 11:57 +0100, Jean-François Lemaire wrote:
> > 1st, it doesn't work :-) I expected some kind of border around the window
> > edges, like when "thinwork" is disabled in xaaes.cnf, but nothing; I even
> > disabled the "thinwork" option to be sure this wasn't hiding it;
>
> BORDER is not a window element, but a functionality. It doesn't change
> the appearance of the window border.
You're right. It's the gemlib doc that describes it in a confusing way:
"The BORDER gadget is only available in XaAES kernel module versions compiled
after November 8, 2004."
> > 2nd, BORDER is defined as 0x8000, which is 32768 in decimal. Since the
> > "kind" parameter of (wind_create() is a signed short (max positive value
> > of 32767) GCC warns about an overflow.
>
> I don't know enough about gcc to say anything sensible about this. But a
> simple test should tell you if this is the problem.
>
> void main(void)
> {
> short int a = 0;
>
> a |= 0x8000;
> printf("%s\n", a & 0x8000 ? "true":"false");
> }
>
> With AHCC this program will print "true".
Same with GCC. Must be something to do with the warning options, then. Thanks,
Jo.
Cheers,
JFL
--
Jean-François Lemaire