home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / exampleCode / opengl / GLUT / progs / demos / yacme / mallocbis.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-11  |  212 b   |  14 lines

  1.  
  2. #define newItem(item,list,type)\
  3.     if (list == NULL)\
  4.         item = (type *) malloc(sizeof(type));\
  5.     else\
  6.     {\
  7.         item = list;\
  8.         list = list->next;\
  9.     }
  10.  
  11. #define freeItem(item,list)\
  12.     item->next = list;\
  13.     list = item;
  14.