/*
 * Tuple macros used by both index tuples and heap tuples.
 * 
 * "$Header: /home2/aoki/master/src/backend/access/RCS/tupmacs.h,v 1.5 1993/01/27 03:21:26 aoki Exp $"
 */

#ifndef TUPMACS_H
#define TUPMACS_H

#define att_isnull(ATT, BITS) (!((BITS)[(ATT) >> 3] & (1 << ((ATT) & 0x07))))

#define fetchatt(A, T) \
 ((*(A))->attbyval \
  ? ((*(A))->attlen > sizeof(short) \
     ? (char *) *((long *)(T)) \
     : ((*(A))->attlen < sizeof(short) \
        ? (char *) *((char *)(T)) \
        : (char *) *((short *)(T)))) \
  : (char *) (T))
	
#endif

