home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume20 / rc / part04 / nalloc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-05-22  |  323 b   |  12 lines

  1. extern Block *newblock(void);
  2. extern void *nalloc(SIZE_T);
  3. extern void nfree(void);
  4. extern void restoreblock(Block *);
  5.  
  6. #undef offsetof
  7. #define offsetof(t, m) ((SIZE_T) &((t *)0)->m)
  8.  
  9. /* memory allocation abbreviation */
  10. #define nnew(x) ((x *) nalloc(sizeof(x)))
  11. #define ncpy(x) (strcpy((char *) nalloc(strlen(x) + 1), x))
  12.