/* vi: set ts=2: * * $Id: faction.c,v 1.2 2001/01/26 16:19:39 enno Exp $ * Eressea PB(E)M host Copyright (C) 1998-2000 * Christian Schlittchen (corwin@amber.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de) * Henning Peters (faroul@beyond.kn-bremen.de) * Enno Rehling (enno@eressea-pbem.de) * Ingo Wilken (Ingo.Wilken@informatik.uni-oldenburg.de) * * This program may not be used, modified or distributed without * prior permission by the authors of Eressea. */ #include #include "eressea.h" #include "faction.h" /* util includes */ #include /* libc includes */ #include char * factionname(const faction * f) { typedef char name[OBJECTIDSIZE + 1]; static name idbuf[8]; static int nextbuf = 0; char *buf = idbuf[(++nextbuf) % 8]; if (f && f->name) { sprintf(buf, "%s (%s)", strcheck(f->name, NAMESIZE), itoa36(f->no)); } else { sprintf(buf, "Unbekannte Partei (?)"); } return buf; } void * resolve_faction(void * id) { return findfaction((int)id); }