home *** CD-ROM | disk | FTP | other *** search
/ ftp.disi.unige.it / 2015-02-11.ftp.disi.unige.it.tar / ftp.disi.unige.it / pub / .person / CataniaB / teach-act / esempi / Comp-Sep / list.h < prev    next >
C/C++ Source or Header  |  1997-04-19  |  461b  |  20 lines

  1. #define ERROR -1
  2.  
  3. typedef  int bool; 
  4. typedef  int element;  /* assumiamo che siano solo > 0 */
  5.  
  6. typedef struct cell * list;
  7.  
  8. struct cell { element x,y; list next; };
  9.  
  10. typedef struct      { list head, tail; }  dlist;
  11.  
  12. void    init(dlist *);
  13. bool    is_empty(dlist *);
  14. void    first(element *,element *,dlist *);
  15. void    insert_head(element,element, dlist *);
  16. void    insert_tail(element,element, dlist *);
  17. void    delete_head(dlist *);
  18. void    print(dlist *);
  19.  
  20.