/* vi: set ts=2: +-------------------+ Christian Schlittchen | | Enno Rehling | Eressea PBEM host | Katja Zedel | (c) 1998 - 2003 | Henning Peters | | Ingo Wilken +-------------------+ Stefan Reich This program may not be used, modified or distributed without prior permission by the authors of Eressea. */ #include #include #include "xmas.h" /* kernel includes */ #include #include #include #include #include #include #include /* util includes */ #include #include #include /* libc includes */ #include static int xmasgate_handle(trigger * t, void * data) { return -1; } static void xmasgate_write(const trigger * t, FILE * F) { building *b = (building *)t->data.v; fprintf(F, "%s ", itoa36(b->no)); } static int xmasgate_read(trigger * t, FILE * F) { return read_building_reference((building**)&t->data.v, F); } struct trigger_type tt_xmasgate = { "xmasgate", NULL, NULL, xmasgate_handle, xmasgate_write, xmasgate_read }; trigger * trigger_xmasgate(building * b) { trigger * t = t_new(&tt_xmasgate); t->data.v = b; return t; } void init_xmas(void) { tt_register(&tt_xmasgate); }