diff --git a/src/common/attributes/gm.c b/src/common/attributes/gm.c new file mode 100644 index 000000000..be93d5f17 --- /dev/null +++ b/src/common/attributes/gm.c @@ -0,0 +1,60 @@ +/* vi: set ts=2: + * + * $Id: gm.c,v 1.1 2001/02/17 15:04:06 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 +#include "gm.h" + +/* kernel includes */ +#include + +/* util includes */ +#include + +static void +write_gm(const attrib * a, FILE * F) +{ + write_plane_reference((plane*)a->data.v, F); +} + +static int +read_gm(attrib * a, FILE * F) +{ + read_plane_reference((plane**)&a->data.v, F); + return 1; +} + + +attrib_type at_gm = { + "gm", + NULL, + NULL, + NULL, + write_gm, + read_gm, +}; + +attrib * +make_gm(const struct plane * pl) +{ + attrib * a = a_new(&at_gm); + a->data.v = (void*)pl; + return a; +} + +void +init_gm(void) +{ + at_register(&at_gm); +} diff --git a/src/common/attributes/gm.h b/src/common/attributes/gm.h new file mode 100644 index 000000000..b461ac8e4 --- /dev/null +++ b/src/common/attributes/gm.h @@ -0,0 +1,21 @@ +/* vi: set ts=2: + * + * $Id: gm.h,v 1.1 2001/02/17 15:04:06 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. + */ + +/* this is an attribute used by the kernel (isallied) */ + +struct plane; +extern struct attrib_type at_gm; + +extern struct attrib * make_gm(const struct plane *pl); +extern void init_gm(void);