Btw I'm planning to declare m, tree, filename as extern variables in common.h and define them in main.c because they are to persist in memory as long as the calculations are being done. Also, once they are initialized, they won't be changed during calculations. Is it really bad to use extern even if you know what you want to do.