home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / jove-4.16-src.tgz / tar.out / bsd / jove / list.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  734b  |  23 lines

  1. /************************************************************************
  2.  * This program is Copyright (C) 1986-1996 by Jonathan Payne.  JOVE is  *
  3.  * provided to you without charge, and with no warranty.  You may give  *
  4.  * away copies of JOVE, including sources, provided that this notice is *
  5.  * included in all the files.                                           *
  6.  ************************************************************************/
  7.  
  8. /* generic singly linked list package */
  9.  
  10. typedef struct cons    List;
  11.  
  12. struct cons {
  13.     UnivPtr    car;    /* pointer to element */
  14.     List    *cdr;
  15. };
  16.  
  17. #define list_next(lp)    ((lp)->cdr)
  18. #define list_data(lp)    ((lp)->car)
  19.  
  20. extern UnivPtr
  21.     list_push proto((List **, UnivPtr)),
  22.     list_pop proto((List **));
  23.