On Sun, 24 Jun 2012, Rodolfo García Peñas wrote:
Therefore, not all the .c files have .h file. This is possible, but he
main reason is because some of them are using "funcs.h" and
"Windowmaker.h" to include their structs and prototypes. Of course,
funcs.c and Windowmaker.c doesn't exists :-)
For this reason, I think we need "a plan":
You may want to consider that .h files are not necessarily belong to .c
files and it does not have to be a one-to-one mapping. In the object
oriented paradigm .h would declare the methods or the interface of an
object and the .c would contain the implementation (the actual method
definitions). Thus it's fine to have internal functions defined in the .c
file and also fine to split the implementation into multiple .c files
while there's still only one .h file. You could also think of this as
modules. The functions declared in WindowMaker.h might belong to a core
module which is implemeted in multiple .c files. Of course this can be
changed and fixed if this is not anymore the case but the point is that it
should follow some logic and not just make every .c file have a .h file
declaring every funtion. That's why we need a plan and have to think about
what are the modules that need a .h file first :-)
Regards,
BALATON Zoltan