This stuff is neither generic enough to be in def.h, nor really has much to do with locale, hence give it its own .c/.h file pair.