Created attachment 2815[details]
Add 'static' for private functions in tr_font.c
Hi there,
here is another huge change ^^
The included patch adds 'static' in front of the functions declarations in tr_font.c; of course, not all the functions are affected, only those with a limited/private scope.
As a custom engine dev, I disagree for I don't think it's "more difficult", I actually reckon it's easier as it removes 1 patch on my side.
Anyway, I sincerely thought the main goal of this project was to maintain a clean and improved code base, this is why I sent this patch(*); just thought it would be better to have this made upstream but if you disagree that's ok to me ^^
(*) this is why I also sent my questions about the cvar naming scheme to the ML, http://lists.ioquake.org/pipermail/ioquake3-ioquake.org/2011-July/004655.html
I simply don't think it's worth it. Why do you only make functions in tr_font.c static? There's lots of other functions in other files that could be declared "static" then. I don't even really consider this a cleanup. It's not imperative that functions used locally only are to be declared static.
so WONTFIX
I only altered tr_font.c because I was working on a piece of code related to this file, also I prefer doing small, atomic changes instead of a big patch. If you were interrested in specifying 'static' for every private function in the whole code, I guess it could have been done smoothly and files by files.
But that's ok to me anyway and I understand your refusal.
I wrote a patch once to use GCC's compilation information gathering (via -aux-info) to add static to all sorts of functions only used in their file. It was huge. The benefits are reduced executable size (but not by a very impressive amount) and GCC can provide more warnings (e.g. for unused functions) because it knows a particular function can't be used outside of some file. Neither are really major though.
Created attachment 2815 [details] Add 'static' for private functions in tr_font.c Hi there, here is another huge change ^^ The included patch adds 'static' in front of the functions declarations in tr_font.c; of course, not all the functions are affected, only those with a limited/private scope.