diff options
author | Martin Mares <mj@ucw.cz> | 1998-04-22 12:58:34 +0000 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 1998-04-22 12:58:34 +0000 |
commit | 58ef912c6babf1866193ab04674a5866dd761f13 (patch) | |
tree | 244af1a4acb9feac08b45800587a06653a6ff264 /lib/birdlib.h | |
parent | b60f7489148d021cb541414b8788f795ec4378fa (diff) |
First look at data structures. More to come tomorrow...
Diffstat (limited to 'lib/birdlib.h')
-rw-r--r-- | lib/birdlib.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h new file mode 100644 index 00000000..fb4814f9 --- /dev/null +++ b/lib/birdlib.h @@ -0,0 +1,17 @@ +/* + * BIRD Library + * + * (c) 1998 Martin Mares <mj@ucw.cz> + * + * 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 |