From 58ef912c6babf1866193ab04674a5866dd761f13 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Wed, 22 Apr 1998 12:58:34 +0000 Subject: First look at data structures. More to come tomorrow... --- lib/birdlib.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/birdlib.h (limited to 'lib/birdlib.h') diff --git a/lib/birdlib.h b/lib/birdlib.h new file mode 100644 index 0000000..fb4814f --- /dev/null +++ b/lib/birdlib.h @@ -0,0 +1,17 @@ +/* + * BIRD Library + * + * (c) 1998 Martin Mares + * + * Can be freely distributed and used under the terms of the GNU GPL. + */ + +#ifndef _BIRD_BIRDLIB_H_ +#define _BIRD_BIRDLIB_H_ + +/* Ugly structure offset handling macros */ + +#define OFFSETOF(s, i) ((unsigned int)&((s *)0)->i) +#define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i))) + +#endif -- cgit v1.2.3