On 01/ 4/11 02:26 AM, Pauli Nieminen wrote: > On 03/01/11 13:23 -0800, ext Alan Coopersmith wrote: >> On 12/31/10 09:30 AM, Pauli wrote: >>> From: Pauli Nieminen <[email protected]> >>> >>> It is common use case in server that only block or wakeup handler is >>> used. To provide API for that case block handlers have to be split to >>> separate structures. >>> >>> +extern _X_EXPORT Bool RegisterBlockHandler( >>> + BlockHandlerProcPtr /*blockHandler*/, >>> + pointer /*blockData*/); >>> + >>> +extern _X_EXPORT void RemoveBlockHandler( >>> + BlockHandlerProcPtr /*blockHandler*/, >>> + pointer /*blockData*/); >>> + >>> +extern _X_EXPORT Bool RegisterWakeupHandler( >>> + WakeupHandlerProcPtr /*wakeupHandler*/, >>> + pointer /*blockData*/); >>> + >>> +extern _X_EXPORT void RemoveWakeupHandler( >>> + WakeupHandlerProcPtr /*wakeupHandler*/, >>> + pointer /*blockData*/); >>> + >> >> Seems like an excellent solution to the problem. The docs should be >> updated to match though, as in the attached patch you can merge into >> this one. (Yes, the style of the function declarations in those docs >> still needs love, this matches the existing style for now.) >> > > Right. I'm going to add the documentation patch. > > Looking at documentation. Is there any reason why it isn't embedded in code?
Because that's not the way it was written 20 years ago (I don't know if there were any good/widespread tools for doing that in C at the time), and no one has put in the effort to change it. Feel free to add doxygen comments into the code as well, there's a growing number of those already, but those tend to provide a more simple reference manual style of documentation, with less of the narrative structure of the current documentation - both are useful, depending on whether you want to read a document to learn the system or just need a quick reference to the arguments to a specific function. BTW, for the docs I wrote, you should probably add a: Signed-off-by: Alan Coopersmith <[email protected]> to the comments in the patch you merge it into. -- -Alan Coopersmith- [email protected] Oracle Solaris Platform Engineering: X Window System _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
