[Bf-committers] space.c refactor questions

Tom M letterrip at gmail.com
Fri Mar 18 21:16:36 CET 2005


I'm refactoring space.c and have some questions on how people would
like things organized

each of the major spaces has most of the following four functions

extern void init_FOOspace(ScrArea *sa);
extern void drawFOOpace(ScrArea *sa, void *spacedata);
extern void winqreadFOOspace(ScrArea *sa, void *spacedata, BWinEvent *evt);
extern void changeFOOspace(ScrArea *sa, void *spacedata);

and an associated function

SpaceType *spaceFOO_get_type(void)

there are also a large number of miscelanous functions 

the init and change are fairly small functions - the winqread is
usually huge, as is the draw functions.

My thoughts are - split the drawFOOspace into a drawFOO.c since this
is how many are already handled.  Then move init, winqread, and change
into space_winqreadFOO.c

split out the miscelaneous functions to where they go, or into
space_helpers.c and leave the remaining functions that are space
releated in space.c

Does this sound like a reasonable organization?

I'm already fairly much done, but I can change things if needed.

LetterRip


More information about the Bf-committers mailing list