pike.git / src / pike_macros.h

version» Context lines:

pike.git/src/pike_macros.h:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/      /* -  * $Id: pike_macros.h,v 1.27 2001/10/06 12:04:08 hubbe Exp $ +  * $Id: pike_macros.h,v 1.28 2001/11/10 19:44:48 mast Exp $    */   #ifndef MACROS_H   #define MACROS_H      #include <global.h>      #ifdef HAVE_SYS_PARAM_H   #include <sys/param.h>   #endif      #include "pike_memory.h"      #define OFFSETOF(str_type, field) ((size_t)& (((struct str_type *)0)->field))   #define BASEOF(ptr, str_type, field) \ - ((struct str_type *)((char*)ptr - (char*)& (((struct str_type *)0)->field))) + ((struct str_type *)((char*)ptr - (size_t)& (((struct str_type *)0)->field)))      #define NELEM(a) (sizeof (a) / sizeof ((a)[0]))   #define ALLOC_STRUCT(X) ( (struct X *)xalloc(sizeof(struct X)) )      #define MINIMUM(X,Y) ((X)<(Y)?(X):(Y))   #define MAXIMUM(X,Y) ((X)>(Y)?(X):(Y))         #define is8bitalnum(X) ("0000000000000000" \    "0000000000000000" \