home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / inc&ad2.0 / includes / exec / initializers.h < prev    next >
C/C++ Source or Header  |  1992-09-01  |  853b  |  27 lines

  1. #ifndef    EXEC_INITIALIZERS_H
  2. #define    EXEC_INITIALIZERS_H
  3. /*
  4. **    $Filename: exec/initializers.h $
  5. **    $Release: 2.04 Includes, V37.4 $
  6. **    $Revision: 36.5 $
  7. **    $Date: 90/05/10 $
  8. **
  9. **    Macros for use with the InitStruct() function.
  10. **
  11. **    (C) Copyright 1985-1991 Commodore-Amiga, Inc.
  12. **        All Rights Reserved
  13. */
  14.  
  15. #define    OFFSET(structName, structEntry) \
  16.                 (&(((struct structName *) 0)->structEntry))
  17. #define    INITBYTE(offset,value)    0xe000,(UWORD) (offset),(UWORD) ((value)<<8)
  18. #define    INITWORD(offset,value)    0xd000,(UWORD) (offset),(UWORD) (value)
  19. #define    INITLONG(offset,value)    0xc000,(UWORD) (offset), \
  20.                 (UWORD) ((value)>>16), \
  21.                 (UWORD) ((value) & 0xffff)
  22. #define    INITSTRUCT(size,offset,value,count) \
  23.                 (UWORD) (0xc000|(size<<12)|(count<<8)| \
  24.                 ((UWORD) ((offset)>>16)), \
  25.                 ((UWORD) (offset)) & 0xffff)
  26. #endif /* EXEC_INITIALIZERS_H */
  27.