home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_06_04 / v6n4051a.txt < prev    next >
Text File  |  1989-09-28  |  568b  |  26 lines

  1. /* these must change if the underlying
  2.    cell representation changes */
  3.  
  4. typedef int qele_type;
  5. #define qele_cpy(x,y) x=y
  6. #define qele_incr(x) x+=1
  7. #define q_NIL 0   
  8. #define EMPTY -99
  9. #define FULL -98
  10. #define NORMAL -97
  11.  
  12. /* these define the "public interface" to the 
  13.    operations legal on the cyclic buffer named "queue" */
  14.  
  15. extern qele_type q_get(void);
  16. extern qele_type q_put(qele_type);
  17. extern int q_free(void);
  18. extern int q_bsy(void);
  19.  
  20. /* these change if the queue length is
  21.    to change */
  22.  
  23. #define q_MAX 128
  24. #define q_WRAP q_MAX-1 
  25.  
  26.