I have a program that uses a large number of global variables to store various settings. I've eliminated some by making them static withing their functions, if they aren't used anywhere else.

What is the best way to store lots of settings in a useable way? I would actually like to learn how to eliminate all globals, even if it's somewhat impractical.