home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d500 / wiconify.lha / wIconify / wIconSetter.lzh / wIconSetter / Source / wMemory.h < prev    next >
C/C++ Source or Header  |  1991-04-19  |  371b  |  15 lines

  1. /*
  2.  *  Helpfull macros for memory allocation
  3.  */
  4.  
  5. #include <exec/memory.h>
  6.  
  7. #define MEMFLAGS    MEMF_CLEAR
  8.  
  9. #define NEWSTRUCT(s,p)  (p=(struct s *)AllocMem(sizeof(struct s),MEMFLAGS))
  10. #define FREESTRUCT(s,p) (FreeMem(p,sizeof(struct s)))
  11. #define NEWCHAR(p,n)    (p=(char *)AllocMem(n+1,MEMFLAGS))
  12. #define FREECHAR(p)     (FreeMem(p,strlen(p)+1))
  13.  
  14. extern APTR AllocMem();
  15.