home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / jove414s.zip / list.h < prev    next >
C/C++ Source or Header  |  1989-10-10  |  780b  |  25 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 char    *Element;
  11.  
  12. typedef struct cons    List;
  13.  
  14. struct cons {
  15.     Element    *car;
  16.     List    *cdr;
  17. };
  18.  
  19. #define list_next(lp)    ((lp)->cdr)
  20. #define list_data(lp)    ((lp)->car)
  21.  
  22. extern Element
  23.     *list_push proto((List **, Element *)),
  24.     *list_pop proto((List **));
  25.