I have just committed to CVS a patch to refactor some of the display code in ArcEm:
Summary: Factor out common parts of functions DisplayKbd_Init() and DisplayKbd_XPoll(), (and rename DisplayKbd_XPoll() to DisplayKbd_Poll()). Details: 1. Rename DisplayKbd_XPoll() to DisplayKbd_PollHost() in each */DispKbd.c 2. Rename DisplayKbd_Init() to DisplayKbd_InitHost() in each */DispKbd.c 3. Add prototypes for these to arch/DispKbd.h 4. Create new functions DisplayKbd_Poll() and DisplayKbd_Init() in arch/DispKbdShared.c. These new functions call the new host-specific functions. 5. Move static variables enodes and xpollenode, and #define POLLGAP from each */DispKbd.c to DispKbdShared.c 6. Make function RefreshDisplay() in each */DispKbd.c non-static. Prototype goes in arch/DispKbd.h 7. Common code moved from DisplayKbd_PollHost() to DisplayKbd_Poll() 8. Common code moved from DisplayKbd_InitHost() to DisplayKbd_Init() This reduces each */DispKbd.c by about 50 lines of duplicated code. Testing: The code has been comprehensively tested on X, and is undergoing testing on Windows by Peter Howkins. Could I request that Michael Dales and Ian Jeffray check that the MacOS, RISC OS, and GP2x ports are still working, and that I haven't broken them. Future incremental changes are planned, but I will try and keep each change as small as possible to minimise breakage/impact. Matthew PS Anyone know why my CVS commit generated so many postings to the arcem-cvs mailing list? ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ arcem-devel mailing list arcem-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/arcem-devel