home *** CD-ROM | disk | FTP | other *** search
/ Atari FTP / ATARI_FTP_0693.zip / ATARI_FTP_0693 / Mint / Editors / mjovesrc.zoo / list.h < prev    next >
C/C++ Source or Header  |  1991-06-16  |  752b  |  23 lines

  1. /***************************************************************************
  2.  * This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne.  JOVE *
  3.  * is 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.