Notes |
(0012304)
codemastr (reporter)
2006-09-03 16:17
|
Doesn't it kinda defeat the purpose of include files though? Granted, our current way sucks. But isn't it more "include what you need"? If we don't need channel.h, we shouldn't be including it. |
|
(0012305)
syzop (administrator)
2006-09-03 16:55
edited on: 2006-09-03 16:56
|
While the idea is technically nice, I don't think many people care about it including me. It only adds extra work to find out what's in where and add an include every time you use a certain function. Not to mention if we move a definition from file A to file B "to clean things up" or "improve". This is much easier and cleaner.
So, no, I think it's an excelent idea.
EDIT: Of course, if any 3rd party author wants to do it differently, that's their right, but they shouldn't complain when they have missed 1 of the 20 includes they need, or when they missed an ifdef, or when something got moved from modules.h to struct.h or vice versa, etc........
|
|
(0013349)
aquanight (reporter)
2007-04-06 21:36
|
I've attached an all.h I put together, basically just copied out the #include blob from message.c and then included some commented out #includes for all the other headers, since I'm not sure whether or not those needed to be included (some are only used in one or two .c files). |
|
(0013351)
syzop (administrator)
2007-04-07 05:46
|
Many of the ones commented out are included by an include (common.h, struct.h, those two include quite some other includes). Perhaps you could narrow the list down with that info, only very few left then probably (basically just grep at the includename in include/*.h for each file).
One that can be ditched is include/threads.h, since we don't do threads anymore since 3.2beta14 or so. Could consider removing the file as well, but perhaps we shouldn't be ditching threading, perhaps it can be used for something we haven't thought of yet... (noidea, offtopic, just keep the file itself, but not references) |
|
(0013354)
aquanight (reporter)
2007-04-08 01:10
|
(updated all.h attached) - was indeed a few that could be taken out, but a few are still left, but I'm not really sure if those are used in more than 1 or 2 places... |
|
(0015107)
Stealth (administrator)
2008-02-11 21:23
|
Added to 3.3, r257 |
|