#ifndef MPLIB1_DATA_ALIGN #define MPLIB1_DATA_ALIGN /* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/mplib1/data_align.h,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:44 $ * $Revision: 1.2 $ * ******************************************************************************* * * Change History * * $Log: data_align.h,v $ * Revision 1.2 2002/10/07 09:37:44 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:37:00 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ #ident "$Header: /home/cvs/cvsroot/onelan/onelan/src/mplib1/mplib1/data_align.h,v 1.2 2002/10/07 09:37:44 mpoole Exp $" /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /** ** Here we attempt to specify what the data alignment rules are ** for a particular platform. ** Two types of alignment are specified, compact and optimal ** This is provided so that the storage vs speed choice can be made ** */ #ifdef EIGHT_ALIGN_EIGHT #define MPLIB_ALIGN_SPC_CHAR 1 #define MPLIB_ALIGN_SPC_SHORT 2 #define MPLIB_ALIGN_SPC_INT 4 #define MPLIB_ALIGN_SPC_LONG 4 #define MPLIB_ALIGN_SPC_DOUBLE 8 #define MPLIB_ALIGN_SPC_VLONG 8 #define MPLIB_ALIGN_SPC_PTR 4 #define MPLIB_STRUCT_PAD 8 #define MPLIB_ALIGN_SPD_CHAR 1 #define MPLIB_ALIGN_SPD_SHORT 2 #define MPLIB_ALIGN_SPD_INT 4 #define MPLIB_ALIGN_SPD_LONG 4 #define MPLIB_ALIGN_SPD_DOUBLE 8 #define MPLIB_ALIGN_SPD_VLONG 8 #define MPLIB_ALIGN_SPD_PTR 4 #else #define MPLIB_ALIGN_SPC_CHAR 1 #define MPLIB_ALIGN_SPC_SHORT 2 #define MPLIB_ALIGN_SPC_INT 4 #define MPLIB_ALIGN_SPC_LONG 4 #define MPLIB_ALIGN_SPC_DOUBLE 4 #define MPLIB_ALIGN_SPC_VLONG 4 #define MPLIB_ALIGN_SPC_PTR 4 #define MPLIB_STRUCT_PAD 4 #define MPLIB_ALIGN_SPD_CHAR 1 #define MPLIB_ALIGN_SPD_SHORT 2 #define MPLIB_ALIGN_SPD_INT 4 #define MPLIB_ALIGN_SPD_LONG 4 #define MPLIB_ALIGN_SPD_DOUBLE 4 #define MPLIB_ALIGN_SPD_VLONG 4 #define MPLIB_ALIGN_SPD_PTR 4 #endif /* #define STRUCT_PAD(n) (((n)+(MPLIB_STRUCT_PAD-1)) & ~(MPLIB_STRUCT_PAD-1)) */ #define STRUCT_PAD(n) (((n)+(MPLIB_STRUCT_PAD-1)) & ((MPLIB_STRUCT_PAD-1) ^ 0x7ffffff)) /* ------------------------------------------------------------------ structure ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ function definitions ------------------------------------------------------------------ */ #endif /* -- End of File -- */