new files

This commit is contained in:
Enno Rehling 2001-02-17 15:04:06 +00:00
parent e11a6f5561
commit 9f5820fdfe
2 changed files with 81 additions and 0 deletions

View File

@ -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 <config.h>
#include <eressea.h>
#include "gm.h"
/* kernel includes */
#include <plane.h>
/* util includes */
#include <attrib.h>
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);
}

View File

@ -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);