Mercurial > garten
view main.c @ 17:5e6c9260913a
lots of cleanups and small fixes
author | meillo@marmaro.de |
---|---|
date | Wed, 23 Jul 2008 17:14:38 +0200 |
parents | f1d43b52ed36 |
children | 5937504619f2 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include "db.h" #include "game.h" void run_module(char* name, void (*module)(void)) { printf(" --> %s\n", name); module(); printf(" --< %s\n", name); } int main(int argc, char* argv[]) { if (argc != 2) { printf("usage: %s <database>\n", argv[0]); exit(1); } database = argv[1]; printf("database '%s'\n", database); /* echo "started backend cycle at `date +%F\ %H:%M:%S`" */ db_connect(); read_time(); /* modules */ run_module("clock", worldclock); run_module("weather", weather); run_module("environment", environment); /* run_module("market", market); */ run_module("growth", growth); /* run_module("orderexec", orderexec); */ db_close(); /* echo "finished backend cycle at `date +%F\ %H:%M:%S`" */ return 0; }