split libbsdconv.c into several files