/* ************************************************************************** * File: main.c * Author: Greg Buxton * Desc: CircleMUD^2 World Converter * * Copyright (C) 2006- Greg Buxton. ALL RIGHTS RESERVED. * * This program and it's source code are subject to the CircleMUD^2 * license, the CircleMUD license, and the DikuMUD license. * * License text can be found at: * * http://www.circlemudsquared.org/license.php * ************************************************************************** */ #include <unistd.h> #include "sysdep.h" #include "structs.h" #include "db.h" #include "dao.h" #include "main.h" #include "zone.h" int main() { char *dir = "lib"; log("-- Starting World Conversion process"); if (chdir(dir) < 0) { perror("SYSERR: Fatal error changing to data directory"); exit(1); } log("Using %s as data directory.", dir); mag_assign_spells(); log("\r\n-- Loading world files"); boot_world(); log("\r\n-- Assign keywords for zones"); keyword_zones(); log("\r\n-- Saving world as dao files"); world_toDao(); log("\r\n-- Done!"); return (0); } /* * Provide a va_args function to display log() output to screen. */ void syslog(const char *format, ...) { va_list args; va_start(args, format); vprintf(format, args); printf("\r\n"); va_end(args); }