Re: [PATCH] More cleanup + bugfixes
Re: [PATCH] More cleanup + bugfixes
- Subject: Re: [PATCH] More cleanup + bugfixes
- From: "Jordan K. Hubbard" <email@hidden>
- Date: Fri, 16 Nov 2007 00:46:24 -0800
I just wanted to jump in here really quick and give Jeremy some much-
deserved kudos for stepping up and helping like this - it is precisely
what I was referring to when I said that community involvement could
and would make a real difference vs simply expecting Ben to do
everything. Already, we have a number of fixes that we wouldn't have
otherwise and Jeremy has also provided some tools to help people track
and install Ben's unofficial updates, which is great.
Thanks, Jeremy!
- Jordan
On Nov 16, 2007, at 12:09 AM, Jeremy Huddleston wrote:
Here's another patch to further the codebase cleanup.
1) Fixed a bug where XQUARTZ was #defined when auto but not when --
enable-xquartz
2) Cleaned up missing #includes and function prototypes.
3) Fixed some invalid C syntax problems
4) Removed a bunch of dead code
5) Cleaned up code to prevent some warnings
6) Bugfix in xpr/x-hook.c - looks like someone just forgot to finish
writing code for hook_remove()... I only noticed it because gcc -
Wall complained about reaching the end of a non-void function...
lucky for us gcc is smarter than we are.
http://cloud.cs.berkeley.edu/~jeremy/X11/X11-XDarwin-Cleanup.patch
There are two compile warnings remaining that actually concern me as
potentially bug-causing, but I haven't looked into them enough to
fix them. Here they are if someone cares to investigate:
quartz.c: In function ‘DarwinModeInitOutput’:
quartz.c:168: warning: passing argument 1 of
‘RegisterBlockAndWakeupHandlers’ from incompatible pointer type
quartz.c: In function ‘DarwinModeProcessEvent’:
quartz.c:467: warning: passing argument 1 of
‘RootlessNativeWindowMoved’ makes pointer from integer without a cast
---
The RegisterBlockAndWakeupHandlers warning is weird. Here's the
offending call:
if (!RegisterBlockAndWakeupHandlers(QuartzBlockHandler,
QuartzWakeupHandler,
NULL))
Looking at include/scrnintstr.h, we see the types need to be:
typedef void (* ScreenBlockHandlerProcPtr)(
int /*screenNum*/,
pointer /*blockData*/,
pointer /*pTimeout*/,
pointer /*pReadmask*/);
typedef void (* ScreenWakeupHandlerProcPtr)(
int /*screenNum*/,
pointer /*wakeupData*/,
unsigned long /*result*/,
pointer /*pReadMask*/);
but BOTH are the wrong type as we look in quartzCommon.h:
void QuartzBlockHandler(void *blockData, void *pTimeout, void
*pReadmask);
void QuartzWakeupHandler(void *blockData, int result, void
*pReadmask);
They don't have ScreenNum. Changing the prototypes to match
scrnintstr.h (by adding int as the first arg and changing int result
to unsigned in wakeup) causes the compiler to complain about BOTH
arguments. I am befuddled and give up for now.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden