Further deglobalisation: settings.c now has a more sensible interface.