home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume14 / sharedmem / part01 / src / cm_bytestuff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-05-17  |  372 b   |  10 lines

  1. /* cm_bytestuff.h - byte stuffing aids */
  2.  
  3. /* #byteadd is used to add offsets to structures */
  4. /*#define byteadd(a,b)    (((int)a) + ((int)b) + (((int)a) + (int)b) % 2)*/
  5. #define byteadd(a,b)    (align(((int)(a)) + ((int)(b))))
  6.  
  7. /* align converts rounds up addresses if they are odd */
  8. /* if this is not done, longword stores fail on the 68000 */
  9. #define align(x)    ((x) + (x)%2)
  10.